| | 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 ContainerWorkingDirectory. |
| | 20 | | /// </summary> |
| | 21 | | [JsonConverter(typeof(StringEnumConverter))] |
| | 22 | | public enum ContainerWorkingDirectory |
| | 23 | | { |
| | 24 | | /// <summary> |
| | 25 | | /// Use the standard Batch service Task working directory, which will |
| | 26 | | /// contain the Task Resource Files populated by Batch. |
| | 27 | | /// </summary> |
| | 28 | | [EnumMember(Value = "taskWorkingDirectory")] |
| | 29 | | TaskWorkingDirectory, |
| | 30 | | /// <summary> |
| | 31 | | /// Use the working directory defined in the container Image. Beware |
| | 32 | | /// that this directory will not contain the Resource Files downloaded |
| | 33 | | /// by Batch. |
| | 34 | | /// </summary> |
| | 35 | | [EnumMember(Value = "containerImageDefault")] |
| | 36 | | ContainerImageDefault |
| | 37 | | } |
| | 38 | | internal static class ContainerWorkingDirectoryEnumExtension |
| | 39 | | { |
| | 40 | | internal static string ToSerializedValue(this ContainerWorkingDirectory? value) |
| | 41 | | { |
| 0 | 42 | | return value == null ? null : ((ContainerWorkingDirectory)value).ToSerializedValue(); |
| | 43 | | } |
| | 44 | |
|
| | 45 | | internal static string ToSerializedValue(this ContainerWorkingDirectory value) |
| | 46 | | { |
| | 47 | | switch( value ) |
| | 48 | | { |
| | 49 | | case ContainerWorkingDirectory.TaskWorkingDirectory: |
| 0 | 50 | | return "taskWorkingDirectory"; |
| | 51 | | case ContainerWorkingDirectory.ContainerImageDefault: |
| 0 | 52 | | return "containerImageDefault"; |
| | 53 | | } |
| 0 | 54 | | return null; |
| | 55 | | } |
| | 56 | |
|
| | 57 | | internal static ContainerWorkingDirectory? ParseContainerWorkingDirectory(this string value) |
| | 58 | | { |
| | 59 | | switch( value ) |
| | 60 | | { |
| | 61 | | case "taskWorkingDirectory": |
| 0 | 62 | | return ContainerWorkingDirectory.TaskWorkingDirectory; |
| | 63 | | case "containerImageDefault": |
| 0 | 64 | | return ContainerWorkingDirectory.ContainerImageDefault; |
| | 65 | | } |
| 0 | 66 | | return null; |
| | 67 | | } |
| | 68 | | } |
| | 69 | | } |