| | 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 SkuNameExtensions |
| | 13 | | { |
| 104 | 14 | | public static string ToSerialString(this SkuName value) => value switch |
| 104 | 15 | | { |
| 200 | 16 | | SkuName.Standard => "standard", |
| 112 | 17 | | SkuName.Premium => "premium", |
| 0 | 18 | | _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SkuName value.") |
| 104 | 19 | | }; |
| | 20 | |
|
| | 21 | | public static SkuName ToSkuName(this string value) |
| | 22 | | { |
| 144 | 23 | | if (string.Equals(value, "standard", StringComparison.InvariantCultureIgnoreCase)) return SkuName.Standard; |
| 16 | 24 | | if (string.Equals(value, "premium", StringComparison.InvariantCultureIgnoreCase)) return SkuName.Premium; |
| 0 | 25 | | throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SkuName value."); |
| | 26 | | } |
| | 27 | | } |
| | 28 | | } |