| | 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 AliasTypeExtensions |
| | 13 | | { |
| 0 | 14 | | public static string ToSerialString(this AliasType value) => value switch |
| 0 | 15 | | { |
| 0 | 16 | | AliasType.NotSpecified => "NotSpecified", |
| 0 | 17 | | AliasType.PlainText => "PlainText", |
| 0 | 18 | | AliasType.Mask => "Mask", |
| 0 | 19 | | _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown AliasType value.") |
| 0 | 20 | | }; |
| | 21 | |
|
| | 22 | | public static AliasType ToAliasType(this string value) |
| | 23 | | { |
| 0 | 24 | | if (string.Equals(value, "NotSpecified", StringComparison.InvariantCultureIgnoreCase)) return AliasType.NotS |
| 0 | 25 | | if (string.Equals(value, "PlainText", StringComparison.InvariantCultureIgnoreCase)) return AliasType.PlainTe |
| 0 | 26 | | if (string.Equals(value, "Mask", StringComparison.InvariantCultureIgnoreCase)) return AliasType.Mask; |
| 0 | 27 | | throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown AliasType value."); |
| | 28 | | } |
| | 29 | | } |
| | 30 | | } |