toJson method
Implementation
Map<String, dynamic> toJson() {
final metricName = this.metricName;
final counts = this.counts;
final dimensions = this.dimensions;
final statisticValues = this.statisticValues;
final storageResolution = this.storageResolution;
final timestamp = this.timestamp;
final unit = this.unit;
final value = this.value;
final values = this.values;
return {
'MetricName': metricName,
if (counts != null) 'Counts': counts,
if (dimensions != null) 'Dimensions': dimensions,
if (statisticValues != null) 'StatisticValues': statisticValues,
if (storageResolution != null) 'StorageResolution': storageResolution,
if (timestamp != null) 'Timestamp': iso8601ToJson(timestamp),
if (unit != null) 'Unit': unit.toValue(),
if (value != null) 'Value': value,
if (values != null) 'Values': values,
};
}