| | | 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.Collections.Generic; |
| | | 9 | | using System.Text.Json; |
| | | 10 | | using Azure.Core; |
| | | 11 | | |
| | | 12 | | namespace Azure.ResourceManager.Storage.Models |
| | | 13 | | { |
| | | 14 | | public partial class StorageAccountListKeysResult |
| | | 15 | | { |
| | | 16 | | internal static StorageAccountListKeysResult DeserializeStorageAccountListKeysResult(JsonElement element) |
| | | 17 | | { |
| | 12 | 18 | | IReadOnlyList<StorageAccountKey> keys = default; |
| | 48 | 19 | | foreach (var property in element.EnumerateObject()) |
| | | 20 | | { |
| | 12 | 21 | | if (property.NameEquals("keys")) |
| | | 22 | | { |
| | 12 | 23 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | | 24 | | { |
| | | 25 | | continue; |
| | | 26 | | } |
| | 12 | 27 | | List<StorageAccountKey> array = new List<StorageAccountKey>(); |
| | 72 | 28 | | foreach (var item in property.Value.EnumerateArray()) |
| | | 29 | | { |
| | 24 | 30 | | if (item.ValueKind == JsonValueKind.Null) |
| | | 31 | | { |
| | 0 | 32 | | array.Add(null); |
| | | 33 | | } |
| | | 34 | | else |
| | | 35 | | { |
| | 24 | 36 | | array.Add(StorageAccountKey.DeserializeStorageAccountKey(item)); |
| | | 37 | | } |
| | | 38 | | } |
| | 12 | 39 | | keys = array; |
| | | 40 | | continue; |
| | | 41 | | } |
| | | 42 | | } |
| | 12 | 43 | | return new StorageAccountListKeysResult(keys); |
| | | 44 | | } |
| | | 45 | | } |
| | | 46 | | } |