DataLabelingJob.fromJson constructor

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

Implementation

factory DataLabelingJob.fromJson(Map<String, dynamic> json) {
  return DataLabelingJob(
    name: json['name'] ?? '',
    displayName: json['displayName'] ?? '',
    datasets: decodeList(json['datasets']) ?? [],
    annotationLabels: decodeMap(json['annotationLabels']) ?? {},
    labelerCount: json['labelerCount'] ?? 0,
    instructionUri: json['instructionUri'] ?? '',
    inputsSchemaUri: json['inputsSchemaUri'] ?? '',
    inputs: decodeCustom(json['inputs'], protobuf.Value.fromJson),
    state: decodeEnum(json['state'], JobState.fromJson) ?? JobState.$default,
    labelingProgress: json['labelingProgress'] ?? 0,
    currentSpend: decode(json['currentSpend'], Money.fromJson),
    createTime: decodeCustom(json['createTime'], protobuf.Timestamp.fromJson),
    updateTime: decodeCustom(json['updateTime'], protobuf.Timestamp.fromJson),
    error: decode(json['error'], Status.fromJson),
    labels: decodeMap(json['labels']) ?? {},
    specialistPools: decodeList(json['specialistPools']) ?? [],
    encryptionSpec: decode(json['encryptionSpec'], EncryptionSpec.fromJson),
    activeLearningConfig: decode(
      json['activeLearningConfig'],
      ActiveLearningConfig.fromJson,
    ),
  );
}