ReleasePackerCommandGCS.fromJson constructor

ReleasePackerCommandGCS.fromJson(
  1. Map json
)

Implementation

factory ReleasePackerCommandGCS.fromJson(Map json) {
  var map = json.asJsonMap;

  var project =
      map.get<String>('project') ?? (throw ArgumentError.notNull('project'));
  var bucket =
      map.get<String>('bucket') ?? (throw ArgumentError.notNull('bucket'));
  var credential =
      map.get('credential') ?? (throw ArgumentError.notNull('credential'));

  var parameters = map.get<Map>('parameters');
  var body = map.get('body');

  return ReleasePackerCommandGCS(project, bucket,
      credential: credential, parameters: parameters?.asJsonMap, body: body);
}