| | 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.KeyVault.Models |
| | 12 | | { |
| | 13 | | public partial class VaultPatchProperties : IUtf8JsonSerializable |
| | 14 | | { |
| | 15 | | void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) |
| | 16 | | { |
| 0 | 17 | | writer.WriteStartObject(); |
| 0 | 18 | | if (Optional.IsDefined(TenantId)) |
| | 19 | | { |
| 0 | 20 | | writer.WritePropertyName("tenantId"); |
| 0 | 21 | | writer.WriteStringValue(TenantId.Value); |
| | 22 | | } |
| 0 | 23 | | if (Optional.IsDefined(Sku)) |
| | 24 | | { |
| 0 | 25 | | writer.WritePropertyName("sku"); |
| 0 | 26 | | writer.WriteObjectValue(Sku); |
| | 27 | | } |
| 0 | 28 | | if (Optional.IsCollectionDefined(AccessPolicies)) |
| | 29 | | { |
| 0 | 30 | | writer.WritePropertyName("accessPolicies"); |
| 0 | 31 | | writer.WriteStartArray(); |
| 0 | 32 | | foreach (var item in AccessPolicies) |
| | 33 | | { |
| 0 | 34 | | writer.WriteObjectValue(item); |
| | 35 | | } |
| 0 | 36 | | writer.WriteEndArray(); |
| | 37 | | } |
| 0 | 38 | | if (Optional.IsDefined(EnabledForDeployment)) |
| | 39 | | { |
| 0 | 40 | | writer.WritePropertyName("enabledForDeployment"); |
| 0 | 41 | | writer.WriteBooleanValue(EnabledForDeployment.Value); |
| | 42 | | } |
| 0 | 43 | | if (Optional.IsDefined(EnabledForDiskEncryption)) |
| | 44 | | { |
| 0 | 45 | | writer.WritePropertyName("enabledForDiskEncryption"); |
| 0 | 46 | | writer.WriteBooleanValue(EnabledForDiskEncryption.Value); |
| | 47 | | } |
| 0 | 48 | | if (Optional.IsDefined(EnabledForTemplateDeployment)) |
| | 49 | | { |
| 0 | 50 | | writer.WritePropertyName("enabledForTemplateDeployment"); |
| 0 | 51 | | writer.WriteBooleanValue(EnabledForTemplateDeployment.Value); |
| | 52 | | } |
| 0 | 53 | | if (Optional.IsDefined(EnableSoftDelete)) |
| | 54 | | { |
| 0 | 55 | | writer.WritePropertyName("enableSoftDelete"); |
| 0 | 56 | | writer.WriteBooleanValue(EnableSoftDelete.Value); |
| | 57 | | } |
| 0 | 58 | | if (Optional.IsDefined(CreateMode)) |
| | 59 | | { |
| 0 | 60 | | writer.WritePropertyName("createMode"); |
| 0 | 61 | | writer.WriteStringValue(CreateMode.Value.ToSerialString()); |
| | 62 | | } |
| 0 | 63 | | if (Optional.IsDefined(EnablePurgeProtection)) |
| | 64 | | { |
| 0 | 65 | | writer.WritePropertyName("enablePurgeProtection"); |
| 0 | 66 | | writer.WriteBooleanValue(EnablePurgeProtection.Value); |
| | 67 | | } |
| 0 | 68 | | if (Optional.IsDefined(NetworkAcls)) |
| | 69 | | { |
| 0 | 70 | | writer.WritePropertyName("networkAcls"); |
| 0 | 71 | | writer.WriteObjectValue(NetworkAcls); |
| | 72 | | } |
| 0 | 73 | | writer.WriteEndObject(); |
| 0 | 74 | | } |
| | 75 | | } |
| | 76 | | } |