CustomizedScalingMetricSpecification.fromJson constructor

CustomizedScalingMetricSpecification.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory CustomizedScalingMetricSpecification.fromJson(
    Map<String, dynamic> json) {
  return CustomizedScalingMetricSpecification(
    metricName: json['MetricName'] as String,
    namespace: json['Namespace'] as String,
    statistic: (json['Statistic'] as String).toMetricStatistic(),
    dimensions: (json['Dimensions'] as List?)
        ?.whereNotNull()
        .map((e) => MetricDimension.fromJson(e as Map<String, dynamic>))
        .toList(),
    unit: json['Unit'] as String?,
  );
}