ReservationBlock.fromJson constructor
ReservationBlock.fromJson(
- Object? j
Implementation
factory ReservationBlock.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return ReservationBlock(
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 => ReservationBlockHealthInfo.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 => ReservationBlockPhysicalTopology.fromJson($1),
},
reservationMaintenance: switch (json['reservationMaintenance']) {
null => null,
Object $1 => GroupMaintenanceInfo.fromJson($1),
},
reservationSubBlockCount: switch (json['reservationSubBlockCount']) {
null => null,
Object $1 => decodeInt($1),
},
reservationSubBlockInUseCount:
switch (json['reservationSubBlockInUseCount']) {
null => null,
Object $1 => decodeInt($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),
},
);
}