| | 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.Text.Json; |
| | 9 | | using Azure.Core; |
| | 10 | |
|
| | 11 | | namespace Azure.ResourceManager.Network.Models |
| | 12 | | { |
| | 13 | | public partial class ExpressRouteCircuitArpTable |
| | 14 | | { |
| | 15 | | internal static ExpressRouteCircuitArpTable DeserializeExpressRouteCircuitArpTable(JsonElement element) |
| | 16 | | { |
| 0 | 17 | | int? age = default; |
| 0 | 18 | | string @interface = default; |
| 0 | 19 | | string ipAddress = default; |
| 0 | 20 | | string macAddress = default; |
| 0 | 21 | | foreach (var property in element.EnumerateObject()) |
| | 22 | | { |
| 0 | 23 | | if (property.NameEquals("age")) |
| | 24 | | { |
| 0 | 25 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | 26 | | { |
| | 27 | | continue; |
| | 28 | | } |
| 0 | 29 | | age = property.Value.GetInt32(); |
| 0 | 30 | | continue; |
| | 31 | | } |
| 0 | 32 | | if (property.NameEquals("interface")) |
| | 33 | | { |
| 0 | 34 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | 35 | | { |
| | 36 | | continue; |
| | 37 | | } |
| 0 | 38 | | @interface = property.Value.GetString(); |
| 0 | 39 | | continue; |
| | 40 | | } |
| 0 | 41 | | if (property.NameEquals("ipAddress")) |
| | 42 | | { |
| 0 | 43 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | 44 | | { |
| | 45 | | continue; |
| | 46 | | } |
| 0 | 47 | | ipAddress = property.Value.GetString(); |
| 0 | 48 | | continue; |
| | 49 | | } |
| 0 | 50 | | if (property.NameEquals("macAddress")) |
| | 51 | | { |
| 0 | 52 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | 53 | | { |
| | 54 | | continue; |
| | 55 | | } |
| 0 | 56 | | macAddress = property.Value.GetString(); |
| | 57 | | continue; |
| | 58 | | } |
| | 59 | | } |
| 0 | 60 | | return new ExpressRouteCircuitArpTable(age, @interface, ipAddress, macAddress); |
| | 61 | | } |
| | 62 | | } |
| | 63 | | } |