| | 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 | | /// Specifies details of the Jobs to be created on a schedule. |
| | 20 | | /// </summary> |
| | 21 | | public partial class JobSpecification |
| | 22 | | { |
| | 23 | | /// <summary> |
| | 24 | | /// Initializes a new instance of the JobSpecification class. |
| | 25 | | /// </summary> |
| 733 | 26 | | public JobSpecification() |
| | 27 | | { |
| 733 | 28 | | PoolInfo = new PoolInformation(); |
| | 29 | | CustomInit(); |
| 733 | 30 | | } |
| | 31 | |
|
| | 32 | | /// <summary> |
| | 33 | | /// Initializes a new instance of the JobSpecification class. |
| | 34 | | /// </summary> |
| | 35 | | /// <param name="poolInfo">The Pool on which the Batch service runs the |
| | 36 | | /// Tasks of Jobs created under this schedule.</param> |
| | 37 | | /// <param name="priority">The priority of Jobs created under this |
| | 38 | | /// schedule.</param> |
| | 39 | | /// <param name="displayName">The display name for Jobs created under |
| | 40 | | /// this schedule.</param> |
| | 41 | | /// <param name="usesTaskDependencies">Whether Tasks in the Job can |
| | 42 | | /// define dependencies on each other. The default is false.</param> |
| | 43 | | /// <param name="onAllTasksComplete">The action the Batch service |
| | 44 | | /// should take when all Tasks in a Job created under this schedule are |
| | 45 | | /// in the completed state.</param> |
| | 46 | | /// <param name="onTaskFailure">The action the Batch service should |
| | 47 | | /// take when any Task fails in a Job created under this schedule. A |
| | 48 | | /// Task is considered to have failed if it have failed if has a |
| | 49 | | /// failureInfo. A failureInfo is set if the Task completes with a |
| | 50 | | /// non-zero exit code after exhausting its retry count, or if there |
| | 51 | | /// was an error starting the Task, for example due to a resource file |
| | 52 | | /// download error.</param> |
| | 53 | | /// <param name="networkConfiguration">The network configuration for |
| | 54 | | /// the Job.</param> |
| | 55 | | /// <param name="constraints">The execution constraints for Jobs |
| | 56 | | /// created under this schedule.</param> |
| | 57 | | /// <param name="jobManagerTask">The details of a Job Manager Task to |
| | 58 | | /// be launched when a Job is started under this schedule.</param> |
| | 59 | | /// <param name="jobPreparationTask">The Job Preparation Task for Jobs |
| | 60 | | /// created under this schedule.</param> |
| | 61 | | /// <param name="jobReleaseTask">The Job Release Task for Jobs created |
| | 62 | | /// under this schedule.</param> |
| | 63 | | /// <param name="commonEnvironmentSettings">A list of common |
| | 64 | | /// environment variable settings. These environment variables are set |
| | 65 | | /// for all Tasks in Jobs created under this schedule (including the |
| | 66 | | /// Job Manager, Job Preparation and Job Release Tasks).</param> |
| | 67 | | /// <param name="metadata">A list of name-value pairs associated with |
| | 68 | | /// each Job created under this schedule as metadata.</param> |
| 2 | 69 | | public JobSpecification(PoolInformation poolInfo, int? priority = default(int?), string displayName = default(st |
| | 70 | | { |
| 2 | 71 | | Priority = priority; |
| 2 | 72 | | DisplayName = displayName; |
| 2 | 73 | | UsesTaskDependencies = usesTaskDependencies; |
| 2 | 74 | | OnAllTasksComplete = onAllTasksComplete; |
| 2 | 75 | | OnTaskFailure = onTaskFailure; |
| 2 | 76 | | NetworkConfiguration = networkConfiguration; |
| 2 | 77 | | Constraints = constraints; |
| 2 | 78 | | JobManagerTask = jobManagerTask; |
| 2 | 79 | | JobPreparationTask = jobPreparationTask; |
| 2 | 80 | | JobReleaseTask = jobReleaseTask; |
| 2 | 81 | | CommonEnvironmentSettings = commonEnvironmentSettings; |
| 2 | 82 | | PoolInfo = poolInfo; |
| 2 | 83 | | Metadata = metadata; |
| | 84 | | CustomInit(); |
| 2 | 85 | | } |
| | 86 | |
|
| | 87 | | /// <summary> |
| | 88 | | /// An initialization method that performs custom operations like setting defaults |
| | 89 | | /// </summary> |
| | 90 | | partial void CustomInit(); |
| | 91 | |
|
| | 92 | | /// <summary> |
| | 93 | | /// Gets or sets the priority of Jobs created under this schedule. |
| | 94 | | /// </summary> |
| | 95 | | /// <remarks> |
| | 96 | | /// Priority values can range from -1000 to 1000, with -1000 being the |
| | 97 | | /// lowest priority and 1000 being the highest priority. The default |
| | 98 | | /// value is 0. This priority is used as the default for all Jobs under |
| | 99 | | /// the Job Schedule. You can update a Job's priority after it has been |
| | 100 | | /// created using by using the update Job API. |
| | 101 | | /// </remarks> |
| | 102 | | [JsonProperty(PropertyName = "priority")] |
| 1491 | 103 | | public int? Priority { get; set; } |
| | 104 | |
|
| | 105 | | /// <summary> |
| | 106 | | /// Gets or sets the display name for Jobs created under this schedule. |
| | 107 | | /// </summary> |
| | 108 | | /// <remarks> |
| | 109 | | /// The name need not be unique and can contain any Unicode characters |
| | 110 | | /// up to a maximum length of 1024. |
| | 111 | | /// </remarks> |
| | 112 | | [JsonProperty(PropertyName = "displayName")] |
| 1502 | 113 | | public string DisplayName { get; set; } |
| | 114 | |
|
| | 115 | | /// <summary> |
| | 116 | | /// Gets or sets whether Tasks in the Job can define dependencies on |
| | 117 | | /// each other. The default is false. |
| | 118 | | /// </summary> |
| | 119 | | [JsonProperty(PropertyName = "usesTaskDependencies")] |
| 1482 | 120 | | public bool? UsesTaskDependencies { get; set; } |
| | 121 | |
|
| | 122 | | /// <summary> |
| | 123 | | /// Gets or sets the action the Batch service should take when all |
| | 124 | | /// Tasks in a Job created under this schedule are in the completed |
| | 125 | | /// state. |
| | 126 | | /// </summary> |
| | 127 | | /// <remarks> |
| | 128 | | /// Note that if a Job contains no Tasks, then all Tasks are considered |
| | 129 | | /// complete. This option is therefore most commonly used with a Job |
| | 130 | | /// Manager task; if you want to use automatic Job termination without |
| | 131 | | /// a Job Manager, you should initially set onAllTasksComplete to |
| | 132 | | /// noaction and update the Job properties to set onAllTasksComplete to |
| | 133 | | /// terminatejob once you have finished adding Tasks. The default is |
| | 134 | | /// noaction. Possible values include: 'noAction', 'terminateJob' |
| | 135 | | /// </remarks> |
| | 136 | | [JsonProperty(PropertyName = "onAllTasksComplete")] |
| 1501 | 137 | | public OnAllTasksComplete? OnAllTasksComplete { get; set; } |
| | 138 | |
|
| | 139 | | /// <summary> |
| | 140 | | /// Gets or sets the action the Batch service should take when any Task |
| | 141 | | /// fails in a Job created under this schedule. A Task is considered to |
| | 142 | | /// have failed if it have failed if has a failureInfo. A failureInfo |
| | 143 | | /// is set if the Task completes with a non-zero exit code after |
| | 144 | | /// exhausting its retry count, or if there was an error starting the |
| | 145 | | /// Task, for example due to a resource file download error. |
| | 146 | | /// </summary> |
| | 147 | | /// <remarks> |
| | 148 | | /// The default is noaction. Possible values include: 'noAction', |
| | 149 | | /// 'performExitOptionsJobAction' |
| | 150 | | /// </remarks> |
| | 151 | | [JsonProperty(PropertyName = "onTaskFailure")] |
| 1510 | 152 | | public OnTaskFailure? OnTaskFailure { get; set; } |
| | 153 | |
|
| | 154 | | /// <summary> |
| | 155 | | /// Gets or sets the network configuration for the Job. |
| | 156 | | /// </summary> |
| | 157 | | [JsonProperty(PropertyName = "networkConfiguration")] |
| 1498 | 158 | | public JobNetworkConfiguration NetworkConfiguration { get; set; } |
| | 159 | |
|
| | 160 | | /// <summary> |
| | 161 | | /// Gets or sets the execution constraints for Jobs created under this |
| | 162 | | /// schedule. |
| | 163 | | /// </summary> |
| | 164 | | [JsonProperty(PropertyName = "constraints")] |
| 1504 | 165 | | public JobConstraints Constraints { get; set; } |
| | 166 | |
|
| | 167 | | /// <summary> |
| | 168 | | /// Gets or sets the details of a Job Manager Task to be launched when |
| | 169 | | /// a Job is started under this schedule. |
| | 170 | | /// </summary> |
| | 171 | | /// <remarks> |
| | 172 | | /// If the Job does not specify a Job Manager Task, the user must |
| | 173 | | /// explicitly add Tasks to the Job using the Task API. If the Job does |
| | 174 | | /// specify a Job Manager Task, the Batch service creates the Job |
| | 175 | | /// Manager Task when the Job is created, and will try to schedule the |
| | 176 | | /// Job Manager Task before scheduling other Tasks in the Job. |
| | 177 | | /// </remarks> |
| | 178 | | [JsonProperty(PropertyName = "jobManagerTask")] |
| 1469 | 179 | | public JobManagerTask JobManagerTask { get; set; } |
| | 180 | |
|
| | 181 | | /// <summary> |
| | 182 | | /// Gets or sets the Job Preparation Task for Jobs created under this |
| | 183 | | /// schedule. |
| | 184 | | /// </summary> |
| | 185 | | /// <remarks> |
| | 186 | | /// If a Job has a Job Preparation Task, the Batch service will run the |
| | 187 | | /// Job Preparation Task on a Node before starting any Tasks of that |
| | 188 | | /// Job on that Compute Node. |
| | 189 | | /// </remarks> |
| | 190 | | [JsonProperty(PropertyName = "jobPreparationTask")] |
| 1498 | 191 | | public JobPreparationTask JobPreparationTask { get; set; } |
| | 192 | |
|
| | 193 | | /// <summary> |
| | 194 | | /// Gets or sets the Job Release Task for Jobs created under this |
| | 195 | | /// schedule. |
| | 196 | | /// </summary> |
| | 197 | | /// <remarks> |
| | 198 | | /// The primary purpose of the Job Release Task is to undo changes to |
| | 199 | | /// Nodes made by the Job Preparation Task. Example activities include |
| | 200 | | /// deleting local files, or shutting down services that were started |
| | 201 | | /// as part of Job preparation. A Job Release Task cannot be specified |
| | 202 | | /// without also specifying a Job Preparation Task for the Job. The |
| | 203 | | /// Batch service runs the Job Release Task on the Compute Nodes that |
| | 204 | | /// have run the Job Preparation Task. |
| | 205 | | /// </remarks> |
| | 206 | | [JsonProperty(PropertyName = "jobReleaseTask")] |
| 1503 | 207 | | public JobReleaseTask JobReleaseTask { get; set; } |
| | 208 | |
|
| | 209 | | /// <summary> |
| | 210 | | /// Gets or sets a list of common environment variable settings. These |
| | 211 | | /// environment variables are set for all Tasks in Jobs created under |
| | 212 | | /// this schedule (including the Job Manager, Job Preparation and Job |
| | 213 | | /// Release Tasks). |
| | 214 | | /// </summary> |
| | 215 | | /// <remarks> |
| | 216 | | /// Individual Tasks can override an environment setting specified here |
| | 217 | | /// by specifying the same setting name with a different value. |
| | 218 | | /// </remarks> |
| | 219 | | [JsonProperty(PropertyName = "commonEnvironmentSettings")] |
| 1496 | 220 | | public IList<EnvironmentSetting> CommonEnvironmentSettings { get; set; } |
| | 221 | |
|
| | 222 | | /// <summary> |
| | 223 | | /// Gets or sets the Pool on which the Batch service runs the Tasks of |
| | 224 | | /// Jobs created under this schedule. |
| | 225 | | /// </summary> |
| | 226 | | [JsonProperty(PropertyName = "poolInfo")] |
| 2231 | 227 | | public PoolInformation PoolInfo { get; set; } |
| | 228 | |
|
| | 229 | | /// <summary> |
| | 230 | | /// Gets or sets a list of name-value pairs associated with each Job |
| | 231 | | /// created under this schedule as metadata. |
| | 232 | | /// </summary> |
| | 233 | | /// <remarks> |
| | 234 | | /// The Batch service does not assign any meaning to metadata; it is |
| | 235 | | /// solely for the use of user code. |
| | 236 | | /// </remarks> |
| | 237 | | [JsonProperty(PropertyName = "metadata")] |
| 1496 | 238 | | public IList<MetadataItem> Metadata { get; set; } |
| | 239 | |
|
| | 240 | | } |
| | 241 | | } |