VolumeRecommendation.fromJson constructor
VolumeRecommendation.fromJson(
- Map<String, dynamic> json
)
Implementation
factory VolumeRecommendation.fromJson(Map<String, dynamic> json) {
return VolumeRecommendation(
accountId: json['accountId'] as String?,
currentConfiguration: json['currentConfiguration'] != null
? VolumeConfiguration.fromJson(
json['currentConfiguration'] as Map<String, dynamic>)
: null,
finding: (json['finding'] as String?)?.toEBSFinding(),
lastRefreshTimestamp: timeStampFromJson(json['lastRefreshTimestamp']),
lookBackPeriodInDays: json['lookBackPeriodInDays'] as double?,
utilizationMetrics: (json['utilizationMetrics'] as List?)
?.whereNotNull()
.map((e) => EBSUtilizationMetric.fromJson(e as Map<String, dynamic>))
.toList(),
volumeArn: json['volumeArn'] as String?,
volumeRecommendationOptions: (json['volumeRecommendationOptions']
as List?)
?.whereNotNull()
.map((e) =>
VolumeRecommendationOption.fromJson(e as Map<String, dynamic>))
.toList(),
);
}