toJson method
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 case final startTime?) 'startTime': startTime.toJson(),
if (endTime case final endTime?) 'endTime': endTime.toJson(),
};