| | | 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 LoginMode. |
| | | 20 | | /// </summary> |
| | | 21 | | [JsonConverter(typeof(StringEnumConverter))] |
| | | 22 | | public enum LoginMode |
| | | 23 | | { |
| | | 24 | | /// <summary> |
| | | 25 | | /// The LOGON32_LOGON_BATCH Win32 login mode. The batch login mode is |
| | | 26 | | /// recommended for long running parallel processes. |
| | | 27 | | /// </summary> |
| | | 28 | | [EnumMember(Value = "batch")] |
| | | 29 | | Batch, |
| | | 30 | | /// <summary> |
| | | 31 | | /// The LOGON32_LOGON_INTERACTIVE Win32 login mode. UAC is enabled on |
| | | 32 | | /// Windows VirtualMachineConfiguration Pools. If this option is used |
| | | 33 | | /// with an elevated user identity in a Windows |
| | | 34 | | /// VirtualMachineConfiguration Pool, the user session will not be |
| | | 35 | | /// elevated unless the application executed by the Task command line |
| | | 36 | | /// is configured to always require administrative privilege or to |
| | | 37 | | /// always require maximum privilege. |
| | | 38 | | /// </summary> |
| | | 39 | | [EnumMember(Value = "interactive")] |
| | | 40 | | Interactive |
| | | 41 | | } |
| | | 42 | | internal static class LoginModeEnumExtension |
| | | 43 | | { |
| | | 44 | | internal static string ToSerializedValue(this LoginMode? value) |
| | | 45 | | { |
| | 0 | 46 | | return value == null ? null : ((LoginMode)value).ToSerializedValue(); |
| | | 47 | | } |
| | | 48 | | |
| | | 49 | | internal static string ToSerializedValue(this LoginMode value) |
| | | 50 | | { |
| | | 51 | | switch( value ) |
| | | 52 | | { |
| | | 53 | | case LoginMode.Batch: |
| | 0 | 54 | | return "batch"; |
| | | 55 | | case LoginMode.Interactive: |
| | 0 | 56 | | return "interactive"; |
| | | 57 | | } |
| | 0 | 58 | | return null; |
| | | 59 | | } |
| | | 60 | | |
| | | 61 | | internal static LoginMode? ParseLoginMode(this string value) |
| | | 62 | | { |
| | | 63 | | switch( value ) |
| | | 64 | | { |
| | | 65 | | case "batch": |
| | 0 | 66 | | return LoginMode.Batch; |
| | | 67 | | case "interactive": |
| | 0 | 68 | | return LoginMode.Interactive; |
| | | 69 | | } |
| | 0 | 70 | | return null; |
| | | 71 | | } |
| | | 72 | | } |
| | | 73 | | } |