NetworkEndpointGroup.fromJson constructor
NetworkEndpointGroup.fromJson(
- Object? j
Implementation
factory NetworkEndpointGroup.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return NetworkEndpointGroup(
annotations: switch (json['annotations']) {
null => {},
Map<String, Object?> $1 => {
for (final e in $1.entries)
decodeString(e.key): decodeString(e.value),
},
_ => throw const FormatException('"annotations" is not an object'),
},
appEngine: switch (json['appEngine']) {
null => null,
Object $1 => NetworkEndpointGroupAppEngine.fromJson($1),
},
cloudFunction: switch (json['cloudFunction']) {
null => null,
Object $1 => NetworkEndpointGroupCloudFunction.fromJson($1),
},
cloudRun: switch (json['cloudRun']) {
null => null,
Object $1 => NetworkEndpointGroupCloudRun.fromJson($1),
},
creationTimestamp: switch (json['creationTimestamp']) {
null => null,
Object $1 => decodeString($1),
},
defaultPort: switch (json['defaultPort']) {
null => null,
Object $1 => decodeInt($1),
},
description: switch (json['description']) {
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),
},
network: switch (json['network']) {
null => null,
Object $1 => decodeString($1),
},
networkEndpointType: switch (json['networkEndpointType']) {
null => null,
Object $1 => decodeString($1),
},
pscData: switch (json['pscData']) {
null => null,
Object $1 => NetworkEndpointGroupPscData.fromJson($1),
},
pscTargetService: switch (json['pscTargetService']) {
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),
},
);
}