Network.fromJson constructor
Network.fromJson(
- Object? j
Implementation
factory Network.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return Network(
iPv4Range: switch (json['IPv4Range']) {
null => null,
Object $1 => decodeString($1),
},
autoCreateSubnetworks: switch (json['autoCreateSubnetworks']) {
null => null,
Object $1 => decodeBool($1),
},
creationTimestamp: switch (json['creationTimestamp']) {
null => null,
Object $1 => decodeString($1),
},
description: switch (json['description']) {
null => null,
Object $1 => decodeString($1),
},
enableUlaInternalIpv6: switch (json['enableUlaInternalIpv6']) {
null => null,
Object $1 => decodeBool($1),
},
firewallPolicy: switch (json['firewallPolicy']) {
null => null,
Object $1 => decodeString($1),
},
gatewayIPv4: switch (json['gatewayIPv4']) {
null => null,
Object $1 => decodeString($1),
},
id: switch (json['id']) {
null => null,
Object $1 => decodeUint64($1),
},
internalIpv6Range: switch (json['internalIpv6Range']) {
null => null,
Object $1 => decodeString($1),
},
kind: switch (json['kind']) {
null => null,
Object $1 => decodeString($1),
},
mtu: switch (json['mtu']) {
null => null,
Object $1 => decodeInt($1),
},
name: switch (json['name']) {
null => null,
Object $1 => decodeString($1),
},
networkFirewallPolicyEnforcementOrder:
switch (json['networkFirewallPolicyEnforcementOrder']) {
null => null,
Object $1 => decodeString($1),
},
networkProfile: switch (json['networkProfile']) {
null => null,
Object $1 => decodeString($1),
},
params: switch (json['params']) {
null => null,
Object $1 => NetworkParams.fromJson($1),
},
peerings: switch (json['peerings']) {
null => [],
List<Object?> $1 => [for (final i in $1) NetworkPeering.fromJson(i)],
_ => throw const FormatException('"peerings" is not a list'),
},
routingConfig: switch (json['routingConfig']) {
null => null,
Object $1 => NetworkRoutingConfig.fromJson($1),
},
selfLink: switch (json['selfLink']) {
null => null,
Object $1 => decodeString($1),
},
selfLinkWithId: switch (json['selfLinkWithId']) {
null => null,
Object $1 => decodeString($1),
},
subnetworks: switch (json['subnetworks']) {
null => [],
List<Object?> $1 => [for (final i in $1) decodeString(i)],
_ => throw const FormatException('"subnetworks" is not a list'),
},
);
}