| | 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.Linq; |
| | 15 | |
|
| | 16 | | /// <summary> |
| | 17 | | /// Execution constraints to apply to a Task. |
| | 18 | | /// </summary> |
| | 19 | | public partial class TaskConstraints |
| | 20 | | { |
| | 21 | | /// <summary> |
| | 22 | | /// Initializes a new instance of the TaskConstraints class. |
| | 23 | | /// </summary> |
| 1590 | 24 | | public TaskConstraints() |
| | 25 | | { |
| | 26 | | CustomInit(); |
| 1590 | 27 | | } |
| | 28 | |
|
| | 29 | | /// <summary> |
| | 30 | | /// Initializes a new instance of the TaskConstraints class. |
| | 31 | | /// </summary> |
| | 32 | | /// <param name="maxWallClockTime">The maximum elapsed time that the |
| | 33 | | /// Task may run, measured from the time the Task starts. If the Task |
| | 34 | | /// does not complete within the time limit, the Batch service |
| | 35 | | /// terminates it.</param> |
| | 36 | | /// <param name="retentionTime">The minimum time to retain the Task |
| | 37 | | /// directory on the Compute Node where it ran, from the time it |
| | 38 | | /// completes execution. After this time, the Batch service may delete |
| | 39 | | /// the Task directory and all its contents.</param> |
| | 40 | | /// <param name="maxTaskRetryCount">The maximum number of times the |
| | 41 | | /// Task may be retried. The Batch service retries a Task if its exit |
| | 42 | | /// code is nonzero.</param> |
| 0 | 43 | | public TaskConstraints(System.TimeSpan? maxWallClockTime = default(System.TimeSpan?), System.TimeSpan? retention |
| | 44 | | { |
| 0 | 45 | | MaxWallClockTime = maxWallClockTime; |
| 0 | 46 | | RetentionTime = retentionTime; |
| 0 | 47 | | MaxTaskRetryCount = maxTaskRetryCount; |
| | 48 | | CustomInit(); |
| 0 | 49 | | } |
| | 50 | |
|
| | 51 | | /// <summary> |
| | 52 | | /// An initialization method that performs custom operations like setting defaults |
| | 53 | | /// </summary> |
| | 54 | | partial void CustomInit(); |
| | 55 | |
|
| | 56 | | /// <summary> |
| | 57 | | /// Gets or sets the maximum elapsed time that the Task may run, |
| | 58 | | /// measured from the time the Task starts. If the Task does not |
| | 59 | | /// complete within the time limit, the Batch service terminates it. |
| | 60 | | /// </summary> |
| | 61 | | /// <remarks> |
| | 62 | | /// If this is not specified, there is no time limit on how long the |
| | 63 | | /// Task may run. |
| | 64 | | /// </remarks> |
| | 65 | | [JsonProperty(PropertyName = "maxWallClockTime")] |
| 3803 | 66 | | public System.TimeSpan? MaxWallClockTime { get; set; } |
| | 67 | |
|
| | 68 | | /// <summary> |
| | 69 | | /// Gets or sets the minimum time to retain the Task directory on the |
| | 70 | | /// Compute Node where it ran, from the time it completes execution. |
| | 71 | | /// After this time, the Batch service may delete the Task directory |
| | 72 | | /// and all its contents. |
| | 73 | | /// </summary> |
| | 74 | | /// <remarks> |
| | 75 | | /// The default is 7 days, i.e. the Task directory will be retained for |
| | 76 | | /// 7 days unless the Compute Node is removed or the Job is deleted. |
| | 77 | | /// </remarks> |
| | 78 | | [JsonProperty(PropertyName = "retentionTime")] |
| 3799 | 79 | | public System.TimeSpan? RetentionTime { get; set; } |
| | 80 | |
|
| | 81 | | /// <summary> |
| | 82 | | /// Gets or sets the maximum number of times the Task may be retried. |
| | 83 | | /// The Batch service retries a Task if its exit code is nonzero. |
| | 84 | | /// </summary> |
| | 85 | | /// <remarks> |
| | 86 | | /// Note that this value specifically controls the number of retries |
| | 87 | | /// for the Task executable due to a nonzero exit code. The Batch |
| | 88 | | /// service will try the Task once, and may then retry up to this |
| | 89 | | /// limit. For example, if the maximum retry count is 3, Batch tries |
| | 90 | | /// the Task up to 4 times (one initial try and 3 retries). If the |
| | 91 | | /// maximum retry count is 0, the Batch service does not retry the Task |
| | 92 | | /// after the first attempt. If the maximum retry count is -1, the |
| | 93 | | /// Batch service retries the Task without limit. |
| | 94 | | /// </remarks> |
| | 95 | | [JsonProperty(PropertyName = "maxTaskRetryCount")] |
| 3789 | 96 | | public int? MaxTaskRetryCount { get; set; } |
| | 97 | |
|
| | 98 | | } |
| | 99 | | } |