| | 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 RollingUpgradeStatusCodeExtensions |
| | 13 | | { |
| 0 | 14 | | public static string ToSerialString(this RollingUpgradeStatusCode value) => value switch |
| 0 | 15 | | { |
| 0 | 16 | | RollingUpgradeStatusCode.RollingForward => "RollingForward", |
| 0 | 17 | | RollingUpgradeStatusCode.Cancelled => "Cancelled", |
| 0 | 18 | | RollingUpgradeStatusCode.Completed => "Completed", |
| 0 | 19 | | RollingUpgradeStatusCode.Faulted => "Faulted", |
| 0 | 20 | | _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown RollingUpgradeStatusCode value.") |
| 0 | 21 | | }; |
| | 22 | |
|
| | 23 | | public static RollingUpgradeStatusCode ToRollingUpgradeStatusCode(this string value) |
| | 24 | | { |
| 0 | 25 | | if (string.Equals(value, "RollingForward", StringComparison.InvariantCultureIgnoreCase)) return RollingUpgra |
| 0 | 26 | | if (string.Equals(value, "Cancelled", StringComparison.InvariantCultureIgnoreCase)) return RollingUpgradeSta |
| 0 | 27 | | if (string.Equals(value, "Completed", StringComparison.InvariantCultureIgnoreCase)) return RollingUpgradeSta |
| 0 | 28 | | if (string.Equals(value, "Faulted", StringComparison.InvariantCultureIgnoreCase)) return RollingUpgradeStatu |
| 0 | 29 | | throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown RollingUpgradeStatusCode value."); |
| | 30 | | } |
| | 31 | | } |
| | 32 | | } |