| | 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 StatusLevelTypesExtensions |
| | 13 | | { |
| 80 | 14 | | public static string ToSerialString(this StatusLevelTypes value) => value switch |
| 80 | 15 | | { |
| 144 | 16 | | StatusLevelTypes.Info => "Info", |
| 96 | 17 | | StatusLevelTypes.Warning => "Warning", |
| 0 | 18 | | StatusLevelTypes.Error => "Error", |
| 0 | 19 | | _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown StatusLevelTypes value.") |
| 80 | 20 | | }; |
| | 21 | |
|
| | 22 | | public static StatusLevelTypes ToStatusLevelTypes(this string value) |
| | 23 | | { |
| 1820 | 24 | | if (string.Equals(value, "Info", StringComparison.InvariantCultureIgnoreCase)) return StatusLevelTypes.Info; |
| 276 | 25 | | if (string.Equals(value, "Warning", StringComparison.InvariantCultureIgnoreCase)) return StatusLevelTypes.Wa |
| 8 | 26 | | if (string.Equals(value, "Error", StringComparison.InvariantCultureIgnoreCase)) return StatusLevelTypes.Erro |
| 0 | 27 | | throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown StatusLevelTypes value."); |
| | 28 | | } |
| | 29 | | } |
| | 30 | | } |