-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
JobPreparationTaskExecutionInformation.cs
206 lines (190 loc) · 9.17 KB
/
JobPreparationTaskExecutionInformation.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
namespace Microsoft.Azure.Batch.Protocol.Models
{
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// Contains information about the execution of a Job Preparation Task on a
/// Compute Node.
/// </summary>
public partial class JobPreparationTaskExecutionInformation
{
/// <summary>
/// Initializes a new instance of the
/// JobPreparationTaskExecutionInformation class.
/// </summary>
public JobPreparationTaskExecutionInformation()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the
/// JobPreparationTaskExecutionInformation class.
/// </summary>
/// <param name="startTime">The time at which the Task started
/// running.</param>
/// <param name="state">The current state of the Job Preparation Task
/// on the Compute Node.</param>
/// <param name="retryCount">The number of times the Task has been
/// retried by the Batch service. Task application failures (non-zero
/// exit code) are retried, pre-processing errors (the Task could not
/// be run) and file upload errors are not retried. The Batch service
/// will retry the Task up to the limit specified by the
/// constraints.</param>
/// <param name="endTime">The time at which the Job Preparation Task
/// completed.</param>
/// <param name="taskRootDirectory">The root directory of the Job
/// Preparation Task on the Compute Node. You can use this path to
/// retrieve files created by the Task, such as log files.</param>
/// <param name="taskRootDirectoryUrl">The URL to the root directory of
/// the Job Preparation Task on the Compute Node.</param>
/// <param name="exitCode">The exit code of the program specified on
/// the Task command line.</param>
/// <param name="containerInfo">Information about the container under
/// which the Task is executing.</param>
/// <param name="failureInfo">Information describing the Task failure,
/// if any.</param>
/// <param name="lastRetryTime">The most recent time at which a retry
/// of the Job Preparation Task started running.</param>
/// <param name="result">The result of the Task execution.</param>
public JobPreparationTaskExecutionInformation(System.DateTime startTime, JobPreparationTaskState state, int retryCount, System.DateTime? endTime = default(System.DateTime?), string taskRootDirectory = default(string), string taskRootDirectoryUrl = default(string), int? exitCode = default(int?), TaskContainerExecutionInformation containerInfo = default(TaskContainerExecutionInformation), TaskFailureInformation failureInfo = default(TaskFailureInformation), System.DateTime? lastRetryTime = default(System.DateTime?), TaskExecutionResult? result = default(TaskExecutionResult?))
{
StartTime = startTime;
EndTime = endTime;
State = state;
TaskRootDirectory = taskRootDirectory;
TaskRootDirectoryUrl = taskRootDirectoryUrl;
ExitCode = exitCode;
ContainerInfo = containerInfo;
FailureInfo = failureInfo;
RetryCount = retryCount;
LastRetryTime = lastRetryTime;
Result = result;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets the time at which the Task started running.
/// </summary>
/// <remarks>
/// If the Task has been restarted or retried, this is the most recent
/// time at which the Task started running.
/// </remarks>
[JsonProperty(PropertyName = "startTime")]
public System.DateTime StartTime { get; set; }
/// <summary>
/// Gets or sets the time at which the Job Preparation Task completed.
/// </summary>
/// <remarks>
/// This property is set only if the Task is in the Completed state.
/// </remarks>
[JsonProperty(PropertyName = "endTime")]
public System.DateTime? EndTime { get; set; }
/// <summary>
/// Gets or sets the current state of the Job Preparation Task on the
/// Compute Node.
/// </summary>
/// <remarks>
/// Possible values include: 'running', 'completed'
/// </remarks>
[JsonProperty(PropertyName = "state")]
public JobPreparationTaskState State { get; set; }
/// <summary>
/// Gets or sets the root directory of the Job Preparation Task on the
/// Compute Node. You can use this path to retrieve files created by
/// the Task, such as log files.
/// </summary>
[JsonProperty(PropertyName = "taskRootDirectory")]
public string TaskRootDirectory { get; set; }
/// <summary>
/// Gets or sets the URL to the root directory of the Job Preparation
/// Task on the Compute Node.
/// </summary>
[JsonProperty(PropertyName = "taskRootDirectoryUrl")]
public string TaskRootDirectoryUrl { get; set; }
/// <summary>
/// Gets or sets the exit code of the program specified on the Task
/// command line.
/// </summary>
/// <remarks>
/// This parameter is returned only if the Task is in the completed
/// state. The exit code for a process reflects the specific convention
/// implemented by the application developer for that process. If you
/// use the exit code value to make decisions in your code, be sure
/// that you know the exit code convention used by the application
/// process. Note that the exit code may also be generated by the
/// Compute Node operating system, such as when a process is forcibly
/// terminated.
/// </remarks>
[JsonProperty(PropertyName = "exitCode")]
public int? ExitCode { get; set; }
/// <summary>
/// Gets or sets information about the container under which the Task
/// is executing.
/// </summary>
/// <remarks>
/// This property is set only if the Task runs in a container context.
/// </remarks>
[JsonProperty(PropertyName = "containerInfo")]
public TaskContainerExecutionInformation ContainerInfo { get; set; }
/// <summary>
/// Gets or sets information describing the Task failure, if any.
/// </summary>
/// <remarks>
/// This property is set only if the Task is in the completed state and
/// encountered a failure.
/// </remarks>
[JsonProperty(PropertyName = "failureInfo")]
public TaskFailureInformation FailureInfo { get; set; }
/// <summary>
/// Gets or sets the number of times the Task has been retried by the
/// Batch service. Task application failures (non-zero exit code) are
/// retried, pre-processing errors (the Task could not be run) and file
/// upload errors are not retried. The Batch service will retry the
/// Task up to the limit specified by the constraints.
/// </summary>
/// <remarks>
/// Task application failures (non-zero exit code) are retried,
/// pre-processing errors (the Task could not be run) and file upload
/// errors are not retried. The Batch service will retry the Task up to
/// the limit specified by the constraints.
/// </remarks>
[JsonProperty(PropertyName = "retryCount")]
public int RetryCount { get; set; }
/// <summary>
/// Gets or sets the most recent time at which a retry of the Job
/// Preparation Task started running.
/// </summary>
/// <remarks>
/// This property is set only if the Task was retried (i.e. retryCount
/// is nonzero). If present, this is typically the same as startTime,
/// but may be different if the Task has been restarted for reasons
/// other than retry; for example, if the Compute Node was rebooted
/// during a retry, then the startTime is updated but the lastRetryTime
/// is not.
/// </remarks>
[JsonProperty(PropertyName = "lastRetryTime")]
public System.DateTime? LastRetryTime { get; set; }
/// <summary>
/// Gets or sets the result of the Task execution.
/// </summary>
/// <remarks>
/// If the value is 'failed', then the details of the failure can be
/// found in the failureInfo property. Possible values include:
/// 'success', 'failure'
/// </remarks>
[JsonProperty(PropertyName = "result")]
public TaskExecutionResult? Result { get; set; }
}
}