ReservationSubBlock.fromJson constructor

ReservationSubBlock.fromJson(
  1. Object? j
)

Implementation

factory ReservationSubBlock.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return ReservationSubBlock(
    acceleratorTopologiesInfo: switch (json['acceleratorTopologiesInfo']) {
      null => null,
      Object $1 => AcceleratorTopologiesInfo.fromJson($1),
    },
    count: switch (json['count']) {
      null => null,
      Object $1 => decodeInt($1),
    },
    creationTimestamp: switch (json['creationTimestamp']) {
      null => null,
      Object $1 => decodeString($1),
    },
    healthInfo: switch (json['healthInfo']) {
      null => null,
      Object $1 => ReservationSubBlockHealthInfo.fromJson($1),
    },
    id: switch (json['id']) {
      null => null,
      Object $1 => decodeUint64($1),
    },
    inUseCount: switch (json['inUseCount']) {
      null => null,
      Object $1 => decodeInt($1),
    },
    inUseHostCount: switch (json['inUseHostCount']) {
      null => null,
      Object $1 => decodeInt($1),
    },
    kind: switch (json['kind']) {
      null => null,
      Object $1 => decodeString($1),
    },
    name: switch (json['name']) {
      null => null,
      Object $1 => decodeString($1),
    },
    physicalTopology: switch (json['physicalTopology']) {
      null => null,
      Object $1 => ReservationSubBlockPhysicalTopology.fromJson($1),
    },
    reservationSubBlockMaintenance:
        switch (json['reservationSubBlockMaintenance']) {
          null => null,
          Object $1 => GroupMaintenanceInfo.fromJson($1),
        },
    selfLink: switch (json['selfLink']) {
      null => null,
      Object $1 => decodeString($1),
    },
    selfLinkWithId: switch (json['selfLinkWithId']) {
      null => null,
      Object $1 => decodeString($1),
    },
    status: switch (json['status']) {
      null => null,
      Object $1 => decodeString($1),
    },
    zone: switch (json['zone']) {
      null => null,
      Object $1 => decodeString($1),
    },
  );
}