internal ExpressRouteCircuitPeeringData(string id, string name, string etag, string type, ExpressRoutePeeringType?peeringType, ExpressRoutePeeringState?state, int?azureASN, long?peerASN, string primaryPeerAddressPrefix, string secondaryPeerAddressPrefix, string primaryAzurePort, string secondaryAzurePort, string sharedKey, int?vlanId, ExpressRouteCircuitPeeringConfig microsoftPeeringConfig, ExpressRouteCircuitStats stats, ProvisioningState?provisioningState, string gatewayManagerEtag, string lastModifiedBy, Models.SubResource routeFilter, Ipv6ExpressRouteCircuitPeeringConfig ipv6PeeringConfig, ExpressRouteConnectionId expressRouteConnection, IList <ExpressRouteCircuitConnectionData> connections, IReadOnlyList <PeerExpressRouteCircuitConnection> peeredConnections) : base(id) { Name = name; Etag = etag; Type = type; PeeringType = peeringType; State = state; AzureASN = azureASN; PeerASN = peerASN; PrimaryPeerAddressPrefix = primaryPeerAddressPrefix; SecondaryPeerAddressPrefix = secondaryPeerAddressPrefix; PrimaryAzurePort = primaryAzurePort; SecondaryAzurePort = secondaryAzurePort; SharedKey = sharedKey; VlanId = vlanId; MicrosoftPeeringConfig = microsoftPeeringConfig; Stats = stats; ProvisioningState = provisioningState; GatewayManagerEtag = gatewayManagerEtag; LastModifiedBy = lastModifiedBy; RouteFilter = routeFilter; Ipv6PeeringConfig = ipv6PeeringConfig; ExpressRouteConnection = expressRouteConnection; Connections = connections; PeeredConnections = peeredConnections; }
internal SubnetData(string id, string name, string etag, string type, string addressPrefix, IList <string> addressPrefixes, NetworkSecurityGroupData networkSecurityGroup, RouteTableData routeTable, Models.SubResource natGateway, IList <ServiceEndpointPropertiesFormat> serviceEndpoints, IList <ServiceEndpointPolicyData> serviceEndpointPolicies, IReadOnlyList <PrivateEndpointData> privateEndpoints, IReadOnlyList <IPConfiguration> ipConfigurations, IReadOnlyList <IPConfigurationProfile> ipConfigurationProfiles, IList <Models.SubResource> ipAllocations, IReadOnlyList <ResourceNavigationLink> resourceNavigationLinks, IReadOnlyList <ServiceAssociationLink> serviceAssociationLinks, IList <Delegation> delegations, string purpose, ProvisioningState?provisioningState, VirtualNetworkPrivateEndpointNetworkPolicies?privateEndpointNetworkPolicies, VirtualNetworkPrivateLinkServiceNetworkPolicies?privateLinkServiceNetworkPolicies, IList <ApplicationGatewayIPConfiguration> applicationGatewayIpConfigurations) : base(id) { Name = name; Etag = etag; Type = type; AddressPrefix = addressPrefix; AddressPrefixes = addressPrefixes; NetworkSecurityGroup = networkSecurityGroup; RouteTable = routeTable; NatGateway = natGateway; ServiceEndpoints = serviceEndpoints; ServiceEndpointPolicies = serviceEndpointPolicies; PrivateEndpoints = privateEndpoints; IpConfigurations = ipConfigurations; IpConfigurationProfiles = ipConfigurationProfiles; IpAllocations = ipAllocations; ResourceNavigationLinks = resourceNavigationLinks; ServiceAssociationLinks = serviceAssociationLinks; Delegations = delegations; Purpose = purpose; ProvisioningState = provisioningState; PrivateEndpointNetworkPolicies = privateEndpointNetworkPolicies; PrivateLinkServiceNetworkPolicies = privateLinkServiceNetworkPolicies; ApplicationGatewayIpConfigurations = applicationGatewayIpConfigurations; }
internal HubVirtualNetworkConnectionData(string id, string name, string etag, Models.SubResource remoteVirtualNetwork, bool?allowHubToRemoteVnetTransit, bool?allowRemoteVnetToUseHubVnetGateways, bool?enableInternetSecurity, RoutingConfiguration routingConfiguration, ProvisioningState?provisioningState) : base(id) { Name = name; Etag = etag; RemoteVirtualNetwork = remoteVirtualNetwork; AllowHubToRemoteVnetTransit = allowHubToRemoteVnetTransit; AllowRemoteVnetToUseHubVnetGateways = allowRemoteVnetToUseHubVnetGateways; EnableInternetSecurity = enableInternetSecurity; RoutingConfiguration = routingConfiguration; ProvisioningState = provisioningState; }
internal ExpressRouteCircuitConnectionData(string id, string name, string etag, string type, Models.SubResource expressRouteCircuitPeering, Models.SubResource peerExpressRouteCircuitPeering, string addressPrefix, string authorizationKey, Ipv6CircuitConnectionConfig ipv6CircuitConnectionConfig, CircuitConnectionStatus?circuitConnectionStatus, ProvisioningState?provisioningState) : base(id) { Name = name; Etag = etag; Type = type; ExpressRouteCircuitPeering = expressRouteCircuitPeering; PeerExpressRouteCircuitPeering = peerExpressRouteCircuitPeering; AddressPrefix = addressPrefix; AuthorizationKey = authorizationKey; Ipv6CircuitConnectionConfig = ipv6CircuitConnectionConfig; CircuitConnectionStatus = circuitConnectionStatus; ProvisioningState = provisioningState; }
internal BackendAddressPoolData(string id, string name, string etag, string type, string location, IList <GatewayLoadBalancerTunnelInterface> tunnelInterfaces, IList <LoadBalancerBackendAddress> loadBalancerBackendAddresses, IReadOnlyList <NetworkInterfaceIPConfiguration> backendIPConfigurations, IReadOnlyList <Models.SubResource> loadBalancingRules, Models.SubResource outboundRule, IReadOnlyList <Models.SubResource> outboundRules, ProvisioningState?provisioningState) : base(id) { Name = name; Etag = etag; Type = type; Location = location; TunnelInterfaces = tunnelInterfaces; LoadBalancerBackendAddresses = loadBalancerBackendAddresses; BackendIPConfigurations = backendIPConfigurations; LoadBalancingRules = loadBalancingRules; OutboundRule = outboundRule; OutboundRules = outboundRules; ProvisioningState = provisioningState; }
internal InboundNatRuleData(string id, string name, string etag, string type, Models.SubResource frontendIPConfiguration, NetworkInterfaceIPConfiguration backendIPConfiguration, TransportProtocol?protocol, int?frontendPort, int?backendPort, int?idleTimeoutInMinutes, bool?enableFloatingIP, bool?enableTcpReset, ProvisioningState?provisioningState) : base(id) { Name = name; Etag = etag; Type = type; FrontendIPConfiguration = frontendIPConfiguration; BackendIPConfiguration = backendIPConfiguration; Protocol = protocol; FrontendPort = frontendPort; BackendPort = backendPort; IdleTimeoutInMinutes = idleTimeoutInMinutes; EnableFloatingIP = enableFloatingIP; EnableTcpReset = enableTcpReset; ProvisioningState = provisioningState; }
internal NetworkVirtualApplianceData(string id, string name, string type, string location, IDictionary <string, string> tags, ResourceIdentity identity, string etag, VirtualApplianceSkuProperties nvaSku, string addressPrefix, IList <string> bootStrapConfigurationBlobs, Models.SubResource virtualHub, IList <string> cloudInitConfigurationBlobs, string cloudInitConfiguration, long?virtualApplianceAsn, IReadOnlyList <VirtualApplianceNicProperties> virtualApplianceNics, IReadOnlyList <Models.SubResource> virtualApplianceSites, IReadOnlyList <Models.SubResource> inboundSecurityRules, ProvisioningState?provisioningState) : base(id, name, type, location, tags) { Identity = identity; Etag = etag; NvaSku = nvaSku; AddressPrefix = addressPrefix; BootStrapConfigurationBlobs = bootStrapConfigurationBlobs; VirtualHub = virtualHub; CloudInitConfigurationBlobs = cloudInitConfigurationBlobs; CloudInitConfiguration = cloudInitConfiguration; VirtualApplianceAsn = virtualApplianceAsn; VirtualApplianceNics = virtualApplianceNics; VirtualApplianceSites = virtualApplianceSites; InboundSecurityRules = inboundSecurityRules; ProvisioningState = provisioningState; }
internal FirewallPolicyData(string id, string name, string type, string location, IDictionary <string, string> tags, string etag, ResourceIdentity identity, IReadOnlyList <Models.SubResource> ruleCollectionGroups, ProvisioningState?provisioningState, Models.SubResource basePolicy, IReadOnlyList <Models.SubResource> firewalls, IReadOnlyList <Models.SubResource> childPolicies, AzureFirewallThreatIntelMode?threatIntelMode, FirewallPolicyThreatIntelWhitelist threatIntelWhitelist, FirewallPolicyInsights insights, FirewallPolicySnat snat, DnsSettings dnsSettings, FirewallPolicyIntrusionDetection intrusionDetection, FirewallPolicyTransportSecurity transportSecurity, FirewallPolicySku sku) : base(id, name, type, location, tags) { Etag = etag; Identity = identity; RuleCollectionGroups = ruleCollectionGroups; ProvisioningState = provisioningState; BasePolicy = basePolicy; Firewalls = firewalls; ChildPolicies = childPolicies; ThreatIntelMode = threatIntelMode; ThreatIntelWhitelist = threatIntelWhitelist; Insights = insights; Snat = snat; DnsSettings = dnsSettings; IntrusionDetection = intrusionDetection; TransportSecurity = transportSecurity; Sku = sku; }
internal VirtualNetworkPeeringData(string id, string name, string etag, string type, bool?allowVirtualNetworkAccess, bool?allowForwardedTraffic, bool?allowGatewayTransit, bool?useRemoteGateways, Models.SubResource remoteVirtualNetwork, AddressSpace remoteAddressSpace, AddressSpace remoteVirtualNetworkAddressSpace, VirtualNetworkBgpCommunities remoteBgpCommunities, VirtualNetworkPeeringState?peeringState, VirtualNetworkPeeringLevel?peeringSyncLevel, ProvisioningState?provisioningState, bool?doNotVerifyRemoteGateways, string resourceGuid) : base(id) { Name = name; Etag = etag; Type = type; AllowVirtualNetworkAccess = allowVirtualNetworkAccess; AllowForwardedTraffic = allowForwardedTraffic; AllowGatewayTransit = allowGatewayTransit; UseRemoteGateways = useRemoteGateways; RemoteVirtualNetwork = remoteVirtualNetwork; RemoteAddressSpace = remoteAddressSpace; RemoteVirtualNetworkAddressSpace = remoteVirtualNetworkAddressSpace; RemoteBgpCommunities = remoteBgpCommunities; PeeringState = peeringState; PeeringSyncLevel = peeringSyncLevel; ProvisioningState = provisioningState; DoNotVerifyRemoteGateways = doNotVerifyRemoteGateways; ResourceGuid = resourceGuid; }
internal VpnConnectionData(string id, string name, string etag, Models.SubResource remoteVpnSite, int?routingWeight, int?dpdTimeoutSeconds, VpnConnectionStatus?connectionStatus, VirtualNetworkGatewayConnectionProtocol?vpnConnectionProtocolType, long?ingressBytesTransferred, long?egressBytesTransferred, int?connectionBandwidth, string sharedKey, bool?enableBgp, bool?usePolicyBasedTrafficSelectors, IList <IpsecPolicy> ipsecPolicies, IList <TrafficSelectorPolicy> trafficSelectorPolicies, bool?enableRateLimiting, bool?enableInternetSecurity, bool?useLocalAzureIpAddress, ProvisioningState?provisioningState, IList <VpnSiteLinkConnection> vpnLinkConnections, RoutingConfiguration routingConfiguration) : base(id) { Name = name; Etag = etag; RemoteVpnSite = remoteVpnSite; RoutingWeight = routingWeight; DpdTimeoutSeconds = dpdTimeoutSeconds; ConnectionStatus = connectionStatus; VpnConnectionProtocolType = vpnConnectionProtocolType; IngressBytesTransferred = ingressBytesTransferred; EgressBytesTransferred = egressBytesTransferred; ConnectionBandwidth = connectionBandwidth; SharedKey = sharedKey; EnableBgp = enableBgp; UsePolicyBasedTrafficSelectors = usePolicyBasedTrafficSelectors; IpsecPolicies = ipsecPolicies; TrafficSelectorPolicies = trafficSelectorPolicies; EnableRateLimiting = enableRateLimiting; EnableInternetSecurity = enableInternetSecurity; UseLocalAzureIpAddress = useLocalAzureIpAddress; ProvisioningState = provisioningState; VpnLinkConnections = vpnLinkConnections; RoutingConfiguration = routingConfiguration; }
internal ApplicationGatewayData(string id, string name, string type, string location, IDictionary <string, string> tags, string etag, IList <string> zones, ResourceIdentity identity, ApplicationGatewaySku sku, ApplicationGatewaySslPolicy sslPolicy, ApplicationGatewayOperationalState?operationalState, IList <ApplicationGatewayIPConfiguration> gatewayIPConfigurations, IList <ApplicationGatewayAuthenticationCertificate> authenticationCertificates, IList <ApplicationGatewayTrustedRootCertificate> trustedRootCertificates, IList <ApplicationGatewayTrustedClientCertificate> trustedClientCertificates, IList <ApplicationGatewaySslCertificate> sslCertificates, IList <ApplicationGatewayFrontendIPConfiguration> frontendIPConfigurations, IList <ApplicationGatewayFrontendPort> frontendPorts, IList <ApplicationGatewayProbe> probes, IList <ApplicationGatewayBackendAddressPool> backendAddressPools, IList <ApplicationGatewayBackendHttpSettings> backendHttpSettingsCollection, IList <ApplicationGatewayHttpListener> httpListeners, IList <ApplicationGatewaySslProfile> sslProfiles, IList <ApplicationGatewayUrlPathMap> urlPathMaps, IList <ApplicationGatewayRequestRoutingRule> requestRoutingRules, IList <ApplicationGatewayRewriteRuleSet> rewriteRuleSets, IList <ApplicationGatewayRedirectConfiguration> redirectConfigurations, ApplicationGatewayWebApplicationFirewallConfiguration webApplicationFirewallConfiguration, Models.SubResource firewallPolicy, bool?enableHttp2, bool?enableFips, ApplicationGatewayAutoscaleConfiguration autoscaleConfiguration, IList <ApplicationGatewayPrivateLinkConfiguration> privateLinkConfigurations, IReadOnlyList <ApplicationGatewayPrivateEndpointConnectionData> privateEndpointConnections, string resourceGuid, ProvisioningState?provisioningState, IList <ApplicationGatewayCustomError> customErrorConfigurations, bool?forceFirewallPolicyAssociation) : base(id, name, type, location, tags) { Etag = etag; Zones = zones; Identity = identity; Sku = sku; SslPolicy = sslPolicy; OperationalState = operationalState; GatewayIPConfigurations = gatewayIPConfigurations; AuthenticationCertificates = authenticationCertificates; TrustedRootCertificates = trustedRootCertificates; TrustedClientCertificates = trustedClientCertificates; SslCertificates = sslCertificates; FrontendIPConfigurations = frontendIPConfigurations; FrontendPorts = frontendPorts; Probes = probes; BackendAddressPools = backendAddressPools; BackendHttpSettingsCollection = backendHttpSettingsCollection; HttpListeners = httpListeners; SslProfiles = sslProfiles; UrlPathMaps = urlPathMaps; RequestRoutingRules = requestRoutingRules; RewriteRuleSets = rewriteRuleSets; RedirectConfigurations = redirectConfigurations; WebApplicationFirewallConfiguration = webApplicationFirewallConfiguration; FirewallPolicy = firewallPolicy; EnableHttp2 = enableHttp2; EnableFips = enableFips; AutoscaleConfiguration = autoscaleConfiguration; PrivateLinkConfigurations = privateLinkConfigurations; PrivateEndpointConnections = privateEndpointConnections; ResourceGuid = resourceGuid; ProvisioningState = provisioningState; CustomErrorConfigurations = customErrorConfigurations; ForceFirewallPolicyAssociation = forceFirewallPolicyAssociation; }
internal static WebApplicationFirewallPolicy DeserializeWebApplicationFirewallPolicy(JsonElement element) { string etag = default; string id = default; string name = default; string type = default; string location = default; IDictionary <string, string> tags = default; PolicySettings policySettings = default; IList <WebApplicationFirewallCustomRule> customRules = default; IList <ApplicationGateway> applicationGateways = default; ProvisioningState? provisioningState = default; WebApplicationFirewallPolicyResourceState?resourceState = default; ManagedRulesDefinition managedRules = default; IList <SubResource> httpListeners = default; IList <SubResource> pathBasedRules = default; foreach (var property in element.EnumerateObject()) { 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("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("policySettings")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } policySettings = PolicySettings.DeserializePolicySettings(property0.Value); continue; } if (property0.NameEquals("customRules")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } List <WebApplicationFirewallCustomRule> array = new List <WebApplicationFirewallCustomRule>(); foreach (var item in property0.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(WebApplicationFirewallCustomRule.DeserializeWebApplicationFirewallCustomRule(item)); } } customRules = array; continue; } if (property0.NameEquals("applicationGateways")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } List <ApplicationGateway> array = new List <ApplicationGateway>(); foreach (var item in property0.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(ApplicationGateway.DeserializeApplicationGateway(item)); } } applicationGateways = array; continue; } if (property0.NameEquals("provisioningState")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } if (property0.NameEquals("resourceState")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } resourceState = new WebApplicationFirewallPolicyResourceState(property0.Value.GetString()); continue; } if (property0.NameEquals("managedRules")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } managedRules = ManagedRulesDefinition.DeserializeManagedRulesDefinition(property0.Value); continue; } if (property0.NameEquals("httpListeners")) { 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(SubResource.DeserializeSubResource(item)); } } httpListeners = array; continue; } if (property0.NameEquals("pathBasedRules")) { 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(SubResource.DeserializeSubResource(item)); } } pathBasedRules = array; continue; } } continue; } } return(new WebApplicationFirewallPolicy(id, name, type, location, tags, etag, policySettings, customRules, applicationGateways, provisioningState, resourceState, managedRules, httpListeners, pathBasedRules)); }
internal ApplicationGatewayBackendHttpSettings(string id, string name, string etag, string type, int?port, ApplicationGatewayProtocol?protocol, ApplicationGatewayCookieBasedAffinity?cookieBasedAffinity, int?requestTimeout, SubResource probe, IList <SubResource> authenticationCertificates, IList <SubResource> trustedRootCertificates, ApplicationGatewayConnectionDraining connectionDraining, string hostName, bool?pickHostNameFromBackendAddress, string affinityCookieName, bool?probeEnabled, string path, ProvisioningState?provisioningState) : base(id) { Name = name; Etag = etag; Type = type; Port = port; Protocol = protocol; CookieBasedAffinity = cookieBasedAffinity; RequestTimeout = requestTimeout; Probe = probe; AuthenticationCertificates = authenticationCertificates; TrustedRootCertificates = trustedRootCertificates; ConnectionDraining = connectionDraining; HostName = hostName; PickHostNameFromBackendAddress = pickHostNameFromBackendAddress; AffinityCookieName = affinityCookieName; ProbeEnabled = probeEnabled; Path = path; ProvisioningState = provisioningState; }
internal VpnSite(string id, string name, string type, string location, IDictionary <string, string> tags, string etag, SubResource virtualWan, DeviceProperties deviceProperties, string ipAddress, string siteKey, AddressSpace addressSpace, BgpSettings bgpProperties, ProvisioningState?provisioningState, bool?isSecuritySite, IList <VpnSiteLink> vpnSiteLinks) : base(id, name, type, location, tags) { Etag = etag; VirtualWan = virtualWan; DeviceProperties = deviceProperties; IpAddress = ipAddress; SiteKey = siteKey; AddressSpace = addressSpace; BgpProperties = bgpProperties; ProvisioningState = provisioningState; IsSecuritySite = isSecuritySite; VpnSiteLinks = vpnSiteLinks; }
internal static VirtualNetworkGateway DeserializeVirtualNetworkGateway(JsonElement element) { string etag = default; string id = default; string name = default; string type = default; string location = default; IDictionary <string, string> tags = default; IList <VirtualNetworkGatewayIPConfiguration> ipConfigurations = default; VirtualNetworkGatewayType?gatewayType = default; VpnType?vpnType = default; VpnGatewayGeneration?vpnGatewayGeneration = default; bool? enableBgp = default; bool? enablePrivateIpAddress = default; bool? activeActive = default; SubResource gatewayDefaultSite = default; VirtualNetworkGatewaySku sku = default; VpnClientConfiguration vpnClientConfiguration = default; BgpSettings bgpSettings = default; AddressSpace customRoutes = default; string resourceGuid = default; ProvisioningState?provisioningState = default; bool? enableDnsForwarding = default; string inboundDnsForwardingEndpoint = default; foreach (var property in element.EnumerateObject()) { 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("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("ipConfigurations")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } List <VirtualNetworkGatewayIPConfiguration> array = new List <VirtualNetworkGatewayIPConfiguration>(); foreach (var item in property0.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(VirtualNetworkGatewayIPConfiguration.DeserializeVirtualNetworkGatewayIPConfiguration(item)); } } ipConfigurations = array; continue; } if (property0.NameEquals("gatewayType")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } gatewayType = new VirtualNetworkGatewayType(property0.Value.GetString()); continue; } if (property0.NameEquals("vpnType")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } vpnType = new VpnType(property0.Value.GetString()); continue; } if (property0.NameEquals("vpnGatewayGeneration")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } vpnGatewayGeneration = new VpnGatewayGeneration(property0.Value.GetString()); continue; } if (property0.NameEquals("enableBgp")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } enableBgp = property0.Value.GetBoolean(); continue; } if (property0.NameEquals("enablePrivateIpAddress")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } enablePrivateIpAddress = property0.Value.GetBoolean(); continue; } if (property0.NameEquals("activeActive")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } activeActive = property0.Value.GetBoolean(); continue; } if (property0.NameEquals("gatewayDefaultSite")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } gatewayDefaultSite = SubResource.DeserializeSubResource(property0.Value); continue; } if (property0.NameEquals("sku")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } sku = VirtualNetworkGatewaySku.DeserializeVirtualNetworkGatewaySku(property0.Value); continue; } if (property0.NameEquals("vpnClientConfiguration")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } vpnClientConfiguration = VpnClientConfiguration.DeserializeVpnClientConfiguration(property0.Value); continue; } if (property0.NameEquals("bgpSettings")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } bgpSettings = BgpSettings.DeserializeBgpSettings(property0.Value); continue; } if (property0.NameEquals("customRoutes")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } customRoutes = AddressSpace.DeserializeAddressSpace(property0.Value); 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; } if (property0.NameEquals("enableDnsForwarding")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } enableDnsForwarding = property0.Value.GetBoolean(); continue; } if (property0.NameEquals("inboundDnsForwardingEndpoint")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } inboundDnsForwardingEndpoint = property0.Value.GetString(); continue; } } continue; } } return(new VirtualNetworkGateway(id, name, type, location, tags, etag, ipConfigurations, gatewayType, vpnType, vpnGatewayGeneration, enableBgp, enablePrivateIpAddress, activeActive, gatewayDefaultSite, sku, vpnClientConfiguration, bgpSettings, customRoutes, resourceGuid, provisioningState, enableDnsForwarding, inboundDnsForwardingEndpoint)); }
internal ContainerNetworkInterface(string id, string name, string type, string etag, ContainerNetworkInterfaceConfiguration containerNetworkInterfaceConfiguration, SubResource container, IList <ContainerNetworkInterfaceIpConfiguration> ipConfigurations, ProvisioningState?provisioningState) : base(id) { Name = name; Type = type; Etag = etag; ContainerNetworkInterfaceConfiguration = containerNetworkInterfaceConfiguration; Container = container; IpConfigurations = ipConfigurations; ProvisioningState = provisioningState; }
internal FirewallPolicy(string id, string name, string type, string location, IDictionary <string, string> tags, string etag, ManagedServiceIdentity identity, IReadOnlyList <SubResource> ruleGroups, ProvisioningState?provisioningState, SubResource basePolicy, IReadOnlyList <SubResource> firewalls, IReadOnlyList <SubResource> childPolicies, AzureFirewallThreatIntelMode?threatIntelMode, FirewallPolicyThreatIntelWhitelist threatIntelWhitelist, FirewallPolicyIntrusionSystemMode?intrusionSystemMode, FirewallPolicyTransportSecurity transportSecurity) : base(id, name, type, location, tags) { Etag = etag; Identity = identity; RuleGroups = ruleGroups; ProvisioningState = provisioningState; BasePolicy = basePolicy; Firewalls = firewalls; ChildPolicies = childPolicies; ThreatIntelMode = threatIntelMode; ThreatIntelWhitelist = threatIntelWhitelist; IntrusionSystemMode = intrusionSystemMode; TransportSecurity = transportSecurity; }
internal static VirtualRouter DeserializeVirtualRouter(JsonElement element) { Optional <string> etag = default; Optional <string> id = default; Optional <string> name = default; Optional <string> type = default; Optional <string> location = default; Optional <IDictionary <string, string> > tags = default; Optional <long> virtualRouterAsn = default; Optional <IList <string> > virtualRouterIps = default; Optional <SubResource> hostedSubnet = default; Optional <SubResource> hostedGateway = default; Optional <IReadOnlyList <SubResource> > peerings = default; Optional <ProvisioningState> provisioningState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("etag")) { etag = property.Value.GetString(); 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")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } 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")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("virtualRouterAsn")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } virtualRouterAsn = property0.Value.GetInt64(); continue; } if (property0.NameEquals("virtualRouterIps")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } List <string> array = new List <string>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(item.GetString()); } virtualRouterIps = array; continue; } if (property0.NameEquals("hostedSubnet")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } hostedSubnet = SubResource.DeserializeSubResource(property0.Value); continue; } if (property0.NameEquals("hostedGateway")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } hostedGateway = SubResource.DeserializeSubResource(property0.Value); continue; } if (property0.NameEquals("peerings")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } List <SubResource> array = new List <SubResource>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(SubResource.DeserializeSubResource(item)); } peerings = array; continue; } if (property0.NameEquals("provisioningState")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } } continue; } } return(new VirtualRouter(id.Value, name.Value, type.Value, location.Value, Optional.ToDictionary(tags), etag.Value, Optional.ToNullable(virtualRouterAsn), Optional.ToList(virtualRouterIps), hostedSubnet.Value, hostedGateway.Value, Optional.ToList(peerings), Optional.ToNullable(provisioningState))); }
internal VirtualHub(string id, string name, string type, string location, IDictionary <string, string> tags, string etag, SubResource virtualWan, SubResource vpnGateway, SubResource p2SVpnGateway, SubResource expressRouteGateway, SubResource azureFirewall, SubResource securityPartnerProvider, IList <HubVirtualNetworkConnection> virtualNetworkConnections, string addressPrefix, VirtualHubRouteTable routeTable, ProvisioningState?provisioningState, string securityProviderName, IList <VirtualHubRouteTableV2> virtualHubRouteTableV2S, string sku) : base(id, name, type, location, tags) { Etag = etag; VirtualWan = virtualWan; VpnGateway = vpnGateway; P2SVpnGateway = p2SVpnGateway; ExpressRouteGateway = expressRouteGateway; AzureFirewall = azureFirewall; SecurityPartnerProvider = securityPartnerProvider; VirtualNetworkConnections = virtualNetworkConnections; AddressPrefix = addressPrefix; RouteTable = routeTable; ProvisioningState = provisioningState; SecurityProviderName = securityProviderName; VirtualHubRouteTableV2S = virtualHubRouteTableV2S; Sku = sku; }
internal static ExpressRoutePort DeserializeExpressRoutePort(JsonElement element) { Optional <string> etag = default; Optional <ManagedServiceIdentity> identity = default; Optional <string> id = default; Optional <string> name = default; Optional <string> type = default; Optional <string> location = default; Optional <IDictionary <string, string> > tags = default; Optional <string> peeringLocation = default; Optional <int> bandwidthInGbps = default; Optional <float> provisionedBandwidthInGbps = default; Optional <string> mtu = default; Optional <ExpressRoutePortsEncapsulation> encapsulation = default; Optional <string> etherType = default; Optional <string> allocationDate = default; Optional <IList <ExpressRouteLink> > links = default; Optional <IReadOnlyList <SubResource> > circuits = default; Optional <ProvisioningState> provisioningState = default; Optional <string> resourceGuid = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("etag")) { etag = property.Value.GetString(); continue; } if (property.NameEquals("identity")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } identity = ManagedServiceIdentity.DeserializeManagedServiceIdentity(property.Value); 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")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } 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")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("peeringLocation")) { peeringLocation = property0.Value.GetString(); continue; } if (property0.NameEquals("bandwidthInGbps")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } bandwidthInGbps = property0.Value.GetInt32(); continue; } if (property0.NameEquals("provisionedBandwidthInGbps")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } provisionedBandwidthInGbps = property0.Value.GetSingle(); continue; } if (property0.NameEquals("mtu")) { mtu = property0.Value.GetString(); continue; } if (property0.NameEquals("encapsulation")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } encapsulation = new ExpressRoutePortsEncapsulation(property0.Value.GetString()); continue; } if (property0.NameEquals("etherType")) { etherType = property0.Value.GetString(); continue; } if (property0.NameEquals("allocationDate")) { allocationDate = property0.Value.GetString(); continue; } if (property0.NameEquals("links")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } List <ExpressRouteLink> array = new List <ExpressRouteLink>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(ExpressRouteLink.DeserializeExpressRouteLink(item)); } links = array; continue; } if (property0.NameEquals("circuits")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } List <SubResource> array = new List <SubResource>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(SubResource.DeserializeSubResource(item)); } circuits = array; continue; } if (property0.NameEquals("provisioningState")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } if (property0.NameEquals("resourceGuid")) { resourceGuid = property0.Value.GetString(); continue; } } continue; } } return(new ExpressRoutePort(id.Value, name.Value, type.Value, location.Value, Optional.ToDictionary(tags), etag.Value, identity.Value, peeringLocation.Value, Optional.ToNullable(bandwidthInGbps), Optional.ToNullable(provisionedBandwidthInGbps), mtu.Value, Optional.ToNullable(encapsulation), etherType.Value, allocationDate.Value, Optional.ToList(links), Optional.ToList(circuits), Optional.ToNullable(provisioningState), resourceGuid.Value)); }
internal VirtualNetworkGatewayConnection(string id, string name, string type, string location, IDictionary <string, string> tags, string etag, string authorizationKey, VirtualNetworkGateway virtualNetworkGateway1, VirtualNetworkGateway virtualNetworkGateway2, LocalNetworkGateway localNetworkGateway2, VirtualNetworkGatewayConnectionType connectionType, VirtualNetworkGatewayConnectionProtocol?connectionProtocol, int?routingWeight, int?dpdTimeoutSeconds, string sharedKey, VirtualNetworkGatewayConnectionStatus?connectionStatus, IList <TunnelConnectionHealth> tunnelConnectionStatus, long?egressBytesTransferred, long?ingressBytesTransferred, SubResource peer, bool?enableBgp, bool?useLocalAzureIpAddress, bool?usePolicyBasedTrafficSelectors, IList <IpsecPolicy> ipsecPolicies, IList <TrafficSelectorPolicy> trafficSelectorPolicies, string resourceGuid, ProvisioningState?provisioningState, bool?expressRouteGatewayBypass) : base(id, name, type, location, tags) { Etag = etag; AuthorizationKey = authorizationKey; VirtualNetworkGateway1 = virtualNetworkGateway1; VirtualNetworkGateway2 = virtualNetworkGateway2; LocalNetworkGateway2 = localNetworkGateway2; ConnectionType = connectionType; ConnectionProtocol = connectionProtocol; RoutingWeight = routingWeight; DpdTimeoutSeconds = dpdTimeoutSeconds; SharedKey = sharedKey; ConnectionStatus = connectionStatus; TunnelConnectionStatus = tunnelConnectionStatus; EgressBytesTransferred = egressBytesTransferred; IngressBytesTransferred = ingressBytesTransferred; Peer = peer; EnableBgp = enableBgp; UseLocalAzureIpAddress = useLocalAzureIpAddress; UsePolicyBasedTrafficSelectors = usePolicyBasedTrafficSelectors; IpsecPolicies = ipsecPolicies; TrafficSelectorPolicies = trafficSelectorPolicies; ResourceGuid = resourceGuid; ProvisioningState = provisioningState; ExpressRouteGatewayBypass = expressRouteGatewayBypass; }
internal static ApplicationGatewayRedirectConfiguration DeserializeApplicationGatewayRedirectConfiguration(JsonElement element) { string name = default; string etag = default; string type = default; string id = default; ApplicationGatewayRedirectType?redirectType = default; SubResource targetListener = default; string targetUrl = default; bool? includePath = default; bool? includeQueryString = default; IList <SubResource> requestRoutingRules = default; IList <SubResource> urlPathMaps = default; IList <SubResource> pathRules = 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("redirectType")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } redirectType = new ApplicationGatewayRedirectType(property0.Value.GetString()); continue; } if (property0.NameEquals("targetListener")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } targetListener = DeserializeSubResource(property0.Value); continue; } if (property0.NameEquals("targetUrl")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } targetUrl = property0.Value.GetString(); continue; } if (property0.NameEquals("includePath")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } includePath = property0.Value.GetBoolean(); continue; } if (property0.NameEquals("includeQueryString")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } includeQueryString = property0.Value.GetBoolean(); continue; } if (property0.NameEquals("requestRoutingRules")) { 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)); } } requestRoutingRules = array; continue; } if (property0.NameEquals("urlPathMaps")) { 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)); } } urlPathMaps = array; continue; } if (property0.NameEquals("pathRules")) { 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)); } } pathRules = array; continue; } } continue; } } return(new ApplicationGatewayRedirectConfiguration(id, name, etag, type, redirectType, targetListener, targetUrl, includePath, includeQueryString, requestRoutingRules, urlPathMaps, pathRules)); }
internal FrontendIPConfiguration(string id, string name, string etag, string type, IList <string> zones, IReadOnlyList <SubResource> inboundNatRules, IReadOnlyList <SubResource> inboundNatPools, IReadOnlyList <SubResource> outboundRules, IReadOnlyList <SubResource> loadBalancingRules, string privateIPAddress, IPAllocationMethod?privateIPAllocationMethod, IPVersion?privateIPAddressVersion, SubnetData subnet, PublicIPAddressData publicIPAddress, SubResource publicIPPrefix, SubResource gatewayLoadBalancer, ProvisioningState?provisioningState) : base(id) { Name = name; Etag = etag; Type = type; Zones = zones; InboundNatRules = inboundNatRules; InboundNatPools = inboundNatPools; OutboundRules = outboundRules; LoadBalancingRules = loadBalancingRules; PrivateIPAddress = privateIPAddress; PrivateIPAllocationMethod = privateIPAllocationMethod; PrivateIPAddressVersion = privateIPAddressVersion; Subnet = subnet; PublicIPAddress = publicIPAddress; PublicIPPrefix = publicIPPrefix; GatewayLoadBalancer = gatewayLoadBalancer; ProvisioningState = provisioningState; }
internal static BackendAddressPool DeserializeBackendAddressPool(JsonElement element) { string name = default; string etag = default; string type = default; string id = default; IList <NetworkInterfaceIPConfiguration> backendIPConfigurations = default; IList <LoadBalancerBackendAddress> loadBalancerBackendAddresses = default; IList <SubResource> loadBalancingRules = default; SubResource outboundRule = default; IList <SubResource> outboundRules = 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("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("backendIPConfigurations")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } List <NetworkInterfaceIPConfiguration> array = new List <NetworkInterfaceIPConfiguration>(); foreach (var item in property0.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(NetworkInterfaceIPConfiguration.DeserializeNetworkInterfaceIPConfiguration(item)); } } backendIPConfigurations = array; continue; } if (property0.NameEquals("loadBalancerBackendAddresses")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } List <LoadBalancerBackendAddress> array = new List <LoadBalancerBackendAddress>(); foreach (var item in property0.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(LoadBalancerBackendAddress.DeserializeLoadBalancerBackendAddress(item)); } } loadBalancerBackendAddresses = 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("outboundRule")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } outboundRule = DeserializeSubResource(property0.Value); 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("provisioningState")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } } continue; } } return(new BackendAddressPool(id, name, etag, type, backendIPConfigurations, loadBalancerBackendAddresses, loadBalancingRules, outboundRule, outboundRules, provisioningState)); }
internal NetworkInterface(string id, string name, string type, string location, IDictionary <string, string> tags, string etag, SubResource virtualMachine, NetworkSecurityGroup networkSecurityGroup, PrivateEndpoint privateEndpoint, IList <NetworkInterfaceIPConfiguration> ipConfigurations, IList <NetworkInterfaceTapConfiguration> tapConfigurations, NetworkInterfaceDnsSettings dnsSettings, string macAddress, bool?primary, bool?enableAcceleratedNetworking, bool?enableIPForwarding, IList <string> hostedWorkloads, string resourceGuid, ProvisioningState?provisioningState) : base(id, name, type, location, tags) { Etag = etag; VirtualMachine = virtualMachine; NetworkSecurityGroup = networkSecurityGroup; PrivateEndpoint = privateEndpoint; IpConfigurations = ipConfigurations; TapConfigurations = tapConfigurations; DnsSettings = dnsSettings; MacAddress = macAddress; Primary = primary; EnableAcceleratedNetworking = enableAcceleratedNetworking; EnableIPForwarding = enableIPForwarding; HostedWorkloads = hostedWorkloads; ResourceGuid = resourceGuid; ProvisioningState = provisioningState; }
internal static ApplicationGateway DeserializeApplicationGateway(JsonElement element) { Optional <string> etag = default; Optional <IList <string> > zones = default; Optional <ManagedServiceIdentity> identity = default; Optional <string> id = default; Optional <string> name = default; Optional <string> type = default; Optional <string> location = default; Optional <IDictionary <string, string> > tags = default; Optional <ApplicationGatewaySku> sku = default; Optional <ApplicationGatewaySslPolicy> sslPolicy = default; Optional <ApplicationGatewayOperationalState> operationalState = default; Optional <IList <ApplicationGatewayIPConfiguration> > gatewayIPConfigurations = default; Optional <IList <ApplicationGatewayAuthenticationCertificate> > authenticationCertificates = default; Optional <IList <ApplicationGatewayTrustedRootCertificate> > trustedRootCertificates = default; Optional <IList <ApplicationGatewaySslCertificate> > sslCertificates = default; Optional <IList <ApplicationGatewayFrontendIPConfiguration> > frontendIPConfigurations = default; Optional <IList <ApplicationGatewayFrontendPort> > frontendPorts = default; Optional <IList <ApplicationGatewayProbe> > probes = default; Optional <IList <ApplicationGatewayBackendAddressPool> > backendAddressPools = default; Optional <IList <ApplicationGatewayBackendHttpSettings> > backendHttpSettingsCollection = default; Optional <IList <ApplicationGatewayHttpListener> > httpListeners = default; Optional <IList <ApplicationGatewayUrlPathMap> > urlPathMaps = default; Optional <IList <ApplicationGatewayRequestRoutingRule> > requestRoutingRules = default; Optional <IList <ApplicationGatewayRewriteRuleSet> > rewriteRuleSets = default; Optional <IList <ApplicationGatewayRedirectConfiguration> > redirectConfigurations = default; Optional <ApplicationGatewayWebApplicationFirewallConfiguration> webApplicationFirewallConfiguration = default; Optional <SubResource> firewallPolicy = default; Optional <bool> enableHttp2 = default; Optional <bool> enableFips = default; Optional <ApplicationGatewayAutoscaleConfiguration> autoscaleConfiguration = default; Optional <string> resourceGuid = default; Optional <ProvisioningState> provisioningState = default; Optional <IList <ApplicationGatewayCustomError> > customErrorConfigurations = default; Optional <bool> forceFirewallPolicyAssociation = default; foreach (var property in element.EnumerateObject()) { 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("identity")) { identity = ManagedServiceIdentity.DeserializeManagedServiceIdentity(property.Value); 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("sku")) { sku = ApplicationGatewaySku.DeserializeApplicationGatewaySku(property0.Value); continue; } if (property0.NameEquals("sslPolicy")) { sslPolicy = ApplicationGatewaySslPolicy.DeserializeApplicationGatewaySslPolicy(property0.Value); continue; } if (property0.NameEquals("operationalState")) { operationalState = new ApplicationGatewayOperationalState(property0.Value.GetString()); continue; } if (property0.NameEquals("gatewayIPConfigurations")) { List <ApplicationGatewayIPConfiguration> array = new List <ApplicationGatewayIPConfiguration>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(ApplicationGatewayIPConfiguration.DeserializeApplicationGatewayIPConfiguration(item)); } gatewayIPConfigurations = array; continue; } if (property0.NameEquals("authenticationCertificates")) { List <ApplicationGatewayAuthenticationCertificate> array = new List <ApplicationGatewayAuthenticationCertificate>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(ApplicationGatewayAuthenticationCertificate.DeserializeApplicationGatewayAuthenticationCertificate(item)); } authenticationCertificates = array; continue; } if (property0.NameEquals("trustedRootCertificates")) { List <ApplicationGatewayTrustedRootCertificate> array = new List <ApplicationGatewayTrustedRootCertificate>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(ApplicationGatewayTrustedRootCertificate.DeserializeApplicationGatewayTrustedRootCertificate(item)); } trustedRootCertificates = array; continue; } if (property0.NameEquals("sslCertificates")) { List <ApplicationGatewaySslCertificate> array = new List <ApplicationGatewaySslCertificate>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(ApplicationGatewaySslCertificate.DeserializeApplicationGatewaySslCertificate(item)); } sslCertificates = array; continue; } if (property0.NameEquals("frontendIPConfigurations")) { List <ApplicationGatewayFrontendIPConfiguration> array = new List <ApplicationGatewayFrontendIPConfiguration>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(ApplicationGatewayFrontendIPConfiguration.DeserializeApplicationGatewayFrontendIPConfiguration(item)); } frontendIPConfigurations = array; continue; } if (property0.NameEquals("frontendPorts")) { List <ApplicationGatewayFrontendPort> array = new List <ApplicationGatewayFrontendPort>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(ApplicationGatewayFrontendPort.DeserializeApplicationGatewayFrontendPort(item)); } frontendPorts = array; continue; } if (property0.NameEquals("probes")) { List <ApplicationGatewayProbe> array = new List <ApplicationGatewayProbe>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(ApplicationGatewayProbe.DeserializeApplicationGatewayProbe(item)); } probes = array; continue; } if (property0.NameEquals("backendAddressPools")) { List <ApplicationGatewayBackendAddressPool> array = new List <ApplicationGatewayBackendAddressPool>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(ApplicationGatewayBackendAddressPool.DeserializeApplicationGatewayBackendAddressPool(item)); } backendAddressPools = array; continue; } if (property0.NameEquals("backendHttpSettingsCollection")) { List <ApplicationGatewayBackendHttpSettings> array = new List <ApplicationGatewayBackendHttpSettings>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(ApplicationGatewayBackendHttpSettings.DeserializeApplicationGatewayBackendHttpSettings(item)); } backendHttpSettingsCollection = array; continue; } if (property0.NameEquals("httpListeners")) { List <ApplicationGatewayHttpListener> array = new List <ApplicationGatewayHttpListener>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(ApplicationGatewayHttpListener.DeserializeApplicationGatewayHttpListener(item)); } httpListeners = array; continue; } if (property0.NameEquals("urlPathMaps")) { List <ApplicationGatewayUrlPathMap> array = new List <ApplicationGatewayUrlPathMap>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(ApplicationGatewayUrlPathMap.DeserializeApplicationGatewayUrlPathMap(item)); } urlPathMaps = array; continue; } if (property0.NameEquals("requestRoutingRules")) { List <ApplicationGatewayRequestRoutingRule> array = new List <ApplicationGatewayRequestRoutingRule>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(ApplicationGatewayRequestRoutingRule.DeserializeApplicationGatewayRequestRoutingRule(item)); } requestRoutingRules = array; continue; } if (property0.NameEquals("rewriteRuleSets")) { List <ApplicationGatewayRewriteRuleSet> array = new List <ApplicationGatewayRewriteRuleSet>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(ApplicationGatewayRewriteRuleSet.DeserializeApplicationGatewayRewriteRuleSet(item)); } rewriteRuleSets = array; continue; } if (property0.NameEquals("redirectConfigurations")) { List <ApplicationGatewayRedirectConfiguration> array = new List <ApplicationGatewayRedirectConfiguration>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(ApplicationGatewayRedirectConfiguration.DeserializeApplicationGatewayRedirectConfiguration(item)); } redirectConfigurations = array; continue; } if (property0.NameEquals("webApplicationFirewallConfiguration")) { webApplicationFirewallConfiguration = ApplicationGatewayWebApplicationFirewallConfiguration.DeserializeApplicationGatewayWebApplicationFirewallConfiguration(property0.Value); continue; } if (property0.NameEquals("firewallPolicy")) { firewallPolicy = SubResource.DeserializeSubResource(property0.Value); continue; } if (property0.NameEquals("enableHttp2")) { enableHttp2 = property0.Value.GetBoolean(); continue; } if (property0.NameEquals("enableFips")) { enableFips = property0.Value.GetBoolean(); continue; } if (property0.NameEquals("autoscaleConfiguration")) { autoscaleConfiguration = ApplicationGatewayAutoscaleConfiguration.DeserializeApplicationGatewayAutoscaleConfiguration(property0.Value); continue; } if (property0.NameEquals("resourceGuid")) { resourceGuid = property0.Value.GetString(); continue; } if (property0.NameEquals("provisioningState")) { provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } if (property0.NameEquals("customErrorConfigurations")) { List <ApplicationGatewayCustomError> array = new List <ApplicationGatewayCustomError>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(ApplicationGatewayCustomError.DeserializeApplicationGatewayCustomError(item)); } customErrorConfigurations = array; continue; } if (property0.NameEquals("forceFirewallPolicyAssociation")) { forceFirewallPolicyAssociation = property0.Value.GetBoolean(); continue; } } continue; } } return(new ApplicationGateway(id.Value, name.Value, type.Value, location.Value, Optional.ToDictionary(tags), etag.Value, Optional.ToList(zones), identity.Value, sku.Value, sslPolicy.Value, Optional.ToNullable(operationalState), Optional.ToList(gatewayIPConfigurations), Optional.ToList(authenticationCertificates), Optional.ToList(trustedRootCertificates), Optional.ToList(sslCertificates), Optional.ToList(frontendIPConfigurations), Optional.ToList(frontendPorts), Optional.ToList(probes), Optional.ToList(backendAddressPools), Optional.ToList(backendHttpSettingsCollection), Optional.ToList(httpListeners), Optional.ToList(urlPathMaps), Optional.ToList(requestRoutingRules), Optional.ToList(rewriteRuleSets), Optional.ToList(redirectConfigurations), webApplicationFirewallConfiguration.Value, firewallPolicy.Value, Optional.ToNullable(enableHttp2), Optional.ToNullable(enableFips), autoscaleConfiguration.Value, resourceGuid.Value, Optional.ToNullable(provisioningState), Optional.ToList(customErrorConfigurations), Optional.ToNullable(forceFirewallPolicyAssociation))); }
internal static VirtualNetworkGatewayConnection DeserializeVirtualNetworkGatewayConnection(JsonElement element) { string etag = default; string id = default; string name = default; string type = default; string location = default; IDictionary <string, string> tags = default; string authorizationKey = default; VirtualNetworkGateway virtualNetworkGateway1 = default; VirtualNetworkGateway virtualNetworkGateway2 = default; LocalNetworkGateway localNetworkGateway2 = default; VirtualNetworkGatewayConnectionType connectionType = default; VirtualNetworkGatewayConnectionProtocol?connectionProtocol = default; int? routingWeight = default; int? dpdTimeoutSeconds = default; string sharedKey = default; VirtualNetworkGatewayConnectionStatus?connectionStatus = default; IList <TunnelConnectionHealth> tunnelConnectionStatus = default; long? egressBytesTransferred = default; long? ingressBytesTransferred = default; SubResource peer = default; bool? enableBgp = default; bool? useLocalAzureIpAddress = default; bool? usePolicyBasedTrafficSelectors = default; IList <IpsecPolicy> ipsecPolicies = default; IList <TrafficSelectorPolicy> trafficSelectorPolicies = default; string resourceGuid = default; ProvisioningState? provisioningState = default; bool? expressRouteGatewayBypass = default; foreach (var property in element.EnumerateObject()) { 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("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("authorizationKey")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } authorizationKey = property0.Value.GetString(); continue; } if (property0.NameEquals("virtualNetworkGateway1")) { virtualNetworkGateway1 = VirtualNetworkGateway.DeserializeVirtualNetworkGateway(property0.Value); continue; } if (property0.NameEquals("virtualNetworkGateway2")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } virtualNetworkGateway2 = VirtualNetworkGateway.DeserializeVirtualNetworkGateway(property0.Value); continue; } if (property0.NameEquals("localNetworkGateway2")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } localNetworkGateway2 = LocalNetworkGateway.DeserializeLocalNetworkGateway(property0.Value); continue; } if (property0.NameEquals("connectionType")) { connectionType = new VirtualNetworkGatewayConnectionType(property0.Value.GetString()); continue; } if (property0.NameEquals("connectionProtocol")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } connectionProtocol = new VirtualNetworkGatewayConnectionProtocol(property0.Value.GetString()); continue; } if (property0.NameEquals("routingWeight")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } routingWeight = property0.Value.GetInt32(); continue; } if (property0.NameEquals("dpdTimeoutSeconds")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } dpdTimeoutSeconds = property0.Value.GetInt32(); continue; } if (property0.NameEquals("sharedKey")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } sharedKey = property0.Value.GetString(); continue; } if (property0.NameEquals("connectionStatus")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } connectionStatus = new VirtualNetworkGatewayConnectionStatus(property0.Value.GetString()); continue; } if (property0.NameEquals("tunnelConnectionStatus")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } List <TunnelConnectionHealth> array = new List <TunnelConnectionHealth>(); foreach (var item in property0.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(TunnelConnectionHealth.DeserializeTunnelConnectionHealth(item)); } } tunnelConnectionStatus = array; continue; } if (property0.NameEquals("egressBytesTransferred")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } egressBytesTransferred = property0.Value.GetInt64(); continue; } if (property0.NameEquals("ingressBytesTransferred")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } ingressBytesTransferred = property0.Value.GetInt64(); continue; } if (property0.NameEquals("peer")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } peer = SubResource.DeserializeSubResource(property0.Value); continue; } if (property0.NameEquals("enableBgp")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } enableBgp = property0.Value.GetBoolean(); continue; } if (property0.NameEquals("useLocalAzureIpAddress")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } useLocalAzureIpAddress = property0.Value.GetBoolean(); continue; } if (property0.NameEquals("usePolicyBasedTrafficSelectors")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } usePolicyBasedTrafficSelectors = property0.Value.GetBoolean(); continue; } if (property0.NameEquals("ipsecPolicies")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } List <IpsecPolicy> array = new List <IpsecPolicy>(); foreach (var item in property0.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(IpsecPolicy.DeserializeIpsecPolicy(item)); } } ipsecPolicies = array; continue; } if (property0.NameEquals("trafficSelectorPolicies")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } List <TrafficSelectorPolicy> array = new List <TrafficSelectorPolicy>(); foreach (var item in property0.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(TrafficSelectorPolicy.DeserializeTrafficSelectorPolicy(item)); } } trafficSelectorPolicies = array; 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; } if (property0.NameEquals("expressRouteGatewayBypass")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } expressRouteGatewayBypass = property0.Value.GetBoolean(); continue; } } continue; } } return(new VirtualNetworkGatewayConnection(id, name, type, location, tags, etag, authorizationKey, virtualNetworkGateway1, virtualNetworkGateway2, localNetworkGateway2, connectionType, connectionProtocol, routingWeight, dpdTimeoutSeconds, sharedKey, connectionStatus, tunnelConnectionStatus, egressBytesTransferred, ingressBytesTransferred, peer, enableBgp, useLocalAzureIpAddress, usePolicyBasedTrafficSelectors, ipsecPolicies, trafficSelectorPolicies, resourceGuid, provisioningState, expressRouteGatewayBypass)); }
internal VpnSiteLinkConnection(string id, string name, string etag, string type, SubResource vpnSiteLink, int?routingWeight, VpnConnectionStatus?connectionStatus, VirtualNetworkGatewayConnectionProtocol?vpnConnectionProtocolType, long?ingressBytesTransferred, long?egressBytesTransferred, int?connectionBandwidth, string sharedKey, bool?enableBgp, bool?usePolicyBasedTrafficSelectors, IList <IpsecPolicy> ipsecPolicies, bool?enableRateLimiting, bool?useLocalAzureIpAddress, ProvisioningState?provisioningState) : base(id) { Name = name; Etag = etag; Type = type; VpnSiteLink = vpnSiteLink; RoutingWeight = routingWeight; ConnectionStatus = connectionStatus; VpnConnectionProtocolType = vpnConnectionProtocolType; IngressBytesTransferred = ingressBytesTransferred; EgressBytesTransferred = egressBytesTransferred; ConnectionBandwidth = connectionBandwidth; SharedKey = sharedKey; EnableBgp = enableBgp; UsePolicyBasedTrafficSelectors = usePolicyBasedTrafficSelectors; IpsecPolicies = ipsecPolicies; EnableRateLimiting = enableRateLimiting; UseLocalAzureIpAddress = useLocalAzureIpAddress; ProvisioningState = provisioningState; }
internal VirtualRouter(string id, string name, string type, string location, IDictionary <string, string> tags, string etag, long?virtualRouterAsn, IList <string> virtualRouterIps, SubResource hostedSubnet, SubResource hostedGateway, IReadOnlyList <SubResource> peerings, ProvisioningState?provisioningState) : base(id, name, type, location, tags) { Etag = etag; VirtualRouterAsn = virtualRouterAsn; VirtualRouterIps = virtualRouterIps; HostedSubnet = hostedSubnet; HostedGateway = hostedGateway; Peerings = peerings; ProvisioningState = provisioningState; }
internal IpAllocation(string id, string name, string type, string location, IDictionary <string, string> tags, string etag, SubResource subnet, SubResource virtualNetwork, IpAllocationType?typePropertiesType, string prefix, int?prefixLength, IPVersion?prefixType, string ipamAllocationId, IDictionary <string, string> allocationTags) : base(id, name, type, location, tags) { Etag = etag; Subnet = subnet; VirtualNetwork = virtualNetwork; TypePropertiesType = typePropertiesType; Prefix = prefix; PrefixLength = prefixLength; PrefixType = prefixType; IpamAllocationId = ipamAllocationId; AllocationTags = allocationTags; }