| | 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.Storage.Models |
| | 11 | | { |
| | 12 | | internal static class HttpProtocolExtensions |
| | 13 | | { |
| 8 | 14 | | public static string ToSerialString(this HttpProtocol value) => value switch |
| 8 | 15 | | { |
| 16 | 16 | | HttpProtocol.HttpsHttp => "https,http", |
| 0 | 17 | | HttpProtocol.Https => "https", |
| 0 | 18 | | _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown HttpProtocol value.") |
| 8 | 19 | | }; |
| | 20 | |
|
| | 21 | | public static HttpProtocol ToHttpProtocol(this string value) |
| | 22 | | { |
| 0 | 23 | | if (string.Equals(value, "https,http", StringComparison.InvariantCultureIgnoreCase)) return HttpProtocol.Htt |
| 0 | 24 | | if (string.Equals(value, "https", StringComparison.InvariantCultureIgnoreCase)) return HttpProtocol.Https; |
| 0 | 25 | | throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown HttpProtocol value."); |
| | 26 | | } |
| | 27 | | } |
| | 28 | | } |