| | | 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.Storage.Models |
| | | 12 | | { |
| | | 13 | | public partial class Endpoints : IUtf8JsonSerializable |
| | | 14 | | { |
| | | 15 | | void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) |
| | | 16 | | { |
| | 0 | 17 | | writer.WriteStartObject(); |
| | 0 | 18 | | if (Blob != null) |
| | | 19 | | { |
| | 0 | 20 | | writer.WritePropertyName("blob"); |
| | 0 | 21 | | writer.WriteStringValue(Blob); |
| | | 22 | | } |
| | 0 | 23 | | if (Queue != null) |
| | | 24 | | { |
| | 0 | 25 | | writer.WritePropertyName("queue"); |
| | 0 | 26 | | writer.WriteStringValue(Queue); |
| | | 27 | | } |
| | 0 | 28 | | if (Table != null) |
| | | 29 | | { |
| | 0 | 30 | | writer.WritePropertyName("table"); |
| | 0 | 31 | | writer.WriteStringValue(Table); |
| | | 32 | | } |
| | 0 | 33 | | if (File != null) |
| | | 34 | | { |
| | 0 | 35 | | writer.WritePropertyName("file"); |
| | 0 | 36 | | writer.WriteStringValue(File); |
| | | 37 | | } |
| | 0 | 38 | | if (Web != null) |
| | | 39 | | { |
| | 0 | 40 | | writer.WritePropertyName("web"); |
| | 0 | 41 | | writer.WriteStringValue(Web); |
| | | 42 | | } |
| | 0 | 43 | | if (Dfs != null) |
| | | 44 | | { |
| | 0 | 45 | | writer.WritePropertyName("dfs"); |
| | 0 | 46 | | writer.WriteStringValue(Dfs); |
| | | 47 | | } |
| | 0 | 48 | | if (MicrosoftEndpoints != null) |
| | | 49 | | { |
| | 0 | 50 | | writer.WritePropertyName("microsoftEndpoints"); |
| | 0 | 51 | | writer.WriteObjectValue(MicrosoftEndpoints); |
| | | 52 | | } |
| | 0 | 53 | | if (InternetEndpoints != null) |
| | | 54 | | { |
| | 0 | 55 | | writer.WritePropertyName("internetEndpoints"); |
| | 0 | 56 | | writer.WriteObjectValue(InternetEndpoints); |
| | | 57 | | } |
| | 0 | 58 | | writer.WriteEndObject(); |
| | 0 | 59 | | } |
| | | 60 | | |
| | | 61 | | internal static Endpoints DeserializeEndpoints(JsonElement element) |
| | | 62 | | { |
| | 996 | 63 | | string blob = default; |
| | 996 | 64 | | string queue = default; |
| | 996 | 65 | | string table = default; |
| | 996 | 66 | | string file = default; |
| | 996 | 67 | | string web = default; |
| | 996 | 68 | | string dfs = default; |
| | 996 | 69 | | StorageAccountMicrosoftEndpoints microsoftEndpoints = default; |
| | 996 | 70 | | StorageAccountInternetEndpoints internetEndpoints = default; |
| | 10664 | 71 | | foreach (var property in element.EnumerateObject()) |
| | | 72 | | { |
| | 4336 | 73 | | if (property.NameEquals("blob")) |
| | | 74 | | { |
| | 988 | 75 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | | 76 | | { |
| | | 77 | | continue; |
| | | 78 | | } |
| | 988 | 79 | | blob = property.Value.GetString(); |
| | 988 | 80 | | continue; |
| | | 81 | | } |
| | 3348 | 82 | | if (property.NameEquals("queue")) |
| | | 83 | | { |
| | 888 | 84 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | | 85 | | { |
| | | 86 | | continue; |
| | | 87 | | } |
| | 888 | 88 | | queue = property.Value.GetString(); |
| | 888 | 89 | | continue; |
| | | 90 | | } |
| | 2460 | 91 | | if (property.NameEquals("table")) |
| | | 92 | | { |
| | 968 | 93 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | | 94 | | { |
| | | 95 | | continue; |
| | | 96 | | } |
| | 968 | 97 | | table = property.Value.GetString(); |
| | 968 | 98 | | continue; |
| | | 99 | | } |
| | 1492 | 100 | | if (property.NameEquals("file")) |
| | | 101 | | { |
| | 756 | 102 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | | 103 | | { |
| | | 104 | | continue; |
| | | 105 | | } |
| | 756 | 106 | | file = property.Value.GetString(); |
| | 756 | 107 | | continue; |
| | | 108 | | } |
| | 736 | 109 | | if (property.NameEquals("web")) |
| | | 110 | | { |
| | 328 | 111 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | | 112 | | { |
| | | 113 | | continue; |
| | | 114 | | } |
| | 328 | 115 | | web = property.Value.GetString(); |
| | 328 | 116 | | continue; |
| | | 117 | | } |
| | 408 | 118 | | if (property.NameEquals("dfs")) |
| | | 119 | | { |
| | 404 | 120 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | | 121 | | { |
| | | 122 | | continue; |
| | | 123 | | } |
| | 404 | 124 | | dfs = property.Value.GetString(); |
| | 404 | 125 | | continue; |
| | | 126 | | } |
| | 4 | 127 | | if (property.NameEquals("microsoftEndpoints")) |
| | | 128 | | { |
| | 0 | 129 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | | 130 | | { |
| | | 131 | | continue; |
| | | 132 | | } |
| | 0 | 133 | | microsoftEndpoints = StorageAccountMicrosoftEndpoints.DeserializeStorageAccountMicrosoftEndpoints(pr |
| | 0 | 134 | | continue; |
| | | 135 | | } |
| | 4 | 136 | | if (property.NameEquals("internetEndpoints")) |
| | | 137 | | { |
| | 4 | 138 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | | 139 | | { |
| | | 140 | | continue; |
| | | 141 | | } |
| | 4 | 142 | | internetEndpoints = StorageAccountInternetEndpoints.DeserializeStorageAccountInternetEndpoints(prope |
| | | 143 | | continue; |
| | | 144 | | } |
| | | 145 | | } |
| | 996 | 146 | | return new Endpoints(blob, queue, table, file, web, dfs, microsoftEndpoints, internetEndpoints); |
| | | 147 | | } |
| | | 148 | | } |
| | | 149 | | } |