| | 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 JobScheduleState. |
| | 20 | | /// </summary> |
| | 21 | | [JsonConverter(typeof(StringEnumConverter))] |
| | 22 | | public enum JobScheduleState |
| | 23 | | { |
| | 24 | | /// <summary> |
| | 25 | | /// The Job Schedule is active and will create Jobs as per its |
| | 26 | | /// schedule. |
| | 27 | | /// </summary> |
| | 28 | | [EnumMember(Value = "active")] |
| | 29 | | Active, |
| | 30 | | /// <summary> |
| | 31 | | /// The Job Schedule has terminated, either by reaching its end time or |
| | 32 | | /// by the user terminating it explicitly. |
| | 33 | | /// </summary> |
| | 34 | | [EnumMember(Value = "completed")] |
| | 35 | | Completed, |
| | 36 | | /// <summary> |
| | 37 | | /// The user has disabled the Job Schedule. The scheduler will not |
| | 38 | | /// initiate any new Jobs will on this schedule, but any existing |
| | 39 | | /// active Job will continue to run. |
| | 40 | | /// </summary> |
| | 41 | | [EnumMember(Value = "disabled")] |
| | 42 | | Disabled, |
| | 43 | | /// <summary> |
| | 44 | | /// The Job Schedule has no more work to do, or has been explicitly |
| | 45 | | /// terminated by the user, but the termination operation is still in |
| | 46 | | /// progress. The scheduler will not initiate any new Jobs for this Job |
| | 47 | | /// Schedule, nor is any existing Job active. |
| | 48 | | /// </summary> |
| | 49 | | [EnumMember(Value = "terminating")] |
| | 50 | | Terminating, |
| | 51 | | /// <summary> |
| | 52 | | /// The user has requested that the Job Schedule be deleted, but the |
| | 53 | | /// delete operation is still in progress. The scheduler will not |
| | 54 | | /// initiate any new Jobs for this Job Schedule, and will delete any |
| | 55 | | /// existing Jobs and Tasks under the Job Schedule, including any |
| | 56 | | /// active Job. The Job Schedule will be deleted when all Jobs and |
| | 57 | | /// Tasks under the Job Schedule have been deleted. |
| | 58 | | /// </summary> |
| | 59 | | [EnumMember(Value = "deleting")] |
| | 60 | | Deleting |
| | 61 | | } |
| | 62 | | internal static class JobScheduleStateEnumExtension |
| | 63 | | { |
| | 64 | | internal static string ToSerializedValue(this JobScheduleState? value) |
| | 65 | | { |
| 0 | 66 | | return value == null ? null : ((JobScheduleState)value).ToSerializedValue(); |
| | 67 | | } |
| | 68 | |
|
| | 69 | | internal static string ToSerializedValue(this JobScheduleState value) |
| | 70 | | { |
| | 71 | | switch( value ) |
| | 72 | | { |
| | 73 | | case JobScheduleState.Active: |
| 0 | 74 | | return "active"; |
| | 75 | | case JobScheduleState.Completed: |
| 0 | 76 | | return "completed"; |
| | 77 | | case JobScheduleState.Disabled: |
| 0 | 78 | | return "disabled"; |
| | 79 | | case JobScheduleState.Terminating: |
| 0 | 80 | | return "terminating"; |
| | 81 | | case JobScheduleState.Deleting: |
| 0 | 82 | | return "deleting"; |
| | 83 | | } |
| 0 | 84 | | return null; |
| | 85 | | } |
| | 86 | |
|
| | 87 | | internal static JobScheduleState? ParseJobScheduleState(this string value) |
| | 88 | | { |
| | 89 | | switch( value ) |
| | 90 | | { |
| | 91 | | case "active": |
| 0 | 92 | | return JobScheduleState.Active; |
| | 93 | | case "completed": |
| 0 | 94 | | return JobScheduleState.Completed; |
| | 95 | | case "disabled": |
| 0 | 96 | | return JobScheduleState.Disabled; |
| | 97 | | case "terminating": |
| 0 | 98 | | return JobScheduleState.Terminating; |
| | 99 | | case "deleting": |
| 0 | 100 | | return JobScheduleState.Deleting; |
| | 101 | | } |
| 0 | 102 | | return null; |
| | 103 | | } |
| | 104 | | } |
| | 105 | | } |