Subnetwork.fromJson constructor
Subnetwork.fromJson(
- Object? j
Implementation
factory Subnetwork.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return Subnetwork(
allowSubnetCidrRoutesOverlap:
switch (json['allowSubnetCidrRoutesOverlap']) {
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),
},
enableFlowLogs: switch (json['enableFlowLogs']) {
null => null,
Object $1 => decodeBool($1),
},
externalIpv6Prefix: switch (json['externalIpv6Prefix']) {
null => null,
Object $1 => decodeString($1),
},
fingerprint: switch (json['fingerprint']) {
null => null,
Object $1 => decodeString($1),
},
gatewayAddress: switch (json['gatewayAddress']) {
null => null,
Object $1 => decodeString($1),
},
id: switch (json['id']) {
null => null,
Object $1 => decodeUint64($1),
},
internalIpv6Prefix: switch (json['internalIpv6Prefix']) {
null => null,
Object $1 => decodeString($1),
},
ipCidrRange: switch (json['ipCidrRange']) {
null => null,
Object $1 => decodeString($1),
},
ipCollection: switch (json['ipCollection']) {
null => null,
Object $1 => decodeString($1),
},
ipv6AccessType: switch (json['ipv6AccessType']) {
null => null,
Object $1 => decodeString($1),
},
ipv6CidrRange: switch (json['ipv6CidrRange']) {
null => null,
Object $1 => decodeString($1),
},
ipv6GceEndpoint: switch (json['ipv6GceEndpoint']) {
null => null,
Object $1 => decodeString($1),
},
kind: switch (json['kind']) {
null => null,
Object $1 => decodeString($1),
},
logConfig: switch (json['logConfig']) {
null => null,
Object $1 => SubnetworkLogConfig.fromJson($1),
},
name: switch (json['name']) {
null => null,
Object $1 => decodeString($1),
},
network: switch (json['network']) {
null => null,
Object $1 => decodeString($1),
},
params: switch (json['params']) {
null => null,
Object $1 => SubnetworkParams.fromJson($1),
},
privateIpGoogleAccess: switch (json['privateIpGoogleAccess']) {
null => null,
Object $1 => decodeBool($1),
},
privateIpv6GoogleAccess: switch (json['privateIpv6GoogleAccess']) {
null => null,
Object $1 => decodeString($1),
},
purpose: switch (json['purpose']) {
null => null,
Object $1 => decodeString($1),
},
region: switch (json['region']) {
null => null,
Object $1 => decodeString($1),
},
reservedInternalRange: switch (json['reservedInternalRange']) {
null => null,
Object $1 => decodeString($1),
},
resolveSubnetMask: switch (json['resolveSubnetMask']) {
null => null,
Object $1 => decodeString($1),
},
role: switch (json['role']) {
null => null,
Object $1 => decodeString($1),
},
secondaryIpRanges: switch (json['secondaryIpRanges']) {
null => [],
List<Object?> $1 => [
for (final i in $1) SubnetworkSecondaryRange.fromJson(i),
],
_ => throw const FormatException('"secondaryIpRanges" is not a list'),
},
selfLink: switch (json['selfLink']) {
null => null,
Object $1 => decodeString($1),
},
stackType: switch (json['stackType']) {
null => null,
Object $1 => decodeString($1),
},
state: switch (json['state']) {
null => null,
Object $1 => decodeString($1),
},
systemReservedExternalIpv6Ranges:
switch (json['systemReservedExternalIpv6Ranges']) {
null => [],
List<Object?> $1 => [for (final i in $1) decodeString(i)],
_ => throw const FormatException(
'"systemReservedExternalIpv6Ranges" is not a list',
),
},
systemReservedInternalIpv6Ranges:
switch (json['systemReservedInternalIpv6Ranges']) {
null => [],
List<Object?> $1 => [for (final i in $1) decodeString(i)],
_ => throw const FormatException(
'"systemReservedInternalIpv6Ranges" is not a list',
),
},
utilizationDetails: switch (json['utilizationDetails']) {
null => null,
Object $1 => SubnetworkUtilizationDetails.fromJson($1),
},
);
}