ReservedElasticsearchInstance.fromJson constructor
ReservedElasticsearchInstance.fromJson(
- Map<String, dynamic> json
)
Implementation
factory ReservedElasticsearchInstance.fromJson(Map<String, dynamic> json) {
return ReservedElasticsearchInstance(
currencyCode: json['CurrencyCode'] as String?,
duration: json['Duration'] as int?,
elasticsearchInstanceCount: json['ElasticsearchInstanceCount'] as int?,
elasticsearchInstanceType: (json['ElasticsearchInstanceType'] as String?)
?.toESPartitionInstanceType(),
fixedPrice: json['FixedPrice'] as double?,
paymentOption: (json['PaymentOption'] as String?)
?.toReservedElasticsearchInstancePaymentOption(),
recurringCharges: (json['RecurringCharges'] as List?)
?.whereNotNull()
.map((e) => RecurringCharge.fromJson(e as Map<String, dynamic>))
.toList(),
reservationName: json['ReservationName'] as String?,
reservedElasticsearchInstanceId:
json['ReservedElasticsearchInstanceId'] as String?,
reservedElasticsearchInstanceOfferingId:
json['ReservedElasticsearchInstanceOfferingId'] as String?,
startTime: timeStampFromJson(json['StartTime']),
state: json['State'] as String?,
usagePrice: json['UsagePrice'] as double?,
);
}