| | 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 | | /// The execution constraints for a Job. |
| | 18 | | /// </summary> |
| | 19 | | public partial class JobConstraints |
| | 20 | | { |
| | 21 | | /// <summary> |
| | 22 | | /// Initializes a new instance of the JobConstraints class. |
| | 23 | | /// </summary> |
| 965 | 24 | | public JobConstraints() |
| | 25 | | { |
| | 26 | | CustomInit(); |
| 965 | 27 | | } |
| | 28 | |
|
| | 29 | | /// <summary> |
| | 30 | | /// Initializes a new instance of the JobConstraints class. |
| | 31 | | /// </summary> |
| | 32 | | /// <param name="maxWallClockTime">The maximum elapsed time that the |
| | 33 | | /// Job may run, measured from the time the Job is created.</param> |
| | 34 | | /// <param name="maxTaskRetryCount">The maximum number of times each |
| | 35 | | /// Task may be retried. The Batch service retries a Task if its exit |
| | 36 | | /// code is nonzero.</param> |
| 2 | 37 | | public JobConstraints(System.TimeSpan? maxWallClockTime = default(System.TimeSpan?), int? maxTaskRetryCount = de |
| | 38 | | { |
| 2 | 39 | | MaxWallClockTime = maxWallClockTime; |
| 2 | 40 | | MaxTaskRetryCount = maxTaskRetryCount; |
| | 41 | | CustomInit(); |
| 2 | 42 | | } |
| | 43 | |
|
| | 44 | | /// <summary> |
| | 45 | | /// An initialization method that performs custom operations like setting defaults |
| | 46 | | /// </summary> |
| | 47 | | partial void CustomInit(); |
| | 48 | |
|
| | 49 | | /// <summary> |
| | 50 | | /// Gets or sets the maximum elapsed time that the Job may run, |
| | 51 | | /// measured from the time the Job is created. |
| | 52 | | /// </summary> |
| | 53 | | /// <remarks> |
| | 54 | | /// If the Job does not complete within the time limit, the Batch |
| | 55 | | /// service terminates it and any Tasks that are still running. In this |
| | 56 | | /// case, the termination reason will be MaxWallClockTimeExpiry. If |
| | 57 | | /// this property is not specified, there is no time limit on how long |
| | 58 | | /// the Job may run. |
| | 59 | | /// </remarks> |
| | 60 | | [JsonProperty(PropertyName = "maxWallClockTime")] |
| 2287 | 61 | | public System.TimeSpan? MaxWallClockTime { get; set; } |
| | 62 | |
|
| | 63 | | /// <summary> |
| | 64 | | /// Gets or sets the maximum number of times each Task may be retried. |
| | 65 | | /// The Batch service retries a Task if its exit code is nonzero. |
| | 66 | | /// </summary> |
| | 67 | | /// <remarks> |
| | 68 | | /// Note that this value specifically controls the number of retries. |
| | 69 | | /// The Batch service will try each Task once, and may then retry up to |
| | 70 | | /// this limit. For example, if the maximum retry count is 3, Batch |
| | 71 | | /// tries a Task up to 4 times (one initial try and 3 retries). If the |
| | 72 | | /// maximum retry count is 0, the Batch service does not retry Tasks. |
| | 73 | | /// If the maximum retry count is -1, the Batch service retries Tasks |
| | 74 | | /// without limit. The default value is 0 (no retries). |
| | 75 | | /// </remarks> |
| | 76 | | [JsonProperty(PropertyName = "maxTaskRetryCount")] |
| 2287 | 77 | | public int? MaxTaskRetryCount { get; set; } |
| | 78 | |
|
| | 79 | | } |
| | 80 | | } |