| | 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 how a job should be assigned to a pool. |
| | 22 | | /// </summary> |
| | 23 | | public partial class PoolInformation : ITransportObjectProvider<Models.PoolInformation>, IPropertyMetadata |
| | 24 | | { |
| | 25 | | private class PropertyContainer : PropertyCollection |
| | 26 | | { |
| | 27 | | public readonly PropertyAccessor<AutoPoolSpecification> AutoPoolSpecificationProperty; |
| | 28 | | public readonly PropertyAccessor<string> PoolIdProperty; |
| | 29 | |
|
| 228 | 30 | | public PropertyContainer() : base(BindingState.Unbound) |
| | 31 | | { |
| 228 | 32 | | this.AutoPoolSpecificationProperty = this.CreatePropertyAccessor<AutoPoolSpecification>(nameof(AutoPoolS |
| 228 | 33 | | this.PoolIdProperty = this.CreatePropertyAccessor<string>(nameof(PoolId), BindingAccess.Read | BindingAc |
| 228 | 34 | | } |
| | 35 | |
|
| 993 | 36 | | public PropertyContainer(Models.PoolInformation protocolObject) : base(BindingState.Bound) |
| | 37 | | { |
| 993 | 38 | | this.AutoPoolSpecificationProperty = this.CreatePropertyAccessor( |
| 1379 | 39 | | UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.AutoPoolSpecification, o => new AutoPoolS |
| 993 | 40 | | nameof(AutoPoolSpecification), |
| 993 | 41 | | BindingAccess.Read | BindingAccess.Write); |
| 993 | 42 | | this.PoolIdProperty = this.CreatePropertyAccessor( |
| 993 | 43 | | protocolObject.PoolId, |
| 993 | 44 | | nameof(PoolId), |
| 993 | 45 | | BindingAccess.Read | BindingAccess.Write); |
| 993 | 46 | | } |
| | 47 | | } |
| | 48 | |
|
| | 49 | | private readonly PropertyContainer propertyContainer; |
| | 50 | |
|
| | 51 | | #region Constructors |
| | 52 | |
|
| | 53 | | /// <summary> |
| | 54 | | /// Initializes a new instance of the <see cref="PoolInformation"/> class. |
| | 55 | | /// </summary> |
| 228 | 56 | | public PoolInformation() |
| | 57 | | { |
| 228 | 58 | | this.propertyContainer = new PropertyContainer(); |
| 228 | 59 | | } |
| | 60 | |
|
| 993 | 61 | | internal PoolInformation(Models.PoolInformation protocolObject) |
| | 62 | | { |
| 993 | 63 | | this.propertyContainer = new PropertyContainer(protocolObject); |
| 993 | 64 | | } |
| | 65 | |
|
| | 66 | | #endregion Constructors |
| | 67 | |
|
| | 68 | | #region PoolInformation |
| | 69 | |
|
| | 70 | | /// <summary> |
| | 71 | | /// Gets or sets the properties for the auto pool that will be created. |
| | 72 | | /// </summary> |
| | 73 | | /// <remarks> |
| | 74 | | /// If this property is set, then <see cref="PoolId"/> must be left unset. |
| | 75 | | /// </remarks> |
| | 76 | | public AutoPoolSpecification AutoPoolSpecification |
| | 77 | | { |
| 1438 | 78 | | get { return this.propertyContainer.AutoPoolSpecificationProperty.Value; } |
| 233 | 79 | | set { this.propertyContainer.AutoPoolSpecificationProperty.Value = value; } |
| | 80 | | } |
| | 81 | |
|
| | 82 | | /// <summary> |
| | 83 | | /// Gets or sets the name of an existing pool that can be used for running tasks. |
| | 84 | | /// </summary> |
| | 85 | | /// <remarks> |
| | 86 | | /// If this property is set, then <see cref="AutoPoolSpecification"/> must be left unset. |
| | 87 | | /// </remarks> |
| | 88 | | public string PoolId |
| | 89 | | { |
| 1429 | 90 | | get { return this.propertyContainer.PoolIdProperty.Value; } |
| 233 | 91 | | set { this.propertyContainer.PoolIdProperty.Value = value; } |
| | 92 | | } |
| | 93 | |
|
| | 94 | | #endregion // PoolInformation |
| | 95 | |
|
| | 96 | | #region IPropertyMetadata |
| | 97 | |
|
| | 98 | | bool IModifiable.HasBeenModified |
| | 99 | | { |
| 4 | 100 | | get { return this.propertyContainer.HasBeenModified; } |
| | 101 | | } |
| | 102 | |
|
| | 103 | | bool IReadOnly.IsReadOnly |
| | 104 | | { |
| 0 | 105 | | get { return this.propertyContainer.IsReadOnly; } |
| 16 | 106 | | set { this.propertyContainer.IsReadOnly = value; } |
| | 107 | | } |
| | 108 | |
|
| | 109 | | #endregion //IPropertyMetadata |
| | 110 | |
|
| | 111 | | #region Internal/private methods |
| | 112 | | /// <summary> |
| | 113 | | /// Return a protocol object of the requested type. |
| | 114 | | /// </summary> |
| | 115 | | /// <returns>The protocol object of the requested type.</returns> |
| | 116 | | Models.PoolInformation ITransportObjectProvider<Models.PoolInformation>.GetTransportObject() |
| | 117 | | { |
| 224 | 118 | | Models.PoolInformation result = new Models.PoolInformation() |
| 224 | 119 | | { |
| 338 | 120 | | AutoPoolSpecification = UtilitiesInternal.CreateObjectWithNullCheck(this.AutoPoolSpecification, (o) => o |
| 224 | 121 | | PoolId = this.PoolId, |
| 224 | 122 | | }; |
| | 123 | |
|
| 224 | 124 | | return result; |
| | 125 | | } |
| | 126 | |
|
| | 127 | |
|
| | 128 | | #endregion // Internal/private methods |
| | 129 | | } |
| | 130 | | } |