NetworkProfileNetworkFeatures.fromJson constructor
NetworkProfileNetworkFeatures.fromJson(
- Object? j
Implementation
factory NetworkProfileNetworkFeatures.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return NetworkProfileNetworkFeatures(
addressPurposes: switch (json['addressPurposes']) {
null => [],
List<Object?> $1 => [for (final i in $1) decodeString(i)],
_ => throw const FormatException('"addressPurposes" is not a list'),
},
allowAddressCreation: switch (json['allowAddressCreation']) {
null => null,
Object $1 => decodeString($1),
},
allowAliasIpRanges: switch (json['allowAliasIpRanges']) {
null => null,
Object $1 => decodeString($1),
},
allowAutoModeSubnet: switch (json['allowAutoModeSubnet']) {
null => null,
Object $1 => decodeString($1),
},
allowClassDFirewalls: switch (json['allowClassDFirewalls']) {
null => null,
Object $1 => decodeString($1),
},
allowCloudNat: switch (json['allowCloudNat']) {
null => null,
Object $1 => decodeString($1),
},
allowCloudRouter: switch (json['allowCloudRouter']) {
null => null,
Object $1 => decodeString($1),
},
allowDefaultNicAttachment: switch (json['allowDefaultNicAttachment']) {
null => null,
Object $1 => decodeString($1),
},
allowExternalIpAccess: switch (json['allowExternalIpAccess']) {
null => null,
Object $1 => decodeString($1),
},
allowFirewallPolicy: switch (json['allowFirewallPolicy']) {
null => null,
Object $1 => decodeString($1),
},
allowInterconnect: switch (json['allowInterconnect']) {
null => null,
Object $1 => decodeString($1),
},
allowIpForwarding: switch (json['allowIpForwarding']) {
null => null,
Object $1 => decodeString($1),
},
allowLoadBalancing: switch (json['allowLoadBalancing']) {
null => null,
Object $1 => decodeString($1),
},
allowMultiNicInSameNetwork: switch (json['allowMultiNicInSameNetwork']) {
null => null,
Object $1 => decodeString($1),
},
allowMultiNicInSameSubnetwork:
switch (json['allowMultiNicInSameSubnetwork']) {
null => null,
Object $1 => decodeString($1),
},
allowMulticast: switch (json['allowMulticast']) {
null => null,
Object $1 => decodeString($1),
},
allowNcc: switch (json['allowNcc']) {
null => null,
Object $1 => decodeString($1),
},
allowNetworkMigration: switch (json['allowNetworkMigration']) {
null => null,
Object $1 => decodeString($1),
},
allowPacketMirroring: switch (json['allowPacketMirroring']) {
null => null,
Object $1 => decodeString($1),
},
allowPrivateGoogleAccess: switch (json['allowPrivateGoogleAccess']) {
null => null,
Object $1 => decodeString($1),
},
allowPsc: switch (json['allowPsc']) {
null => null,
Object $1 => decodeString($1),
},
allowSameNetworkUnicast: switch (json['allowSameNetworkUnicast']) {
null => null,
Object $1 => decodeString($1),
},
allowStaticRoutes: switch (json['allowStaticRoutes']) {
null => null,
Object $1 => decodeString($1),
},
allowSubInterfaces: switch (json['allowSubInterfaces']) {
null => null,
Object $1 => decodeString($1),
},
allowSubnetworkCreation: switch (json['allowSubnetworkCreation']) {
null => null,
Object $1 => decodeString($1),
},
allowVpcFirewallRules: switch (json['allowVpcFirewallRules']) {
null => null,
Object $1 => decodeString($1),
},
allowVpcPeering: switch (json['allowVpcPeering']) {
null => null,
Object $1 => decodeString($1),
},
allowVpn: switch (json['allowVpn']) {
null => null,
Object $1 => decodeString($1),
},
firewallPolicyTypes: switch (json['firewallPolicyTypes']) {
null => [],
List<Object?> $1 => [for (final i in $1) decodeString(i)],
_ => throw const FormatException('"firewallPolicyTypes" is not a list'),
},
interfaceTypes: switch (json['interfaceTypes']) {
null => [],
List<Object?> $1 => [for (final i in $1) decodeString(i)],
_ => throw const FormatException('"interfaceTypes" is not a list'),
},
multicast: switch (json['multicast']) {
null => null,
Object $1 => decodeString($1),
},
predefinedNetworkInternalIpv6Range:
switch (json['predefinedNetworkInternalIpv6Range']) {
null => null,
Object $1 => decodeString($1),
},
predefinedSubnetworkRanges: switch (json['predefinedSubnetworkRanges']) {
null => [],
List<Object?> $1 => [
for (final i in $1)
NetworkProfileNetworkFeaturesPredefinedSubnetworkRange.fromJson(i),
],
_ => throw const FormatException(
'"predefinedSubnetworkRanges" is not a list',
),
},
subnetPurposes: switch (json['subnetPurposes']) {
null => [],
List<Object?> $1 => [for (final i in $1) decodeString(i)],
_ => throw const FormatException('"subnetPurposes" is not a list'),
},
subnetStackTypes: switch (json['subnetStackTypes']) {
null => [],
List<Object?> $1 => [for (final i in $1) decodeString(i)],
_ => throw const FormatException('"subnetStackTypes" is not a list'),
},
subnetworkPurposes: switch (json['subnetworkPurposes']) {
null => [],
List<Object?> $1 => [for (final i in $1) decodeString(i)],
_ => throw const FormatException('"subnetworkPurposes" is not a list'),
},
subnetworkStackTypes: switch (json['subnetworkStackTypes']) {
null => [],
List<Object?> $1 => [for (final i in $1) decodeString(i)],
_ => throw const FormatException(
'"subnetworkStackTypes" is not a list',
),
},
unicast: switch (json['unicast']) {
null => null,
Object $1 => decodeString($1),
},
);
}