| | 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.Messaging.EventGrid.SystemEvents |
| | 11 | | { |
| | 12 | | internal static class MediaJobErrorCategoryExtensions |
| | 13 | | { |
| 0 | 14 | | public static string ToSerialString(this MediaJobErrorCategory value) => value switch |
| 0 | 15 | | { |
| 0 | 16 | | MediaJobErrorCategory.Service => "Service", |
| 0 | 17 | | MediaJobErrorCategory.Download => "Download", |
| 0 | 18 | | MediaJobErrorCategory.Upload => "Upload", |
| 0 | 19 | | MediaJobErrorCategory.Configuration => "Configuration", |
| 0 | 20 | | MediaJobErrorCategory.Content => "Content", |
| 0 | 21 | | _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown MediaJobErrorCategory value.") |
| 0 | 22 | | }; |
| | 23 | |
|
| | 24 | | public static MediaJobErrorCategory ToMediaJobErrorCategory(this string value) |
| | 25 | | { |
| 32 | 26 | | if (string.Equals(value, "Service", StringComparison.InvariantCultureIgnoreCase)) return MediaJobErrorCatego |
| 0 | 27 | | if (string.Equals(value, "Download", StringComparison.InvariantCultureIgnoreCase)) return MediaJobErrorCateg |
| 0 | 28 | | if (string.Equals(value, "Upload", StringComparison.InvariantCultureIgnoreCase)) return MediaJobErrorCategor |
| 0 | 29 | | if (string.Equals(value, "Configuration", StringComparison.InvariantCultureIgnoreCase)) return MediaJobError |
| 0 | 30 | | if (string.Equals(value, "Content", StringComparison.InvariantCultureIgnoreCase)) return MediaJobErrorCatego |
| 0 | 31 | | throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown MediaJobErrorCategory value."); |
| | 32 | | } |
| | 33 | | } |
| | 34 | | } |