toJson method

  1. @override
Object toJson()
override

Implementation

@override
Object toJson() => {
  if (name.isNotDefault) 'name': name,
  'displayName': displayName,
  'endpoint': endpoint,
  if (state.isNotDefault) 'state': state.toJson(),
  if (scheduleState.isNotDefault) 'scheduleState': scheduleState.toJson(),
  if (latestMonitoringPipelineMetadata != null)
    'latestMonitoringPipelineMetadata': latestMonitoringPipelineMetadata!
        .toJson(),
  'modelDeploymentMonitoringObjectiveConfigs': encodeList(
    modelDeploymentMonitoringObjectiveConfigs,
  ),
  if (modelDeploymentMonitoringScheduleConfig != null)
    'modelDeploymentMonitoringScheduleConfig':
        modelDeploymentMonitoringScheduleConfig!.toJson(),
  if (loggingSamplingStrategy != null)
    'loggingSamplingStrategy': loggingSamplingStrategy!.toJson(),
  if (modelMonitoringAlertConfig != null)
    'modelMonitoringAlertConfig': modelMonitoringAlertConfig!.toJson(),
  if (predictInstanceSchemaUri.isNotDefault)
    'predictInstanceSchemaUri': predictInstanceSchemaUri,
  if (samplePredictInstance != null)
    'samplePredictInstance': samplePredictInstance!.toJson(),
  if (analysisInstanceSchemaUri.isNotDefault)
    'analysisInstanceSchemaUri': analysisInstanceSchemaUri,
  if (bigqueryTables.isNotDefault)
    'bigqueryTables': encodeList(bigqueryTables),
  if (logTtl != null) 'logTtl': logTtl!.toJson(),
  if (labels.isNotDefault) 'labels': labels,
  if (createTime != null) 'createTime': createTime!.toJson(),
  if (updateTime != null) 'updateTime': updateTime!.toJson(),
  if (nextScheduleTime != null)
    'nextScheduleTime': nextScheduleTime!.toJson(),
  if (statsAnomaliesBaseDirectory != null)
    'statsAnomaliesBaseDirectory': statsAnomaliesBaseDirectory!.toJson(),
  if (encryptionSpec != null) 'encryptionSpec': encryptionSpec!.toJson(),
  if (enableMonitoringPipelineLogs.isNotDefault)
    'enableMonitoringPipelineLogs': enableMonitoringPipelineLogs,
  if (error != null) 'error': error!.toJson(),
  if (satisfiesPzs.isNotDefault) 'satisfiesPzs': satisfiesPzs,
  if (satisfiesPzi.isNotDefault) 'satisfiesPzi': satisfiesPzi,
};