| | | 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; |
| | | 9 | | |
| | | 10 | | namespace Azure.ResourceManager.KeyVault.Models |
| | | 11 | | { |
| | | 12 | | internal static class AccessPolicyUpdateKindExtensions |
| | | 13 | | { |
| | 0 | 14 | | public static string ToSerialString(this AccessPolicyUpdateKind value) => value switch |
| | 0 | 15 | | { |
| | 0 | 16 | | AccessPolicyUpdateKind.Add => "add", |
| | 0 | 17 | | AccessPolicyUpdateKind.Replace => "replace", |
| | 0 | 18 | | AccessPolicyUpdateKind.Remove => "remove", |
| | 0 | 19 | | _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown AccessPolicyUpdateKind value.") |
| | 0 | 20 | | }; |
| | | 21 | | |
| | | 22 | | public static AccessPolicyUpdateKind ToAccessPolicyUpdateKind(this string value) |
| | | 23 | | { |
| | 0 | 24 | | if (string.Equals(value, "add", StringComparison.InvariantCultureIgnoreCase)) return AccessPolicyUpdateKind. |
| | 0 | 25 | | if (string.Equals(value, "replace", StringComparison.InvariantCultureIgnoreCase)) return AccessPolicyUpdateK |
| | 0 | 26 | | if (string.Equals(value, "remove", StringComparison.InvariantCultureIgnoreCase)) return AccessPolicyUpdateKi |
| | 0 | 27 | | throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown AccessPolicyUpdateKind value."); |
| | | 28 | | } |
| | | 29 | | } |
| | | 30 | | } |