| | 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 | | /// Specifies the parameters for the auto user that runs a task on the Batch service |
| | 22 | | /// </summary> |
| | 23 | | public partial class AutoUserSpecification : ITransportObjectProvider<Models.AutoUserSpecification>, IPropertyMetada |
| | 24 | | { |
| | 25 | | #region Constructors |
| | 26 | | /// <summary> |
| | 27 | | /// Initializes a new instance of the <see cref="AutoUserSpecification"/> class. |
| | 28 | | /// </summary> |
| | 29 | | /// <param name='scope'>The scope for the auto user. If omitted, the default is <see cref="Common.AutoUserScope. |
| | 30 | | /// <param name='elevationLevel'>The elevation level of the auto user. If omitted, the default is <see cref="Com |
| 101 | 31 | | public AutoUserSpecification( |
| 101 | 32 | | Common.AutoUserScope? scope = default(Common.AutoUserScope?), |
| 101 | 33 | | Common.ElevationLevel? elevationLevel = default(Common.ElevationLevel?)) |
| | 34 | | { |
| 101 | 35 | | this.Scope = scope; |
| 101 | 36 | | this.ElevationLevel = elevationLevel; |
| 101 | 37 | | } |
| | 38 | |
|
| 1385 | 39 | | internal AutoUserSpecification(Models.AutoUserSpecification protocolObject) |
| | 40 | | { |
| 1385 | 41 | | this.ElevationLevel = UtilitiesInternal.MapNullableEnum<Models.ElevationLevel, Common.ElevationLevel>(protoc |
| 1385 | 42 | | this.Scope = UtilitiesInternal.MapNullableEnum<Models.AutoUserScope, Common.AutoUserScope>(protocolObject.Sc |
| 1385 | 43 | | } |
| | 44 | |
|
| | 45 | | #endregion Constructors |
| | 46 | |
|
| | 47 | | #region AutoUserSpecification |
| | 48 | |
|
| | 49 | | /// <summary> |
| | 50 | | /// Gets the elevation level of the auto user. If omitted, the default is <see cref="Common.ElevationLevel.NonAd |
| | 51 | | /// </summary> |
| 1861 | 52 | | public Common.ElevationLevel? ElevationLevel { get; } |
| | 53 | |
|
| | 54 | | /// <summary> |
| | 55 | | /// Gets the scope for the auto user. If omitted, the default is <see cref="Common.AutoUserScope.Pool"/>. |
| | 56 | | /// </summary> |
| | 57 | | /// <remarks> |
| | 58 | | /// If the pool is running Windows a value of <see cref="Common.AutoUserScope.Task"/> should be specified if str |
| | 59 | | /// isolation between tasks is required. For example, if the Task mutates the registry in a way which could impa |
| | 60 | | /// other Tasks, or if Certificates have been specified on the pool which should not be accessible by normal tas |
| | 61 | | /// but should be accessible by StartTasks. |
| | 62 | | /// </remarks> |
| 1860 | 63 | | public Common.AutoUserScope? Scope { get; } |
| | 64 | |
|
| | 65 | | #endregion // AutoUserSpecification |
| | 66 | |
|
| | 67 | | #region IPropertyMetadata |
| | 68 | |
|
| | 69 | | bool IModifiable.HasBeenModified |
| | 70 | | { |
| | 71 | | //This class is compile time readonly so it cannot have been modified |
| 0 | 72 | | get { return false; } |
| | 73 | | } |
| | 74 | |
|
| | 75 | | bool IReadOnly.IsReadOnly |
| | 76 | | { |
| 0 | 77 | | get { return true; } |
| | 78 | | set |
| | 79 | | { |
| | 80 | | // This class is compile time readonly already |
| 1386 | 81 | | } |
| | 82 | | } |
| | 83 | |
|
| | 84 | | #endregion // IPropertyMetadata |
| | 85 | |
|
| | 86 | | #region Internal/private methods |
| | 87 | |
|
| | 88 | | /// <summary> |
| | 89 | | /// Return a protocol object of the requested type. |
| | 90 | | /// </summary> |
| | 91 | | /// <returns>The protocol object of the requested type.</returns> |
| | 92 | | Models.AutoUserSpecification ITransportObjectProvider<Models.AutoUserSpecification>.GetTransportObject() |
| | 93 | | { |
| 375 | 94 | | Models.AutoUserSpecification result = new Models.AutoUserSpecification() |
| 375 | 95 | | { |
| 375 | 96 | | ElevationLevel = UtilitiesInternal.MapNullableEnum<Common.ElevationLevel, Models.ElevationLevel>(this.El |
| 375 | 97 | | Scope = UtilitiesInternal.MapNullableEnum<Common.AutoUserScope, Models.AutoUserScope>(this.Scope), |
| 375 | 98 | | }; |
| | 99 | |
|
| 375 | 100 | | return result; |
| | 101 | | } |
| | 102 | |
|
| | 103 | |
|
| | 104 | | #endregion // Internal/private methods |
| | 105 | | } |
| | 106 | | } |