| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | // <auto-generated/> |
| | 5 | |
|
| | 6 | | #nullable disable |
| | 7 | |
|
| | 8 | | using System.Collections.Generic; |
| | 9 | | using System.Text.Json; |
| | 10 | | using Azure.Core; |
| | 11 | |
|
| | 12 | | namespace Azure.ResourceManager.Network.Models |
| | 13 | | { |
| | 14 | | public partial class ApplicationGateway : IUtf8JsonSerializable |
| | 15 | | { |
| | 16 | | void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) |
| | 17 | | { |
| 0 | 18 | | writer.WriteStartObject(); |
| 0 | 19 | | if (Etag != null) |
| | 20 | | { |
| 0 | 21 | | writer.WritePropertyName("etag"); |
| 0 | 22 | | writer.WriteStringValue(Etag); |
| | 23 | | } |
| 0 | 24 | | if (Zones != null) |
| | 25 | | { |
| 0 | 26 | | writer.WritePropertyName("zones"); |
| 0 | 27 | | writer.WriteStartArray(); |
| 0 | 28 | | foreach (var item in Zones) |
| | 29 | | { |
| 0 | 30 | | writer.WriteStringValue(item); |
| | 31 | | } |
| 0 | 32 | | writer.WriteEndArray(); |
| | 33 | | } |
| 0 | 34 | | if (Identity != null) |
| | 35 | | { |
| 0 | 36 | | writer.WritePropertyName("identity"); |
| 0 | 37 | | writer.WriteObjectValue(Identity); |
| | 38 | | } |
| 0 | 39 | | if (Id != null) |
| | 40 | | { |
| 0 | 41 | | writer.WritePropertyName("id"); |
| 0 | 42 | | writer.WriteStringValue(Id); |
| | 43 | | } |
| 0 | 44 | | if (Name != null) |
| | 45 | | { |
| 0 | 46 | | writer.WritePropertyName("name"); |
| 0 | 47 | | writer.WriteStringValue(Name); |
| | 48 | | } |
| 0 | 49 | | if (Type != null) |
| | 50 | | { |
| 0 | 51 | | writer.WritePropertyName("type"); |
| 0 | 52 | | writer.WriteStringValue(Type); |
| | 53 | | } |
| 0 | 54 | | if (Location != null) |
| | 55 | | { |
| 0 | 56 | | writer.WritePropertyName("location"); |
| 0 | 57 | | writer.WriteStringValue(Location); |
| | 58 | | } |
| 0 | 59 | | if (Tags != null) |
| | 60 | | { |
| 0 | 61 | | writer.WritePropertyName("tags"); |
| 0 | 62 | | writer.WriteStartObject(); |
| 0 | 63 | | foreach (var item in Tags) |
| | 64 | | { |
| 0 | 65 | | writer.WritePropertyName(item.Key); |
| 0 | 66 | | writer.WriteStringValue(item.Value); |
| | 67 | | } |
| 0 | 68 | | writer.WriteEndObject(); |
| | 69 | | } |
| 0 | 70 | | writer.WritePropertyName("properties"); |
| 0 | 71 | | writer.WriteStartObject(); |
| 0 | 72 | | if (Sku != null) |
| | 73 | | { |
| 0 | 74 | | writer.WritePropertyName("sku"); |
| 0 | 75 | | writer.WriteObjectValue(Sku); |
| | 76 | | } |
| 0 | 77 | | if (SslPolicy != null) |
| | 78 | | { |
| 0 | 79 | | writer.WritePropertyName("sslPolicy"); |
| 0 | 80 | | writer.WriteObjectValue(SslPolicy); |
| | 81 | | } |
| 0 | 82 | | if (OperationalState != null) |
| | 83 | | { |
| 0 | 84 | | writer.WritePropertyName("operationalState"); |
| 0 | 85 | | writer.WriteStringValue(OperationalState.Value.ToString()); |
| | 86 | | } |
| 0 | 87 | | if (GatewayIPConfigurations != null) |
| | 88 | | { |
| 0 | 89 | | writer.WritePropertyName("gatewayIPConfigurations"); |
| 0 | 90 | | writer.WriteStartArray(); |
| 0 | 91 | | foreach (var item in GatewayIPConfigurations) |
| | 92 | | { |
| 0 | 93 | | writer.WriteObjectValue(item); |
| | 94 | | } |
| 0 | 95 | | writer.WriteEndArray(); |
| | 96 | | } |
| 0 | 97 | | if (AuthenticationCertificates != null) |
| | 98 | | { |
| 0 | 99 | | writer.WritePropertyName("authenticationCertificates"); |
| 0 | 100 | | writer.WriteStartArray(); |
| 0 | 101 | | foreach (var item in AuthenticationCertificates) |
| | 102 | | { |
| 0 | 103 | | writer.WriteObjectValue(item); |
| | 104 | | } |
| 0 | 105 | | writer.WriteEndArray(); |
| | 106 | | } |
| 0 | 107 | | if (TrustedRootCertificates != null) |
| | 108 | | { |
| 0 | 109 | | writer.WritePropertyName("trustedRootCertificates"); |
| 0 | 110 | | writer.WriteStartArray(); |
| 0 | 111 | | foreach (var item in TrustedRootCertificates) |
| | 112 | | { |
| 0 | 113 | | writer.WriteObjectValue(item); |
| | 114 | | } |
| 0 | 115 | | writer.WriteEndArray(); |
| | 116 | | } |
| 0 | 117 | | if (SslCertificates != null) |
| | 118 | | { |
| 0 | 119 | | writer.WritePropertyName("sslCertificates"); |
| 0 | 120 | | writer.WriteStartArray(); |
| 0 | 121 | | foreach (var item in SslCertificates) |
| | 122 | | { |
| 0 | 123 | | writer.WriteObjectValue(item); |
| | 124 | | } |
| 0 | 125 | | writer.WriteEndArray(); |
| | 126 | | } |
| 0 | 127 | | if (FrontendIPConfigurations != null) |
| | 128 | | { |
| 0 | 129 | | writer.WritePropertyName("frontendIPConfigurations"); |
| 0 | 130 | | writer.WriteStartArray(); |
| 0 | 131 | | foreach (var item in FrontendIPConfigurations) |
| | 132 | | { |
| 0 | 133 | | writer.WriteObjectValue(item); |
| | 134 | | } |
| 0 | 135 | | writer.WriteEndArray(); |
| | 136 | | } |
| 0 | 137 | | if (FrontendPorts != null) |
| | 138 | | { |
| 0 | 139 | | writer.WritePropertyName("frontendPorts"); |
| 0 | 140 | | writer.WriteStartArray(); |
| 0 | 141 | | foreach (var item in FrontendPorts) |
| | 142 | | { |
| 0 | 143 | | writer.WriteObjectValue(item); |
| | 144 | | } |
| 0 | 145 | | writer.WriteEndArray(); |
| | 146 | | } |
| 0 | 147 | | if (Probes != null) |
| | 148 | | { |
| 0 | 149 | | writer.WritePropertyName("probes"); |
| 0 | 150 | | writer.WriteStartArray(); |
| 0 | 151 | | foreach (var item in Probes) |
| | 152 | | { |
| 0 | 153 | | writer.WriteObjectValue(item); |
| | 154 | | } |
| 0 | 155 | | writer.WriteEndArray(); |
| | 156 | | } |
| 0 | 157 | | if (BackendAddressPools != null) |
| | 158 | | { |
| 0 | 159 | | writer.WritePropertyName("backendAddressPools"); |
| 0 | 160 | | writer.WriteStartArray(); |
| 0 | 161 | | foreach (var item in BackendAddressPools) |
| | 162 | | { |
| 0 | 163 | | writer.WriteObjectValue(item); |
| | 164 | | } |
| 0 | 165 | | writer.WriteEndArray(); |
| | 166 | | } |
| 0 | 167 | | if (BackendHttpSettingsCollection != null) |
| | 168 | | { |
| 0 | 169 | | writer.WritePropertyName("backendHttpSettingsCollection"); |
| 0 | 170 | | writer.WriteStartArray(); |
| 0 | 171 | | foreach (var item in BackendHttpSettingsCollection) |
| | 172 | | { |
| 0 | 173 | | writer.WriteObjectValue(item); |
| | 174 | | } |
| 0 | 175 | | writer.WriteEndArray(); |
| | 176 | | } |
| 0 | 177 | | if (HttpListeners != null) |
| | 178 | | { |
| 0 | 179 | | writer.WritePropertyName("httpListeners"); |
| 0 | 180 | | writer.WriteStartArray(); |
| 0 | 181 | | foreach (var item in HttpListeners) |
| | 182 | | { |
| 0 | 183 | | writer.WriteObjectValue(item); |
| | 184 | | } |
| 0 | 185 | | writer.WriteEndArray(); |
| | 186 | | } |
| 0 | 187 | | if (UrlPathMaps != null) |
| | 188 | | { |
| 0 | 189 | | writer.WritePropertyName("urlPathMaps"); |
| 0 | 190 | | writer.WriteStartArray(); |
| 0 | 191 | | foreach (var item in UrlPathMaps) |
| | 192 | | { |
| 0 | 193 | | writer.WriteObjectValue(item); |
| | 194 | | } |
| 0 | 195 | | writer.WriteEndArray(); |
| | 196 | | } |
| 0 | 197 | | if (RequestRoutingRules != null) |
| | 198 | | { |
| 0 | 199 | | writer.WritePropertyName("requestRoutingRules"); |
| 0 | 200 | | writer.WriteStartArray(); |
| 0 | 201 | | foreach (var item in RequestRoutingRules) |
| | 202 | | { |
| 0 | 203 | | writer.WriteObjectValue(item); |
| | 204 | | } |
| 0 | 205 | | writer.WriteEndArray(); |
| | 206 | | } |
| 0 | 207 | | if (RewriteRuleSets != null) |
| | 208 | | { |
| 0 | 209 | | writer.WritePropertyName("rewriteRuleSets"); |
| 0 | 210 | | writer.WriteStartArray(); |
| 0 | 211 | | foreach (var item in RewriteRuleSets) |
| | 212 | | { |
| 0 | 213 | | writer.WriteObjectValue(item); |
| | 214 | | } |
| 0 | 215 | | writer.WriteEndArray(); |
| | 216 | | } |
| 0 | 217 | | if (RedirectConfigurations != null) |
| | 218 | | { |
| 0 | 219 | | writer.WritePropertyName("redirectConfigurations"); |
| 0 | 220 | | writer.WriteStartArray(); |
| 0 | 221 | | foreach (var item in RedirectConfigurations) |
| | 222 | | { |
| 0 | 223 | | writer.WriteObjectValue(item); |
| | 224 | | } |
| 0 | 225 | | writer.WriteEndArray(); |
| | 226 | | } |
| 0 | 227 | | if (WebApplicationFirewallConfiguration != null) |
| | 228 | | { |
| 0 | 229 | | writer.WritePropertyName("webApplicationFirewallConfiguration"); |
| 0 | 230 | | writer.WriteObjectValue(WebApplicationFirewallConfiguration); |
| | 231 | | } |
| 0 | 232 | | if (FirewallPolicy != null) |
| | 233 | | { |
| 0 | 234 | | writer.WritePropertyName("firewallPolicy"); |
| 0 | 235 | | writer.WriteObjectValue(FirewallPolicy); |
| | 236 | | } |
| 0 | 237 | | if (EnableHttp2 != null) |
| | 238 | | { |
| 0 | 239 | | writer.WritePropertyName("enableHttp2"); |
| 0 | 240 | | writer.WriteBooleanValue(EnableHttp2.Value); |
| | 241 | | } |
| 0 | 242 | | if (EnableFips != null) |
| | 243 | | { |
| 0 | 244 | | writer.WritePropertyName("enableFips"); |
| 0 | 245 | | writer.WriteBooleanValue(EnableFips.Value); |
| | 246 | | } |
| 0 | 247 | | if (AutoscaleConfiguration != null) |
| | 248 | | { |
| 0 | 249 | | writer.WritePropertyName("autoscaleConfiguration"); |
| 0 | 250 | | writer.WriteObjectValue(AutoscaleConfiguration); |
| | 251 | | } |
| 0 | 252 | | if (ResourceGuid != null) |
| | 253 | | { |
| 0 | 254 | | writer.WritePropertyName("resourceGuid"); |
| 0 | 255 | | writer.WriteStringValue(ResourceGuid); |
| | 256 | | } |
| 0 | 257 | | if (ProvisioningState != null) |
| | 258 | | { |
| 0 | 259 | | writer.WritePropertyName("provisioningState"); |
| 0 | 260 | | writer.WriteStringValue(ProvisioningState.Value.ToString()); |
| | 261 | | } |
| 0 | 262 | | if (CustomErrorConfigurations != null) |
| | 263 | | { |
| 0 | 264 | | writer.WritePropertyName("customErrorConfigurations"); |
| 0 | 265 | | writer.WriteStartArray(); |
| 0 | 266 | | foreach (var item in CustomErrorConfigurations) |
| | 267 | | { |
| 0 | 268 | | writer.WriteObjectValue(item); |
| | 269 | | } |
| 0 | 270 | | writer.WriteEndArray(); |
| | 271 | | } |
| 0 | 272 | | if (ForceFirewallPolicyAssociation != null) |
| | 273 | | { |
| 0 | 274 | | writer.WritePropertyName("forceFirewallPolicyAssociation"); |
| 0 | 275 | | writer.WriteBooleanValue(ForceFirewallPolicyAssociation.Value); |
| | 276 | | } |
| 0 | 277 | | writer.WriteEndObject(); |
| 0 | 278 | | writer.WriteEndObject(); |
| 0 | 279 | | } |
| | 280 | |
|
| | 281 | | internal static ApplicationGateway DeserializeApplicationGateway(JsonElement element) |
| | 282 | | { |
| 0 | 283 | | string etag = default; |
| 0 | 284 | | IList<string> zones = default; |
| 0 | 285 | | ManagedServiceIdentity identity = default; |
| 0 | 286 | | string id = default; |
| 0 | 287 | | string name = default; |
| 0 | 288 | | string type = default; |
| 0 | 289 | | string location = default; |
| 0 | 290 | | IDictionary<string, string> tags = default; |
| 0 | 291 | | ApplicationGatewaySku sku = default; |
| 0 | 292 | | ApplicationGatewaySslPolicy sslPolicy = default; |
| 0 | 293 | | ApplicationGatewayOperationalState? operationalState = default; |
| 0 | 294 | | IList<ApplicationGatewayIPConfiguration> gatewayIPConfigurations = default; |
| 0 | 295 | | IList<ApplicationGatewayAuthenticationCertificate> authenticationCertificates = default; |
| 0 | 296 | | IList<ApplicationGatewayTrustedRootCertificate> trustedRootCertificates = default; |
| 0 | 297 | | IList<ApplicationGatewaySslCertificate> sslCertificates = default; |
| 0 | 298 | | IList<ApplicationGatewayFrontendIPConfiguration> frontendIPConfigurations = default; |
| 0 | 299 | | IList<ApplicationGatewayFrontendPort> frontendPorts = default; |
| 0 | 300 | | IList<ApplicationGatewayProbe> probes = default; |
| 0 | 301 | | IList<ApplicationGatewayBackendAddressPool> backendAddressPools = default; |
| 0 | 302 | | IList<ApplicationGatewayBackendHttpSettings> backendHttpSettingsCollection = default; |
| 0 | 303 | | IList<ApplicationGatewayHttpListener> httpListeners = default; |
| 0 | 304 | | IList<ApplicationGatewayUrlPathMap> urlPathMaps = default; |
| 0 | 305 | | IList<ApplicationGatewayRequestRoutingRule> requestRoutingRules = default; |
| 0 | 306 | | IList<ApplicationGatewayRewriteRuleSet> rewriteRuleSets = default; |
| 0 | 307 | | IList<ApplicationGatewayRedirectConfiguration> redirectConfigurations = default; |
| 0 | 308 | | ApplicationGatewayWebApplicationFirewallConfiguration webApplicationFirewallConfiguration = default; |
| 0 | 309 | | SubResource firewallPolicy = default; |
| 0 | 310 | | bool? enableHttp2 = default; |
| 0 | 311 | | bool? enableFips = default; |
| 0 | 312 | | ApplicationGatewayAutoscaleConfiguration autoscaleConfiguration = default; |
| 0 | 313 | | string resourceGuid = default; |
| 0 | 314 | | ProvisioningState? provisioningState = default; |
| 0 | 315 | | IList<ApplicationGatewayCustomError> customErrorConfigurations = default; |
| 0 | 316 | | bool? forceFirewallPolicyAssociation = default; |
| 0 | 317 | | foreach (var property in element.EnumerateObject()) |
| | 318 | | { |
| 0 | 319 | | if (property.NameEquals("etag")) |
| | 320 | | { |
| 0 | 321 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | 322 | | { |
| | 323 | | continue; |
| | 324 | | } |
| 0 | 325 | | etag = property.Value.GetString(); |
| 0 | 326 | | continue; |
| | 327 | | } |
| 0 | 328 | | if (property.NameEquals("zones")) |
| | 329 | | { |
| 0 | 330 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | 331 | | { |
| | 332 | | continue; |
| | 333 | | } |
| 0 | 334 | | List<string> array = new List<string>(); |
| 0 | 335 | | foreach (var item in property.Value.EnumerateArray()) |
| | 336 | | { |
| 0 | 337 | | if (item.ValueKind == JsonValueKind.Null) |
| | 338 | | { |
| 0 | 339 | | array.Add(null); |
| | 340 | | } |
| | 341 | | else |
| | 342 | | { |
| 0 | 343 | | array.Add(item.GetString()); |
| | 344 | | } |
| | 345 | | } |
| 0 | 346 | | zones = array; |
| 0 | 347 | | continue; |
| | 348 | | } |
| 0 | 349 | | if (property.NameEquals("identity")) |
| | 350 | | { |
| 0 | 351 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | 352 | | { |
| | 353 | | continue; |
| | 354 | | } |
| 0 | 355 | | identity = ManagedServiceIdentity.DeserializeManagedServiceIdentity(property.Value); |
| 0 | 356 | | continue; |
| | 357 | | } |
| 0 | 358 | | if (property.NameEquals("id")) |
| | 359 | | { |
| 0 | 360 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | 361 | | { |
| | 362 | | continue; |
| | 363 | | } |
| 0 | 364 | | id = property.Value.GetString(); |
| 0 | 365 | | continue; |
| | 366 | | } |
| 0 | 367 | | if (property.NameEquals("name")) |
| | 368 | | { |
| 0 | 369 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | 370 | | { |
| | 371 | | continue; |
| | 372 | | } |
| 0 | 373 | | name = property.Value.GetString(); |
| 0 | 374 | | continue; |
| | 375 | | } |
| 0 | 376 | | if (property.NameEquals("type")) |
| | 377 | | { |
| 0 | 378 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | 379 | | { |
| | 380 | | continue; |
| | 381 | | } |
| 0 | 382 | | type = property.Value.GetString(); |
| 0 | 383 | | continue; |
| | 384 | | } |
| 0 | 385 | | if (property.NameEquals("location")) |
| | 386 | | { |
| 0 | 387 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | 388 | | { |
| | 389 | | continue; |
| | 390 | | } |
| 0 | 391 | | location = property.Value.GetString(); |
| 0 | 392 | | continue; |
| | 393 | | } |
| 0 | 394 | | if (property.NameEquals("tags")) |
| | 395 | | { |
| 0 | 396 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | 397 | | { |
| | 398 | | continue; |
| | 399 | | } |
| 0 | 400 | | Dictionary<string, string> dictionary = new Dictionary<string, string>(); |
| 0 | 401 | | foreach (var property0 in property.Value.EnumerateObject()) |
| | 402 | | { |
| 0 | 403 | | if (property0.Value.ValueKind == JsonValueKind.Null) |
| | 404 | | { |
| 0 | 405 | | dictionary.Add(property0.Name, null); |
| | 406 | | } |
| | 407 | | else |
| | 408 | | { |
| 0 | 409 | | dictionary.Add(property0.Name, property0.Value.GetString()); |
| | 410 | | } |
| | 411 | | } |
| 0 | 412 | | tags = dictionary; |
| 0 | 413 | | continue; |
| | 414 | | } |
| 0 | 415 | | if (property.NameEquals("properties")) |
| | 416 | | { |
| 0 | 417 | | foreach (var property0 in property.Value.EnumerateObject()) |
| | 418 | | { |
| 0 | 419 | | if (property0.NameEquals("sku")) |
| | 420 | | { |
| 0 | 421 | | if (property0.Value.ValueKind == JsonValueKind.Null) |
| | 422 | | { |
| | 423 | | continue; |
| | 424 | | } |
| 0 | 425 | | sku = ApplicationGatewaySku.DeserializeApplicationGatewaySku(property0.Value); |
| 0 | 426 | | continue; |
| | 427 | | } |
| 0 | 428 | | if (property0.NameEquals("sslPolicy")) |
| | 429 | | { |
| 0 | 430 | | if (property0.Value.ValueKind == JsonValueKind.Null) |
| | 431 | | { |
| | 432 | | continue; |
| | 433 | | } |
| 0 | 434 | | sslPolicy = ApplicationGatewaySslPolicy.DeserializeApplicationGatewaySslPolicy(property0.Val |
| 0 | 435 | | continue; |
| | 436 | | } |
| 0 | 437 | | if (property0.NameEquals("operationalState")) |
| | 438 | | { |
| 0 | 439 | | if (property0.Value.ValueKind == JsonValueKind.Null) |
| | 440 | | { |
| | 441 | | continue; |
| | 442 | | } |
| 0 | 443 | | operationalState = new ApplicationGatewayOperationalState(property0.Value.GetString()); |
| 0 | 444 | | continue; |
| | 445 | | } |
| 0 | 446 | | if (property0.NameEquals("gatewayIPConfigurations")) |
| | 447 | | { |
| 0 | 448 | | if (property0.Value.ValueKind == JsonValueKind.Null) |
| | 449 | | { |
| | 450 | | continue; |
| | 451 | | } |
| 0 | 452 | | List<ApplicationGatewayIPConfiguration> array = new List<ApplicationGatewayIPConfiguration>( |
| 0 | 453 | | foreach (var item in property0.Value.EnumerateArray()) |
| | 454 | | { |
| 0 | 455 | | if (item.ValueKind == JsonValueKind.Null) |
| | 456 | | { |
| 0 | 457 | | array.Add(null); |
| | 458 | | } |
| | 459 | | else |
| | 460 | | { |
| 0 | 461 | | array.Add(ApplicationGatewayIPConfiguration.DeserializeApplicationGatewayIPConfigura |
| | 462 | | } |
| | 463 | | } |
| 0 | 464 | | gatewayIPConfigurations = array; |
| 0 | 465 | | continue; |
| | 466 | | } |
| 0 | 467 | | if (property0.NameEquals("authenticationCertificates")) |
| | 468 | | { |
| 0 | 469 | | if (property0.Value.ValueKind == JsonValueKind.Null) |
| | 470 | | { |
| | 471 | | continue; |
| | 472 | | } |
| 0 | 473 | | List<ApplicationGatewayAuthenticationCertificate> array = new List<ApplicationGatewayAuthent |
| 0 | 474 | | foreach (var item in property0.Value.EnumerateArray()) |
| | 475 | | { |
| 0 | 476 | | if (item.ValueKind == JsonValueKind.Null) |
| | 477 | | { |
| 0 | 478 | | array.Add(null); |
| | 479 | | } |
| | 480 | | else |
| | 481 | | { |
| 0 | 482 | | array.Add(ApplicationGatewayAuthenticationCertificate.DeserializeApplicationGatewayA |
| | 483 | | } |
| | 484 | | } |
| 0 | 485 | | authenticationCertificates = array; |
| 0 | 486 | | continue; |
| | 487 | | } |
| 0 | 488 | | if (property0.NameEquals("trustedRootCertificates")) |
| | 489 | | { |
| 0 | 490 | | if (property0.Value.ValueKind == JsonValueKind.Null) |
| | 491 | | { |
| | 492 | | continue; |
| | 493 | | } |
| 0 | 494 | | List<ApplicationGatewayTrustedRootCertificate> array = new List<ApplicationGatewayTrustedRoo |
| 0 | 495 | | foreach (var item in property0.Value.EnumerateArray()) |
| | 496 | | { |
| 0 | 497 | | if (item.ValueKind == JsonValueKind.Null) |
| | 498 | | { |
| 0 | 499 | | array.Add(null); |
| | 500 | | } |
| | 501 | | else |
| | 502 | | { |
| 0 | 503 | | array.Add(ApplicationGatewayTrustedRootCertificate.DeserializeApplicationGatewayTrus |
| | 504 | | } |
| | 505 | | } |
| 0 | 506 | | trustedRootCertificates = array; |
| 0 | 507 | | continue; |
| | 508 | | } |
| 0 | 509 | | if (property0.NameEquals("sslCertificates")) |
| | 510 | | { |
| 0 | 511 | | if (property0.Value.ValueKind == JsonValueKind.Null) |
| | 512 | | { |
| | 513 | | continue; |
| | 514 | | } |
| 0 | 515 | | List<ApplicationGatewaySslCertificate> array = new List<ApplicationGatewaySslCertificate>(); |
| 0 | 516 | | foreach (var item in property0.Value.EnumerateArray()) |
| | 517 | | { |
| 0 | 518 | | if (item.ValueKind == JsonValueKind.Null) |
| | 519 | | { |
| 0 | 520 | | array.Add(null); |
| | 521 | | } |
| | 522 | | else |
| | 523 | | { |
| 0 | 524 | | array.Add(ApplicationGatewaySslCertificate.DeserializeApplicationGatewaySslCertifica |
| | 525 | | } |
| | 526 | | } |
| 0 | 527 | | sslCertificates = array; |
| 0 | 528 | | continue; |
| | 529 | | } |
| 0 | 530 | | if (property0.NameEquals("frontendIPConfigurations")) |
| | 531 | | { |
| 0 | 532 | | if (property0.Value.ValueKind == JsonValueKind.Null) |
| | 533 | | { |
| | 534 | | continue; |
| | 535 | | } |
| 0 | 536 | | List<ApplicationGatewayFrontendIPConfiguration> array = new List<ApplicationGatewayFrontendI |
| 0 | 537 | | foreach (var item in property0.Value.EnumerateArray()) |
| | 538 | | { |
| 0 | 539 | | if (item.ValueKind == JsonValueKind.Null) |
| | 540 | | { |
| 0 | 541 | | array.Add(null); |
| | 542 | | } |
| | 543 | | else |
| | 544 | | { |
| 0 | 545 | | array.Add(ApplicationGatewayFrontendIPConfiguration.DeserializeApplicationGatewayFro |
| | 546 | | } |
| | 547 | | } |
| 0 | 548 | | frontendIPConfigurations = array; |
| 0 | 549 | | continue; |
| | 550 | | } |
| 0 | 551 | | if (property0.NameEquals("frontendPorts")) |
| | 552 | | { |
| 0 | 553 | | if (property0.Value.ValueKind == JsonValueKind.Null) |
| | 554 | | { |
| | 555 | | continue; |
| | 556 | | } |
| 0 | 557 | | List<ApplicationGatewayFrontendPort> array = new List<ApplicationGatewayFrontendPort>(); |
| 0 | 558 | | foreach (var item in property0.Value.EnumerateArray()) |
| | 559 | | { |
| 0 | 560 | | if (item.ValueKind == JsonValueKind.Null) |
| | 561 | | { |
| 0 | 562 | | array.Add(null); |
| | 563 | | } |
| | 564 | | else |
| | 565 | | { |
| 0 | 566 | | array.Add(ApplicationGatewayFrontendPort.DeserializeApplicationGatewayFrontendPort(i |
| | 567 | | } |
| | 568 | | } |
| 0 | 569 | | frontendPorts = array; |
| 0 | 570 | | continue; |
| | 571 | | } |
| 0 | 572 | | if (property0.NameEquals("probes")) |
| | 573 | | { |
| 0 | 574 | | if (property0.Value.ValueKind == JsonValueKind.Null) |
| | 575 | | { |
| | 576 | | continue; |
| | 577 | | } |
| 0 | 578 | | List<ApplicationGatewayProbe> array = new List<ApplicationGatewayProbe>(); |
| 0 | 579 | | foreach (var item in property0.Value.EnumerateArray()) |
| | 580 | | { |
| 0 | 581 | | if (item.ValueKind == JsonValueKind.Null) |
| | 582 | | { |
| 0 | 583 | | array.Add(null); |
| | 584 | | } |
| | 585 | | else |
| | 586 | | { |
| 0 | 587 | | array.Add(ApplicationGatewayProbe.DeserializeApplicationGatewayProbe(item)); |
| | 588 | | } |
| | 589 | | } |
| 0 | 590 | | probes = array; |
| 0 | 591 | | continue; |
| | 592 | | } |
| 0 | 593 | | if (property0.NameEquals("backendAddressPools")) |
| | 594 | | { |
| 0 | 595 | | if (property0.Value.ValueKind == JsonValueKind.Null) |
| | 596 | | { |
| | 597 | | continue; |
| | 598 | | } |
| 0 | 599 | | List<ApplicationGatewayBackendAddressPool> array = new List<ApplicationGatewayBackendAddress |
| 0 | 600 | | foreach (var item in property0.Value.EnumerateArray()) |
| | 601 | | { |
| 0 | 602 | | if (item.ValueKind == JsonValueKind.Null) |
| | 603 | | { |
| 0 | 604 | | array.Add(null); |
| | 605 | | } |
| | 606 | | else |
| | 607 | | { |
| 0 | 608 | | array.Add(ApplicationGatewayBackendAddressPool.DeserializeApplicationGatewayBackendA |
| | 609 | | } |
| | 610 | | } |
| 0 | 611 | | backendAddressPools = array; |
| 0 | 612 | | continue; |
| | 613 | | } |
| 0 | 614 | | if (property0.NameEquals("backendHttpSettingsCollection")) |
| | 615 | | { |
| 0 | 616 | | if (property0.Value.ValueKind == JsonValueKind.Null) |
| | 617 | | { |
| | 618 | | continue; |
| | 619 | | } |
| 0 | 620 | | List<ApplicationGatewayBackendHttpSettings> array = new List<ApplicationGatewayBackendHttpSe |
| 0 | 621 | | foreach (var item in property0.Value.EnumerateArray()) |
| | 622 | | { |
| 0 | 623 | | if (item.ValueKind == JsonValueKind.Null) |
| | 624 | | { |
| 0 | 625 | | array.Add(null); |
| | 626 | | } |
| | 627 | | else |
| | 628 | | { |
| 0 | 629 | | array.Add(ApplicationGatewayBackendHttpSettings.DeserializeApplicationGatewayBackend |
| | 630 | | } |
| | 631 | | } |
| 0 | 632 | | backendHttpSettingsCollection = array; |
| 0 | 633 | | continue; |
| | 634 | | } |
| 0 | 635 | | if (property0.NameEquals("httpListeners")) |
| | 636 | | { |
| 0 | 637 | | if (property0.Value.ValueKind == JsonValueKind.Null) |
| | 638 | | { |
| | 639 | | continue; |
| | 640 | | } |
| 0 | 641 | | List<ApplicationGatewayHttpListener> array = new List<ApplicationGatewayHttpListener>(); |
| 0 | 642 | | foreach (var item in property0.Value.EnumerateArray()) |
| | 643 | | { |
| 0 | 644 | | if (item.ValueKind == JsonValueKind.Null) |
| | 645 | | { |
| 0 | 646 | | array.Add(null); |
| | 647 | | } |
| | 648 | | else |
| | 649 | | { |
| 0 | 650 | | array.Add(ApplicationGatewayHttpListener.DeserializeApplicationGatewayHttpListener(i |
| | 651 | | } |
| | 652 | | } |
| 0 | 653 | | httpListeners = array; |
| 0 | 654 | | continue; |
| | 655 | | } |
| 0 | 656 | | if (property0.NameEquals("urlPathMaps")) |
| | 657 | | { |
| 0 | 658 | | if (property0.Value.ValueKind == JsonValueKind.Null) |
| | 659 | | { |
| | 660 | | continue; |
| | 661 | | } |
| 0 | 662 | | List<ApplicationGatewayUrlPathMap> array = new List<ApplicationGatewayUrlPathMap>(); |
| 0 | 663 | | foreach (var item in property0.Value.EnumerateArray()) |
| | 664 | | { |
| 0 | 665 | | if (item.ValueKind == JsonValueKind.Null) |
| | 666 | | { |
| 0 | 667 | | array.Add(null); |
| | 668 | | } |
| | 669 | | else |
| | 670 | | { |
| 0 | 671 | | array.Add(ApplicationGatewayUrlPathMap.DeserializeApplicationGatewayUrlPathMap(item) |
| | 672 | | } |
| | 673 | | } |
| 0 | 674 | | urlPathMaps = array; |
| 0 | 675 | | continue; |
| | 676 | | } |
| 0 | 677 | | if (property0.NameEquals("requestRoutingRules")) |
| | 678 | | { |
| 0 | 679 | | if (property0.Value.ValueKind == JsonValueKind.Null) |
| | 680 | | { |
| | 681 | | continue; |
| | 682 | | } |
| 0 | 683 | | List<ApplicationGatewayRequestRoutingRule> array = new List<ApplicationGatewayRequestRouting |
| 0 | 684 | | foreach (var item in property0.Value.EnumerateArray()) |
| | 685 | | { |
| 0 | 686 | | if (item.ValueKind == JsonValueKind.Null) |
| | 687 | | { |
| 0 | 688 | | array.Add(null); |
| | 689 | | } |
| | 690 | | else |
| | 691 | | { |
| 0 | 692 | | array.Add(ApplicationGatewayRequestRoutingRule.DeserializeApplicationGatewayRequestR |
| | 693 | | } |
| | 694 | | } |
| 0 | 695 | | requestRoutingRules = array; |
| 0 | 696 | | continue; |
| | 697 | | } |
| 0 | 698 | | if (property0.NameEquals("rewriteRuleSets")) |
| | 699 | | { |
| 0 | 700 | | if (property0.Value.ValueKind == JsonValueKind.Null) |
| | 701 | | { |
| | 702 | | continue; |
| | 703 | | } |
| 0 | 704 | | List<ApplicationGatewayRewriteRuleSet> array = new List<ApplicationGatewayRewriteRuleSet>(); |
| 0 | 705 | | foreach (var item in property0.Value.EnumerateArray()) |
| | 706 | | { |
| 0 | 707 | | if (item.ValueKind == JsonValueKind.Null) |
| | 708 | | { |
| 0 | 709 | | array.Add(null); |
| | 710 | | } |
| | 711 | | else |
| | 712 | | { |
| 0 | 713 | | array.Add(ApplicationGatewayRewriteRuleSet.DeserializeApplicationGatewayRewriteRuleS |
| | 714 | | } |
| | 715 | | } |
| 0 | 716 | | rewriteRuleSets = array; |
| 0 | 717 | | continue; |
| | 718 | | } |
| 0 | 719 | | if (property0.NameEquals("redirectConfigurations")) |
| | 720 | | { |
| 0 | 721 | | if (property0.Value.ValueKind == JsonValueKind.Null) |
| | 722 | | { |
| | 723 | | continue; |
| | 724 | | } |
| 0 | 725 | | List<ApplicationGatewayRedirectConfiguration> array = new List<ApplicationGatewayRedirectCon |
| 0 | 726 | | foreach (var item in property0.Value.EnumerateArray()) |
| | 727 | | { |
| 0 | 728 | | if (item.ValueKind == JsonValueKind.Null) |
| | 729 | | { |
| 0 | 730 | | array.Add(null); |
| | 731 | | } |
| | 732 | | else |
| | 733 | | { |
| 0 | 734 | | array.Add(ApplicationGatewayRedirectConfiguration.DeserializeApplicationGatewayRedir |
| | 735 | | } |
| | 736 | | } |
| 0 | 737 | | redirectConfigurations = array; |
| 0 | 738 | | continue; |
| | 739 | | } |
| 0 | 740 | | if (property0.NameEquals("webApplicationFirewallConfiguration")) |
| | 741 | | { |
| 0 | 742 | | if (property0.Value.ValueKind == JsonValueKind.Null) |
| | 743 | | { |
| | 744 | | continue; |
| | 745 | | } |
| 0 | 746 | | webApplicationFirewallConfiguration = ApplicationGatewayWebApplicationFirewallConfiguration. |
| 0 | 747 | | continue; |
| | 748 | | } |
| 0 | 749 | | if (property0.NameEquals("firewallPolicy")) |
| | 750 | | { |
| 0 | 751 | | if (property0.Value.ValueKind == JsonValueKind.Null) |
| | 752 | | { |
| | 753 | | continue; |
| | 754 | | } |
| 0 | 755 | | firewallPolicy = SubResource.DeserializeSubResource(property0.Value); |
| 0 | 756 | | continue; |
| | 757 | | } |
| 0 | 758 | | if (property0.NameEquals("enableHttp2")) |
| | 759 | | { |
| 0 | 760 | | if (property0.Value.ValueKind == JsonValueKind.Null) |
| | 761 | | { |
| | 762 | | continue; |
| | 763 | | } |
| 0 | 764 | | enableHttp2 = property0.Value.GetBoolean(); |
| 0 | 765 | | continue; |
| | 766 | | } |
| 0 | 767 | | if (property0.NameEquals("enableFips")) |
| | 768 | | { |
| 0 | 769 | | if (property0.Value.ValueKind == JsonValueKind.Null) |
| | 770 | | { |
| | 771 | | continue; |
| | 772 | | } |
| 0 | 773 | | enableFips = property0.Value.GetBoolean(); |
| 0 | 774 | | continue; |
| | 775 | | } |
| 0 | 776 | | if (property0.NameEquals("autoscaleConfiguration")) |
| | 777 | | { |
| 0 | 778 | | if (property0.Value.ValueKind == JsonValueKind.Null) |
| | 779 | | { |
| | 780 | | continue; |
| | 781 | | } |
| 0 | 782 | | autoscaleConfiguration = ApplicationGatewayAutoscaleConfiguration.DeserializeApplicationGate |
| 0 | 783 | | continue; |
| | 784 | | } |
| 0 | 785 | | if (property0.NameEquals("resourceGuid")) |
| | 786 | | { |
| 0 | 787 | | if (property0.Value.ValueKind == JsonValueKind.Null) |
| | 788 | | { |
| | 789 | | continue; |
| | 790 | | } |
| 0 | 791 | | resourceGuid = property0.Value.GetString(); |
| 0 | 792 | | continue; |
| | 793 | | } |
| 0 | 794 | | if (property0.NameEquals("provisioningState")) |
| | 795 | | { |
| 0 | 796 | | if (property0.Value.ValueKind == JsonValueKind.Null) |
| | 797 | | { |
| | 798 | | continue; |
| | 799 | | } |
| 0 | 800 | | provisioningState = new ProvisioningState(property0.Value.GetString()); |
| 0 | 801 | | continue; |
| | 802 | | } |
| 0 | 803 | | if (property0.NameEquals("customErrorConfigurations")) |
| | 804 | | { |
| 0 | 805 | | if (property0.Value.ValueKind == JsonValueKind.Null) |
| | 806 | | { |
| | 807 | | continue; |
| | 808 | | } |
| 0 | 809 | | List<ApplicationGatewayCustomError> array = new List<ApplicationGatewayCustomError>(); |
| 0 | 810 | | foreach (var item in property0.Value.EnumerateArray()) |
| | 811 | | { |
| 0 | 812 | | if (item.ValueKind == JsonValueKind.Null) |
| | 813 | | { |
| 0 | 814 | | array.Add(null); |
| | 815 | | } |
| | 816 | | else |
| | 817 | | { |
| 0 | 818 | | array.Add(ApplicationGatewayCustomError.DeserializeApplicationGatewayCustomError(ite |
| | 819 | | } |
| | 820 | | } |
| 0 | 821 | | customErrorConfigurations = array; |
| 0 | 822 | | continue; |
| | 823 | | } |
| 0 | 824 | | if (property0.NameEquals("forceFirewallPolicyAssociation")) |
| | 825 | | { |
| 0 | 826 | | if (property0.Value.ValueKind == JsonValueKind.Null) |
| | 827 | | { |
| | 828 | | continue; |
| | 829 | | } |
| 0 | 830 | | forceFirewallPolicyAssociation = property0.Value.GetBoolean(); |
| | 831 | | continue; |
| | 832 | | } |
| | 833 | | } |
| | 834 | | continue; |
| | 835 | | } |
| | 836 | | } |
| 0 | 837 | | return new ApplicationGateway(id, name, type, location, tags, etag, zones, identity, sku, sslPolicy, operati |
| | 838 | | } |
| | 839 | | } |
| | 840 | | } |