ReservedInstanceOffering.fromJson constructor
ReservedInstanceOffering.fromJson(
- Map<String, dynamic> json
)
Implementation
factory ReservedInstanceOffering.fromJson(Map<String, dynamic> json) {
return ReservedInstanceOffering(
currencyCode: json['CurrencyCode'] as String?,
duration: json['Duration'] as int?,
fixedPrice: json['FixedPrice'] as double?,
instanceType: (json['InstanceType'] as String?)
?.toOpenSearchPartitionInstanceType(),
paymentOption:
(json['PaymentOption'] as String?)?.toReservedInstancePaymentOption(),
recurringCharges: (json['RecurringCharges'] as List?)
?.whereNotNull()
.map((e) => RecurringCharge.fromJson(e as Map<String, dynamic>))
.toList(),
reservedInstanceOfferingId: json['ReservedInstanceOfferingId'] as String?,
usagePrice: json['UsagePrice'] as double?,
);
}