| | | 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.AI.FormRecognizer.Models |
| | | 13 | | { |
| | | 14 | | internal partial class KeysResult |
| | | 15 | | { |
| | | 16 | | internal static KeysResult DeserializeKeysResult(JsonElement element) |
| | | 17 | | { |
| | 80 | 18 | | IReadOnlyDictionary<string, IList<string>> clusters = default; |
| | 320 | 19 | | foreach (var property in element.EnumerateObject()) |
| | | 20 | | { |
| | 80 | 21 | | if (property.NameEquals("clusters")) |
| | | 22 | | { |
| | 80 | 23 | | Dictionary<string, IList<string>> dictionary = new Dictionary<string, IList<string>>(); |
| | 320 | 24 | | foreach (var property0 in property.Value.EnumerateObject()) |
| | | 25 | | { |
| | 80 | 26 | | List<string> array = new List<string>(); |
| | 3280 | 27 | | foreach (var item in property0.Value.EnumerateArray()) |
| | | 28 | | { |
| | 1560 | 29 | | array.Add(item.GetString()); |
| | | 30 | | } |
| | 80 | 31 | | dictionary.Add(property0.Name, array); |
| | | 32 | | } |
| | 80 | 33 | | clusters = dictionary; |
| | | 34 | | continue; |
| | | 35 | | } |
| | | 36 | | } |
| | 80 | 37 | | return new KeysResult(clusters); |
| | | 38 | | } |
| | | 39 | | } |
| | | 40 | | } |