| | | 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 StorageAccountInternetEndpoints : 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 (File != null) |
| | | 24 | | { |
| | 0 | 25 | | writer.WritePropertyName("file"); |
| | 0 | 26 | | writer.WriteStringValue(File); |
| | | 27 | | } |
| | 0 | 28 | | if (Web != null) |
| | | 29 | | { |
| | 0 | 30 | | writer.WritePropertyName("web"); |
| | 0 | 31 | | writer.WriteStringValue(Web); |
| | | 32 | | } |
| | 0 | 33 | | if (Dfs != null) |
| | | 34 | | { |
| | 0 | 35 | | writer.WritePropertyName("dfs"); |
| | 0 | 36 | | writer.WriteStringValue(Dfs); |
| | | 37 | | } |
| | 0 | 38 | | writer.WriteEndObject(); |
| | 0 | 39 | | } |
| | | 40 | | |
| | | 41 | | internal static StorageAccountInternetEndpoints DeserializeStorageAccountInternetEndpoints(JsonElement element) |
| | | 42 | | { |
| | 4 | 43 | | string blob = default; |
| | 4 | 44 | | string file = default; |
| | 4 | 45 | | string web = default; |
| | 4 | 46 | | string dfs = default; |
| | 40 | 47 | | foreach (var property in element.EnumerateObject()) |
| | | 48 | | { |
| | 16 | 49 | | if (property.NameEquals("blob")) |
| | | 50 | | { |
| | 4 | 51 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | | 52 | | { |
| | | 53 | | continue; |
| | | 54 | | } |
| | 4 | 55 | | blob = property.Value.GetString(); |
| | 4 | 56 | | continue; |
| | | 57 | | } |
| | 12 | 58 | | if (property.NameEquals("file")) |
| | | 59 | | { |
| | 4 | 60 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | | 61 | | { |
| | | 62 | | continue; |
| | | 63 | | } |
| | 4 | 64 | | file = property.Value.GetString(); |
| | 4 | 65 | | continue; |
| | | 66 | | } |
| | 8 | 67 | | if (property.NameEquals("web")) |
| | | 68 | | { |
| | 4 | 69 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | | 70 | | { |
| | | 71 | | continue; |
| | | 72 | | } |
| | 4 | 73 | | web = property.Value.GetString(); |
| | 4 | 74 | | continue; |
| | | 75 | | } |
| | 4 | 76 | | if (property.NameEquals("dfs")) |
| | | 77 | | { |
| | 4 | 78 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | | 79 | | { |
| | | 80 | | continue; |
| | | 81 | | } |
| | 4 | 82 | | dfs = property.Value.GetString(); |
| | | 83 | | continue; |
| | | 84 | | } |
| | | 85 | | } |
| | 4 | 86 | | return new StorageAccountInternetEndpoints(blob, file, web, dfs); |
| | | 87 | | } |
| | | 88 | | } |
| | | 89 | | } |