| | 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 MediaJobState. |
| | 20 | | /// </summary> |
| | 21 | | [JsonConverter(typeof(StringEnumConverter))] |
| | 22 | | public enum MediaJobState |
| | 23 | | { |
| | 24 | | /// <summary> |
| | 25 | | /// The job was canceled. This is a final state for the job. |
| | 26 | | /// </summary> |
| | 27 | | [EnumMember(Value = "Canceled")] |
| | 28 | | Canceled, |
| | 29 | | /// <summary> |
| | 30 | | /// The job is in the process of being canceled. This is a transient |
| | 31 | | /// state for the job. |
| | 32 | | /// </summary> |
| | 33 | | [EnumMember(Value = "Canceling")] |
| | 34 | | Canceling, |
| | 35 | | /// <summary> |
| | 36 | | /// The job has encountered an error. This is a final state for the |
| | 37 | | /// job. |
| | 38 | | /// </summary> |
| | 39 | | [EnumMember(Value = "Error")] |
| | 40 | | Error, |
| | 41 | | /// <summary> |
| | 42 | | /// The job is finished. This is a final state for the job. |
| | 43 | | /// </summary> |
| | 44 | | [EnumMember(Value = "Finished")] |
| | 45 | | Finished, |
| | 46 | | /// <summary> |
| | 47 | | /// The job is processing. This is a transient state for the job. |
| | 48 | | /// </summary> |
| | 49 | | [EnumMember(Value = "Processing")] |
| | 50 | | Processing, |
| | 51 | | /// <summary> |
| | 52 | | /// The job is in a queued state, waiting for resources to become |
| | 53 | | /// available. This is a transient state. |
| | 54 | | /// </summary> |
| | 55 | | [EnumMember(Value = "Queued")] |
| | 56 | | Queued, |
| | 57 | | /// <summary> |
| | 58 | | /// The job is being scheduled to run on an available resource. This is |
| | 59 | | /// a transient state, between queued and processing states. |
| | 60 | | /// </summary> |
| | 61 | | [EnumMember(Value = "Scheduled")] |
| | 62 | | Scheduled |
| | 63 | | } |
| | 64 | | internal static class MediaJobStateEnumExtension |
| | 65 | | { |
| | 66 | | internal static string ToSerializedValue(this MediaJobState? value) |
| | 67 | | { |
| 0 | 68 | | return value == null ? null : ((MediaJobState)value).ToSerializedValue(); |
| | 69 | | } |
| | 70 | |
|
| | 71 | | internal static string ToSerializedValue(this MediaJobState value) |
| | 72 | | { |
| | 73 | | switch( value ) |
| | 74 | | { |
| | 75 | | case MediaJobState.Canceled: |
| 0 | 76 | | return "Canceled"; |
| | 77 | | case MediaJobState.Canceling: |
| 0 | 78 | | return "Canceling"; |
| | 79 | | case MediaJobState.Error: |
| 0 | 80 | | return "Error"; |
| | 81 | | case MediaJobState.Finished: |
| 0 | 82 | | return "Finished"; |
| | 83 | | case MediaJobState.Processing: |
| 0 | 84 | | return "Processing"; |
| | 85 | | case MediaJobState.Queued: |
| 0 | 86 | | return "Queued"; |
| | 87 | | case MediaJobState.Scheduled: |
| 0 | 88 | | return "Scheduled"; |
| | 89 | | } |
| 0 | 90 | | return null; |
| | 91 | | } |
| | 92 | |
|
| | 93 | | internal static MediaJobState? ParseMediaJobState(this string value) |
| | 94 | | { |
| | 95 | | switch( value ) |
| | 96 | | { |
| | 97 | | case "Canceled": |
| 0 | 98 | | return MediaJobState.Canceled; |
| | 99 | | case "Canceling": |
| 0 | 100 | | return MediaJobState.Canceling; |
| | 101 | | case "Error": |
| 0 | 102 | | return MediaJobState.Error; |
| | 103 | | case "Finished": |
| 0 | 104 | | return MediaJobState.Finished; |
| | 105 | | case "Processing": |
| 0 | 106 | | return MediaJobState.Processing; |
| | 107 | | case "Queued": |
| 0 | 108 | | return MediaJobState.Queued; |
| | 109 | | case "Scheduled": |
| 0 | 110 | | return MediaJobState.Scheduled; |
| | 111 | | } |
| 0 | 112 | | return null; |
| | 113 | | } |
| | 114 | | } |
| | 115 | | } |