| | 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 UpgradeOperationInvokerExtensions |
| | 13 | | { |
| 0 | 14 | | public static string ToSerialString(this UpgradeOperationInvoker value) => value switch |
| 0 | 15 | | { |
| 0 | 16 | | UpgradeOperationInvoker.Unknown => "Unknown", |
| 0 | 17 | | UpgradeOperationInvoker.User => "User", |
| 0 | 18 | | UpgradeOperationInvoker.Platform => "Platform", |
| 0 | 19 | | _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown UpgradeOperationInvoker value.") |
| 0 | 20 | | }; |
| | 21 | |
|
| | 22 | | public static UpgradeOperationInvoker ToUpgradeOperationInvoker(this string value) |
| | 23 | | { |
| 0 | 24 | | if (string.Equals(value, "Unknown", StringComparison.InvariantCultureIgnoreCase)) return UpgradeOperationInv |
| 0 | 25 | | if (string.Equals(value, "User", StringComparison.InvariantCultureIgnoreCase)) return UpgradeOperationInvoke |
| 0 | 26 | | if (string.Equals(value, "Platform", StringComparison.InvariantCultureIgnoreCase)) return UpgradeOperationIn |
| 0 | 27 | | throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown UpgradeOperationInvoker value."); |
| | 28 | | } |
| | 29 | | } |
| | 30 | | } |