| | 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.Compute.Models |
| | 12 | | { |
| | 13 | | public partial class AutomaticOSUpgradeProperties : IUtf8JsonSerializable |
| | 14 | | { |
| | 15 | | void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) |
| | 16 | | { |
| 0 | 17 | | writer.WriteStartObject(); |
| 0 | 18 | | writer.WritePropertyName("automaticOSUpgradeSupported"); |
| 0 | 19 | | writer.WriteBooleanValue(AutomaticOSUpgradeSupported); |
| 0 | 20 | | writer.WriteEndObject(); |
| 0 | 21 | | } |
| | 22 | |
|
| | 23 | | internal static AutomaticOSUpgradeProperties DeserializeAutomaticOSUpgradeProperties(JsonElement element) |
| | 24 | | { |
| 32 | 25 | | bool automaticOSUpgradeSupported = default; |
| 128 | 26 | | foreach (var property in element.EnumerateObject()) |
| | 27 | | { |
| 32 | 28 | | if (property.NameEquals("automaticOSUpgradeSupported")) |
| | 29 | | { |
| 32 | 30 | | automaticOSUpgradeSupported = property.Value.GetBoolean(); |
| | 31 | | continue; |
| | 32 | | } |
| | 33 | | } |
| 32 | 34 | | return new AutomaticOSUpgradeProperties(automaticOSUpgradeSupported); |
| | 35 | | } |
| | 36 | | } |
| | 37 | | } |