internal static PrivateLinkServiceIpConfiguration DeserializePrivateLinkServiceIpConfiguration(JsonElement element) { string name = default; string etag = default; string type = default; string id = default; string privateIPAddress = default; IPAllocationMethod?privateIPAllocationMethod = default; Subnet subnet = default; bool?primary = default; ProvisioningState?provisioningState = default; IPVersion? privateIPAddressVersion = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("name")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } name = property.Value.GetString(); continue; } if (property.NameEquals("etag")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } etag = property.Value.GetString(); continue; } if (property.NameEquals("type")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } type = property.Value.GetString(); continue; } if (property.NameEquals("id")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } id = property.Value.GetString(); continue; } if (property.NameEquals("properties")) { foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("privateIPAddress")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } privateIPAddress = property0.Value.GetString(); continue; } if (property0.NameEquals("privateIPAllocationMethod")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } privateIPAllocationMethod = new IPAllocationMethod(property0.Value.GetString()); continue; } if (property0.NameEquals("subnet")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } subnet = Subnet.DeserializeSubnet(property0.Value); continue; } if (property0.NameEquals("primary")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } primary = property0.Value.GetBoolean(); continue; } if (property0.NameEquals("provisioningState")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } if (property0.NameEquals("privateIPAddressVersion")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } privateIPAddressVersion = new IPVersion(property0.Value.GetString()); continue; } } continue; } } return(new PrivateLinkServiceIpConfiguration(id, name, etag, type, privateIPAddress, privateIPAllocationMethod, subnet, primary, provisioningState, privateIPAddressVersion)); }
internal static PublicIPAddress DeserializePublicIPAddress(JsonElement element) { Optional <PublicIPAddressSku> sku = default; Optional <string> etag = default; Optional <IList <string> > zones = default; Optional <string> id = default; Optional <string> name = default; Optional <string> type = default; Optional <string> location = default; Optional <IDictionary <string, string> > tags = default; Optional <IPAllocationMethod> publicIPAllocationMethod = default; Optional <IPVersion> publicIPAddressVersion = default; Optional <IPConfiguration> ipConfiguration = default; Optional <PublicIPAddressDnsSettings> dnsSettings = default; Optional <DdosSettings> ddosSettings = default; Optional <IList <IpTag> > ipTags = default; Optional <string> ipAddress = default; Optional <SubResource> publicIPPrefix = default; Optional <int> idleTimeoutInMinutes = default; Optional <string> resourceGuid = default; Optional <ProvisioningState> provisioningState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("sku")) { sku = PublicIPAddressSku.DeserializePublicIPAddressSku(property.Value); continue; } if (property.NameEquals("etag")) { etag = property.Value.GetString(); continue; } if (property.NameEquals("zones")) { List <string> array = new List <string>(); foreach (var item in property.Value.EnumerateArray()) { array.Add(item.GetString()); } zones = array; continue; } if (property.NameEquals("id")) { id = property.Value.GetString(); continue; } if (property.NameEquals("name")) { name = property.Value.GetString(); continue; } if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } if (property.NameEquals("location")) { location = property.Value.GetString(); continue; } if (property.NameEquals("tags")) { Dictionary <string, string> dictionary = new Dictionary <string, string>(); foreach (var property0 in property.Value.EnumerateObject()) { dictionary.Add(property0.Name, property0.Value.GetString()); } tags = dictionary; continue; } if (property.NameEquals("properties")) { foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("publicIPAllocationMethod")) { publicIPAllocationMethod = new IPAllocationMethod(property0.Value.GetString()); continue; } if (property0.NameEquals("publicIPAddressVersion")) { publicIPAddressVersion = new IPVersion(property0.Value.GetString()); continue; } if (property0.NameEquals("ipConfiguration")) { ipConfiguration = IPConfiguration.DeserializeIPConfiguration(property0.Value); continue; } if (property0.NameEquals("dnsSettings")) { dnsSettings = PublicIPAddressDnsSettings.DeserializePublicIPAddressDnsSettings(property0.Value); continue; } if (property0.NameEquals("ddosSettings")) { ddosSettings = DdosSettings.DeserializeDdosSettings(property0.Value); continue; } if (property0.NameEquals("ipTags")) { List <IpTag> array = new List <IpTag>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(IpTag.DeserializeIpTag(item)); } ipTags = array; continue; } if (property0.NameEquals("ipAddress")) { ipAddress = property0.Value.GetString(); continue; } if (property0.NameEquals("publicIPPrefix")) { publicIPPrefix = SubResource.DeserializeSubResource(property0.Value); continue; } if (property0.NameEquals("idleTimeoutInMinutes")) { idleTimeoutInMinutes = property0.Value.GetInt32(); continue; } if (property0.NameEquals("resourceGuid")) { resourceGuid = property0.Value.GetString(); continue; } if (property0.NameEquals("provisioningState")) { provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } } continue; } } return(new PublicIPAddress(id.Value, name.Value, type.Value, location.Value, Optional.ToDictionary(tags), sku.Value, etag.Value, Optional.ToList(zones), Optional.ToNullable(publicIPAllocationMethod), Optional.ToNullable(publicIPAddressVersion), ipConfiguration.Value, dnsSettings.Value, ddosSettings.Value, Optional.ToList(ipTags), ipAddress.Value, publicIPPrefix.Value, Optional.ToNullable(idleTimeoutInMinutes), resourceGuid.Value, Optional.ToNullable(provisioningState))); }
internal static ApplicationGatewayFrontendIPConfiguration DeserializeApplicationGatewayFrontendIPConfiguration(JsonElement element) { Optional <string> name = default; Optional <string> etag = default; Optional <string> type = default; Optional <string> id = default; Optional <string> privateIPAddress = default; Optional <IPAllocationMethod> privateIPAllocationMethod = default; Optional <SubResource> subnet = default; Optional <SubResource> publicIPAddress = default; Optional <ProvisioningState> provisioningState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("name")) { name = property.Value.GetString(); continue; } if (property.NameEquals("etag")) { etag = property.Value.GetString(); continue; } if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } if (property.NameEquals("id")) { id = property.Value.GetString(); continue; } if (property.NameEquals("properties")) { foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("privateIPAddress")) { privateIPAddress = property0.Value.GetString(); continue; } if (property0.NameEquals("privateIPAllocationMethod")) { privateIPAllocationMethod = new IPAllocationMethod(property0.Value.GetString()); continue; } if (property0.NameEquals("subnet")) { subnet = DeserializeSubResource(property0.Value); continue; } if (property0.NameEquals("publicIPAddress")) { publicIPAddress = DeserializeSubResource(property0.Value); continue; } if (property0.NameEquals("provisioningState")) { provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } } continue; } } return(new ApplicationGatewayFrontendIPConfiguration(id.Value, name.Value, etag.Value, type.Value, privateIPAddress.Value, Optional.ToNullable(privateIPAllocationMethod), subnet.Value, publicIPAddress.Value, Optional.ToNullable(provisioningState))); }
internal static NetworkInterfaceIPConfiguration DeserializeNetworkInterfaceIPConfiguration(JsonElement element) { string name = default; string etag = default; string id = default; IList <VirtualNetworkTap> virtualNetworkTaps = default; IList <ApplicationGatewayBackendAddressPool> applicationGatewayBackendAddressPools = default; IList <BackendAddressPool> loadBalancerBackendAddressPools = default; IList <InboundNatRule> loadBalancerInboundNatRules = default; string privateIPAddress = default; IPAllocationMethod?privateIPAllocationMethod = default; IPVersion? privateIPAddressVersion = default; Subnet subnet = default; bool? primary = default; PublicIPAddress publicIPAddress = default; IList <ApplicationSecurityGroup> applicationSecurityGroups = default; ProvisioningState?provisioningState = default; NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties privateLinkConnectionProperties = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("name")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } name = property.Value.GetString(); continue; } if (property.NameEquals("etag")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } etag = property.Value.GetString(); continue; } if (property.NameEquals("id")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } id = property.Value.GetString(); continue; } if (property.NameEquals("properties")) { foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("virtualNetworkTaps")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } List <VirtualNetworkTap> array = new List <VirtualNetworkTap>(); foreach (var item in property0.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(VirtualNetworkTap.DeserializeVirtualNetworkTap(item)); } } virtualNetworkTaps = array; continue; } if (property0.NameEquals("applicationGatewayBackendAddressPools")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } List <ApplicationGatewayBackendAddressPool> array = new List <ApplicationGatewayBackendAddressPool>(); foreach (var item in property0.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(ApplicationGatewayBackendAddressPool.DeserializeApplicationGatewayBackendAddressPool(item)); } } applicationGatewayBackendAddressPools = array; continue; } if (property0.NameEquals("loadBalancerBackendAddressPools")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } List <BackendAddressPool> array = new List <BackendAddressPool>(); foreach (var item in property0.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(BackendAddressPool.DeserializeBackendAddressPool(item)); } } loadBalancerBackendAddressPools = array; continue; } if (property0.NameEquals("loadBalancerInboundNatRules")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } List <InboundNatRule> array = new List <InboundNatRule>(); foreach (var item in property0.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(InboundNatRule.DeserializeInboundNatRule(item)); } } loadBalancerInboundNatRules = array; continue; } if (property0.NameEquals("privateIPAddress")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } privateIPAddress = property0.Value.GetString(); continue; } if (property0.NameEquals("privateIPAllocationMethod")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } privateIPAllocationMethod = new IPAllocationMethod(property0.Value.GetString()); continue; } if (property0.NameEquals("privateIPAddressVersion")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } privateIPAddressVersion = new IPVersion(property0.Value.GetString()); continue; } if (property0.NameEquals("subnet")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } subnet = Subnet.DeserializeSubnet(property0.Value); continue; } if (property0.NameEquals("primary")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } primary = property0.Value.GetBoolean(); continue; } if (property0.NameEquals("publicIPAddress")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } publicIPAddress = PublicIPAddress.DeserializePublicIPAddress(property0.Value); continue; } if (property0.NameEquals("applicationSecurityGroups")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } List <ApplicationSecurityGroup> array = new List <ApplicationSecurityGroup>(); foreach (var item in property0.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(ApplicationSecurityGroup.DeserializeApplicationSecurityGroup(item)); } } applicationSecurityGroups = array; continue; } if (property0.NameEquals("provisioningState")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } if (property0.NameEquals("privateLinkConnectionProperties")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } privateLinkConnectionProperties = NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties.DeserializeNetworkInterfaceIPConfigurationPrivateLinkConnectionProperties(property0.Value); continue; } } continue; } } return(new NetworkInterfaceIPConfiguration(id, name, etag, virtualNetworkTaps, applicationGatewayBackendAddressPools, loadBalancerBackendAddressPools, loadBalancerInboundNatRules, privateIPAddress, privateIPAllocationMethod, privateIPAddressVersion, subnet, primary, publicIPAddress, applicationSecurityGroups, provisioningState, privateLinkConnectionProperties)); }
internal static IPConfiguration DeserializeIPConfiguration(JsonElement element) { string name = default; string etag = default; string id = default; string privateIPAddress = default; IPAllocationMethod?privateIPAllocationMethod = default; Subnet subnet = default; PublicIPAddress publicIPAddress = default; ProvisioningState? provisioningState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("name")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } name = property.Value.GetString(); continue; } if (property.NameEquals("etag")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } etag = property.Value.GetString(); continue; } if (property.NameEquals("id")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } id = property.Value.GetString(); continue; } if (property.NameEquals("properties")) { foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("privateIPAddress")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } privateIPAddress = property0.Value.GetString(); continue; } if (property0.NameEquals("privateIPAllocationMethod")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } privateIPAllocationMethod = new IPAllocationMethod(property0.Value.GetString()); continue; } if (property0.NameEquals("subnet")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } subnet = Subnet.DeserializeSubnet(property0.Value); continue; } if (property0.NameEquals("publicIPAddress")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } publicIPAddress = PublicIPAddress.DeserializePublicIPAddress(property0.Value); continue; } if (property0.NameEquals("provisioningState")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } } continue; } } return(new IPConfiguration(id, name, etag, privateIPAddress, privateIPAllocationMethod, subnet, publicIPAddress, provisioningState)); }
internal static FrontendIPConfiguration DeserializeFrontendIPConfiguration(JsonElement element) { string name = default; string etag = default; string type = default; IList <string> zones = default; string id = default; IList <SubResource> inboundNatRules = default; IList <SubResource> inboundNatPools = default; IList <SubResource> outboundRules = default; IList <SubResource> loadBalancingRules = default; string privateIPAddress = default; IPAllocationMethod? privateIPAllocationMethod = default; IPVersion? privateIPAddressVersion = default; Subnet subnet = default; PublicIPAddress publicIPAddress = default; SubResource publicIPPrefix = default; ProvisioningState? provisioningState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("name")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } name = property.Value.GetString(); continue; } if (property.NameEquals("etag")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } etag = property.Value.GetString(); continue; } if (property.NameEquals("type")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } type = property.Value.GetString(); continue; } if (property.NameEquals("zones")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } List <string> array = new List <string>(); foreach (var item in property.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(item.GetString()); } } zones = array; continue; } if (property.NameEquals("id")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } id = property.Value.GetString(); continue; } if (property.NameEquals("properties")) { foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("inboundNatRules")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } List <SubResource> array = new List <SubResource>(); foreach (var item in property0.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(DeserializeSubResource(item)); } } inboundNatRules = array; continue; } if (property0.NameEquals("inboundNatPools")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } List <SubResource> array = new List <SubResource>(); foreach (var item in property0.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(DeserializeSubResource(item)); } } inboundNatPools = array; continue; } if (property0.NameEquals("outboundRules")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } List <SubResource> array = new List <SubResource>(); foreach (var item in property0.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(DeserializeSubResource(item)); } } outboundRules = array; continue; } if (property0.NameEquals("loadBalancingRules")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } List <SubResource> array = new List <SubResource>(); foreach (var item in property0.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(DeserializeSubResource(item)); } } loadBalancingRules = array; continue; } if (property0.NameEquals("privateIPAddress")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } privateIPAddress = property0.Value.GetString(); continue; } if (property0.NameEquals("privateIPAllocationMethod")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } privateIPAllocationMethod = new IPAllocationMethod(property0.Value.GetString()); continue; } if (property0.NameEquals("privateIPAddressVersion")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } privateIPAddressVersion = new IPVersion(property0.Value.GetString()); continue; } if (property0.NameEquals("subnet")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } subnet = Subnet.DeserializeSubnet(property0.Value); continue; } if (property0.NameEquals("publicIPAddress")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } publicIPAddress = PublicIPAddress.DeserializePublicIPAddress(property0.Value); continue; } if (property0.NameEquals("publicIPPrefix")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } publicIPPrefix = DeserializeSubResource(property0.Value); continue; } if (property0.NameEquals("provisioningState")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } } continue; } } return(new FrontendIPConfiguration(id, name, etag, type, zones, inboundNatRules, inboundNatPools, outboundRules, loadBalancingRules, privateIPAddress, privateIPAllocationMethod, privateIPAddressVersion, subnet, publicIPAddress, publicIPPrefix, provisioningState)); }
internal static PublicIPAddress DeserializePublicIPAddress(JsonElement element) { PublicIPAddressSku sku = default; string etag = default; IList <string> zones = default; string id = default; string name = default; string type = default; string location = default; IDictionary <string, string> tags = default; IPAllocationMethod? publicIPAllocationMethod = default; IPVersion? publicIPAddressVersion = default; IPConfiguration ipConfiguration = default; PublicIPAddressDnsSettings dnsSettings = default; DdosSettings ddosSettings = default; IList <IpTag> ipTags = default; string ipAddress = default; SubResource publicIPPrefix = default; int? idleTimeoutInMinutes = default; string resourceGuid = default; ProvisioningState?provisioningState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("sku")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } sku = PublicIPAddressSku.DeserializePublicIPAddressSku(property.Value); continue; } if (property.NameEquals("etag")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } etag = property.Value.GetString(); continue; } if (property.NameEquals("zones")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } List <string> array = new List <string>(); foreach (var item in property.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(item.GetString()); } } zones = array; continue; } if (property.NameEquals("id")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } id = property.Value.GetString(); continue; } if (property.NameEquals("name")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } name = property.Value.GetString(); continue; } if (property.NameEquals("type")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } type = property.Value.GetString(); continue; } if (property.NameEquals("location")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } location = property.Value.GetString(); continue; } if (property.NameEquals("tags")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary <string, string> dictionary = new Dictionary <string, string>(); foreach (var property0 in property.Value.EnumerateObject()) { if (property0.Value.ValueKind == JsonValueKind.Null) { dictionary.Add(property0.Name, null); } else { dictionary.Add(property0.Name, property0.Value.GetString()); } } tags = dictionary; continue; } if (property.NameEquals("properties")) { foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("publicIPAllocationMethod")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } publicIPAllocationMethod = new IPAllocationMethod(property0.Value.GetString()); continue; } if (property0.NameEquals("publicIPAddressVersion")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } publicIPAddressVersion = new IPVersion(property0.Value.GetString()); continue; } if (property0.NameEquals("ipConfiguration")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } ipConfiguration = IPConfiguration.DeserializeIPConfiguration(property0.Value); continue; } if (property0.NameEquals("dnsSettings")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } dnsSettings = PublicIPAddressDnsSettings.DeserializePublicIPAddressDnsSettings(property0.Value); continue; } if (property0.NameEquals("ddosSettings")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } ddosSettings = DdosSettings.DeserializeDdosSettings(property0.Value); continue; } if (property0.NameEquals("ipTags")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } List <IpTag> array = new List <IpTag>(); foreach (var item in property0.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(IpTag.DeserializeIpTag(item)); } } ipTags = array; continue; } if (property0.NameEquals("ipAddress")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } ipAddress = property0.Value.GetString(); continue; } if (property0.NameEquals("publicIPPrefix")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } publicIPPrefix = SubResource.DeserializeSubResource(property0.Value); continue; } if (property0.NameEquals("idleTimeoutInMinutes")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } idleTimeoutInMinutes = property0.Value.GetInt32(); continue; } if (property0.NameEquals("resourceGuid")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } resourceGuid = property0.Value.GetString(); continue; } if (property0.NameEquals("provisioningState")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } } continue; } } return(new PublicIPAddress(id, name, type, location, tags, sku, etag, zones, publicIPAllocationMethod, publicIPAddressVersion, ipConfiguration, dnsSettings, ddosSettings, ipTags, ipAddress, publicIPPrefix, idleTimeoutInMinutes, resourceGuid, provisioningState)); }
internal static PrivateLinkServiceIpConfiguration DeserializePrivateLinkServiceIpConfiguration(JsonElement element) { Optional <string> name = default; Optional <string> etag = default; Optional <string> type = default; Optional <string> id = default; Optional <string> privateIPAddress = default; Optional <IPAllocationMethod> privateIPAllocationMethod = default; Optional <Subnet> subnet = default; Optional <bool> primary = default; Optional <ProvisioningState> provisioningState = default; Optional <IPVersion> privateIPAddressVersion = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("name")) { name = property.Value.GetString(); continue; } if (property.NameEquals("etag")) { etag = property.Value.GetString(); continue; } if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } if (property.NameEquals("id")) { id = property.Value.GetString(); continue; } if (property.NameEquals("properties")) { foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("privateIPAddress")) { privateIPAddress = property0.Value.GetString(); continue; } if (property0.NameEquals("privateIPAllocationMethod")) { privateIPAllocationMethod = new IPAllocationMethod(property0.Value.GetString()); continue; } if (property0.NameEquals("subnet")) { subnet = Subnet.DeserializeSubnet(property0.Value); continue; } if (property0.NameEquals("primary")) { primary = property0.Value.GetBoolean(); continue; } if (property0.NameEquals("provisioningState")) { provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } if (property0.NameEquals("privateIPAddressVersion")) { privateIPAddressVersion = new IPVersion(property0.Value.GetString()); continue; } } continue; } } return(new PrivateLinkServiceIpConfiguration(id.Value, name.Value, etag.Value, type.Value, privateIPAddress.Value, Optional.ToNullable(privateIPAllocationMethod), subnet.Value, Optional.ToNullable(primary), Optional.ToNullable(provisioningState), Optional.ToNullable(privateIPAddressVersion))); }
internal static FrontendIPConfiguration DeserializeFrontendIPConfiguration(JsonElement element) { Optional <string> name = default; Optional <string> etag = default; Optional <string> type = default; Optional <IList <string> > zones = default; Optional <string> id = default; Optional <IReadOnlyList <SubResource> > inboundNatRules = default; Optional <IReadOnlyList <SubResource> > inboundNatPools = default; Optional <IReadOnlyList <SubResource> > outboundRules = default; Optional <IReadOnlyList <SubResource> > loadBalancingRules = default; Optional <string> privateIPAddress = default; Optional <IPAllocationMethod> privateIPAllocationMethod = default; Optional <IPVersion> privateIPAddressVersion = default; Optional <Subnet> subnet = default; Optional <PublicIPAddress> publicIPAddress = default; Optional <SubResource> publicIPPrefix = default; Optional <ProvisioningState> provisioningState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("name")) { name = property.Value.GetString(); continue; } if (property.NameEquals("etag")) { etag = property.Value.GetString(); continue; } if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } if (property.NameEquals("zones")) { List <string> array = new List <string>(); foreach (var item in property.Value.EnumerateArray()) { array.Add(item.GetString()); } zones = array; continue; } if (property.NameEquals("id")) { id = property.Value.GetString(); continue; } if (property.NameEquals("properties")) { foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("inboundNatRules")) { List <SubResource> array = new List <SubResource>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(DeserializeSubResource(item)); } inboundNatRules = array; continue; } if (property0.NameEquals("inboundNatPools")) { List <SubResource> array = new List <SubResource>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(DeserializeSubResource(item)); } inboundNatPools = array; continue; } if (property0.NameEquals("outboundRules")) { List <SubResource> array = new List <SubResource>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(DeserializeSubResource(item)); } outboundRules = array; continue; } if (property0.NameEquals("loadBalancingRules")) { List <SubResource> array = new List <SubResource>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(DeserializeSubResource(item)); } loadBalancingRules = array; continue; } if (property0.NameEquals("privateIPAddress")) { privateIPAddress = property0.Value.GetString(); continue; } if (property0.NameEquals("privateIPAllocationMethod")) { privateIPAllocationMethod = new IPAllocationMethod(property0.Value.GetString()); continue; } if (property0.NameEquals("privateIPAddressVersion")) { privateIPAddressVersion = new IPVersion(property0.Value.GetString()); continue; } if (property0.NameEquals("subnet")) { subnet = Subnet.DeserializeSubnet(property0.Value); continue; } if (property0.NameEquals("publicIPAddress")) { publicIPAddress = PublicIPAddress.DeserializePublicIPAddress(property0.Value); continue; } if (property0.NameEquals("publicIPPrefix")) { publicIPPrefix = DeserializeSubResource(property0.Value); continue; } if (property0.NameEquals("provisioningState")) { provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } } continue; } } return(new FrontendIPConfiguration(id.Value, name.Value, etag.Value, type.Value, Optional.ToList(zones), Optional.ToList(inboundNatRules), Optional.ToList(inboundNatPools), Optional.ToList(outboundRules), Optional.ToList(loadBalancingRules), privateIPAddress.Value, Optional.ToNullable(privateIPAllocationMethod), Optional.ToNullable(privateIPAddressVersion), subnet.Value, publicIPAddress.Value, publicIPPrefix.Value, Optional.ToNullable(provisioningState))); }
internal static NetworkInterfaceIPConfiguration DeserializeNetworkInterfaceIPConfiguration(JsonElement element) { Optional <string> name = default; Optional <string> etag = default; Optional <string> id = default; Optional <IList <VirtualNetworkTap> > virtualNetworkTaps = default; Optional <IList <ApplicationGatewayBackendAddressPool> > applicationGatewayBackendAddressPools = default; Optional <IList <BackendAddressPool> > loadBalancerBackendAddressPools = default; Optional <IList <InboundNatRule> > loadBalancerInboundNatRules = default; Optional <string> privateIPAddress = default; Optional <IPAllocationMethod> privateIPAllocationMethod = default; Optional <IPVersion> privateIPAddressVersion = default; Optional <Subnet> subnet = default; Optional <bool> primary = default; Optional <PublicIPAddress> publicIPAddress = default; Optional <IList <ApplicationSecurityGroup> > applicationSecurityGroups = default; Optional <ProvisioningState> provisioningState = default; Optional <NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties> privateLinkConnectionProperties = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("name")) { name = property.Value.GetString(); continue; } if (property.NameEquals("etag")) { etag = property.Value.GetString(); continue; } if (property.NameEquals("id")) { id = property.Value.GetString(); continue; } if (property.NameEquals("properties")) { foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("virtualNetworkTaps")) { List <VirtualNetworkTap> array = new List <VirtualNetworkTap>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(VirtualNetworkTap.DeserializeVirtualNetworkTap(item)); } virtualNetworkTaps = array; continue; } if (property0.NameEquals("applicationGatewayBackendAddressPools")) { List <ApplicationGatewayBackendAddressPool> array = new List <ApplicationGatewayBackendAddressPool>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(ApplicationGatewayBackendAddressPool.DeserializeApplicationGatewayBackendAddressPool(item)); } applicationGatewayBackendAddressPools = array; continue; } if (property0.NameEquals("loadBalancerBackendAddressPools")) { List <BackendAddressPool> array = new List <BackendAddressPool>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(BackendAddressPool.DeserializeBackendAddressPool(item)); } loadBalancerBackendAddressPools = array; continue; } if (property0.NameEquals("loadBalancerInboundNatRules")) { List <InboundNatRule> array = new List <InboundNatRule>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(InboundNatRule.DeserializeInboundNatRule(item)); } loadBalancerInboundNatRules = array; continue; } if (property0.NameEquals("privateIPAddress")) { privateIPAddress = property0.Value.GetString(); continue; } if (property0.NameEquals("privateIPAllocationMethod")) { privateIPAllocationMethod = new IPAllocationMethod(property0.Value.GetString()); continue; } if (property0.NameEquals("privateIPAddressVersion")) { privateIPAddressVersion = new IPVersion(property0.Value.GetString()); continue; } if (property0.NameEquals("subnet")) { subnet = Subnet.DeserializeSubnet(property0.Value); continue; } if (property0.NameEquals("primary")) { primary = property0.Value.GetBoolean(); continue; } if (property0.NameEquals("publicIPAddress")) { publicIPAddress = PublicIPAddress.DeserializePublicIPAddress(property0.Value); continue; } if (property0.NameEquals("applicationSecurityGroups")) { List <ApplicationSecurityGroup> array = new List <ApplicationSecurityGroup>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(ApplicationSecurityGroup.DeserializeApplicationSecurityGroup(item)); } applicationSecurityGroups = array; continue; } if (property0.NameEquals("provisioningState")) { provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } if (property0.NameEquals("privateLinkConnectionProperties")) { privateLinkConnectionProperties = NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties.DeserializeNetworkInterfaceIPConfigurationPrivateLinkConnectionProperties(property0.Value); continue; } } continue; } } return(new NetworkInterfaceIPConfiguration(id.Value, name.Value, etag.Value, Optional.ToList(virtualNetworkTaps), Optional.ToList(applicationGatewayBackendAddressPools), Optional.ToList(loadBalancerBackendAddressPools), Optional.ToList(loadBalancerInboundNatRules), privateIPAddress.Value, Optional.ToNullable(privateIPAllocationMethod), Optional.ToNullable(privateIPAddressVersion), subnet.Value, Optional.ToNullable(primary), publicIPAddress.Value, Optional.ToList(applicationSecurityGroups), Optional.ToNullable(provisioningState), privateLinkConnectionProperties.Value)); }