MetricKeyDataPoints.fromJson constructor

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

Implementation

factory MetricKeyDataPoints.fromJson(Map<String, dynamic> json) {
  return MetricKeyDataPoints(
    dataPoints: (json['DataPoints'] as List?)
        ?.whereNotNull()
        .map((e) => DataPoint.fromJson(e as Map<String, dynamic>))
        .toList(),
    key: json['Key'] != null
        ? ResponseResourceMetricKey.fromJson(
            json['Key'] as Map<String, dynamic>)
        : null,
  );
}