| | | 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 | | /// An Azure Batch Job. |
| | | 20 | | /// </summary> |
| | | 21 | | public partial class CloudJob |
| | | 22 | | { |
| | | 23 | | /// <summary> |
| | | 24 | | /// Initializes a new instance of the CloudJob class. |
| | | 25 | | /// </summary> |
| | 1004 | 26 | | public CloudJob() |
| | | 27 | | { |
| | | 28 | | CustomInit(); |
| | 1004 | 29 | | } |
| | | 30 | | |
| | | 31 | | /// <summary> |
| | | 32 | | /// Initializes a new instance of the CloudJob class. |
| | | 33 | | /// </summary> |
| | | 34 | | /// <param name="id">A string that uniquely identifies the Job within |
| | | 35 | | /// the Account.</param> |
| | | 36 | | /// <param name="displayName">The display name for the Job.</param> |
| | | 37 | | /// <param name="usesTaskDependencies">Whether Tasks in the Job can |
| | | 38 | | /// define dependencies on each other. The default is false.</param> |
| | | 39 | | /// <param name="url">The URL of the Job.</param> |
| | | 40 | | /// <param name="eTag">The ETag of the Job.</param> |
| | | 41 | | /// <param name="lastModified">The last modified time of the |
| | | 42 | | /// Job.</param> |
| | | 43 | | /// <param name="creationTime">The creation time of the Job.</param> |
| | | 44 | | /// <param name="state">The current state of the Job.</param> |
| | | 45 | | /// <param name="stateTransitionTime">The time at which the Job entered |
| | | 46 | | /// its current state.</param> |
| | | 47 | | /// <param name="previousState">The previous state of the Job.</param> |
| | | 48 | | /// <param name="previousStateTransitionTime">The time at which the Job |
| | | 49 | | /// entered its previous state.</param> |
| | | 50 | | /// <param name="priority">The priority of the Job.</param> |
| | | 51 | | /// <param name="constraints">The execution constraints for the |
| | | 52 | | /// Job.</param> |
| | | 53 | | /// <param name="jobManagerTask">Details of a Job Manager Task to be |
| | | 54 | | /// launched when the Job is started.</param> |
| | | 55 | | /// <param name="jobPreparationTask">The Job Preparation Task.</param> |
| | | 56 | | /// <param name="jobReleaseTask">The Job Release Task.</param> |
| | | 57 | | /// <param name="commonEnvironmentSettings">The list of common |
| | | 58 | | /// environment variable settings. These environment variables are set |
| | | 59 | | /// for all Tasks in the Job (including the Job Manager, Job |
| | | 60 | | /// Preparation and Job Release Tasks).</param> |
| | | 61 | | /// <param name="poolInfo">The Pool settings associated with the |
| | | 62 | | /// Job.</param> |
| | | 63 | | /// <param name="onAllTasksComplete">The action the Batch service |
| | | 64 | | /// should take when all Tasks in the Job are in the completed |
| | | 65 | | /// state.</param> |
| | | 66 | | /// <param name="onTaskFailure">The action the Batch service should |
| | | 67 | | /// take when any Task in the Job fails.</param> |
| | | 68 | | /// <param name="networkConfiguration">The network configuration for |
| | | 69 | | /// the Job.</param> |
| | | 70 | | /// <param name="metadata">A list of name-value pairs associated with |
| | | 71 | | /// the Job as metadata.</param> |
| | | 72 | | /// <param name="executionInfo">The execution information for the |
| | | 73 | | /// Job.</param> |
| | | 74 | | /// <param name="stats">Resource usage statistics for the entire |
| | | 75 | | /// lifetime of the Job.</param> |
| | 12 | 76 | | public CloudJob(string id = default(string), string displayName = default(string), bool? usesTaskDependencies = |
| | | 77 | | { |
| | 12 | 78 | | Id = id; |
| | 12 | 79 | | DisplayName = displayName; |
| | 12 | 80 | | UsesTaskDependencies = usesTaskDependencies; |
| | 12 | 81 | | Url = url; |
| | 12 | 82 | | ETag = eTag; |
| | 12 | 83 | | LastModified = lastModified; |
| | 12 | 84 | | CreationTime = creationTime; |
| | 12 | 85 | | State = state; |
| | 12 | 86 | | StateTransitionTime = stateTransitionTime; |
| | 12 | 87 | | PreviousState = previousState; |
| | 12 | 88 | | PreviousStateTransitionTime = previousStateTransitionTime; |
| | 12 | 89 | | Priority = priority; |
| | 12 | 90 | | Constraints = constraints; |
| | 12 | 91 | | JobManagerTask = jobManagerTask; |
| | 12 | 92 | | JobPreparationTask = jobPreparationTask; |
| | 12 | 93 | | JobReleaseTask = jobReleaseTask; |
| | 12 | 94 | | CommonEnvironmentSettings = commonEnvironmentSettings; |
| | 12 | 95 | | PoolInfo = poolInfo; |
| | 12 | 96 | | OnAllTasksComplete = onAllTasksComplete; |
| | 12 | 97 | | OnTaskFailure = onTaskFailure; |
| | 12 | 98 | | NetworkConfiguration = networkConfiguration; |
| | 12 | 99 | | Metadata = metadata; |
| | 12 | 100 | | ExecutionInfo = executionInfo; |
| | 12 | 101 | | Stats = stats; |
| | | 102 | | CustomInit(); |
| | 12 | 103 | | } |
| | | 104 | | |
| | | 105 | | /// <summary> |
| | | 106 | | /// An initialization method that performs custom operations like setting defaults |
| | | 107 | | /// </summary> |
| | | 108 | | partial void CustomInit(); |
| | | 109 | | |
| | | 110 | | /// <summary> |
| | | 111 | | /// Gets or sets a string that uniquely identifies the Job within the |
| | | 112 | | /// Account. |
| | | 113 | | /// </summary> |
| | | 114 | | /// <remarks> |
| | | 115 | | /// The ID is case-preserving and case-insensitive (that is, you may |
| | | 116 | | /// not have two IDs within an Account that differ only by case). |
| | | 117 | | /// </remarks> |
| | | 118 | | [JsonProperty(PropertyName = "id")] |
| | 2537 | 119 | | public string Id { get; set; } |
| | | 120 | | |
| | | 121 | | /// <summary> |
| | | 122 | | /// Gets or sets the display name for the Job. |
| | | 123 | | /// </summary> |
| | | 124 | | [JsonProperty(PropertyName = "displayName")] |
| | 2551 | 125 | | public string DisplayName { get; set; } |
| | | 126 | | |
| | | 127 | | /// <summary> |
| | | 128 | | /// Gets or sets whether Tasks in the Job can define dependencies on |
| | | 129 | | /// each other. The default is false. |
| | | 130 | | /// </summary> |
| | | 131 | | [JsonProperty(PropertyName = "usesTaskDependencies")] |
| | 2546 | 132 | | public bool? UsesTaskDependencies { get; set; } |
| | | 133 | | |
| | | 134 | | /// <summary> |
| | | 135 | | /// Gets or sets the URL of the Job. |
| | | 136 | | /// </summary> |
| | | 137 | | [JsonProperty(PropertyName = "url")] |
| | 2541 | 138 | | public string Url { get; set; } |
| | | 139 | | |
| | | 140 | | /// <summary> |
| | | 141 | | /// Gets or sets the ETag of the Job. |
| | | 142 | | /// </summary> |
| | | 143 | | /// <remarks> |
| | | 144 | | /// This is an opaque string. You can use it to detect whether the Job |
| | | 145 | | /// has changed between requests. In particular, you can be pass the |
| | | 146 | | /// ETag when updating a Job to specify that your changes should take |
| | | 147 | | /// effect only if nobody else has modified the Job in the meantime. |
| | | 148 | | /// </remarks> |
| | | 149 | | [JsonProperty(PropertyName = "eTag")] |
| | 2532 | 150 | | public string ETag { get; set; } |
| | | 151 | | |
| | | 152 | | /// <summary> |
| | | 153 | | /// Gets or sets the last modified time of the Job. |
| | | 154 | | /// </summary> |
| | | 155 | | /// <remarks> |
| | | 156 | | /// This is the last time at which the Job level data, such as the Job |
| | | 157 | | /// state or priority, changed. It does not factor in task-level |
| | | 158 | | /// changes such as adding new Tasks or Tasks changing state. |
| | | 159 | | /// </remarks> |
| | | 160 | | [JsonProperty(PropertyName = "lastModified")] |
| | 2539 | 161 | | public System.DateTime? LastModified { get; set; } |
| | | 162 | | |
| | | 163 | | /// <summary> |
| | | 164 | | /// Gets or sets the creation time of the Job. |
| | | 165 | | /// </summary> |
| | | 166 | | [JsonProperty(PropertyName = "creationTime")] |
| | 2525 | 167 | | public System.DateTime? CreationTime { get; set; } |
| | | 168 | | |
| | | 169 | | /// <summary> |
| | | 170 | | /// Gets or sets the current state of the Job. |
| | | 171 | | /// </summary> |
| | | 172 | | /// <remarks> |
| | | 173 | | /// Possible values include: 'active', 'disabling', 'disabled', |
| | | 174 | | /// 'enabling', 'terminating', 'completed', 'deleting' |
| | | 175 | | /// </remarks> |
| | | 176 | | [JsonProperty(PropertyName = "state")] |
| | 2525 | 177 | | public JobState? State { get; set; } |
| | | 178 | | |
| | | 179 | | /// <summary> |
| | | 180 | | /// Gets or sets the time at which the Job entered its current state. |
| | | 181 | | /// </summary> |
| | | 182 | | [JsonProperty(PropertyName = "stateTransitionTime")] |
| | 2533 | 183 | | public System.DateTime? StateTransitionTime { get; set; } |
| | | 184 | | |
| | | 185 | | /// <summary> |
| | | 186 | | /// Gets or sets the previous state of the Job. |
| | | 187 | | /// </summary> |
| | | 188 | | /// <remarks> |
| | | 189 | | /// This property is not set if the Job is in its initial Active state. |
| | | 190 | | /// Possible values include: 'active', 'disabling', 'disabled', |
| | | 191 | | /// 'enabling', 'terminating', 'completed', 'deleting' |
| | | 192 | | /// </remarks> |
| | | 193 | | [JsonProperty(PropertyName = "previousState")] |
| | 2527 | 194 | | public JobState? PreviousState { get; set; } |
| | | 195 | | |
| | | 196 | | /// <summary> |
| | | 197 | | /// Gets or sets the time at which the Job entered its previous state. |
| | | 198 | | /// </summary> |
| | | 199 | | /// <remarks> |
| | | 200 | | /// This property is not set if the Job is in its initial Active state. |
| | | 201 | | /// </remarks> |
| | | 202 | | [JsonProperty(PropertyName = "previousStateTransitionTime")] |
| | 2550 | 203 | | public System.DateTime? PreviousStateTransitionTime { get; set; } |
| | | 204 | | |
| | | 205 | | /// <summary> |
| | | 206 | | /// Gets or sets the priority of the Job. |
| | | 207 | | /// </summary> |
| | | 208 | | /// <remarks> |
| | | 209 | | /// Priority values can range from -1000 to 1000, with -1000 being the |
| | | 210 | | /// lowest priority and 1000 being the highest priority. The default |
| | | 211 | | /// value is 0. |
| | | 212 | | /// </remarks> |
| | | 213 | | [JsonProperty(PropertyName = "priority")] |
| | 2531 | 214 | | public int? Priority { get; set; } |
| | | 215 | | |
| | | 216 | | /// <summary> |
| | | 217 | | /// Gets or sets the execution constraints for the Job. |
| | | 218 | | /// </summary> |
| | | 219 | | [JsonProperty(PropertyName = "constraints")] |
| | 2527 | 220 | | public JobConstraints Constraints { get; set; } |
| | | 221 | | |
| | | 222 | | /// <summary> |
| | | 223 | | /// Gets or sets details of a Job Manager Task to be launched when the |
| | | 224 | | /// Job is started. |
| | | 225 | | /// </summary> |
| | | 226 | | [JsonProperty(PropertyName = "jobManagerTask")] |
| | 2527 | 227 | | public JobManagerTask JobManagerTask { get; set; } |
| | | 228 | | |
| | | 229 | | /// <summary> |
| | | 230 | | /// Gets or sets the Job Preparation Task. |
| | | 231 | | /// </summary> |
| | | 232 | | /// <remarks> |
| | | 233 | | /// The Job Preparation Task is a special Task run on each Compute Node |
| | | 234 | | /// before any other Task of the Job. |
| | | 235 | | /// </remarks> |
| | | 236 | | [JsonProperty(PropertyName = "jobPreparationTask")] |
| | 2547 | 237 | | public JobPreparationTask JobPreparationTask { get; set; } |
| | | 238 | | |
| | | 239 | | /// <summary> |
| | | 240 | | /// Gets or sets the Job Release Task. |
| | | 241 | | /// </summary> |
| | | 242 | | /// <remarks> |
| | | 243 | | /// The Job Release Task is a special Task run at the end of the Job on |
| | | 244 | | /// each Compute Node that has run any other Task of the Job. |
| | | 245 | | /// </remarks> |
| | | 246 | | [JsonProperty(PropertyName = "jobReleaseTask")] |
| | 2536 | 247 | | public JobReleaseTask JobReleaseTask { get; set; } |
| | | 248 | | |
| | | 249 | | /// <summary> |
| | | 250 | | /// Gets or sets the list of common environment variable settings. |
| | | 251 | | /// These environment variables are set for all Tasks in the Job |
| | | 252 | | /// (including the Job Manager, Job Preparation and Job Release Tasks). |
| | | 253 | | /// </summary> |
| | | 254 | | /// <remarks> |
| | | 255 | | /// Individual Tasks can override an environment setting specified here |
| | | 256 | | /// by specifying the same setting name with a different value. |
| | | 257 | | /// </remarks> |
| | | 258 | | [JsonProperty(PropertyName = "commonEnvironmentSettings")] |
| | 2513 | 259 | | public IList<EnvironmentSetting> CommonEnvironmentSettings { get; set; } |
| | | 260 | | |
| | | 261 | | /// <summary> |
| | | 262 | | /// Gets or sets the Pool settings associated with the Job. |
| | | 263 | | /// </summary> |
| | | 264 | | [JsonProperty(PropertyName = "poolInfo")] |
| | 2533 | 265 | | public PoolInformation PoolInfo { get; set; } |
| | | 266 | | |
| | | 267 | | /// <summary> |
| | | 268 | | /// Gets or sets the action the Batch service should take when all |
| | | 269 | | /// Tasks in the Job are in the completed state. |
| | | 270 | | /// </summary> |
| | | 271 | | /// <remarks> |
| | | 272 | | /// The default is noaction. Possible values include: 'noAction', |
| | | 273 | | /// 'terminateJob' |
| | | 274 | | /// </remarks> |
| | | 275 | | [JsonProperty(PropertyName = "onAllTasksComplete")] |
| | 2527 | 276 | | public OnAllTasksComplete? OnAllTasksComplete { get; set; } |
| | | 277 | | |
| | | 278 | | /// <summary> |
| | | 279 | | /// Gets or sets the action the Batch service should take when any Task |
| | | 280 | | /// in the Job fails. |
| | | 281 | | /// </summary> |
| | | 282 | | /// <remarks> |
| | | 283 | | /// A Task is considered to have failed if has a failureInfo. A |
| | | 284 | | /// failureInfo is set if the Task completes with a non-zero exit code |
| | | 285 | | /// after exhausting its retry count, or if there was an error starting |
| | | 286 | | /// the Task, for example due to a resource file download error. The |
| | | 287 | | /// default is noaction. Possible values include: 'noAction', |
| | | 288 | | /// 'performExitOptionsJobAction' |
| | | 289 | | /// </remarks> |
| | | 290 | | [JsonProperty(PropertyName = "onTaskFailure")] |
| | 2548 | 291 | | public OnTaskFailure? OnTaskFailure { get; set; } |
| | | 292 | | |
| | | 293 | | /// <summary> |
| | | 294 | | /// Gets or sets the network configuration for the Job. |
| | | 295 | | /// </summary> |
| | | 296 | | [JsonProperty(PropertyName = "networkConfiguration")] |
| | 2528 | 297 | | public JobNetworkConfiguration NetworkConfiguration { get; set; } |
| | | 298 | | |
| | | 299 | | /// <summary> |
| | | 300 | | /// Gets or sets a list of name-value pairs associated with the Job as |
| | | 301 | | /// metadata. |
| | | 302 | | /// </summary> |
| | | 303 | | /// <remarks> |
| | | 304 | | /// The Batch service does not assign any meaning to metadata; it is |
| | | 305 | | /// solely for the use of user code. |
| | | 306 | | /// </remarks> |
| | | 307 | | [JsonProperty(PropertyName = "metadata")] |
| | 2560 | 308 | | public IList<MetadataItem> Metadata { get; set; } |
| | | 309 | | |
| | | 310 | | /// <summary> |
| | | 311 | | /// Gets or sets the execution information for the Job. |
| | | 312 | | /// </summary> |
| | | 313 | | [JsonProperty(PropertyName = "executionInfo")] |
| | 2543 | 314 | | public JobExecutionInformation ExecutionInfo { get; set; } |
| | | 315 | | |
| | | 316 | | /// <summary> |
| | | 317 | | /// Gets or sets resource usage statistics for the entire lifetime of |
| | | 318 | | /// the Job. |
| | | 319 | | /// </summary> |
| | | 320 | | /// <remarks> |
| | | 321 | | /// This property is populated only if the CloudJob was retrieved with |
| | | 322 | | /// an expand clause including the 'stats' attribute; otherwise it is |
| | | 323 | | /// null. The statistics may not be immediately available. The Batch |
| | | 324 | | /// service performs periodic roll-up of statistics. The typical delay |
| | | 325 | | /// is about 30 minutes. |
| | | 326 | | /// </remarks> |
| | | 327 | | [JsonProperty(PropertyName = "stats")] |
| | 2533 | 328 | | public JobStatistics Stats { get; set; } |
| | | 329 | | |
| | | 330 | | } |
| | | 331 | | } |