| | 1 | | // <auto-generated> |
| | 2 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 3 | | // Licensed under the MIT License. See License.txt in the project root for |
| | 4 | | // license information. |
| | 5 | | // |
| | 6 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | 7 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | 8 | | // regenerated. |
| | 9 | | // </auto-generated> |
| | 10 | |
|
| | 11 | | namespace Microsoft.Azure.Batch.Protocol.Models |
| | 12 | | { |
| | 13 | | using Newtonsoft.Json; |
| | 14 | | using System.Collections; |
| | 15 | | using System.Collections.Generic; |
| | 16 | | using System.Linq; |
| | 17 | |
|
| | 18 | | /// <summary> |
| | 19 | | /// The set of changes to be made to a Job. |
| | 20 | | /// </summary> |
| | 21 | | public partial class JobUpdateParameter |
| | 22 | | { |
| | 23 | | /// <summary> |
| | 24 | | /// Initializes a new instance of the JobUpdateParameter class. |
| | 25 | | /// </summary> |
| 0 | 26 | | public JobUpdateParameter() |
| | 27 | | { |
| 0 | 28 | | PoolInfo = new PoolInformation(); |
| | 29 | | CustomInit(); |
| 0 | 30 | | } |
| | 31 | |
|
| | 32 | | /// <summary> |
| | 33 | | /// Initializes a new instance of the JobUpdateParameter class. |
| | 34 | | /// </summary> |
| | 35 | | /// <param name="poolInfo">The Pool on which the Batch service runs the |
| | 36 | | /// Job's Tasks.</param> |
| | 37 | | /// <param name="priority">The priority of the Job.</param> |
| | 38 | | /// <param name="constraints">The execution constraints for the |
| | 39 | | /// Job.</param> |
| | 40 | | /// <param name="metadata">A list of name-value pairs associated with |
| | 41 | | /// the Job as metadata.</param> |
| | 42 | | /// <param name="onAllTasksComplete">The action the Batch service |
| | 43 | | /// should take when all Tasks in the Job are in the completed |
| | 44 | | /// state.</param> |
| 0 | 45 | | public JobUpdateParameter(PoolInformation poolInfo, int? priority = default(int?), JobConstraints constraints = |
| | 46 | | { |
| 0 | 47 | | Priority = priority; |
| 0 | 48 | | Constraints = constraints; |
| 0 | 49 | | PoolInfo = poolInfo; |
| 0 | 50 | | Metadata = metadata; |
| 0 | 51 | | OnAllTasksComplete = onAllTasksComplete; |
| | 52 | | CustomInit(); |
| 0 | 53 | | } |
| | 54 | |
|
| | 55 | | /// <summary> |
| | 56 | | /// An initialization method that performs custom operations like setting defaults |
| | 57 | | /// </summary> |
| | 58 | | partial void CustomInit(); |
| | 59 | |
|
| | 60 | | /// <summary> |
| | 61 | | /// Gets or sets the priority of the Job. |
| | 62 | | /// </summary> |
| | 63 | | /// <remarks> |
| | 64 | | /// Priority values can range from -1000 to 1000, with -1000 being the |
| | 65 | | /// lowest priority and 1000 being the highest priority. If omitted, it |
| | 66 | | /// is set to the default value 0. |
| | 67 | | /// </remarks> |
| | 68 | | [JsonProperty(PropertyName = "priority")] |
| 0 | 69 | | public int? Priority { get; set; } |
| | 70 | |
|
| | 71 | | /// <summary> |
| | 72 | | /// Gets or sets the execution constraints for the Job. |
| | 73 | | /// </summary> |
| | 74 | | /// <remarks> |
| | 75 | | /// If omitted, the constraints are cleared. |
| | 76 | | /// </remarks> |
| | 77 | | [JsonProperty(PropertyName = "constraints")] |
| 0 | 78 | | public JobConstraints Constraints { get; set; } |
| | 79 | |
|
| | 80 | | /// <summary> |
| | 81 | | /// Gets or sets the Pool on which the Batch service runs the Job's |
| | 82 | | /// Tasks. |
| | 83 | | /// </summary> |
| | 84 | | /// <remarks> |
| | 85 | | /// You may change the Pool for a Job only when the Job is disabled. |
| | 86 | | /// The Update Job call will fail if you include the poolInfo element |
| | 87 | | /// and the Job is not disabled. If you specify an |
| | 88 | | /// autoPoolSpecification in the poolInfo, only the keepAlive property |
| | 89 | | /// of the autoPoolSpecification can be updated, and then only if the |
| | 90 | | /// autoPoolSpecification has a poolLifetimeOption of Job (other job |
| | 91 | | /// properties can be updated as normal). |
| | 92 | | /// </remarks> |
| | 93 | | [JsonProperty(PropertyName = "poolInfo")] |
| 0 | 94 | | public PoolInformation PoolInfo { get; set; } |
| | 95 | |
|
| | 96 | | /// <summary> |
| | 97 | | /// Gets or sets a list of name-value pairs associated with the Job as |
| | 98 | | /// metadata. |
| | 99 | | /// </summary> |
| | 100 | | /// <remarks> |
| | 101 | | /// If omitted, it takes the default value of an empty list; in effect, |
| | 102 | | /// any existing metadata is deleted. |
| | 103 | | /// </remarks> |
| | 104 | | [JsonProperty(PropertyName = "metadata")] |
| 0 | 105 | | public IList<MetadataItem> Metadata { get; set; } |
| | 106 | |
|
| | 107 | | /// <summary> |
| | 108 | | /// Gets or sets the action the Batch service should take when all |
| | 109 | | /// Tasks in the Job are in the completed state. |
| | 110 | | /// </summary> |
| | 111 | | /// <remarks> |
| | 112 | | /// If omitted, the completion behavior is set to noaction. If the |
| | 113 | | /// current value is terminatejob, this is an error because a Job's |
| | 114 | | /// completion behavior may not be changed from terminatejob to |
| | 115 | | /// noaction. You may not change the value from terminatejob to |
| | 116 | | /// noaction - that is, once you have engaged automatic Job |
| | 117 | | /// termination, you cannot turn it off again. If you try to do this, |
| | 118 | | /// the request fails and Batch returns status code 400 (Bad Request) |
| | 119 | | /// and an 'invalid property value' error response. If you do not |
| | 120 | | /// specify this element in a PUT request, it is equivalent to passing |
| | 121 | | /// noaction. This is an error if the current value is terminatejob. |
| | 122 | | /// Possible values include: 'noAction', 'terminateJob' |
| | 123 | | /// </remarks> |
| | 124 | | [JsonProperty(PropertyName = "onAllTasksComplete")] |
| 0 | 125 | | public OnAllTasksComplete? OnAllTasksComplete { get; set; } |
| | 126 | |
|
| | 127 | | } |
| | 128 | | } |