| | 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 a StartTask running on a Compute Node. |
| | 18 | | /// </summary> |
| | 19 | | public partial class StartTaskInformation |
| | 20 | | { |
| | 21 | | /// <summary> |
| | 22 | | /// Initializes a new instance of the StartTaskInformation class. |
| | 23 | | /// </summary> |
| 504 | 24 | | public StartTaskInformation() |
| | 25 | | { |
| | 26 | | CustomInit(); |
| 504 | 27 | | } |
| | 28 | |
|
| | 29 | | /// <summary> |
| | 30 | | /// Initializes a new instance of the StartTaskInformation class. |
| | 31 | | /// </summary> |
| | 32 | | /// <param name="state">The state of the StartTask on the Compute |
| | 33 | | /// Node.</param> |
| | 34 | | /// <param name="startTime">The time at which the StartTask started |
| | 35 | | /// running.</param> |
| | 36 | | /// <param name="retryCount">The number of times the Task has been |
| | 37 | | /// retried by the Batch service.</param> |
| | 38 | | /// <param name="endTime">The time at which the StartTask stopped |
| | 39 | | /// running.</param> |
| | 40 | | /// <param name="exitCode">The exit code of the program specified on |
| | 41 | | /// the StartTask 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="result">The result of the Task execution.</param> |
| 0 | 49 | | public StartTaskInformation(StartTaskState state, System.DateTime startTime, int retryCount, System.DateTime? en |
| | 50 | | { |
| 0 | 51 | | State = state; |
| 0 | 52 | | StartTime = startTime; |
| 0 | 53 | | EndTime = endTime; |
| 0 | 54 | | ExitCode = exitCode; |
| 0 | 55 | | ContainerInfo = containerInfo; |
| 0 | 56 | | FailureInfo = failureInfo; |
| 0 | 57 | | RetryCount = retryCount; |
| 0 | 58 | | LastRetryTime = lastRetryTime; |
| 0 | 59 | | Result = result; |
| | 60 | | CustomInit(); |
| 0 | 61 | | } |
| | 62 | |
|
| | 63 | | /// <summary> |
| | 64 | | /// An initialization method that performs custom operations like setting defaults |
| | 65 | | /// </summary> |
| | 66 | | partial void CustomInit(); |
| | 67 | |
|
| | 68 | | /// <summary> |
| | 69 | | /// Gets or sets the state of the StartTask on the Compute Node. |
| | 70 | | /// </summary> |
| | 71 | | /// <remarks> |
| | 72 | | /// Possible values include: 'running', 'completed' |
| | 73 | | /// </remarks> |
| | 74 | | [JsonProperty(PropertyName = "state")] |
| 1265 | 75 | | public StartTaskState State { get; set; } |
| | 76 | |
|
| | 77 | | /// <summary> |
| | 78 | | /// Gets or sets the time at which the StartTask started running. |
| | 79 | | /// </summary> |
| | 80 | | /// <remarks> |
| | 81 | | /// This value is reset every time the Task is restarted or retried |
| | 82 | | /// (that is, this is the most recent time at which the StartTask |
| | 83 | | /// started running). |
| | 84 | | /// </remarks> |
| | 85 | | [JsonProperty(PropertyName = "startTime")] |
| 1252 | 86 | | public System.DateTime StartTime { get; set; } |
| | 87 | |
|
| | 88 | | /// <summary> |
| | 89 | | /// Gets or sets the time at which the StartTask stopped running. |
| | 90 | | /// </summary> |
| | 91 | | /// <remarks> |
| | 92 | | /// This is the end time of the most recent run of the StartTask, if |
| | 93 | | /// that run has completed (even if that run failed and a retry is |
| | 94 | | /// pending). This element is not present if the StartTask is currently |
| | 95 | | /// running. |
| | 96 | | /// </remarks> |
| | 97 | | [JsonProperty(PropertyName = "endTime")] |
| 1243 | 98 | | public System.DateTime? EndTime { get; set; } |
| | 99 | |
|
| | 100 | | /// <summary> |
| | 101 | | /// Gets or sets the exit code of the program specified on the |
| | 102 | | /// StartTask command line. |
| | 103 | | /// </summary> |
| | 104 | | /// <remarks> |
| | 105 | | /// This property is set only if the StartTask is in the completed |
| | 106 | | /// state. In general, the exit code for a process reflects the |
| | 107 | | /// specific convention implemented by the application developer for |
| | 108 | | /// that process. If you use the exit code value to make decisions in |
| | 109 | | /// your code, be sure that you know the exit code convention used by |
| | 110 | | /// the application process. However, if the Batch service terminates |
| | 111 | | /// the StartTask (due to timeout, or user termination via the API) you |
| | 112 | | /// may see an operating system-defined exit code. |
| | 113 | | /// </remarks> |
| | 114 | | [JsonProperty(PropertyName = "exitCode")] |
| 1243 | 115 | | public int? ExitCode { get; set; } |
| | 116 | |
|
| | 117 | | /// <summary> |
| | 118 | | /// Gets or sets information about the container under which the Task |
| | 119 | | /// is executing. |
| | 120 | | /// </summary> |
| | 121 | | /// <remarks> |
| | 122 | | /// This property is set only if the Task runs in a container context. |
| | 123 | | /// </remarks> |
| | 124 | | [JsonProperty(PropertyName = "containerInfo")] |
| 1264 | 125 | | public TaskContainerExecutionInformation ContainerInfo { get; set; } |
| | 126 | |
|
| | 127 | | /// <summary> |
| | 128 | | /// Gets or sets information describing the Task failure, if any. |
| | 129 | | /// </summary> |
| | 130 | | /// <remarks> |
| | 131 | | /// This property is set only if the Task is in the completed state and |
| | 132 | | /// encountered a failure. |
| | 133 | | /// </remarks> |
| | 134 | | [JsonProperty(PropertyName = "failureInfo")] |
| 1245 | 135 | | public TaskFailureInformation FailureInfo { get; set; } |
| | 136 | |
|
| | 137 | | /// <summary> |
| | 138 | | /// Gets or sets the number of times the Task has been retried by the |
| | 139 | | /// Batch service. |
| | 140 | | /// </summary> |
| | 141 | | /// <remarks> |
| | 142 | | /// Task application failures (non-zero exit code) are retried, |
| | 143 | | /// pre-processing errors (the Task could not be run) and file upload |
| | 144 | | /// errors are not retried. The Batch service will retry the Task up to |
| | 145 | | /// the limit specified by the constraints. |
| | 146 | | /// </remarks> |
| | 147 | | [JsonProperty(PropertyName = "retryCount")] |
| 1246 | 148 | | public int RetryCount { get; set; } |
| | 149 | |
|
| | 150 | | /// <summary> |
| | 151 | | /// Gets or sets the most recent time at which a retry of the Task |
| | 152 | | /// started running. |
| | 153 | | /// </summary> |
| | 154 | | /// <remarks> |
| | 155 | | /// This element is present only if the Task was retried (i.e. |
| | 156 | | /// retryCount is nonzero). If present, this is typically the same as |
| | 157 | | /// startTime, but may be different if the Task has been restarted for |
| | 158 | | /// reasons other than retry; for example, if the Compute Node was |
| | 159 | | /// rebooted during a retry, then the startTime is updated but the |
| | 160 | | /// lastRetryTime is not. |
| | 161 | | /// </remarks> |
| | 162 | | [JsonProperty(PropertyName = "lastRetryTime")] |
| 1255 | 163 | | public System.DateTime? LastRetryTime { get; set; } |
| | 164 | |
|
| | 165 | | /// <summary> |
| | 166 | | /// Gets or sets the result of the Task execution. |
| | 167 | | /// </summary> |
| | 168 | | /// <remarks> |
| | 169 | | /// If the value is 'failed', then the details of the failure can be |
| | 170 | | /// found in the failureInfo property. Possible values include: |
| | 171 | | /// 'success', 'failure' |
| | 172 | | /// </remarks> |
| | 173 | | [JsonProperty(PropertyName = "result")] |
| 1247 | 174 | | public TaskExecutionResult? Result { get; set; } |
| | 175 | |
|
| | 176 | | } |
| | 177 | | } |