| | 1 | | // <auto-generated> |
| | 2 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 3 | | // Licensed under the MIT License. See License.txt in the project root for |
| | 4 | | // license information. |
| | 5 | | // |
| | 6 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | 7 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | 8 | | // regenerated. |
| | 9 | | // </auto-generated> |
| | 10 | |
|
| | 11 | | namespace Microsoft.Azure.EventGrid.Models |
| | 12 | | { |
| | 13 | | using Newtonsoft.Json; |
| | 14 | | using Newtonsoft.Json.Converters; |
| | 15 | | using System.Runtime; |
| | 16 | | using System.Runtime.Serialization; |
| | 17 | |
|
| | 18 | | /// <summary> |
| | 19 | | /// Defines values for MediaJobErrorCategory. |
| | 20 | | /// </summary> |
| | 21 | | [JsonConverter(typeof(StringEnumConverter))] |
| | 22 | | public enum MediaJobErrorCategory |
| | 23 | | { |
| | 24 | | /// <summary> |
| | 25 | | /// The error is service related. |
| | 26 | | /// </summary> |
| | 27 | | [EnumMember(Value = "Service")] |
| | 28 | | Service, |
| | 29 | | /// <summary> |
| | 30 | | /// The error is download related. |
| | 31 | | /// </summary> |
| | 32 | | [EnumMember(Value = "Download")] |
| | 33 | | Download, |
| | 34 | | /// <summary> |
| | 35 | | /// The error is upload related. |
| | 36 | | /// </summary> |
| | 37 | | [EnumMember(Value = "Upload")] |
| | 38 | | Upload, |
| | 39 | | /// <summary> |
| | 40 | | /// The error is configuration related. |
| | 41 | | /// </summary> |
| | 42 | | [EnumMember(Value = "Configuration")] |
| | 43 | | Configuration, |
| | 44 | | /// <summary> |
| | 45 | | /// The error is related to data in the input files. |
| | 46 | | /// </summary> |
| | 47 | | [EnumMember(Value = "Content")] |
| | 48 | | Content |
| | 49 | | } |
| | 50 | | internal static class MediaJobErrorCategoryEnumExtension |
| | 51 | | { |
| | 52 | | internal static string ToSerializedValue(this MediaJobErrorCategory? value) |
| | 53 | | { |
| 0 | 54 | | return value == null ? null : ((MediaJobErrorCategory)value).ToSerializedValue(); |
| | 55 | | } |
| | 56 | |
|
| | 57 | | internal static string ToSerializedValue(this MediaJobErrorCategory value) |
| | 58 | | { |
| | 59 | | switch( value ) |
| | 60 | | { |
| | 61 | | case MediaJobErrorCategory.Service: |
| 0 | 62 | | return "Service"; |
| | 63 | | case MediaJobErrorCategory.Download: |
| 0 | 64 | | return "Download"; |
| | 65 | | case MediaJobErrorCategory.Upload: |
| 0 | 66 | | return "Upload"; |
| | 67 | | case MediaJobErrorCategory.Configuration: |
| 0 | 68 | | return "Configuration"; |
| | 69 | | case MediaJobErrorCategory.Content: |
| 0 | 70 | | return "Content"; |
| | 71 | | } |
| 0 | 72 | | return null; |
| | 73 | | } |
| | 74 | |
|
| | 75 | | internal static MediaJobErrorCategory? ParseMediaJobErrorCategory(this string value) |
| | 76 | | { |
| | 77 | | switch( value ) |
| | 78 | | { |
| | 79 | | case "Service": |
| 0 | 80 | | return MediaJobErrorCategory.Service; |
| | 81 | | case "Download": |
| 0 | 82 | | return MediaJobErrorCategory.Download; |
| | 83 | | case "Upload": |
| 0 | 84 | | return MediaJobErrorCategory.Upload; |
| | 85 | | case "Configuration": |
| 0 | 86 | | return MediaJobErrorCategory.Configuration; |
| | 87 | | case "Content": |
| 0 | 88 | | return MediaJobErrorCategory.Content; |
| | 89 | | } |
| 0 | 90 | | return null; |
| | 91 | | } |
| | 92 | | } |
| | 93 | | } |