| | 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 locality hint that can be used by the Batch service to select a compute node on which to start a new task. |
| | 22 | | /// </summary> |
| | 23 | | public partial class AffinityInformation : ITransportObjectProvider<Models.AffinityInformation>, IPropertyMetadata |
| | 24 | | { |
| | 25 | | #region Constructors |
| | 26 | | /// <summary> |
| | 27 | | /// Initializes a new instance of the <see cref="AffinityInformation"/> class. |
| | 28 | | /// </summary> |
| | 29 | | /// <param name='affinityId'>An opaque string that represents a previously run task or compute node.</param> |
| 154 | 30 | | public AffinityInformation( |
| 154 | 31 | | string affinityId) |
| | 32 | | { |
| 154 | 33 | | this.AffinityId = affinityId; |
| 154 | 34 | | } |
| | 35 | |
|
| 509 | 36 | | internal AffinityInformation(Models.AffinityInformation protocolObject) |
| | 37 | | { |
| 509 | 38 | | this.AffinityId = protocolObject.AffinityId; |
| 509 | 39 | | } |
| | 40 | |
|
| | 41 | | #endregion Constructors |
| | 42 | |
|
| | 43 | | #region AffinityInformation |
| | 44 | |
|
| | 45 | | /// <summary> |
| | 46 | | /// Gets an opaque string that represents a previously run task or compute node. |
| | 47 | | /// </summary> |
| 816 | 48 | | public string AffinityId { get; } |
| | 49 | |
|
| | 50 | | #endregion // AffinityInformation |
| | 51 | |
|
| | 52 | | #region IPropertyMetadata |
| | 53 | |
|
| | 54 | | bool IModifiable.HasBeenModified |
| | 55 | | { |
| | 56 | | //This class is compile time readonly so it cannot have been modified |
| 0 | 57 | | get { return false; } |
| | 58 | | } |
| | 59 | |
|
| | 60 | | bool IReadOnly.IsReadOnly |
| | 61 | | { |
| 0 | 62 | | get { return true; } |
| | 63 | | set |
| | 64 | | { |
| | 65 | | // This class is compile time readonly already |
| 510 | 66 | | } |
| | 67 | | } |
| | 68 | |
|
| | 69 | | #endregion // IPropertyMetadata |
| | 70 | |
|
| | 71 | | #region Internal/private methods |
| | 72 | |
|
| | 73 | | /// <summary> |
| | 74 | | /// Return a protocol object of the requested type. |
| | 75 | | /// </summary> |
| | 76 | | /// <returns>The protocol object of the requested type.</returns> |
| | 77 | | Models.AffinityInformation ITransportObjectProvider<Models.AffinityInformation>.GetTransportObject() |
| | 78 | | { |
| 153 | 79 | | Models.AffinityInformation result = new Models.AffinityInformation() |
| 153 | 80 | | { |
| 153 | 81 | | AffinityId = this.AffinityId, |
| 153 | 82 | | }; |
| | 83 | |
|
| 153 | 84 | | return result; |
| | 85 | | } |
| | 86 | |
|
| | 87 | |
|
| | 88 | | #endregion // Internal/private methods |
| | 89 | | } |
| | 90 | | } |