GetCostForecastResponse.fromJson constructor

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

Implementation

factory GetCostForecastResponse.fromJson(Map<String, dynamic> json) {
  return GetCostForecastResponse(
    forecastResultsByTime: (json['ForecastResultsByTime'] as List?)
        ?.whereNotNull()
        .map((e) => ForecastResult.fromJson(e as Map<String, dynamic>))
        .toList(),
    total: json['Total'] != null
        ? MetricValue.fromJson(json['Total'] as Map<String, dynamic>)
        : null,
  );
}