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