| | | 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 MediaJobRetry. |
| | | 20 | | /// </summary> |
| | | 21 | | [JsonConverter(typeof(StringEnumConverter))] |
| | | 22 | | public enum MediaJobRetry |
| | | 23 | | { |
| | | 24 | | /// <summary> |
| | | 25 | | /// Issue needs to be investigated and then the job resubmitted with |
| | | 26 | | /// corrections or retried once the underlying issue has been |
| | | 27 | | /// corrected. |
| | | 28 | | /// </summary> |
| | | 29 | | [EnumMember(Value = "DoNotRetry")] |
| | | 30 | | DoNotRetry, |
| | | 31 | | /// <summary> |
| | | 32 | | /// Issue may be resolved after waiting for a period of time and |
| | | 33 | | /// resubmitting the same Job. |
| | | 34 | | /// </summary> |
| | | 35 | | [EnumMember(Value = "MayRetry")] |
| | | 36 | | MayRetry |
| | | 37 | | } |
| | | 38 | | internal static class MediaJobRetryEnumExtension |
| | | 39 | | { |
| | | 40 | | internal static string ToSerializedValue(this MediaJobRetry? value) |
| | | 41 | | { |
| | 0 | 42 | | return value == null ? null : ((MediaJobRetry)value).ToSerializedValue(); |
| | | 43 | | } |
| | | 44 | | |
| | | 45 | | internal static string ToSerializedValue(this MediaJobRetry value) |
| | | 46 | | { |
| | | 47 | | switch( value ) |
| | | 48 | | { |
| | | 49 | | case MediaJobRetry.DoNotRetry: |
| | 0 | 50 | | return "DoNotRetry"; |
| | | 51 | | case MediaJobRetry.MayRetry: |
| | 0 | 52 | | return "MayRetry"; |
| | | 53 | | } |
| | 0 | 54 | | return null; |
| | | 55 | | } |
| | | 56 | | |
| | | 57 | | internal static MediaJobRetry? ParseMediaJobRetry(this string value) |
| | | 58 | | { |
| | | 59 | | switch( value ) |
| | | 60 | | { |
| | | 61 | | case "DoNotRetry": |
| | 0 | 62 | | return MediaJobRetry.DoNotRetry; |
| | | 63 | | case "MayRetry": |
| | 0 | 64 | | return MediaJobRetry.MayRetry; |
| | | 65 | | } |
| | 0 | 66 | | return null; |
| | | 67 | | } |
| | | 68 | | } |
| | | 69 | | } |