internal ApplicationGateway(string id, string name, string type, string location, IDictionary <string, string> tags, string etag, IList <string> zones, ManagedServiceIdentity identity, ApplicationGatewaySku sku, ApplicationGatewaySslPolicy sslPolicy, ApplicationGatewayOperationalState?operationalState, IList <ApplicationGatewayIPConfiguration> gatewayIPConfigurations, IList <ApplicationGatewayAuthenticationCertificate> authenticationCertificates, IList <ApplicationGatewayTrustedRootCertificate> trustedRootCertificates, IList <ApplicationGatewaySslCertificate> sslCertificates, IList <ApplicationGatewayFrontendIPConfiguration> frontendIPConfigurations, IList <ApplicationGatewayFrontendPort> frontendPorts, IList <ApplicationGatewayProbe> probes, IList <ApplicationGatewayBackendAddressPool> backendAddressPools, IList <ApplicationGatewayBackendHttpSettings> backendHttpSettingsCollection, IList <ApplicationGatewayHttpListener> httpListeners, IList <ApplicationGatewayUrlPathMap> urlPathMaps, IList <ApplicationGatewayRequestRoutingRule> requestRoutingRules, IList <ApplicationGatewayRewriteRuleSet> rewriteRuleSets, IList <ApplicationGatewayRedirectConfiguration> redirectConfigurations, ApplicationGatewayWebApplicationFirewallConfiguration webApplicationFirewallConfiguration, SubResource firewallPolicy, bool?enableHttp2, bool?enableFips, ApplicationGatewayAutoscaleConfiguration autoscaleConfiguration, 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; SslCertificates = sslCertificates; FrontendIPConfigurations = frontendIPConfigurations; FrontendPorts = frontendPorts; Probes = probes; BackendAddressPools = backendAddressPools; BackendHttpSettingsCollection = backendHttpSettingsCollection; HttpListeners = httpListeners; UrlPathMaps = urlPathMaps; RequestRoutingRules = requestRoutingRules; RewriteRuleSets = rewriteRuleSets; RedirectConfigurations = redirectConfigurations; WebApplicationFirewallConfiguration = webApplicationFirewallConfiguration; FirewallPolicy = firewallPolicy; EnableHttp2 = enableHttp2; EnableFips = enableFips; AutoscaleConfiguration = autoscaleConfiguration; ResourceGuid = resourceGuid; ProvisioningState = provisioningState; CustomErrorConfigurations = customErrorConfigurations; ForceFirewallPolicyAssociation = forceFirewallPolicyAssociation; }
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 ApplicationGateway DeserializeApplicationGateway(JsonElement element) { string etag = default; IList <string> zones = default; ManagedServiceIdentity identity = default; string id = default; string name = default; string type = default; string location = default; IDictionary <string, string> tags = default; ApplicationGatewaySku sku = default; ApplicationGatewaySslPolicy sslPolicy = default; ApplicationGatewayOperationalState? operationalState = default; IList <ApplicationGatewayIPConfiguration> gatewayIPConfigurations = default; IList <ApplicationGatewayAuthenticationCertificate> authenticationCertificates = default; IList <ApplicationGatewayTrustedRootCertificate> trustedRootCertificates = default; IList <ApplicationGatewaySslCertificate> sslCertificates = default; IList <ApplicationGatewayFrontendIPConfiguration> frontendIPConfigurations = default; IList <ApplicationGatewayFrontendPort> frontendPorts = default; IList <ApplicationGatewayProbe> probes = default; IList <ApplicationGatewayBackendAddressPool> backendAddressPools = default; IList <ApplicationGatewayBackendHttpSettings> backendHttpSettingsCollection = default; IList <ApplicationGatewayHttpListener> httpListeners = default; IList <ApplicationGatewayUrlPathMap> urlPathMaps = default; IList <ApplicationGatewayRequestRoutingRule> requestRoutingRules = default; IList <ApplicationGatewayRewriteRuleSet> rewriteRuleSets = default; IList <ApplicationGatewayRedirectConfiguration> redirectConfigurations = default; ApplicationGatewayWebApplicationFirewallConfiguration webApplicationFirewallConfiguration = default; SubResource firewallPolicy = default; bool?enableHttp2 = default; bool?enableFips = default; ApplicationGatewayAutoscaleConfiguration autoscaleConfiguration = default; string resourceGuid = default; ProvisioningState?provisioningState = default; IList <ApplicationGatewayCustomError> customErrorConfigurations = default; bool?forceFirewallPolicyAssociation = 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("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("identity")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } identity = ManagedServiceIdentity.DeserializeManagedServiceIdentity(property.Value); 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("sku")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } sku = ApplicationGatewaySku.DeserializeApplicationGatewaySku(property0.Value); continue; } if (property0.NameEquals("sslPolicy")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } sslPolicy = ApplicationGatewaySslPolicy.DeserializeApplicationGatewaySslPolicy(property0.Value); continue; } if (property0.NameEquals("operationalState")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } operationalState = new ApplicationGatewayOperationalState(property0.Value.GetString()); continue; } if (property0.NameEquals("gatewayIPConfigurations")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } List <ApplicationGatewayIPConfiguration> array = new List <ApplicationGatewayIPConfiguration>(); foreach (var item in property0.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(ApplicationGatewayIPConfiguration.DeserializeApplicationGatewayIPConfiguration(item)); } } gatewayIPConfigurations = array; continue; } if (property0.NameEquals("authenticationCertificates")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } List <ApplicationGatewayAuthenticationCertificate> array = new List <ApplicationGatewayAuthenticationCertificate>(); foreach (var item in property0.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(ApplicationGatewayAuthenticationCertificate.DeserializeApplicationGatewayAuthenticationCertificate(item)); } } authenticationCertificates = array; continue; } if (property0.NameEquals("trustedRootCertificates")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } List <ApplicationGatewayTrustedRootCertificate> array = new List <ApplicationGatewayTrustedRootCertificate>(); foreach (var item in property0.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(ApplicationGatewayTrustedRootCertificate.DeserializeApplicationGatewayTrustedRootCertificate(item)); } } trustedRootCertificates = array; continue; } if (property0.NameEquals("sslCertificates")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } List <ApplicationGatewaySslCertificate> array = new List <ApplicationGatewaySslCertificate>(); foreach (var item in property0.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(ApplicationGatewaySslCertificate.DeserializeApplicationGatewaySslCertificate(item)); } } sslCertificates = array; continue; } if (property0.NameEquals("frontendIPConfigurations")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } List <ApplicationGatewayFrontendIPConfiguration> array = new List <ApplicationGatewayFrontendIPConfiguration>(); foreach (var item in property0.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(ApplicationGatewayFrontendIPConfiguration.DeserializeApplicationGatewayFrontendIPConfiguration(item)); } } frontendIPConfigurations = array; continue; } if (property0.NameEquals("frontendPorts")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } List <ApplicationGatewayFrontendPort> array = new List <ApplicationGatewayFrontendPort>(); foreach (var item in property0.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(ApplicationGatewayFrontendPort.DeserializeApplicationGatewayFrontendPort(item)); } } frontendPorts = array; continue; } if (property0.NameEquals("probes")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } List <ApplicationGatewayProbe> array = new List <ApplicationGatewayProbe>(); foreach (var item in property0.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(ApplicationGatewayProbe.DeserializeApplicationGatewayProbe(item)); } } probes = array; continue; } if (property0.NameEquals("backendAddressPools")) { 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)); } } backendAddressPools = array; continue; } if (property0.NameEquals("backendHttpSettingsCollection")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } List <ApplicationGatewayBackendHttpSettings> array = new List <ApplicationGatewayBackendHttpSettings>(); foreach (var item in property0.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(ApplicationGatewayBackendHttpSettings.DeserializeApplicationGatewayBackendHttpSettings(item)); } } backendHttpSettingsCollection = array; continue; } if (property0.NameEquals("httpListeners")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } List <ApplicationGatewayHttpListener> array = new List <ApplicationGatewayHttpListener>(); foreach (var item in property0.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(ApplicationGatewayHttpListener.DeserializeApplicationGatewayHttpListener(item)); } } httpListeners = array; continue; } if (property0.NameEquals("urlPathMaps")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } List <ApplicationGatewayUrlPathMap> array = new List <ApplicationGatewayUrlPathMap>(); foreach (var item in property0.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(ApplicationGatewayUrlPathMap.DeserializeApplicationGatewayUrlPathMap(item)); } } urlPathMaps = array; continue; } if (property0.NameEquals("requestRoutingRules")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } List <ApplicationGatewayRequestRoutingRule> array = new List <ApplicationGatewayRequestRoutingRule>(); foreach (var item in property0.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(ApplicationGatewayRequestRoutingRule.DeserializeApplicationGatewayRequestRoutingRule(item)); } } requestRoutingRules = array; continue; } if (property0.NameEquals("rewriteRuleSets")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } List <ApplicationGatewayRewriteRuleSet> array = new List <ApplicationGatewayRewriteRuleSet>(); foreach (var item in property0.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(ApplicationGatewayRewriteRuleSet.DeserializeApplicationGatewayRewriteRuleSet(item)); } } rewriteRuleSets = array; continue; } if (property0.NameEquals("redirectConfigurations")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } List <ApplicationGatewayRedirectConfiguration> array = new List <ApplicationGatewayRedirectConfiguration>(); foreach (var item in property0.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(ApplicationGatewayRedirectConfiguration.DeserializeApplicationGatewayRedirectConfiguration(item)); } } redirectConfigurations = array; continue; } if (property0.NameEquals("webApplicationFirewallConfiguration")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } webApplicationFirewallConfiguration = ApplicationGatewayWebApplicationFirewallConfiguration.DeserializeApplicationGatewayWebApplicationFirewallConfiguration(property0.Value); continue; } if (property0.NameEquals("firewallPolicy")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } firewallPolicy = SubResource.DeserializeSubResource(property0.Value); continue; } if (property0.NameEquals("enableHttp2")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } enableHttp2 = property0.Value.GetBoolean(); continue; } if (property0.NameEquals("enableFips")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } enableFips = property0.Value.GetBoolean(); continue; } if (property0.NameEquals("autoscaleConfiguration")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } autoscaleConfiguration = ApplicationGatewayAutoscaleConfiguration.DeserializeApplicationGatewayAutoscaleConfiguration(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("customErrorConfigurations")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } List <ApplicationGatewayCustomError> array = new List <ApplicationGatewayCustomError>(); foreach (var item in property0.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(ApplicationGatewayCustomError.DeserializeApplicationGatewayCustomError(item)); } } customErrorConfigurations = array; continue; } if (property0.NameEquals("forceFirewallPolicyAssociation")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } forceFirewallPolicyAssociation = property0.Value.GetBoolean(); continue; } } continue; } } return(new ApplicationGateway(id, name, type, location, tags, etag, zones, identity, sku, sslPolicy, operationalState, gatewayIPConfigurations, authenticationCertificates, trustedRootCertificates, sslCertificates, frontendIPConfigurations, frontendPorts, probes, backendAddressPools, backendHttpSettingsCollection, httpListeners, urlPathMaps, requestRoutingRules, rewriteRuleSets, redirectConfigurations, webApplicationFirewallConfiguration, firewallPolicy, enableHttp2, enableFips, autoscaleConfiguration, resourceGuid, provisioningState, customErrorConfigurations, forceFirewallPolicyAssociation)); }