| | | 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 | | /// The definition of the user identity under which the task is run. |
| | 1 | 22 | | /// </summary> |
| | | 23 | | public partial class UserIdentity : ITransportObjectProvider<Models.UserIdentity>, IPropertyMetadata |
| | 1 | 24 | | { |
| | 1 | 25 | | #region Constructors |
| | | 26 | | |
| | 2750 | 27 | | internal UserIdentity(Models.UserIdentity protocolObject) |
| | | 28 | | { |
| | 4135 | 29 | | this.AutoUser = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.AutoUser, o => new AutoUserSpecif |
| | 2750 | 30 | | this.UserName = protocolObject.UserName; |
| | 2750 | 31 | | } |
| | | 32 | | |
| | 0 | 33 | | #endregion Constructors |
| | 0 | 34 | | |
| | | 35 | | #region UserIdentity |
| | | 36 | | |
| | | 37 | | /// <summary> |
| | | 38 | | /// Gets the auto user under which the task is run. |
| | | 39 | | /// </summary> |
| | | 40 | | /// <remarks> |
| | | 41 | | /// The <see cref="UserName"/> and <see cref="AutoUser"/> properties are mutually exclusive; you must specify on |
| | | 42 | | /// but not both. |
| | | 43 | | /// </remarks> |
| | 3318 | 44 | | public AutoUserSpecification AutoUser { get; } |
| | | 45 | | |
| | | 46 | | /// <summary> |
| | | 47 | | /// Gets the name of the user identity under which the task is run. |
| | | 48 | | /// </summary> |
| | | 49 | | /// <remarks> |
| | | 50 | | /// The <see cref="UserName"/> and <see cref="AutoUser"/> properties are mutually exclusive; you must specify on |
| | | 51 | | /// but not both. |
| | | 52 | | /// </remarks> |
| | 3317 | 53 | | public string UserName { get; } |
| | | 54 | | |
| | | 55 | | #endregion // UserIdentity |
| | | 56 | | |
| | | 57 | | #region IPropertyMetadata |
| | | 58 | | |
| | | 59 | | bool IModifiable.HasBeenModified |
| | | 60 | | { |
| | | 61 | | //This class is compile time readonly so it cannot have been modified |
| | 0 | 62 | | get { return false; } |
| | | 63 | | } |
| | | 64 | | |
| | | 65 | | bool IReadOnly.IsReadOnly |
| | | 66 | | { |
| | 0 | 67 | | get { return true; } |
| | | 68 | | set |
| | | 69 | | { |
| | | 70 | | // This class is compile time readonly already |
| | 1920 | 71 | | } |
| | | 72 | | } |
| | | 73 | | |
| | | 74 | | #endregion // IPropertyMetadata |
| | | 75 | | |
| | | 76 | | #region Internal/private methods |
| | | 77 | | |
| | | 78 | | /// <summary> |
| | | 79 | | /// Return a protocol object of the requested type. |
| | | 80 | | /// </summary> |
| | | 81 | | /// <returns>The protocol object of the requested type.</returns> |
| | | 82 | | Models.UserIdentity ITransportObjectProvider<Models.UserIdentity>.GetTransportObject() |
| | | 83 | | { |
| | 568 | 84 | | Models.UserIdentity result = new Models.UserIdentity() |
| | 568 | 85 | | { |
| | 843 | 86 | | AutoUser = UtilitiesInternal.CreateObjectWithNullCheck(this.AutoUser, (o) => o.GetTransportObject()), |
| | 568 | 87 | | UserName = this.UserName, |
| | 568 | 88 | | }; |
| | | 89 | | |
| | 568 | 90 | | return result; |
| | | 91 | | } |
| | | 92 | | |
| | | 93 | | |
| | | 94 | | #endregion // Internal/private methods |
| | | 95 | | } |
| | | 96 | | } |