| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. See License.txt in the project root for license information. |
| | 3 | | // |
| | 4 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | 5 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | 6 | | // regenerated. |
| | 7 | |
|
| | 8 | | // |
| | 9 | | // This file was autogenerated by a tool. |
| | 10 | | // Do not modify it. |
| | 11 | | // |
| | 12 | |
|
| | 13 | | namespace Microsoft.Azure.Batch |
| | 14 | | { |
| | 15 | | using Models = Microsoft.Azure.Batch.Protocol.Models; |
| | 16 | | using System; |
| | 17 | | using System.Collections.Generic; |
| | 18 | | using System.Linq; |
| | 19 | |
|
| | 20 | | /// <summary> |
| | 21 | | /// Properties used to create a user account on a Windows node. |
| | 22 | | /// </summary> |
| | 23 | | public partial class WindowsUserConfiguration : ITransportObjectProvider<Models.WindowsUserConfiguration>, IProperty |
| | 24 | | { |
| | 25 | | private class PropertyContainer : PropertyCollection |
| | 26 | | { |
| | 27 | | public readonly PropertyAccessor<Common.LoginMode?> LoginModeProperty; |
| | 28 | |
|
| 1333 | 29 | | public PropertyContainer() : base(BindingState.Unbound) |
| | 30 | | { |
| 1333 | 31 | | this.LoginModeProperty = this.CreatePropertyAccessor<Common.LoginMode?>(nameof(LoginMode), BindingAccess |
| 1333 | 32 | | } |
| | 33 | |
|
| 1410 | 34 | | public PropertyContainer(Models.WindowsUserConfiguration protocolObject) : base(BindingState.Bound) |
| | 35 | | { |
| 1410 | 36 | | this.LoginModeProperty = this.CreatePropertyAccessor( |
| 1410 | 37 | | UtilitiesInternal.MapNullableEnum<Models.LoginMode, Common.LoginMode>(protocolObject.LoginMode), |
| 1410 | 38 | | nameof(LoginMode), |
| 1410 | 39 | | BindingAccess.Read); |
| 1410 | 40 | | } |
| | 41 | | } |
| | 42 | |
|
| | 43 | | private readonly PropertyContainer propertyContainer; |
| | 44 | |
|
| | 45 | | #region Constructors |
| | 46 | |
|
| | 47 | | /// <summary> |
| | 48 | | /// Initializes a new instance of the <see cref="WindowsUserConfiguration"/> class. |
| | 49 | | /// </summary> |
| | 50 | | /// <param name='loginMode'>The login mode for the user.</param> |
| 1333 | 51 | | public WindowsUserConfiguration( |
| 1333 | 52 | | Common.LoginMode? loginMode = default(Common.LoginMode?)) |
| | 53 | | { |
| 1333 | 54 | | this.propertyContainer = new PropertyContainer(); |
| 1333 | 55 | | this.LoginMode = loginMode; |
| 1333 | 56 | | } |
| | 57 | |
|
| 1410 | 58 | | internal WindowsUserConfiguration(Models.WindowsUserConfiguration protocolObject) |
| | 59 | | { |
| 1410 | 60 | | this.propertyContainer = new PropertyContainer(protocolObject); |
| 1410 | 61 | | } |
| | 62 | |
|
| | 63 | | #endregion Constructors |
| | 64 | |
|
| | 65 | | #region WindowsUserConfiguration |
| | 66 | |
|
| | 67 | | /// <summary> |
| | 68 | | /// Gets or sets the login mode for the user. |
| | 69 | | /// </summary> |
| | 70 | | /// <remarks> |
| | 71 | | /// The default value for <see cref="CloudPool.VirtualMachineConfiguration" /> pools is <see cref="Common.LoginM |
| | 72 | | /// /> and for <see cref="CloudPool.CloudServiceConfiguration" /> pools is <see cref="Common.LoginMode.Batch" /> |
| | 73 | | /// </remarks> |
| | 74 | | public Common.LoginMode? LoginMode |
| | 75 | | { |
| 3261 | 76 | | get { return this.propertyContainer.LoginModeProperty.Value; } |
| 3957 | 77 | | set { this.propertyContainer.LoginModeProperty.Value = value; } |
| | 78 | | } |
| | 79 | |
|
| | 80 | | #endregion // WindowsUserConfiguration |
| | 81 | |
|
| | 82 | | #region IPropertyMetadata |
| | 83 | |
|
| | 84 | | bool IModifiable.HasBeenModified |
| | 85 | | { |
| 0 | 86 | | get { return this.propertyContainer.HasBeenModified; } |
| | 87 | | } |
| | 88 | |
|
| | 89 | | bool IReadOnly.IsReadOnly |
| | 90 | | { |
| 0 | 91 | | get { return this.propertyContainer.IsReadOnly; } |
| 11866 | 92 | | set { this.propertyContainer.IsReadOnly = value; } |
| | 93 | | } |
| | 94 | |
|
| | 95 | | #endregion //IPropertyMetadata |
| | 96 | |
|
| | 97 | | #region Internal/private methods |
| | 98 | | /// <summary> |
| | 99 | | /// Return a protocol object of the requested type. |
| | 100 | | /// </summary> |
| | 101 | | /// <returns>The protocol object of the requested type.</returns> |
| | 102 | | Models.WindowsUserConfiguration ITransportObjectProvider<Models.WindowsUserConfiguration>.GetTransportObject() |
| | 103 | | { |
| 925 | 104 | | Models.WindowsUserConfiguration result = new Models.WindowsUserConfiguration() |
| 925 | 105 | | { |
| 925 | 106 | | LoginMode = UtilitiesInternal.MapNullableEnum<Common.LoginMode, Models.LoginMode>(this.LoginMode), |
| 925 | 107 | | }; |
| | 108 | |
|
| 925 | 109 | | return result; |
| | 110 | | } |
| | 111 | |
|
| | 112 | |
|
| | 113 | | #endregion // Internal/private methods |
| | 114 | | } |
| | 115 | | } |