GetRightsizingRecommendationResponse.fromJson constructor

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

Implementation

factory GetRightsizingRecommendationResponse.fromJson(
    Map<String, dynamic> json) {
  return GetRightsizingRecommendationResponse(
    configuration: json['Configuration'] != null
        ? RightsizingRecommendationConfiguration.fromJson(
            json['Configuration'] as Map<String, dynamic>)
        : null,
    metadata: json['Metadata'] != null
        ? RightsizingRecommendationMetadata.fromJson(
            json['Metadata'] as Map<String, dynamic>)
        : null,
    nextPageToken: json['NextPageToken'] as String?,
    rightsizingRecommendations: (json['RightsizingRecommendations'] as List?)
        ?.whereNotNull()
        .map((e) =>
            RightsizingRecommendation.fromJson(e as Map<String, dynamic>))
        .toList(),
    summary: json['Summary'] != null
        ? RightsizingRecommendationSummary.fromJson(
            json['Summary'] as Map<String, dynamic>)
        : null,
  );
}