| | | 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 DisableComputeNodeSchedulingOption. |
| | | 20 | | /// </summary> |
| | | 21 | | [JsonConverter(typeof(StringEnumConverter))] |
| | | 22 | | public enum DisableComputeNodeSchedulingOption |
| | | 23 | | { |
| | | 24 | | /// <summary> |
| | | 25 | | /// Terminate running Task processes and requeue the Tasks. The Tasks |
| | | 26 | | /// may run again on other Compute Nodes, or when Task scheduling is |
| | | 27 | | /// re-enabled on this Compute Node. Enter offline state as soon as |
| | | 28 | | /// Tasks have been terminated. |
| | | 29 | | /// </summary> |
| | | 30 | | [EnumMember(Value = "requeue")] |
| | | 31 | | Requeue, |
| | | 32 | | /// <summary> |
| | | 33 | | /// Terminate running Tasks. The Tasks will be completed with |
| | | 34 | | /// failureInfo indicating that they were terminated, and will not run |
| | | 35 | | /// again. Enter offline state as soon as Tasks have been terminated. |
| | | 36 | | /// </summary> |
| | | 37 | | [EnumMember(Value = "terminate")] |
| | | 38 | | Terminate, |
| | | 39 | | /// <summary> |
| | | 40 | | /// Allow currently running Tasks to complete. Schedule no new Tasks |
| | | 41 | | /// while waiting. Enter offline state when all Tasks have completed. |
| | | 42 | | /// </summary> |
| | | 43 | | [EnumMember(Value = "taskcompletion")] |
| | | 44 | | TaskCompletion |
| | | 45 | | } |
| | | 46 | | internal static class DisableComputeNodeSchedulingOptionEnumExtension |
| | | 47 | | { |
| | | 48 | | internal static string ToSerializedValue(this DisableComputeNodeSchedulingOption? value) |
| | | 49 | | { |
| | 0 | 50 | | return value == null ? null : ((DisableComputeNodeSchedulingOption)value).ToSerializedValue(); |
| | | 51 | | } |
| | | 52 | | |
| | | 53 | | internal static string ToSerializedValue(this DisableComputeNodeSchedulingOption value) |
| | | 54 | | { |
| | | 55 | | switch( value ) |
| | | 56 | | { |
| | | 57 | | case DisableComputeNodeSchedulingOption.Requeue: |
| | 0 | 58 | | return "requeue"; |
| | | 59 | | case DisableComputeNodeSchedulingOption.Terminate: |
| | 0 | 60 | | return "terminate"; |
| | | 61 | | case DisableComputeNodeSchedulingOption.TaskCompletion: |
| | 0 | 62 | | return "taskcompletion"; |
| | | 63 | | } |
| | 0 | 64 | | return null; |
| | | 65 | | } |
| | | 66 | | |
| | | 67 | | internal static DisableComputeNodeSchedulingOption? ParseDisableComputeNodeSchedulingOption(this string value) |
| | | 68 | | { |
| | | 69 | | switch( value ) |
| | | 70 | | { |
| | | 71 | | case "requeue": |
| | 0 | 72 | | return DisableComputeNodeSchedulingOption.Requeue; |
| | | 73 | | case "terminate": |
| | 0 | 74 | | return DisableComputeNodeSchedulingOption.Terminate; |
| | | 75 | | case "taskcompletion": |
| | 0 | 76 | | return DisableComputeNodeSchedulingOption.TaskCompletion; |
| | | 77 | | } |
| | 0 | 78 | | return null; |
| | | 79 | | } |
| | | 80 | | } |
| | | 81 | | } |