| | 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 StorageAccountMicrosoftEndpoints : 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 | | writer.WriteEndObject(); |
| 0 | 49 | | } |
| | 50 | |
|
| | 51 | | internal static StorageAccountMicrosoftEndpoints DeserializeStorageAccountMicrosoftEndpoints(JsonElement element |
| | 52 | | { |
| 0 | 53 | | string blob = default; |
| 0 | 54 | | string queue = default; |
| 0 | 55 | | string table = default; |
| 0 | 56 | | string file = default; |
| 0 | 57 | | string web = default; |
| 0 | 58 | | string dfs = default; |
| 0 | 59 | | foreach (var property in element.EnumerateObject()) |
| | 60 | | { |
| 0 | 61 | | if (property.NameEquals("blob")) |
| | 62 | | { |
| 0 | 63 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | 64 | | { |
| | 65 | | continue; |
| | 66 | | } |
| 0 | 67 | | blob = property.Value.GetString(); |
| 0 | 68 | | continue; |
| | 69 | | } |
| 0 | 70 | | if (property.NameEquals("queue")) |
| | 71 | | { |
| 0 | 72 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | 73 | | { |
| | 74 | | continue; |
| | 75 | | } |
| 0 | 76 | | queue = property.Value.GetString(); |
| 0 | 77 | | continue; |
| | 78 | | } |
| 0 | 79 | | if (property.NameEquals("table")) |
| | 80 | | { |
| 0 | 81 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | 82 | | { |
| | 83 | | continue; |
| | 84 | | } |
| 0 | 85 | | table = property.Value.GetString(); |
| 0 | 86 | | continue; |
| | 87 | | } |
| 0 | 88 | | if (property.NameEquals("file")) |
| | 89 | | { |
| 0 | 90 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | 91 | | { |
| | 92 | | continue; |
| | 93 | | } |
| 0 | 94 | | file = property.Value.GetString(); |
| 0 | 95 | | continue; |
| | 96 | | } |
| 0 | 97 | | if (property.NameEquals("web")) |
| | 98 | | { |
| 0 | 99 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | 100 | | { |
| | 101 | | continue; |
| | 102 | | } |
| 0 | 103 | | web = property.Value.GetString(); |
| 0 | 104 | | continue; |
| | 105 | | } |
| 0 | 106 | | if (property.NameEquals("dfs")) |
| | 107 | | { |
| 0 | 108 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | 109 | | { |
| | 110 | | continue; |
| | 111 | | } |
| 0 | 112 | | dfs = property.Value.GetString(); |
| | 113 | | continue; |
| | 114 | | } |
| | 115 | | } |
| 0 | 116 | | return new StorageAccountMicrosoftEndpoints(blob, queue, table, file, web, dfs); |
| | 117 | | } |
| | 118 | | } |
| | 119 | | } |