Reservation.fromJson constructor

Reservation.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory Reservation.fromJson(Map<String, dynamic> json) {
  return Reservation(
    currencyCode: json['currencyCode'] as String,
    duration: json['duration'] as int,
    durationUnits: (json['durationUnits'] as String).toDurationUnits(),
    end: json['end'] as String,
    offeringArn: json['offeringArn'] as String,
    offeringDescription: json['offeringDescription'] as String,
    pricePerUnit: json['pricePerUnit'] as String,
    priceUnits: (json['priceUnits'] as String).toPriceUnits(),
    reservationArn: json['reservationArn'] as String,
    reservationName: json['reservationName'] as String,
    reservationState:
        (json['reservationState'] as String).toReservationState(),
    resourceSpecification: ResourceSpecification.fromJson(
        json['resourceSpecification'] as Map<String, dynamic>),
    start: json['start'] as String,
  );
}