toJson method

  1. @override
Object toJson()

Implementation

@override
Object toJson() => {
  if (name.isNotDefault) 'name': name,
  'displayName': displayName,
  'datasets': datasets,
  if (annotationLabels.isNotDefault) 'annotationLabels': annotationLabels,
  'labelerCount': labelerCount,
  'instructionUri': instructionUri,
  'inputsSchemaUri': inputsSchemaUri,
  if (inputs case final $1?) 'inputs': $1.toJson(),
  if (state.isNotDefault) 'state': state.toJson(),
  if (labelingProgress.isNotDefault) 'labelingProgress': labelingProgress,
  'currentSpend': ?currentSpend?.toJson(),
  'createTime': ?createTime?.toJson(),
  'updateTime': ?updateTime?.toJson(),
  'error': ?error?.toJson(),
  if (labels.isNotDefault) 'labels': labels,
  if (specialistPools.isNotDefault) 'specialistPools': specialistPools,
  'encryptionSpec': ?encryptionSpec?.toJson(),
  'activeLearningConfig': ?activeLearningConfig?.toJson(),
};