| | 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.Resources.Models |
| | 11 | | { |
| | 12 | | internal static class ProvisioningOperationExtensions |
| | 13 | | { |
| 0 | 14 | | public static string ToSerialString(this ProvisioningOperation value) => value switch |
| 0 | 15 | | { |
| 0 | 16 | | ProvisioningOperation.NotSpecified => "NotSpecified", |
| 0 | 17 | | ProvisioningOperation.Create => "Create", |
| 0 | 18 | | ProvisioningOperation.Delete => "Delete", |
| 0 | 19 | | ProvisioningOperation.Waiting => "Waiting", |
| 0 | 20 | | ProvisioningOperation.AzureAsyncOperationWaiting => "AzureAsyncOperationWaiting", |
| 0 | 21 | | ProvisioningOperation.ResourceCacheWaiting => "ResourceCacheWaiting", |
| 0 | 22 | | ProvisioningOperation.Action => "Action", |
| 0 | 23 | | ProvisioningOperation.Read => "Read", |
| 0 | 24 | | ProvisioningOperation.EvaluateDeploymentOutput => "EvaluateDeploymentOutput", |
| 0 | 25 | | ProvisioningOperation.DeploymentCleanup => "DeploymentCleanup", |
| 0 | 26 | | _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ProvisioningOperation value.") |
| 0 | 27 | | }; |
| | 28 | |
|
| | 29 | | public static ProvisioningOperation ToProvisioningOperation(this string value) |
| | 30 | | { |
| 0 | 31 | | if (string.Equals(value, "NotSpecified", StringComparison.InvariantCultureIgnoreCase)) return ProvisioningOp |
| 76 | 32 | | if (string.Equals(value, "Create", StringComparison.InvariantCultureIgnoreCase)) return ProvisioningOperatio |
| 0 | 33 | | if (string.Equals(value, "Delete", StringComparison.InvariantCultureIgnoreCase)) return ProvisioningOperatio |
| 0 | 34 | | if (string.Equals(value, "Waiting", StringComparison.InvariantCultureIgnoreCase)) return ProvisioningOperati |
| 0 | 35 | | if (string.Equals(value, "AzureAsyncOperationWaiting", StringComparison.InvariantCultureIgnoreCase)) return |
| 0 | 36 | | if (string.Equals(value, "ResourceCacheWaiting", StringComparison.InvariantCultureIgnoreCase)) return Provis |
| 0 | 37 | | if (string.Equals(value, "Action", StringComparison.InvariantCultureIgnoreCase)) return ProvisioningOperatio |
| 0 | 38 | | if (string.Equals(value, "Read", StringComparison.InvariantCultureIgnoreCase)) return ProvisioningOperation. |
| 24 | 39 | | if (string.Equals(value, "EvaluateDeploymentOutput", StringComparison.InvariantCultureIgnoreCase)) return Pr |
| 0 | 40 | | if (string.Equals(value, "DeploymentCleanup", StringComparison.InvariantCultureIgnoreCase)) return Provision |
| 0 | 41 | | throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ProvisioningOperation value."); |
| | 42 | | } |
| | 43 | | } |
| | 44 | | } |