| | 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.Data.Tables.Models |
| | 12 | | { |
| | 13 | | internal partial class TableResponse |
| | 14 | | { |
| | 15 | | internal static TableResponse DeserializeTableResponse(JsonElement element) |
| | 16 | | { |
| 640 | 17 | | Optional<string> odataMetadata = default; |
| 640 | 18 | | Optional<string> tableName = default; |
| 640 | 19 | | Optional<string> odataType = default; |
| 640 | 20 | | Optional<string> odataId = default; |
| 640 | 21 | | Optional<string> odataEditLink = default; |
| 5808 | 22 | | foreach (var property in element.EnumerateObject()) |
| | 23 | | { |
| 2264 | 24 | | if (property.NameEquals("odata.metadata")) |
| | 25 | | { |
| 640 | 26 | | odataMetadata = property.Value.GetString(); |
| 640 | 27 | | continue; |
| | 28 | | } |
| 1624 | 29 | | if (property.NameEquals("TableName")) |
| | 30 | | { |
| 640 | 31 | | tableName = property.Value.GetString(); |
| 640 | 32 | | continue; |
| | 33 | | } |
| 984 | 34 | | if (property.NameEquals("odata.type")) |
| | 35 | | { |
| 328 | 36 | | odataType = property.Value.GetString(); |
| 328 | 37 | | continue; |
| | 38 | | } |
| 656 | 39 | | if (property.NameEquals("odata.id")) |
| | 40 | | { |
| 328 | 41 | | odataId = property.Value.GetString(); |
| 328 | 42 | | continue; |
| | 43 | | } |
| 328 | 44 | | if (property.NameEquals("odata.editLink")) |
| | 45 | | { |
| 328 | 46 | | odataEditLink = property.Value.GetString(); |
| | 47 | | continue; |
| | 48 | | } |
| | 49 | | } |
| 640 | 50 | | return new TableResponse(tableName.Value, odataType.Value, odataId.Value, odataEditLink.Value, odataMetadata |
| | 51 | | } |
| | 52 | | } |
| | 53 | | } |