| | 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 EncryptionServices : IUtf8JsonSerializable |
| | 14 | | { |
| | 15 | | void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) |
| | 16 | | { |
| 48 | 17 | | writer.WriteStartObject(); |
| 48 | 18 | | if (Blob != null) |
| | 19 | | { |
| 40 | 20 | | writer.WritePropertyName("blob"); |
| 40 | 21 | | writer.WriteObjectValue(Blob); |
| | 22 | | } |
| 48 | 23 | | if (File != null) |
| | 24 | | { |
| 36 | 25 | | writer.WritePropertyName("file"); |
| 36 | 26 | | writer.WriteObjectValue(File); |
| | 27 | | } |
| 48 | 28 | | if (Table != null) |
| | 29 | | { |
| 8 | 30 | | writer.WritePropertyName("table"); |
| 8 | 31 | | writer.WriteObjectValue(Table); |
| | 32 | | } |
| 48 | 33 | | if (Queue != null) |
| | 34 | | { |
| 8 | 35 | | writer.WritePropertyName("queue"); |
| 8 | 36 | | writer.WriteObjectValue(Queue); |
| | 37 | | } |
| 48 | 38 | | writer.WriteEndObject(); |
| 48 | 39 | | } |
| | 40 | |
|
| | 41 | | internal static EncryptionServices DeserializeEncryptionServices(JsonElement element) |
| | 42 | | { |
| 836 | 43 | | EncryptionService blob = default; |
| 836 | 44 | | EncryptionService file = default; |
| 836 | 45 | | EncryptionService table = default; |
| 836 | 46 | | EncryptionService queue = default; |
| 5040 | 47 | | foreach (var property in element.EnumerateObject()) |
| | 48 | | { |
| 1684 | 49 | | if (property.NameEquals("blob")) |
| | 50 | | { |
| 836 | 51 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | 52 | | { |
| | 53 | | continue; |
| | 54 | | } |
| 836 | 55 | | blob = EncryptionService.DeserializeEncryptionService(property.Value); |
| 836 | 56 | | continue; |
| | 57 | | } |
| 848 | 58 | | if (property.NameEquals("file")) |
| | 59 | | { |
| 836 | 60 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | 61 | | { |
| | 62 | | continue; |
| | 63 | | } |
| 836 | 64 | | file = EncryptionService.DeserializeEncryptionService(property.Value); |
| 836 | 65 | | continue; |
| | 66 | | } |
| 12 | 67 | | if (property.NameEquals("table")) |
| | 68 | | { |
| 8 | 69 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | 70 | | { |
| | 71 | | continue; |
| | 72 | | } |
| 8 | 73 | | table = EncryptionService.DeserializeEncryptionService(property.Value); |
| 8 | 74 | | continue; |
| | 75 | | } |
| 4 | 76 | | if (property.NameEquals("queue")) |
| | 77 | | { |
| 4 | 78 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | 79 | | { |
| | 80 | | continue; |
| | 81 | | } |
| 4 | 82 | | queue = EncryptionService.DeserializeEncryptionService(property.Value); |
| | 83 | | continue; |
| | 84 | | } |
| | 85 | | } |
| 836 | 86 | | return new EncryptionServices(blob, file, table, queue); |
| | 87 | | } |
| | 88 | | } |
| | 89 | | } |