| | 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.Analytics.Synapse.Artifacts.Models |
| | 13 | | { |
| | 14 | | public partial class DatasetBZip2Compression : IUtf8JsonSerializable |
| | 15 | | { |
| | 16 | | void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) |
| | 17 | | { |
| 0 | 18 | | writer.WriteStartObject(); |
| 0 | 19 | | writer.WritePropertyName("type"); |
| 0 | 20 | | writer.WriteStringValue(Type); |
| 0 | 21 | | foreach (var item in AdditionalProperties) |
| | 22 | | { |
| 0 | 23 | | writer.WritePropertyName(item.Key); |
| 0 | 24 | | writer.WriteObjectValue(item.Value); |
| | 25 | | } |
| 0 | 26 | | writer.WriteEndObject(); |
| 0 | 27 | | } |
| | 28 | |
|
| | 29 | | internal static DatasetBZip2Compression DeserializeDatasetBZip2Compression(JsonElement element) |
| | 30 | | { |
| 0 | 31 | | string type = default; |
| 0 | 32 | | IDictionary<string, object> additionalProperties = default; |
| 0 | 33 | | Dictionary<string, object> additionalPropertiesDictionary = default; |
| 0 | 34 | | foreach (var property in element.EnumerateObject()) |
| | 35 | | { |
| 0 | 36 | | if (property.NameEquals("type")) |
| | 37 | | { |
| 0 | 38 | | type = property.Value.GetString(); |
| 0 | 39 | | continue; |
| | 40 | | } |
| 0 | 41 | | additionalPropertiesDictionary ??= new Dictionary<string, object>(); |
| 0 | 42 | | additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); |
| | 43 | | } |
| 0 | 44 | | additionalProperties = additionalPropertiesDictionary; |
| 0 | 45 | | return new DatasetBZip2Compression(type, additionalProperties); |
| | 46 | | } |
| | 47 | | } |
| | 48 | | } |