| | 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 OperatingSystemStateTypesExtensions |
| | 13 | | { |
| 40 | 14 | | public static string ToSerialString(this OperatingSystemStateTypes value) => value switch |
| 40 | 15 | | { |
| 80 | 16 | | OperatingSystemStateTypes.Generalized => "Generalized", |
| 0 | 17 | | OperatingSystemStateTypes.Specialized => "Specialized", |
| 0 | 18 | | _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown OperatingSystemStateTypes value.") |
| 40 | 19 | | }; |
| | 20 | |
|
| | 21 | | public static OperatingSystemStateTypes ToOperatingSystemStateTypes(this string value) |
| | 22 | | { |
| 96 | 23 | | if (string.Equals(value, "Generalized", StringComparison.InvariantCultureIgnoreCase)) return OperatingSystem |
| 0 | 24 | | if (string.Equals(value, "Specialized", StringComparison.InvariantCultureIgnoreCase)) return OperatingSystem |
| 0 | 25 | | throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown OperatingSystemStateTypes value."); |
| | 26 | | } |
| | 27 | | } |
| | 28 | | } |