| | 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 Task to add. |
| | 20 | | /// </summary> |
| | 21 | | /// <remarks> |
| | 22 | | /// Batch will retry Tasks when a recovery operation is triggered on a |
| | 23 | | /// Node. Examples of recovery operations include (but are not limited to) |
| | 24 | | /// when an unhealthy Node is rebooted or a Compute Node disappeared due to |
| | 25 | | /// host failure. Retries due to recovery operations are independent of and |
| | 26 | | /// are not counted against the maxTaskRetryCount. Even if the |
| | 27 | | /// maxTaskRetryCount is 0, an internal retry due to a recovery operation |
| | 28 | | /// may occur. Because of this, all Tasks should be idempotent. This means |
| | 29 | | /// Tasks need to tolerate being interrupted and restarted without causing |
| | 30 | | /// any corruption or duplicate data. The best practice for long running |
| | 31 | | /// Tasks is to use some form of checkpointing. |
| | 32 | | /// </remarks> |
| | 33 | | public partial class TaskAddParameter |
| | 34 | | { |
| | 35 | | /// <summary> |
| | 36 | | /// Initializes a new instance of the TaskAddParameter class. |
| | 37 | | /// </summary> |
| 1010 | 38 | | public TaskAddParameter() |
| | 39 | | { |
| | 40 | | CustomInit(); |
| 1010 | 41 | | } |
| | 42 | |
|
| | 43 | | /// <summary> |
| | 44 | | /// Initializes a new instance of the TaskAddParameter class. |
| | 45 | | /// </summary> |
| | 46 | | /// <param name="id">A string that uniquely identifies the Task within |
| | 47 | | /// the Job.</param> |
| | 48 | | /// <param name="commandLine">The command line of the Task.</param> |
| | 49 | | /// <param name="displayName">A display name for the Task.</param> |
| | 50 | | /// <param name="containerSettings">The settings for the container |
| | 51 | | /// under which the Task runs.</param> |
| | 52 | | /// <param name="exitConditions">How the Batch service should respond |
| | 53 | | /// when the Task completes.</param> |
| | 54 | | /// <param name="resourceFiles">A list of files that the Batch service |
| | 55 | | /// will download to the Compute Node before running the command |
| | 56 | | /// line.</param> |
| | 57 | | /// <param name="outputFiles">A list of files that the Batch service |
| | 58 | | /// will upload from the Compute Node after running the command |
| | 59 | | /// line.</param> |
| | 60 | | /// <param name="environmentSettings">A list of environment variable |
| | 61 | | /// settings for the Task.</param> |
| | 62 | | /// <param name="affinityInfo">A locality hint that can be used by the |
| | 63 | | /// Batch service to select a Compute Node on which to start the new |
| | 64 | | /// Task.</param> |
| | 65 | | /// <param name="constraints">The execution constraints that apply to |
| | 66 | | /// this Task.</param> |
| | 67 | | /// <param name="userIdentity">The user identity under which the Task |
| | 68 | | /// runs.</param> |
| | 69 | | /// <param name="multiInstanceSettings">An object that indicates that |
| | 70 | | /// the Task is a multi-instance Task, and contains information about |
| | 71 | | /// how to run the multi-instance Task.</param> |
| | 72 | | /// <param name="dependsOn">The Tasks that this Task depends |
| | 73 | | /// on.</param> |
| | 74 | | /// <param name="applicationPackageReferences">A list of Packages that |
| | 75 | | /// the Batch service will deploy to the Compute Node before running |
| | 76 | | /// the command line.</param> |
| | 77 | | /// <param name="authenticationTokenSettings">The settings for an |
| | 78 | | /// authentication token that the Task can use to perform Batch service |
| | 79 | | /// operations.</param> |
| 0 | 80 | | public TaskAddParameter(string id, string commandLine, string displayName = default(string), TaskContainerSettin |
| | 81 | | { |
| 0 | 82 | | Id = id; |
| 0 | 83 | | DisplayName = displayName; |
| 0 | 84 | | CommandLine = commandLine; |
| 0 | 85 | | ContainerSettings = containerSettings; |
| 0 | 86 | | ExitConditions = exitConditions; |
| 0 | 87 | | ResourceFiles = resourceFiles; |
| 0 | 88 | | OutputFiles = outputFiles; |
| 0 | 89 | | EnvironmentSettings = environmentSettings; |
| 0 | 90 | | AffinityInfo = affinityInfo; |
| 0 | 91 | | Constraints = constraints; |
| 0 | 92 | | UserIdentity = userIdentity; |
| 0 | 93 | | MultiInstanceSettings = multiInstanceSettings; |
| 0 | 94 | | DependsOn = dependsOn; |
| 0 | 95 | | ApplicationPackageReferences = applicationPackageReferences; |
| 0 | 96 | | AuthenticationTokenSettings = authenticationTokenSettings; |
| | 97 | | CustomInit(); |
| 0 | 98 | | } |
| | 99 | |
|
| | 100 | | /// <summary> |
| | 101 | | /// An initialization method that performs custom operations like setting defaults |
| | 102 | | /// </summary> |
| | 103 | | partial void CustomInit(); |
| | 104 | |
|
| | 105 | | /// <summary> |
| | 106 | | /// Gets or sets a string that uniquely identifies the Task within the |
| | 107 | | /// Job. |
| | 108 | | /// </summary> |
| | 109 | | /// <remarks> |
| | 110 | | /// The ID can contain any combination of alphanumeric characters |
| | 111 | | /// including hyphens and underscores, and cannot contain more than 64 |
| | 112 | | /// characters. The ID is case-preserving and case-insensitive (that |
| | 113 | | /// is, you may not have two IDs within a Job that differ only by |
| | 114 | | /// case). |
| | 115 | | /// </remarks> |
| | 116 | | [JsonProperty(PropertyName = "id")] |
| 1115 | 117 | | public string Id { get; set; } |
| | 118 | |
|
| | 119 | | /// <summary> |
| | 120 | | /// Gets or sets a display name for the Task. |
| | 121 | | /// </summary> |
| | 122 | | /// <remarks> |
| | 123 | | /// The display name need not be unique and can contain any Unicode |
| | 124 | | /// characters up to a maximum length of 1024. |
| | 125 | | /// </remarks> |
| | 126 | | [JsonProperty(PropertyName = "displayName")] |
| 1110 | 127 | | public string DisplayName { get; set; } |
| | 128 | |
|
| | 129 | | /// <summary> |
| | 130 | | /// Gets or sets the command line of the Task. |
| | 131 | | /// </summary> |
| | 132 | | /// <remarks> |
| | 133 | | /// For multi-instance Tasks, the command line is executed as the |
| | 134 | | /// primary Task, after the primary Task and all subtasks have finished |
| | 135 | | /// executing the coordination command line. The command line does not |
| | 136 | | /// run under a shell, and therefore cannot take advantage of shell |
| | 137 | | /// features such as environment variable expansion. If you want to |
| | 138 | | /// take advantage of such features, you should invoke the shell in the |
| | 139 | | /// command line, for example using "cmd /c MyCommand" in Windows or |
| | 140 | | /// "/bin/sh -c MyCommand" in Linux. If the command line refers to file |
| | 141 | | /// paths, it should use a relative path (relative to the Task working |
| | 142 | | /// directory), or use the Batch provided environment variable |
| | 143 | | /// (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). |
| | 144 | | /// </remarks> |
| | 145 | | [JsonProperty(PropertyName = "commandLine")] |
| 1110 | 146 | | public string CommandLine { get; set; } |
| | 147 | |
|
| | 148 | | /// <summary> |
| | 149 | | /// Gets or sets the settings for the container under which the Task |
| | 150 | | /// runs. |
| | 151 | | /// </summary> |
| | 152 | | /// <remarks> |
| | 153 | | /// If the Pool that will run this Task has containerConfiguration set, |
| | 154 | | /// this must be set as well. If the Pool that will run this Task |
| | 155 | | /// doesn't have containerConfiguration set, this must not be set. When |
| | 156 | | /// this is specified, all directories recursively below the |
| | 157 | | /// AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the |
| | 158 | | /// node) are mapped into the container, all Task environment variables |
| | 159 | | /// are mapped into the container, and the Task command line is |
| | 160 | | /// executed in the container. Files produced in the container outside |
| | 161 | | /// of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, |
| | 162 | | /// meaning that Batch file APIs will not be able to access those |
| | 163 | | /// files. |
| | 164 | | /// </remarks> |
| | 165 | | [JsonProperty(PropertyName = "containerSettings")] |
| 1110 | 166 | | public TaskContainerSettings ContainerSettings { get; set; } |
| | 167 | |
|
| | 168 | | /// <summary> |
| | 169 | | /// Gets or sets how the Batch service should respond when the Task |
| | 170 | | /// completes. |
| | 171 | | /// </summary> |
| | 172 | | [JsonProperty(PropertyName = "exitConditions")] |
| 1118 | 173 | | public ExitConditions ExitConditions { get; set; } |
| | 174 | |
|
| | 175 | | /// <summary> |
| | 176 | | /// Gets or sets a list of files that the Batch service will download |
| | 177 | | /// to the Compute Node before running the command line. |
| | 178 | | /// </summary> |
| | 179 | | /// <remarks> |
| | 180 | | /// For multi-instance Tasks, the resource files will only be |
| | 181 | | /// downloaded to the Compute Node on which the primary Task is |
| | 182 | | /// executed. There is a maximum size for the list of resource files. |
| | 183 | | /// When the max size is exceeded, the request will fail and the |
| | 184 | | /// response error code will be RequestEntityTooLarge. If this occurs, |
| | 185 | | /// the collection of ResourceFiles must be reduced in size. This can |
| | 186 | | /// be achieved using .zip files, Application Packages, or Docker |
| | 187 | | /// Containers. |
| | 188 | | /// </remarks> |
| | 189 | | [JsonProperty(PropertyName = "resourceFiles")] |
| 1110 | 190 | | public IList<ResourceFile> ResourceFiles { get; set; } |
| | 191 | |
|
| | 192 | | /// <summary> |
| | 193 | | /// Gets or sets a list of files that the Batch service will upload |
| | 194 | | /// from the Compute Node after running the command line. |
| | 195 | | /// </summary> |
| | 196 | | /// <remarks> |
| | 197 | | /// For multi-instance Tasks, the files will only be uploaded from the |
| | 198 | | /// Compute Node on which the primary Task is executed. |
| | 199 | | /// </remarks> |
| | 200 | | [JsonProperty(PropertyName = "outputFiles")] |
| 1110 | 201 | | public IList<OutputFile> OutputFiles { get; set; } |
| | 202 | |
|
| | 203 | | /// <summary> |
| | 204 | | /// Gets or sets a list of environment variable settings for the Task. |
| | 205 | | /// </summary> |
| | 206 | | [JsonProperty(PropertyName = "environmentSettings")] |
| 1110 | 207 | | public IList<EnvironmentSetting> EnvironmentSettings { get; set; } |
| | 208 | |
|
| | 209 | | /// <summary> |
| | 210 | | /// Gets or sets a locality hint that can be used by the Batch service |
| | 211 | | /// to select a Compute Node on which to start the new Task. |
| | 212 | | /// </summary> |
| | 213 | | [JsonProperty(PropertyName = "affinityInfo")] |
| 1110 | 214 | | public AffinityInformation AffinityInfo { get; set; } |
| | 215 | |
|
| | 216 | | /// <summary> |
| | 217 | | /// Gets or sets the execution constraints that apply to this Task. |
| | 218 | | /// </summary> |
| | 219 | | /// <remarks> |
| | 220 | | /// If you do not specify constraints, the maxTaskRetryCount is the |
| | 221 | | /// maxTaskRetryCount specified for the Job, the maxWallClockTime is |
| | 222 | | /// infinite, and the retentionTime is 7 days. |
| | 223 | | /// </remarks> |
| | 224 | | [JsonProperty(PropertyName = "constraints")] |
| 1110 | 225 | | public TaskConstraints Constraints { get; set; } |
| | 226 | |
|
| | 227 | | /// <summary> |
| | 228 | | /// Gets or sets the user identity under which the Task runs. |
| | 229 | | /// </summary> |
| | 230 | | /// <remarks> |
| | 231 | | /// If omitted, the Task runs as a non-administrative user unique to |
| | 232 | | /// the Task. |
| | 233 | | /// </remarks> |
| | 234 | | [JsonProperty(PropertyName = "userIdentity")] |
| 1110 | 235 | | public UserIdentity UserIdentity { get; set; } |
| | 236 | |
|
| | 237 | | /// <summary> |
| | 238 | | /// Gets or sets an object that indicates that the Task is a |
| | 239 | | /// multi-instance Task, and contains information about how to run the |
| | 240 | | /// multi-instance Task. |
| | 241 | | /// </summary> |
| | 242 | | [JsonProperty(PropertyName = "multiInstanceSettings")] |
| 1110 | 243 | | public MultiInstanceSettings MultiInstanceSettings { get; set; } |
| | 244 | |
|
| | 245 | | /// <summary> |
| | 246 | | /// Gets or sets the Tasks that this Task depends on. |
| | 247 | | /// </summary> |
| | 248 | | /// <remarks> |
| | 249 | | /// This Task will not be scheduled until all Tasks that it depends on |
| | 250 | | /// have completed successfully. If any of those Tasks fail and exhaust |
| | 251 | | /// their retry counts, this Task will never be scheduled. If the Job |
| | 252 | | /// does not have usesTaskDependencies set to true, and this element is |
| | 253 | | /// present, the request fails with error code |
| | 254 | | /// TaskDependenciesNotSpecifiedOnJob. |
| | 255 | | /// </remarks> |
| | 256 | | [JsonProperty(PropertyName = "dependsOn")] |
| 1125 | 257 | | public TaskDependencies DependsOn { get; set; } |
| | 258 | |
|
| | 259 | | /// <summary> |
| | 260 | | /// Gets or sets a list of Packages that the Batch service will deploy |
| | 261 | | /// to the Compute Node before running the command line. |
| | 262 | | /// </summary> |
| | 263 | | /// <remarks> |
| | 264 | | /// Application packages are downloaded and deployed to a shared |
| | 265 | | /// directory, not the Task working directory. Therefore, if a |
| | 266 | | /// referenced package is already on the Node, and is up to date, then |
| | 267 | | /// it is not re-downloaded; the existing copy on the Compute Node is |
| | 268 | | /// used. If a referenced Package cannot be installed, for example |
| | 269 | | /// because the package has been deleted or because download failed, |
| | 270 | | /// the Task fails. |
| | 271 | | /// </remarks> |
| | 272 | | [JsonProperty(PropertyName = "applicationPackageReferences")] |
| 1112 | 273 | | public IList<ApplicationPackageReference> ApplicationPackageReferences { get; set; } |
| | 274 | |
|
| | 275 | | /// <summary> |
| | 276 | | /// Gets or sets the settings for an authentication token that the Task |
| | 277 | | /// can use to perform Batch service operations. |
| | 278 | | /// </summary> |
| | 279 | | /// <remarks> |
| | 280 | | /// If this property is set, the Batch service provides the Task with |
| | 281 | | /// an authentication token which can be used to authenticate Batch |
| | 282 | | /// service operations without requiring an Account access key. The |
| | 283 | | /// token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN environment |
| | 284 | | /// variable. The operations that the Task can carry out using the |
| | 285 | | /// token depend on the settings. For example, a Task can request Job |
| | 286 | | /// permissions in order to add other Tasks to the Job, or check the |
| | 287 | | /// status of the Job or of other Tasks under the Job. |
| | 288 | | /// </remarks> |
| | 289 | | [JsonProperty(PropertyName = "authenticationTokenSettings")] |
| 1110 | 290 | | public AuthenticationTokenSettings AuthenticationTokenSettings { get; set; } |
| | 291 | |
|
| | 292 | | } |
| | 293 | | } |