AutoScalingGroupRecommendation.fromJson constructor
AutoScalingGroupRecommendation.fromJson(
- Map<String, dynamic> json
)
Implementation
factory AutoScalingGroupRecommendation.fromJson(Map<String, dynamic> json) {
return AutoScalingGroupRecommendation(
accountId: json['accountId'] as String?,
autoScalingGroupArn: json['autoScalingGroupArn'] as String?,
autoScalingGroupName: json['autoScalingGroupName'] as String?,
currentConfiguration: json['currentConfiguration'] != null
? AutoScalingGroupConfiguration.fromJson(
json['currentConfiguration'] as Map<String, dynamic>)
: null,
finding: (json['finding'] as String?)?.toFinding(),
lastRefreshTimestamp: timeStampFromJson(json['lastRefreshTimestamp']),
lookBackPeriodInDays: json['lookBackPeriodInDays'] as double?,
recommendationOptions: (json['recommendationOptions'] as List?)
?.whereNotNull()
.map((e) => AutoScalingGroupRecommendationOption.fromJson(
e as Map<String, dynamic>))
.toList(),
utilizationMetrics: (json['utilizationMetrics'] as List?)
?.whereNotNull()
.map((e) => UtilizationMetric.fromJson(e as Map<String, dynamic>))
.toList(),
);
}