| | 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.Compute.Models |
| | 11 | | { |
| | 12 | | internal static class DedicatedHostLicenseTypesExtensions |
| | 13 | | { |
| 0 | 14 | | public static string ToSerialString(this DedicatedHostLicenseTypes value) => value switch |
| 0 | 15 | | { |
| 0 | 16 | | DedicatedHostLicenseTypes.None => "None", |
| 0 | 17 | | DedicatedHostLicenseTypes.WindowsServerHybrid => "Windows_Server_Hybrid", |
| 0 | 18 | | DedicatedHostLicenseTypes.WindowsServerPerpetual => "Windows_Server_Perpetual", |
| 0 | 19 | | _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown DedicatedHostLicenseTypes value.") |
| 0 | 20 | | }; |
| | 21 | |
|
| | 22 | | public static DedicatedHostLicenseTypes ToDedicatedHostLicenseTypes(this string value) |
| | 23 | | { |
| 0 | 24 | | if (string.Equals(value, "None", StringComparison.InvariantCultureIgnoreCase)) return DedicatedHostLicenseTy |
| 0 | 25 | | if (string.Equals(value, "Windows_Server_Hybrid", StringComparison.InvariantCultureIgnoreCase)) return Dedic |
| 0 | 26 | | if (string.Equals(value, "Windows_Server_Perpetual", StringComparison.InvariantCultureIgnoreCase)) return De |
| 0 | 27 | | throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown DedicatedHostLicenseTypes value."); |
| | 28 | | } |
| | 29 | | } |
| | 30 | | } |