| | 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 | | /// A user account for remote access to a compute node. |
| | 22 | | /// </summary> |
| | 23 | | public partial class ComputeNodeUser : ITransportObjectProvider<Models.ComputeNodeUser>, IInheritedBehaviors, IPrope |
| | 24 | | { |
| | 25 | | private class PropertyContainer : PropertyCollection |
| | 26 | | { |
| | 27 | | public readonly PropertyAccessor<DateTime> ExpiryTimeProperty; |
| | 28 | | public readonly PropertyAccessor<bool?> IsAdminProperty; |
| | 29 | | public readonly PropertyAccessor<string> NameProperty; |
| | 30 | | public readonly PropertyAccessor<string> PasswordProperty; |
| | 31 | | public readonly PropertyAccessor<string> SshPublicKeyProperty; |
| | 32 | |
|
| 0 | 33 | | public PropertyContainer() : base(BindingState.Unbound) |
| | 34 | | { |
| 0 | 35 | | this.ExpiryTimeProperty = this.CreatePropertyAccessor<DateTime>(nameof(ExpiryTime), BindingAccess.Read | |
| 0 | 36 | | this.IsAdminProperty = this.CreatePropertyAccessor<bool?>(nameof(IsAdmin), BindingAccess.Read | BindingA |
| 0 | 37 | | this.NameProperty = this.CreatePropertyAccessor<string>(nameof(Name), BindingAccess.Read | BindingAccess |
| 0 | 38 | | this.PasswordProperty = this.CreatePropertyAccessor<string>(nameof(Password), BindingAccess.Read | Bindi |
| 0 | 39 | | this.SshPublicKeyProperty = this.CreatePropertyAccessor<string>(nameof(SshPublicKey), BindingAccess.Read |
| 0 | 40 | | } |
| | 41 | |
|
| | 42 | | } |
| | 43 | |
|
| | 44 | | private PropertyContainer propertyContainer; |
| | 45 | |
|
| | 46 | | private readonly BatchClient parentBatchClient; |
| | 47 | | private readonly string parentPoolId; |
| | 48 | |
|
| | 49 | | internal string ParentPoolId |
| | 50 | | { |
| | 51 | | get |
| | 52 | | { |
| 0 | 53 | | return this.parentPoolId; |
| | 54 | | } |
| | 55 | | } |
| | 56 | | private readonly string parentNodeId; |
| | 57 | |
|
| | 58 | | internal string ParentNodeId |
| | 59 | | { |
| | 60 | | get |
| | 61 | | { |
| 0 | 62 | | return this.parentNodeId; |
| | 63 | | } |
| | 64 | | } |
| | 65 | |
|
| | 66 | | #region Constructors |
| | 67 | |
|
| | 68 | | /// <summary> |
| | 69 | | /// Initializes a new instance of the <see cref="ComputeNodeUser"/> class. |
| | 70 | | /// </summary> |
| | 71 | | /// <param name='parentBatchClient'>The parent <see cref="BatchClient"/> to use.</param> |
| | 72 | | /// <param name='baseBehaviors'>The base behaviors to use.</param> |
| | 73 | | /// <param name='parentPoolId'>The parentPoolId.</param> |
| | 74 | | /// <param name='parentNodeId'>The parentNodeId.</param> |
| 0 | 75 | | internal ComputeNodeUser( |
| 0 | 76 | | BatchClient parentBatchClient, |
| 0 | 77 | | IEnumerable<BatchClientBehavior> baseBehaviors, |
| 0 | 78 | | string parentPoolId, |
| 0 | 79 | | string parentNodeId) |
| | 80 | | { |
| 0 | 81 | | this.propertyContainer = new PropertyContainer(); |
| 0 | 82 | | this.parentBatchClient = parentBatchClient; |
| 0 | 83 | | this.parentPoolId = parentPoolId; |
| 0 | 84 | | this.parentNodeId = parentNodeId; |
| 0 | 85 | | InheritUtil.InheritClientBehaviorsAndSetPublicProperty(this, baseBehaviors); |
| 0 | 86 | | } |
| | 87 | |
|
| | 88 | |
|
| | 89 | | #endregion Constructors |
| | 90 | |
|
| | 91 | | #region IInheritedBehaviors |
| | 92 | |
|
| | 93 | | /// <summary> |
| | 94 | | /// Gets or sets a list of behaviors that modify or customize requests to the Batch service |
| | 95 | | /// made via this <see cref="ComputeNodeUser"/>. |
| | 96 | | /// </summary> |
| | 97 | | /// <remarks> |
| | 98 | | /// <para>These behaviors are inherited by child objects.</para> |
| | 99 | | /// <para>Modifications are applied in the order of the collection. The last write wins.</para> |
| | 100 | | /// </remarks> |
| 0 | 101 | | public IList<BatchClientBehavior> CustomBehaviors { get; set; } |
| | 102 | |
|
| | 103 | | #endregion IInheritedBehaviors |
| | 104 | |
|
| | 105 | | #region ComputeNodeUser |
| | 106 | |
|
| | 107 | | /// <summary> |
| | 108 | | /// Gets or sets the expiry time. |
| | 109 | | /// </summary> |
| | 110 | | public DateTime ExpiryTime |
| | 111 | | { |
| 0 | 112 | | get { return this.propertyContainer.ExpiryTimeProperty.Value; } |
| 0 | 113 | | set { this.propertyContainer.ExpiryTimeProperty.Value = value; } |
| | 114 | | } |
| | 115 | |
|
| | 116 | | /// <summary> |
| | 117 | | /// Gets or sets the administrative privilege level of the user account. The value of this property is ignored w |
| | 118 | | /// UpdateUser is specified for the commit operation. |
| | 119 | | /// </summary> |
| | 120 | | public bool? IsAdmin |
| | 121 | | { |
| 0 | 122 | | get { return this.propertyContainer.IsAdminProperty.Value; } |
| 0 | 123 | | set { this.propertyContainer.IsAdminProperty.Value = value; } |
| | 124 | | } |
| | 125 | |
|
| | 126 | | /// <summary> |
| | 127 | | /// Gets or sets the name. If AddUser is specified for the commit operation, the value of this property is the n |
| | 128 | | /// of the local Windows account created. If UpdateUser is specified for the commit operation, the value of this |
| | 129 | | /// property selects the local Windows account to modify. Changing this property does not rename the local Windo |
| | 130 | | /// account on the compute node. |
| | 131 | | /// </summary> |
| | 132 | | public string Name |
| | 133 | | { |
| 0 | 134 | | get { return this.propertyContainer.NameProperty.Value; } |
| 0 | 135 | | set { this.propertyContainer.NameProperty.Value = value; } |
| | 136 | | } |
| | 137 | |
|
| | 138 | | /// <summary> |
| | 139 | | /// Gets or sets the password. |
| | 140 | | /// </summary> |
| | 141 | | public string Password |
| | 142 | | { |
| 0 | 143 | | get { return this.propertyContainer.PasswordProperty.Value; } |
| 0 | 144 | | set { this.propertyContainer.PasswordProperty.Value = value; } |
| | 145 | | } |
| | 146 | |
|
| | 147 | | /// <summary> |
| | 148 | | /// Gets or sets the SSH public key that can be used for remote login to the compute node. |
| | 149 | | /// </summary> |
| | 150 | | /// <remarks> |
| | 151 | | /// <para>The public key should be compatible with Open SSH encoding and should be base 64 encoded. This propert |
| | 152 | | /// can be specified only for Linux nodes. The Batch service will return an error if this property is set for po |
| | 153 | | /// created with <see cref="Microsoft.Azure.Batch.CloudServiceConfiguration"/> or <see cref="Microsoft.Azure.Bat |
| | 154 | | /// with Windows compute nodes.</para> |
| | 155 | | /// </remarks> |
| | 156 | | public string SshPublicKey |
| | 157 | | { |
| 0 | 158 | | get { return this.propertyContainer.SshPublicKeyProperty.Value; } |
| 0 | 159 | | set { this.propertyContainer.SshPublicKeyProperty.Value = value; } |
| | 160 | | } |
| | 161 | |
|
| | 162 | | #endregion // ComputeNodeUser |
| | 163 | |
|
| | 164 | | #region IPropertyMetadata |
| | 165 | |
|
| | 166 | | bool IModifiable.HasBeenModified |
| | 167 | | { |
| 0 | 168 | | get { return this.propertyContainer.HasBeenModified; } |
| | 169 | | } |
| | 170 | |
|
| | 171 | | bool IReadOnly.IsReadOnly |
| | 172 | | { |
| 0 | 173 | | get { return this.propertyContainer.IsReadOnly; } |
| 0 | 174 | | set { this.propertyContainer.IsReadOnly = value; } |
| | 175 | | } |
| | 176 | |
|
| | 177 | | #endregion //IPropertyMetadata |
| | 178 | |
|
| | 179 | | #region Internal/private methods |
| | 180 | | /// <summary> |
| | 181 | | /// Return a protocol object of the requested type. |
| | 182 | | /// </summary> |
| | 183 | | /// <returns>The protocol object of the requested type.</returns> |
| | 184 | | Models.ComputeNodeUser ITransportObjectProvider<Models.ComputeNodeUser>.GetTransportObject() |
| | 185 | | { |
| 0 | 186 | | Models.ComputeNodeUser result = new Models.ComputeNodeUser() |
| 0 | 187 | | { |
| 0 | 188 | | ExpiryTime = this.ExpiryTime, |
| 0 | 189 | | IsAdmin = this.IsAdmin, |
| 0 | 190 | | Name = this.Name, |
| 0 | 191 | | Password = this.Password, |
| 0 | 192 | | SshPublicKey = this.SshPublicKey, |
| 0 | 193 | | }; |
| | 194 | |
|
| 0 | 195 | | return result; |
| | 196 | | } |
| | 197 | |
|
| | 198 | |
|
| | 199 | | #endregion // Internal/private methods |
| | 200 | | } |
| | 201 | | } |