CustomJob.fromJson constructor

CustomJob.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory CustomJob.fromJson(Map<String, dynamic> json) {
  return CustomJob(
    name: json['name'] ?? '',
    displayName: json['displayName'] ?? '',
    jobSpec: decode(json['jobSpec'], CustomJobSpec.fromJson),
    state: decodeEnum(json['state'], JobState.fromJson) ?? JobState.$default,
    createTime: decodeCustom(json['createTime'], protobuf.Timestamp.fromJson),
    startTime: decodeCustom(json['startTime'], protobuf.Timestamp.fromJson),
    endTime: decodeCustom(json['endTime'], protobuf.Timestamp.fromJson),
    updateTime: decodeCustom(json['updateTime'], protobuf.Timestamp.fromJson),
    error: decode(json['error'], Status.fromJson),
    labels: decodeMap(json['labels']) ?? {},
    encryptionSpec: decode(json['encryptionSpec'], EncryptionSpec.fromJson),
    webAccessUris: decodeMap(json['webAccessUris']) ?? {},
    satisfiesPzs: json['satisfiesPzs'] ?? false,
    satisfiesPzi: json['satisfiesPzi'] ?? false,
  );
}