| | | 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 TaskAddStatus. |
| | | 20 | | /// </summary> |
| | | 21 | | [JsonConverter(typeof(StringEnumConverter))] |
| | | 22 | | public enum TaskAddStatus |
| | | 23 | | { |
| | | 24 | | /// <summary> |
| | | 25 | | /// The Task was added successfully. |
| | | 26 | | /// </summary> |
| | | 27 | | [EnumMember(Value = "success")] |
| | | 28 | | Success, |
| | | 29 | | /// <summary> |
| | | 30 | | /// The Task failed to add due to a client error and should not be |
| | | 31 | | /// retried without modifying the request as appropriate. |
| | | 32 | | /// </summary> |
| | | 33 | | [EnumMember(Value = "clienterror")] |
| | | 34 | | ClientError, |
| | | 35 | | /// <summary> |
| | | 36 | | /// Task failed to add due to a server error and can be retried without |
| | | 37 | | /// modification. |
| | | 38 | | /// </summary> |
| | | 39 | | [EnumMember(Value = "servererror")] |
| | | 40 | | ServerError |
| | | 41 | | } |
| | | 42 | | internal static class TaskAddStatusEnumExtension |
| | | 43 | | { |
| | | 44 | | internal static string ToSerializedValue(this TaskAddStatus? value) |
| | | 45 | | { |
| | 0 | 46 | | return value == null ? null : ((TaskAddStatus)value).ToSerializedValue(); |
| | | 47 | | } |
| | | 48 | | |
| | | 49 | | internal static string ToSerializedValue(this TaskAddStatus value) |
| | | 50 | | { |
| | | 51 | | switch( value ) |
| | | 52 | | { |
| | | 53 | | case TaskAddStatus.Success: |
| | 0 | 54 | | return "success"; |
| | | 55 | | case TaskAddStatus.ClientError: |
| | 0 | 56 | | return "clienterror"; |
| | | 57 | | case TaskAddStatus.ServerError: |
| | 0 | 58 | | return "servererror"; |
| | | 59 | | } |
| | 0 | 60 | | return null; |
| | | 61 | | } |
| | | 62 | | |
| | | 63 | | internal static TaskAddStatus? ParseTaskAddStatus(this string value) |
| | | 64 | | { |
| | | 65 | | switch( value ) |
| | | 66 | | { |
| | | 67 | | case "success": |
| | 0 | 68 | | return TaskAddStatus.Success; |
| | | 69 | | case "clienterror": |
| | 0 | 70 | | return TaskAddStatus.ClientError; |
| | | 71 | | case "servererror": |
| | 0 | 72 | | return TaskAddStatus.ServerError; |
| | | 73 | | } |
| | 0 | 74 | | return null; |
| | | 75 | | } |
| | | 76 | | } |
| | | 77 | | } |