| | 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.ResourceManager.Resources.Models |
| | 12 | | { |
| | 13 | | public partial class DebugSetting : IUtf8JsonSerializable |
| | 14 | | { |
| | 15 | | void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) |
| | 16 | | { |
| 0 | 17 | | writer.WriteStartObject(); |
| 0 | 18 | | if (DetailLevel != null) |
| | 19 | | { |
| 0 | 20 | | writer.WritePropertyName("detailLevel"); |
| 0 | 21 | | writer.WriteStringValue(DetailLevel); |
| | 22 | | } |
| 0 | 23 | | writer.WriteEndObject(); |
| 0 | 24 | | } |
| | 25 | |
|
| | 26 | | internal static DebugSetting DeserializeDebugSetting(JsonElement element) |
| | 27 | | { |
| 0 | 28 | | string detailLevel = default; |
| 0 | 29 | | foreach (var property in element.EnumerateObject()) |
| | 30 | | { |
| 0 | 31 | | if (property.NameEquals("detailLevel")) |
| | 32 | | { |
| 0 | 33 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | 34 | | { |
| | 35 | | continue; |
| | 36 | | } |
| 0 | 37 | | detailLevel = property.Value.GetString(); |
| | 38 | | continue; |
| | 39 | | } |
| | 40 | | } |
| 0 | 41 | | return new DebugSetting(detailLevel); |
| | 42 | | } |
| | 43 | | } |
| | 44 | | } |