InstanceGroup.fromJson constructor
InstanceGroup.fromJson(
- Object? j
Implementation
factory InstanceGroup.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return InstanceGroup(
creationTimestamp: switch (json['creationTimestamp']) {
null => null,
Object $1 => decodeString($1),
},
description: switch (json['description']) {
null => null,
Object $1 => decodeString($1),
},
fingerprint: switch (json['fingerprint']) {
null => null,
Object $1 => decodeString($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),
},
namedPorts: switch (json['namedPorts']) {
null => [],
List<Object?> $1 => [for (final i in $1) NamedPort.fromJson(i)],
_ => throw const FormatException('"namedPorts" is not a list'),
},
network: switch (json['network']) {
null => null,
Object $1 => decodeString($1),
},
region: switch (json['region']) {
null => null,
Object $1 => decodeString($1),
},
selfLink: switch (json['selfLink']) {
null => null,
Object $1 => decodeString($1),
},
size: switch (json['size']) {
null => null,
Object $1 => decodeInt($1),
},
subnetwork: switch (json['subnetwork']) {
null => null,
Object $1 => decodeString($1),
},
zone: switch (json['zone']) {
null => null,
Object $1 => decodeString($1),
},
);
}