| | 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.Data.Tables.Models |
| | 13 | | { |
| | 14 | | internal partial class TableEntityQueryResponse |
| | 15 | | { |
| | 16 | | internal static TableEntityQueryResponse DeserializeTableEntityQueryResponse(JsonElement element) |
| | 17 | | { |
| 732 | 18 | | Optional<string> odataMetadata = default; |
| 732 | 19 | | Optional<IReadOnlyList<IDictionary<string, object>>> value = default; |
| 3696 | 20 | | foreach (var property in element.EnumerateObject()) |
| | 21 | | { |
| 1116 | 22 | | if (property.NameEquals("odata.metadata")) |
| | 23 | | { |
| 384 | 24 | | odataMetadata = property.Value.GetString(); |
| 384 | 25 | | continue; |
| | 26 | | } |
| 732 | 27 | | if (property.NameEquals("value")) |
| | 28 | | { |
| 732 | 29 | | List<IDictionary<string, object>> array = new List<IDictionary<string, object>>(); |
| 5488 | 30 | | foreach (var item in property.Value.EnumerateArray()) |
| | 31 | | { |
| 2012 | 32 | | Dictionary<string, object> dictionary = new Dictionary<string, object>(); |
| 114712 | 33 | | foreach (var property0 in item.EnumerateObject()) |
| | 34 | | { |
| 55344 | 35 | | dictionary.Add(property0.Name, property0.Value.GetObject()); |
| | 36 | | } |
| 2012 | 37 | | array.Add(dictionary); |
| | 38 | | } |
| 732 | 39 | | value = array; |
| | 40 | | continue; |
| | 41 | | } |
| | 42 | | } |
| 732 | 43 | | return new TableEntityQueryResponse(odataMetadata.Value, Optional.ToList(value)); |
| | 44 | | } |
| | 45 | | } |
| | 46 | | } |