| | 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 IntervalInMinsExtensions |
| | 13 | | { |
| 0 | 14 | | public static string ToSerialString(this IntervalInMins value) => value switch |
| 0 | 15 | | { |
| 0 | 16 | | IntervalInMins.ThreeMins => "ThreeMins", |
| 0 | 17 | | IntervalInMins.FiveMins => "FiveMins", |
| 0 | 18 | | IntervalInMins.ThirtyMins => "ThirtyMins", |
| 0 | 19 | | IntervalInMins.SixtyMins => "SixtyMins", |
| 0 | 20 | | _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown IntervalInMins value.") |
| 0 | 21 | | }; |
| | 22 | |
|
| | 23 | | public static IntervalInMins ToIntervalInMins(this string value) |
| | 24 | | { |
| 0 | 25 | | if (string.Equals(value, "ThreeMins", StringComparison.InvariantCultureIgnoreCase)) return IntervalInMins.Th |
| 0 | 26 | | if (string.Equals(value, "FiveMins", StringComparison.InvariantCultureIgnoreCase)) return IntervalInMins.Fiv |
| 0 | 27 | | if (string.Equals(value, "ThirtyMins", StringComparison.InvariantCultureIgnoreCase)) return IntervalInMins.T |
| 0 | 28 | | if (string.Equals(value, "SixtyMins", StringComparison.InvariantCultureIgnoreCase)) return IntervalInMins.Si |
| 0 | 29 | | throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown IntervalInMins value."); |
| | 30 | | } |
| | 31 | | } |
| | 32 | | } |