| | 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 an Azure Batch subtask. |
| | 18 | | /// </summary> |
| | 19 | | public partial class SubtaskInformation |
| | 20 | | { |
| | 21 | | /// <summary> |
| | 22 | | /// Initializes a new instance of the SubtaskInformation class. |
| | 23 | | /// </summary> |
| 1 | 24 | | public SubtaskInformation() |
| | 25 | | { |
| | 26 | | CustomInit(); |
| 1 | 27 | | } |
| | 28 | |
|
| | 29 | | /// <summary> |
| | 30 | | /// Initializes a new instance of the SubtaskInformation class. |
| | 31 | | /// </summary> |
| | 32 | | /// <param name="id">The ID of the subtask.</param> |
| | 33 | | /// <param name="nodeInfo">Information about the Compute Node on which |
| | 34 | | /// the subtask ran.</param> |
| | 35 | | /// <param name="startTime">The time at which the subtask started |
| | 36 | | /// running. If the subtask has been restarted or retried, this is the |
| | 37 | | /// most recent time at which the subtask started running.</param> |
| | 38 | | /// <param name="endTime">The time at which the subtask |
| | 39 | | /// completed.</param> |
| | 40 | | /// <param name="exitCode">The exit code of the program specified on |
| | 41 | | /// the subtask 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="state">The current state of the subtask.</param> |
| | 47 | | /// <param name="stateTransitionTime">The time at which the subtask |
| | 48 | | /// entered its current state.</param> |
| | 49 | | /// <param name="previousState">The previous state of the |
| | 50 | | /// subtask.</param> |
| | 51 | | /// <param name="previousStateTransitionTime">The time at which the |
| | 52 | | /// subtask entered its previous state.</param> |
| | 53 | | /// <param name="result">The result of the Task execution.</param> |
| 0 | 54 | | public SubtaskInformation(int? id = default(int?), ComputeNodeInformation nodeInfo = default(ComputeNodeInformat |
| | 55 | | { |
| 0 | 56 | | Id = id; |
| 0 | 57 | | NodeInfo = nodeInfo; |
| 0 | 58 | | StartTime = startTime; |
| 0 | 59 | | EndTime = endTime; |
| 0 | 60 | | ExitCode = exitCode; |
| 0 | 61 | | ContainerInfo = containerInfo; |
| 0 | 62 | | FailureInfo = failureInfo; |
| 0 | 63 | | State = state; |
| 0 | 64 | | StateTransitionTime = stateTransitionTime; |
| 0 | 65 | | PreviousState = previousState; |
| 0 | 66 | | PreviousStateTransitionTime = previousStateTransitionTime; |
| 0 | 67 | | Result = result; |
| | 68 | | CustomInit(); |
| 0 | 69 | | } |
| | 70 | |
|
| | 71 | | /// <summary> |
| | 72 | | /// An initialization method that performs custom operations like setting defaults |
| | 73 | | /// </summary> |
| | 74 | | partial void CustomInit(); |
| | 75 | |
|
| | 76 | | /// <summary> |
| | 77 | | /// Gets or sets the ID of the subtask. |
| | 78 | | /// </summary> |
| | 79 | | [JsonProperty(PropertyName = "id")] |
| 0 | 80 | | public int? Id { get; set; } |
| | 81 | |
|
| | 82 | | /// <summary> |
| | 83 | | /// Gets or sets information about the Compute Node on which the |
| | 84 | | /// subtask ran. |
| | 85 | | /// </summary> |
| | 86 | | [JsonProperty(PropertyName = "nodeInfo")] |
| 0 | 87 | | public ComputeNodeInformation NodeInfo { get; set; } |
| | 88 | |
|
| | 89 | | /// <summary> |
| | 90 | | /// Gets or sets the time at which the subtask started running. If the |
| | 91 | | /// subtask has been restarted or retried, this is the most recent time |
| | 92 | | /// at which the subtask started running. |
| | 93 | | /// </summary> |
| | 94 | | [JsonProperty(PropertyName = "startTime")] |
| 0 | 95 | | public System.DateTime? StartTime { get; set; } |
| | 96 | |
|
| | 97 | | /// <summary> |
| | 98 | | /// Gets or sets the time at which the subtask completed. |
| | 99 | | /// </summary> |
| | 100 | | /// <remarks> |
| | 101 | | /// This property is set only if the subtask is in the Completed state. |
| | 102 | | /// </remarks> |
| | 103 | | [JsonProperty(PropertyName = "endTime")] |
| 0 | 104 | | public System.DateTime? EndTime { get; set; } |
| | 105 | |
|
| | 106 | | /// <summary> |
| | 107 | | /// Gets or sets the exit code of the program specified on the subtask |
| | 108 | | /// command line. |
| | 109 | | /// </summary> |
| | 110 | | /// <remarks> |
| | 111 | | /// This property is set only if the subtask is in the completed state. |
| | 112 | | /// In general, the exit code for a process reflects the specific |
| | 113 | | /// convention implemented by the application developer for that |
| | 114 | | /// process. If you use the exit code value to make decisions in your |
| | 115 | | /// code, be sure that you know the exit code convention used by the |
| | 116 | | /// application process. However, if the Batch service terminates the |
| | 117 | | /// subtask (due to timeout, or user termination via the API) you may |
| | 118 | | /// see an operating system-defined exit code. |
| | 119 | | /// </remarks> |
| | 120 | | [JsonProperty(PropertyName = "exitCode")] |
| 0 | 121 | | public int? ExitCode { get; set; } |
| | 122 | |
|
| | 123 | | /// <summary> |
| | 124 | | /// Gets or sets information about the container under which the Task |
| | 125 | | /// is executing. |
| | 126 | | /// </summary> |
| | 127 | | /// <remarks> |
| | 128 | | /// This property is set only if the Task runs in a container context. |
| | 129 | | /// </remarks> |
| | 130 | | [JsonProperty(PropertyName = "containerInfo")] |
| 0 | 131 | | public TaskContainerExecutionInformation ContainerInfo { get; set; } |
| | 132 | |
|
| | 133 | | /// <summary> |
| | 134 | | /// Gets or sets information describing the Task failure, if any. |
| | 135 | | /// </summary> |
| | 136 | | /// <remarks> |
| | 137 | | /// This property is set only if the Task is in the completed state and |
| | 138 | | /// encountered a failure. |
| | 139 | | /// </remarks> |
| | 140 | | [JsonProperty(PropertyName = "failureInfo")] |
| 0 | 141 | | public TaskFailureInformation FailureInfo { get; set; } |
| | 142 | |
|
| | 143 | | /// <summary> |
| | 144 | | /// Gets or sets the current state of the subtask. |
| | 145 | | /// </summary> |
| | 146 | | /// <remarks> |
| | 147 | | /// Possible values include: 'preparing', 'running', 'completed' |
| | 148 | | /// </remarks> |
| | 149 | | [JsonProperty(PropertyName = "state")] |
| 0 | 150 | | public SubtaskState? State { get; set; } |
| | 151 | |
|
| | 152 | | /// <summary> |
| | 153 | | /// Gets or sets the time at which the subtask entered its current |
| | 154 | | /// state. |
| | 155 | | /// </summary> |
| | 156 | | [JsonProperty(PropertyName = "stateTransitionTime")] |
| 0 | 157 | | public System.DateTime? StateTransitionTime { get; set; } |
| | 158 | |
|
| | 159 | | /// <summary> |
| | 160 | | /// Gets or sets the previous state of the subtask. |
| | 161 | | /// </summary> |
| | 162 | | /// <remarks> |
| | 163 | | /// This property is not set if the subtask is in its initial running |
| | 164 | | /// state. Possible values include: 'preparing', 'running', 'completed' |
| | 165 | | /// </remarks> |
| | 166 | | [JsonProperty(PropertyName = "previousState")] |
| 2 | 167 | | public SubtaskState? PreviousState { get; set; } |
| | 168 | |
|
| | 169 | | /// <summary> |
| | 170 | | /// Gets or sets the time at which the subtask entered its previous |
| | 171 | | /// state. |
| | 172 | | /// </summary> |
| | 173 | | /// <remarks> |
| | 174 | | /// This property is not set if the subtask is in its initial running |
| | 175 | | /// state. |
| | 176 | | /// </remarks> |
| | 177 | | [JsonProperty(PropertyName = "previousStateTransitionTime")] |
| 0 | 178 | | public System.DateTime? PreviousStateTransitionTime { get; set; } |
| | 179 | |
|
| | 180 | | /// <summary> |
| | 181 | | /// Gets or sets the result of the Task execution. |
| | 182 | | /// </summary> |
| | 183 | | /// <remarks> |
| | 184 | | /// If the value is 'failed', then the details of the failure can be |
| | 185 | | /// found in the failureInfo property. Possible values include: |
| | 186 | | /// 'success', 'failure' |
| | 187 | | /// </remarks> |
| | 188 | | [JsonProperty(PropertyName = "result")] |
| 0 | 189 | | public TaskExecutionResult? Result { get; set; } |
| | 190 | |
|
| | 191 | | } |
| | 192 | | } |