FutureReservation.fromJson constructor

FutureReservation.fromJson(
  1. Object? j
)

Implementation

factory FutureReservation.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return FutureReservation(
    aggregateReservation: switch (json['aggregateReservation']) {
      null => null,
      Object $1 => AllocationAggregateReservation.fromJson($1),
    },
    autoCreatedReservationsDeleteTime:
        switch (json['autoCreatedReservationsDeleteTime']) {
          null => null,
          Object $1 => decodeString($1),
        },
    autoCreatedReservationsDuration:
        switch (json['autoCreatedReservationsDuration']) {
          null => null,
          Object $1 => Duration.fromJson($1),
        },
    autoDeleteAutoCreatedReservations:
        switch (json['autoDeleteAutoCreatedReservations']) {
          null => null,
          Object $1 => decodeBool($1),
        },
    commitmentInfo: switch (json['commitmentInfo']) {
      null => null,
      Object $1 => FutureReservationCommitmentInfo.fromJson($1),
    },
    confidentialComputeType: switch (json['confidentialComputeType']) {
      null => null,
      Object $1 => decodeString($1),
    },
    creationTimestamp: switch (json['creationTimestamp']) {
      null => null,
      Object $1 => decodeString($1),
    },
    deploymentType: switch (json['deploymentType']) {
      null => null,
      Object $1 => decodeString($1),
    },
    description: switch (json['description']) {
      null => null,
      Object $1 => decodeString($1),
    },
    enableEmergentMaintenance: switch (json['enableEmergentMaintenance']) {
      null => null,
      Object $1 => decodeBool($1),
    },
    id: switch (json['id']) {
      null => null,
      Object $1 => decodeUint64($1),
    },
    kind: switch (json['kind']) {
      null => null,
      Object $1 => decodeString($1),
    },
    name: switch (json['name']) {
      null => null,
      Object $1 => decodeString($1),
    },
    namePrefix: switch (json['namePrefix']) {
      null => null,
      Object $1 => decodeString($1),
    },
    params: switch (json['params']) {
      null => null,
      Object $1 => FutureReservationParams.fromJson($1),
    },
    planningStatus: switch (json['planningStatus']) {
      null => null,
      Object $1 => decodeString($1),
    },
    reservationMode: switch (json['reservationMode']) {
      null => null,
      Object $1 => decodeString($1),
    },
    reservationName: switch (json['reservationName']) {
      null => null,
      Object $1 => decodeString($1),
    },
    schedulingType: switch (json['schedulingType']) {
      null => null,
      Object $1 => decodeString($1),
    },
    selfLink: switch (json['selfLink']) {
      null => null,
      Object $1 => decodeString($1),
    },
    selfLinkWithId: switch (json['selfLinkWithId']) {
      null => null,
      Object $1 => decodeString($1),
    },
    shareSettings: switch (json['shareSettings']) {
      null => null,
      Object $1 => ShareSettings.fromJson($1),
    },
    specificReservationRequired:
        switch (json['specificReservationRequired']) {
          null => null,
          Object $1 => decodeBool($1),
        },
    specificSkuProperties: switch (json['specificSkuProperties']) {
      null => null,
      Object $1 => FutureReservationSpecificSkuproperties.fromJson($1),
    },
    status: switch (json['status']) {
      null => null,
      Object $1 => FutureReservationStatus.fromJson($1),
    },
    timeWindow: switch (json['timeWindow']) {
      null => null,
      Object $1 => FutureReservationTimeWindow.fromJson($1),
    },
    zone: switch (json['zone']) {
      null => null,
      Object $1 => decodeString($1),
    },
  );
}