| | | 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 ResourceSkuRestrictionsTypeExtensions |
| | | 13 | | { |
| | 0 | 14 | | public static string ToSerialString(this ResourceSkuRestrictionsType value) => value switch |
| | 0 | 15 | | { |
| | 0 | 16 | | ResourceSkuRestrictionsType.Location => "Location", |
| | 0 | 17 | | ResourceSkuRestrictionsType.Zone => "Zone", |
| | 0 | 18 | | _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ResourceSkuRestrictionsType value. |
| | 0 | 19 | | }; |
| | | 20 | | |
| | | 21 | | public static ResourceSkuRestrictionsType ToResourceSkuRestrictionsType(this string value) |
| | | 22 | | { |
| | 25020 | 23 | | if (string.Equals(value, "Location", StringComparison.InvariantCultureIgnoreCase)) return ResourceSkuRestric |
| | 10808 | 24 | | if (string.Equals(value, "Zone", StringComparison.InvariantCultureIgnoreCase)) return ResourceSkuRestriction |
| | 0 | 25 | | throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ResourceSkuRestrictionsType value."); |
| | | 26 | | } |
| | | 27 | | } |
| | | 28 | | } |