| | | 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 scheduling policy for a compute node. |
| | | 22 | | /// </summary> |
| | | 23 | | public partial class TaskSchedulingPolicy : ITransportObjectProvider<Models.TaskSchedulingPolicy>, IPropertyMetadata |
| | | 24 | | { |
| | | 25 | | #region Constructors |
| | | 26 | | /// <summary> |
| | | 27 | | /// Initializes a new instance of the <see cref="TaskSchedulingPolicy"/> class. |
| | | 28 | | /// </summary> |
| | | 29 | | /// <param name='computeNodeFillType'>The fill type of scheduling policy.</param> |
| | 266 | 30 | | public TaskSchedulingPolicy( |
| | 266 | 31 | | Common.ComputeNodeFillType computeNodeFillType) |
| | | 32 | | { |
| | 266 | 33 | | this.ComputeNodeFillType = computeNodeFillType; |
| | 266 | 34 | | } |
| | | 35 | | |
| | 580 | 36 | | internal TaskSchedulingPolicy(Models.TaskSchedulingPolicy protocolObject) |
| | | 37 | | { |
| | 580 | 38 | | this.ComputeNodeFillType = UtilitiesInternal.MapEnum<Models.ComputeNodeFillType, Common.ComputeNodeFillType> |
| | 580 | 39 | | } |
| | | 40 | | |
| | | 41 | | #endregion Constructors |
| | | 42 | | |
| | | 43 | | #region TaskSchedulingPolicy |
| | | 44 | | |
| | | 45 | | /// <summary> |
| | | 46 | | /// Gets the fill type of scheduling policy. |
| | | 47 | | /// </summary> |
| | | 48 | | /// <remarks> |
| | | 49 | | /// If not specified, the default is <see cref="Common.ComputeNodeFillType.Spread"/>. |
| | | 50 | | /// </remarks> |
| | 1111 | 51 | | public Common.ComputeNodeFillType ComputeNodeFillType { get; } |
| | | 52 | | |
| | | 53 | | #endregion // TaskSchedulingPolicy |
| | | 54 | | |
| | | 55 | | #region IPropertyMetadata |
| | | 56 | | |
| | | 57 | | bool IModifiable.HasBeenModified |
| | | 58 | | { |
| | | 59 | | //This class is compile time readonly so it cannot have been modified |
| | 0 | 60 | | get { return false; } |
| | | 61 | | } |
| | | 62 | | |
| | | 63 | | bool IReadOnly.IsReadOnly |
| | | 64 | | { |
| | 0 | 65 | | get { return true; } |
| | | 66 | | set |
| | | 67 | | { |
| | | 68 | | // This class is compile time readonly already |
| | 494 | 69 | | } |
| | | 70 | | } |
| | | 71 | | |
| | | 72 | | #endregion // IPropertyMetadata |
| | | 73 | | |
| | | 74 | | #region Internal/private methods |
| | | 75 | | |
| | | 76 | | /// <summary> |
| | | 77 | | /// Return a protocol object of the requested type. |
| | | 78 | | /// </summary> |
| | | 79 | | /// <returns>The protocol object of the requested type.</returns> |
| | | 80 | | Models.TaskSchedulingPolicy ITransportObjectProvider<Models.TaskSchedulingPolicy>.GetTransportObject() |
| | | 81 | | { |
| | 265 | 82 | | Models.TaskSchedulingPolicy result = new Models.TaskSchedulingPolicy() |
| | 265 | 83 | | { |
| | 265 | 84 | | NodeFillType = UtilitiesInternal.MapEnum<Common.ComputeNodeFillType, Models.ComputeNodeFillType>(this.Co |
| | 265 | 85 | | }; |
| | | 86 | | |
| | 265 | 87 | | return result; |
| | | 88 | | } |
| | | 89 | | |
| | | 90 | | |
| | | 91 | | #endregion // Internal/private methods |
| | | 92 | | } |
| | | 93 | | } |