|   |  | 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.Batch.Protocol.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 DisableJobOption. | 
|   |  | 20 |  |     /// </summary> | 
|   |  | 21 |  |     [JsonConverter(typeof(StringEnumConverter))] | 
|   |  | 22 |  |     public enum DisableJobOption | 
|   |  | 23 |  |     { | 
|   |  | 24 |  |         /// <summary> | 
|   |  | 25 |  |         /// Terminate running Tasks and requeue them. The Tasks will run again | 
|   |  | 26 |  |         /// when the Job is enabled. | 
|   |  | 27 |  |         /// </summary> | 
|   |  | 28 |  |         [EnumMember(Value = "requeue")] | 
|   |  | 29 |  |         Requeue, | 
|   |  | 30 |  |         /// <summary> | 
|   |  | 31 |  |         /// Terminate running Tasks. The Tasks will be completed with | 
|   |  | 32 |  |         /// failureInfo indicating that they were terminated, and will not run | 
|   |  | 33 |  |         /// again. | 
|   |  | 34 |  |         /// </summary> | 
|   |  | 35 |  |         [EnumMember(Value = "terminate")] | 
|   |  | 36 |  |         Terminate, | 
|   |  | 37 |  |         /// <summary> | 
|   |  | 38 |  |         /// Allow currently running Tasks to complete. | 
|   |  | 39 |  |         /// </summary> | 
|   |  | 40 |  |         [EnumMember(Value = "wait")] | 
|   |  | 41 |  |         Wait | 
|   |  | 42 |  |     } | 
|   |  | 43 |  |     internal static class DisableJobOptionEnumExtension | 
|   |  | 44 |  |     { | 
|   |  | 45 |  |         internal static string ToSerializedValue(this DisableJobOption? value) | 
|   |  | 46 |  |         { | 
|   | 0 | 47 |  |             return value == null ? null : ((DisableJobOption)value).ToSerializedValue(); | 
|   |  | 48 |  |         } | 
|   |  | 49 |  |  | 
|   |  | 50 |  |         internal static string ToSerializedValue(this DisableJobOption value) | 
|   |  | 51 |  |         { | 
|   |  | 52 |  |             switch( value ) | 
|   |  | 53 |  |             { | 
|   |  | 54 |  |                 case DisableJobOption.Requeue: | 
|   | 0 | 55 |  |                     return "requeue"; | 
|   |  | 56 |  |                 case DisableJobOption.Terminate: | 
|   | 0 | 57 |  |                     return "terminate"; | 
|   |  | 58 |  |                 case DisableJobOption.Wait: | 
|   | 0 | 59 |  |                     return "wait"; | 
|   |  | 60 |  |             } | 
|   | 0 | 61 |  |             return null; | 
|   |  | 62 |  |         } | 
|   |  | 63 |  |  | 
|   |  | 64 |  |         internal static DisableJobOption? ParseDisableJobOption(this string value) | 
|   |  | 65 |  |         { | 
|   |  | 66 |  |             switch( value ) | 
|   |  | 67 |  |             { | 
|   |  | 68 |  |                 case "requeue": | 
|   | 0 | 69 |  |                     return DisableJobOption.Requeue; | 
|   |  | 70 |  |                 case "terminate": | 
|   | 0 | 71 |  |                     return DisableJobOption.Terminate; | 
|   |  | 72 |  |                 case "wait": | 
|   | 0 | 73 |  |                     return DisableJobOption.Wait; | 
|   |  | 74 |  |             } | 
|   | 0 | 75 |  |             return null; | 
|   |  | 76 |  |         } | 
|   |  | 77 |  |     } | 
|   |  | 78 |  | } |