| | 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 | | /// Information about the execution of a Task. |
| | 18 | | /// </summary> |
| | 19 | | public partial class TaskExecutionInformation |
| | 20 | | { |
| | 21 | | /// <summary> |
| | 22 | | /// Initializes a new instance of the TaskExecutionInformation class. |
| | 23 | | /// </summary> |
| 1572 | 24 | | public TaskExecutionInformation() |
| | 25 | | { |
| | 26 | | CustomInit(); |
| 1572 | 27 | | } |
| | 28 | |
|
| | 29 | | /// <summary> |
| | 30 | | /// Initializes a new instance of the TaskExecutionInformation class. |
| | 31 | | /// </summary> |
| | 32 | | /// <param name="retryCount">The number of times the Task has been |
| | 33 | | /// retried by the Batch service.</param> |
| | 34 | | /// <param name="requeueCount">The number of times the Task has been |
| | 35 | | /// requeued by the Batch service as the result of a user |
| | 36 | | /// request.</param> |
| | 37 | | /// <param name="startTime">The time at which the Task started |
| | 38 | | /// running.</param> |
| | 39 | | /// <param name="endTime">The time at which the Task completed.</param> |
| | 40 | | /// <param name="exitCode">The exit code of the program specified on |
| | 41 | | /// the Task command line.</param> |
| | 42 | | /// <param name="containerInfo">Information about the container under |
| | 43 | | /// which the Task is executing.</param> |
| | 44 | | /// <param name="failureInfo">Information describing the Task failure, |
| | 45 | | /// if any.</param> |
| | 46 | | /// <param name="lastRetryTime">The most recent time at which a retry |
| | 47 | | /// of the Task started running.</param> |
| | 48 | | /// <param name="lastRequeueTime">The most recent time at which the |
| | 49 | | /// Task has been requeued by the Batch service as the result of a user |
| | 50 | | /// request.</param> |
| | 51 | | /// <param name="result">The result of the Task execution.</param> |
| 0 | 52 | | public TaskExecutionInformation(int retryCount, int requeueCount, System.DateTime? startTime = default(System.Da |
| | 53 | | { |
| 0 | 54 | | StartTime = startTime; |
| 0 | 55 | | EndTime = endTime; |
| 0 | 56 | | ExitCode = exitCode; |
| 0 | 57 | | ContainerInfo = containerInfo; |
| 0 | 58 | | FailureInfo = failureInfo; |
| 0 | 59 | | RetryCount = retryCount; |
| 0 | 60 | | LastRetryTime = lastRetryTime; |
| 0 | 61 | | RequeueCount = requeueCount; |
| 0 | 62 | | LastRequeueTime = lastRequeueTime; |
| 0 | 63 | | Result = result; |
| | 64 | | CustomInit(); |
| 0 | 65 | | } |
| | 66 | |
|
| | 67 | | /// <summary> |
| | 68 | | /// An initialization method that performs custom operations like setting defaults |
| | 69 | | /// </summary> |
| | 70 | | partial void CustomInit(); |
| | 71 | |
|
| | 72 | | /// <summary> |
| | 73 | | /// Gets or sets the time at which the Task started running. |
| | 74 | | /// </summary> |
| | 75 | | /// <remarks> |
| | 76 | | /// 'Running' corresponds to the running state, so if the Task |
| | 77 | | /// specifies resource files or Packages, then the start time reflects |
| | 78 | | /// the time at which the Task started downloading or deploying these. |
| | 79 | | /// If the Task has been restarted or retried, this is the most recent |
| | 80 | | /// time at which the Task started running. This property is present |
| | 81 | | /// only for Tasks that are in the running or completed state. |
| | 82 | | /// </remarks> |
| | 83 | | [JsonProperty(PropertyName = "startTime")] |
| 3922 | 84 | | public System.DateTime? StartTime { get; set; } |
| | 85 | |
|
| | 86 | | /// <summary> |
| | 87 | | /// Gets or sets the time at which the Task completed. |
| | 88 | | /// </summary> |
| | 89 | | /// <remarks> |
| | 90 | | /// This property is set only if the Task is in the Completed state. |
| | 91 | | /// </remarks> |
| | 92 | | [JsonProperty(PropertyName = "endTime")] |
| 3919 | 93 | | public System.DateTime? EndTime { get; set; } |
| | 94 | |
|
| | 95 | | /// <summary> |
| | 96 | | /// Gets or sets the exit code of the program specified on the Task |
| | 97 | | /// command line. |
| | 98 | | /// </summary> |
| | 99 | | /// <remarks> |
| | 100 | | /// This property is set only if the Task is in the completed state. In |
| | 101 | | /// general, the exit code for a process reflects the specific |
| | 102 | | /// convention implemented by the application developer for that |
| | 103 | | /// process. If you use the exit code value to make decisions in your |
| | 104 | | /// code, be sure that you know the exit code convention used by the |
| | 105 | | /// application process. However, if the Batch service terminates the |
| | 106 | | /// Task (due to timeout, or user termination via the API) you may see |
| | 107 | | /// an operating system-defined exit code. |
| | 108 | | /// </remarks> |
| | 109 | | [JsonProperty(PropertyName = "exitCode")] |
| 3902 | 110 | | public int? ExitCode { get; set; } |
| | 111 | |
|
| | 112 | | /// <summary> |
| | 113 | | /// Gets or sets information about the container under which the Task |
| | 114 | | /// is executing. |
| | 115 | | /// </summary> |
| | 116 | | /// <remarks> |
| | 117 | | /// This property is set only if the Task runs in a container context. |
| | 118 | | /// </remarks> |
| | 119 | | [JsonProperty(PropertyName = "containerInfo")] |
| 3920 | 120 | | public TaskContainerExecutionInformation ContainerInfo { get; set; } |
| | 121 | |
|
| | 122 | | /// <summary> |
| | 123 | | /// Gets or sets information describing the Task failure, if any. |
| | 124 | | /// </summary> |
| | 125 | | /// <remarks> |
| | 126 | | /// This property is set only if the Task is in the completed state and |
| | 127 | | /// encountered a failure. |
| | 128 | | /// </remarks> |
| | 129 | | [JsonProperty(PropertyName = "failureInfo")] |
| 3938 | 130 | | public TaskFailureInformation FailureInfo { get; set; } |
| | 131 | |
|
| | 132 | | /// <summary> |
| | 133 | | /// Gets or sets the number of times the Task has been retried by the |
| | 134 | | /// Batch service. |
| | 135 | | /// </summary> |
| | 136 | | /// <remarks> |
| | 137 | | /// Task application failures (non-zero exit code) are retried, |
| | 138 | | /// pre-processing errors (the Task could not be run) and file upload |
| | 139 | | /// errors are not retried. The Batch service will retry the Task up to |
| | 140 | | /// the limit specified by the constraints. |
| | 141 | | /// </remarks> |
| | 142 | | [JsonProperty(PropertyName = "retryCount")] |
| 3944 | 143 | | public int RetryCount { get; set; } |
| | 144 | |
|
| | 145 | | /// <summary> |
| | 146 | | /// Gets or sets the most recent time at which a retry of the Task |
| | 147 | | /// started running. |
| | 148 | | /// </summary> |
| | 149 | | /// <remarks> |
| | 150 | | /// This element is present only if the Task was retried (i.e. |
| | 151 | | /// retryCount is nonzero). If present, this is typically the same as |
| | 152 | | /// startTime, but may be different if the Task has been restarted for |
| | 153 | | /// reasons other than retry; for example, if the Compute Node was |
| | 154 | | /// rebooted during a retry, then the startTime is updated but the |
| | 155 | | /// lastRetryTime is not. |
| | 156 | | /// </remarks> |
| | 157 | | [JsonProperty(PropertyName = "lastRetryTime")] |
| 3903 | 158 | | public System.DateTime? LastRetryTime { get; set; } |
| | 159 | |
|
| | 160 | | /// <summary> |
| | 161 | | /// Gets or sets the number of times the Task has been requeued by the |
| | 162 | | /// Batch service as the result of a user request. |
| | 163 | | /// </summary> |
| | 164 | | /// <remarks> |
| | 165 | | /// When the user removes Compute Nodes from a Pool (by |
| | 166 | | /// resizing/shrinking the pool) or when the Job is being disabled, the |
| | 167 | | /// user can specify that running Tasks on the Compute Nodes be |
| | 168 | | /// requeued for execution. This count tracks how many times the Task |
| | 169 | | /// has been requeued for these reasons. |
| | 170 | | /// </remarks> |
| | 171 | | [JsonProperty(PropertyName = "requeueCount")] |
| 3939 | 172 | | public int RequeueCount { get; set; } |
| | 173 | |
|
| | 174 | | /// <summary> |
| | 175 | | /// Gets or sets the most recent time at which the Task has been |
| | 176 | | /// requeued by the Batch service as the result of a user request. |
| | 177 | | /// </summary> |
| | 178 | | /// <remarks> |
| | 179 | | /// This property is set only if the requeueCount is nonzero. |
| | 180 | | /// </remarks> |
| | 181 | | [JsonProperty(PropertyName = "lastRequeueTime")] |
| 3938 | 182 | | public System.DateTime? LastRequeueTime { get; set; } |
| | 183 | |
|
| | 184 | | /// <summary> |
| | 185 | | /// Gets or sets the result of the Task execution. |
| | 186 | | /// </summary> |
| | 187 | | /// <remarks> |
| | 188 | | /// If the value is 'failed', then the details of the failure can be |
| | 189 | | /// found in the failureInfo property. Possible values include: |
| | 190 | | /// 'success', 'failure' |
| | 191 | | /// </remarks> |
| | 192 | | [JsonProperty(PropertyName = "result")] |
| 3909 | 193 | | public TaskExecutionResult? Result { get; set; } |
| | 194 | |
|
| | 195 | | } |
| | 196 | | } |