toJson method

  1. @override
Object toJson()
override

Implementation

@override
Object toJson() => {
  if (score.isNotDefault) 'score': encodeDouble(score),
  if (statsUri.isNotDefault) 'statsUri': statsUri,
  if (anomalyUri.isNotDefault) 'anomalyUri': anomalyUri,
  if (distributionDeviation.isNotDefault)
    'distributionDeviation': encodeDouble(distributionDeviation),
  if (anomalyDetectionThreshold.isNotDefault)
    'anomalyDetectionThreshold': encodeDouble(anomalyDetectionThreshold),
  if (startTime != null) 'startTime': startTime!.toJson(),
  if (endTime != null) 'endTime': endTime!.toJson(),
};