| | 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.Analytics.Synapse.Artifacts.Models |
| | 12 | | { |
| | 13 | | public partial class BigDataPoolReference : IUtf8JsonSerializable |
| | 14 | | { |
| | 15 | | void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) |
| | 16 | | { |
| 0 | 17 | | writer.WriteStartObject(); |
| 0 | 18 | | writer.WritePropertyName("type"); |
| 0 | 19 | | writer.WriteStringValue(Type.ToString()); |
| 0 | 20 | | writer.WritePropertyName("referenceName"); |
| 0 | 21 | | writer.WriteStringValue(ReferenceName); |
| 0 | 22 | | writer.WriteEndObject(); |
| 0 | 23 | | } |
| | 24 | |
|
| | 25 | | internal static BigDataPoolReference DeserializeBigDataPoolReference(JsonElement element) |
| | 26 | | { |
| 8 | 27 | | BigDataPoolReferenceType type = default; |
| 8 | 28 | | string referenceName = default; |
| 48 | 29 | | foreach (var property in element.EnumerateObject()) |
| | 30 | | { |
| 16 | 31 | | if (property.NameEquals("type")) |
| | 32 | | { |
| 8 | 33 | | type = new BigDataPoolReferenceType(property.Value.GetString()); |
| 8 | 34 | | continue; |
| | 35 | | } |
| 8 | 36 | | if (property.NameEquals("referenceName")) |
| | 37 | | { |
| 8 | 38 | | referenceName = property.Value.GetString(); |
| | 39 | | continue; |
| | 40 | | } |
| | 41 | | } |
| 8 | 42 | | return new BigDataPoolReference(type, referenceName); |
| | 43 | | } |
| | 44 | | } |
| | 45 | | } |