Reservation.fromJson constructor
Reservation.fromJson(
- Map<String, dynamic> json
)
Implementation
factory Reservation.fromJson(Map<String, dynamic> json) {
return Reservation(
arn: json['arn'] as String?,
count: json['count'] as int?,
currencyCode: json['currencyCode'] as String?,
duration: json['duration'] as int?,
durationUnits:
(json['durationUnits'] as String?)?.toOfferingDurationUnits(),
end: json['end'] as String?,
fixedPrice: json['fixedPrice'] as double?,
name: json['name'] as String?,
offeringDescription: json['offeringDescription'] as String?,
offeringId: json['offeringId'] as String?,
offeringType: (json['offeringType'] as String?)?.toOfferingType(),
region: json['region'] as String?,
reservationId: json['reservationId'] as String?,
resourceSpecification: json['resourceSpecification'] != null
? ReservationResourceSpecification.fromJson(
json['resourceSpecification'] as Map<String, dynamic>)
: null,
start: json['start'] as String?,
state: (json['state'] as String?)?.toReservationState(),
tags: (json['tags'] as Map<String, dynamic>?)
?.map((k, e) => MapEntry(k, e as String)),
usagePrice: json['usagePrice'] as double?,
);
}