toJson method
Implementation
Map<String, dynamic> toJson() {
final metricName = this.metricName;
final namespace = this.namespace;
final statistic = this.statistic;
final dimensions = this.dimensions;
final unit = this.unit;
return {
'MetricName': metricName,
'Namespace': namespace,
'Statistic': statistic.toValue(),
if (dimensions != null) 'Dimensions': dimensions,
if (unit != null) 'Unit': unit,
};
}