| | 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 TenantCategoryExtensions |
| | 13 | | { |
| 0 | 14 | | public static string ToSerialString(this TenantCategory value) => value switch |
| 0 | 15 | | { |
| 0 | 16 | | TenantCategory.Home => "Home", |
| 0 | 17 | | TenantCategory.ProjectedBy => "ProjectedBy", |
| 0 | 18 | | TenantCategory.ManagedBy => "ManagedBy", |
| 0 | 19 | | _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown TenantCategory value.") |
| 0 | 20 | | }; |
| | 21 | |
|
| | 22 | | public static TenantCategory ToTenantCategory(this string value) |
| | 23 | | { |
| 8 | 24 | | if (string.Equals(value, "Home", StringComparison.InvariantCultureIgnoreCase)) return TenantCategory.Home; |
| 0 | 25 | | if (string.Equals(value, "ProjectedBy", StringComparison.InvariantCultureIgnoreCase)) return TenantCategory. |
| 0 | 26 | | if (string.Equals(value, "ManagedBy", StringComparison.InvariantCultureIgnoreCase)) return TenantCategory.Ma |
| 0 | 27 | | throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown TenantCategory value."); |
| | 28 | | } |
| | 29 | | } |
| | 30 | | } |