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