toJson method

  1. @override
Object toJson()
override

Implementation

@override
Object toJson() => {
  if (currentStats case final currentStats?)
    'currentStats': currentStats.toJson(),
  if (baselineStats case final baselineStats?)
    'baselineStats': baselineStats.toJson(),
  if (thresholdValue.isNotDefault)
    'thresholdValue': encodeDouble(thresholdValue),
  if (hasAnomaly.isNotDefault) 'hasAnomaly': hasAnomaly,
  if (modelMonitoringJob.isNotDefault)
    'modelMonitoringJob': modelMonitoringJob,
  if (schedule.isNotDefault) 'schedule': schedule,
  if (createTime case final createTime?) 'createTime': createTime.toJson(),
  if (algorithm.isNotDefault) 'algorithm': algorithm,
};