GetCostAndUsageResponse.fromJson constructor

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

Implementation

factory GetCostAndUsageResponse.fromJson(Map<String, dynamic> json) {
  return GetCostAndUsageResponse(
    groupDefinitions: (json['GroupDefinitions'] as List?)
        ?.whereNotNull()
        .map((e) => GroupDefinition.fromJson(e as Map<String, dynamic>))
        .toList(),
    nextPageToken: json['NextPageToken'] as String?,
    resultsByTime: (json['ResultsByTime'] as List?)
        ?.whereNotNull()
        .map((e) => ResultByTime.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}