CurrentInstance.fromJson constructor
CurrentInstance.fromJson(
- Map<String, dynamic> json
)
Implementation
factory CurrentInstance.fromJson(Map<String, dynamic> json) {
return CurrentInstance(
currencyCode: json['CurrencyCode'] as String?,
instanceName: json['InstanceName'] as String?,
monthlyCost: json['MonthlyCost'] as String?,
onDemandHoursInLookbackPeriod:
json['OnDemandHoursInLookbackPeriod'] as String?,
reservationCoveredHoursInLookbackPeriod:
json['ReservationCoveredHoursInLookbackPeriod'] as String?,
resourceDetails: json['ResourceDetails'] != null
? ResourceDetails.fromJson(
json['ResourceDetails'] as Map<String, dynamic>)
: null,
resourceId: json['ResourceId'] as String?,
resourceUtilization: json['ResourceUtilization'] != null
? ResourceUtilization.fromJson(
json['ResourceUtilization'] as Map<String, dynamic>)
: null,
savingsPlansCoveredHoursInLookbackPeriod:
json['SavingsPlansCoveredHoursInLookbackPeriod'] as String?,
tags: (json['Tags'] as List?)
?.whereNotNull()
.map((e) => TagValues.fromJson(e as Map<String, dynamic>))
.toList(),
totalRunningHoursInLookbackPeriod:
json['TotalRunningHoursInLookbackPeriod'] as String?,
);
}