| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. See License.txt in the project root for license information. |
| | 3 | | // |
| | 4 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | 5 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | 6 | | // regenerated. |
| | 7 | |
|
| | 8 | | // |
| | 9 | | // This file was autogenerated by a tool. |
| | 10 | | // Do not modify it. |
| | 11 | | // |
| | 12 | |
|
| | 13 | | namespace Microsoft.Azure.Batch |
| | 14 | | { |
| | 15 | | using Models = Microsoft.Azure.Batch.Protocol.Models; |
| | 16 | | using System; |
| | 17 | | using System.Collections.Generic; |
| | 18 | | using System.Linq; |
| | 19 | |
|
| | 20 | | /// <summary> |
| | 21 | | /// Task execution information. |
| | 22 | | /// </summary> |
| | 23 | | public partial class TaskExecutionInformation : IPropertyMetadata |
| | 24 | | { |
| | 25 | | #region Constructors |
| | 26 | |
|
| 1572 | 27 | | internal TaskExecutionInformation(Models.TaskExecutionInformation protocolObject) |
| | 28 | | { |
| 2350 | 29 | | this.ContainerInformation = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.ContainerInfo, o => n |
| 1572 | 30 | | this.EndTime = protocolObject.EndTime; |
| 1572 | 31 | | this.ExitCode = protocolObject.ExitCode; |
| 2368 | 32 | | this.FailureInformation = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.FailureInfo, o => new T |
| 1572 | 33 | | this.LastRequeueTime = protocolObject.LastRequeueTime; |
| 1572 | 34 | | this.LastRetryTime = protocolObject.LastRetryTime; |
| 1572 | 35 | | this.RequeueCount = protocolObject.RequeueCount; |
| 1572 | 36 | | this.Result = UtilitiesInternal.MapNullableEnum<Models.TaskExecutionResult, Common.TaskExecutionResult>(prot |
| 1572 | 37 | | this.RetryCount = protocolObject.RetryCount; |
| 1572 | 38 | | this.StartTime = protocolObject.StartTime; |
| 1572 | 39 | | } |
| | 40 | |
|
| | 41 | | #endregion Constructors |
| | 42 | |
|
| | 43 | | #region TaskExecutionInformation |
| | 44 | |
|
| | 45 | | /// <summary> |
| | 46 | | /// Gets information about the container under which the task is executing. |
| | 47 | | /// </summary> |
| | 48 | | /// <remarks> |
| | 49 | | /// This property is set only if the task runs in a container context. |
| | 50 | | /// </remarks> |
| 1571 | 51 | | public TaskContainerExecutionInformation ContainerInformation { get; } |
| | 52 | |
|
| | 53 | | /// <summary> |
| | 54 | | /// Gets the time at which the task completed. |
| | 55 | | /// </summary> |
| 1571 | 56 | | public DateTime? EndTime { get; } |
| | 57 | |
|
| | 58 | | /// <summary> |
| | 59 | | /// Gets the exit code of the program specified on the task command line. |
| | 60 | | /// </summary> |
| | 61 | | /// <remarks> |
| | 62 | | /// This property is only returned if the task is in the <see cref="Common.TaskState.Completed"/> state. The exi |
| | 63 | | /// code for a process reflects the specific convention implemented by the application developer for that proces |
| | 64 | | /// If you use the exit code value to make decisions in your code, be sure that you know the exit code conventio |
| | 65 | | /// used by the application process. Note that the exit code may also be generated by the compute node operating |
| | 66 | | /// system, such as when a process is forcibly terminated. |
| | 67 | | /// </remarks> |
| 1571 | 68 | | public int? ExitCode { get; } |
| | 69 | |
|
| | 70 | | /// <summary> |
| | 71 | | /// Gets information describing the task failure, if any. |
| | 72 | | /// </summary> |
| | 73 | | /// <remarks> |
| | 74 | | /// This property is set only if the task is in the <see cref="Common.TaskState.Completed"/> state and encounter |
| | 75 | | /// a failure. |
| | 76 | | /// </remarks> |
| 1571 | 77 | | public TaskFailureInformation FailureInformation { get; } |
| | 78 | |
|
| | 79 | | /// <summary> |
| | 80 | | /// Gets the most recent time at which this task's execution was re-queued by the Batch service per user request |
| | 81 | | /// </summary> |
| 1571 | 82 | | public DateTime? LastRequeueTime { get; } |
| | 83 | |
|
| | 84 | | /// <summary> |
| | 85 | | /// Gets the most recent time at which this task's execution was retried by the Batch service. |
| | 86 | | /// </summary> |
| 1571 | 87 | | public DateTime? LastRetryTime { get; } |
| | 88 | |
|
| | 89 | | /// <summary> |
| | 90 | | /// Gets the number of times this task's execution was re-queued by the Batch service per user request. |
| | 91 | | /// </summary> |
| 1571 | 92 | | public int RequeueCount { get; } |
| | 93 | |
|
| | 94 | | /// <summary> |
| | 95 | | /// Gets the result of the task execution. |
| | 96 | | /// </summary> |
| | 97 | | /// <remarks> |
| | 98 | | /// If the value is <see cref="Common.TaskExecutionResult.Failure" />, then the details of the failure can be fo |
| | 99 | | /// in the <see cref="FailureInformation" /> property. |
| | 100 | | /// </remarks> |
| 1571 | 101 | | public Common.TaskExecutionResult? Result { get; } |
| | 102 | |
|
| | 103 | | /// <summary> |
| | 104 | | /// Gets the number of times the task has been retried by the Batch service. |
| | 105 | | /// </summary> |
| | 106 | | /// <remarks> |
| | 107 | | /// Task application failures (non-zero exit code) are retried, pre-processing errors (the task could not be run |
| | 108 | | /// and file upload errors are not retried. The Batch service will retry the task up to the specified <see cref= |
| | 109 | | /// />. |
| | 110 | | /// </remarks> |
| 1571 | 111 | | public int RetryCount { get; } |
| | 112 | |
|
| | 113 | | /// <summary> |
| | 114 | | /// Gets the time at which the task started running. |
| | 115 | | /// </summary> |
| 1571 | 116 | | public DateTime? StartTime { get; } |
| | 117 | |
|
| | 118 | | #endregion // TaskExecutionInformation |
| | 119 | |
|
| | 120 | | #region IPropertyMetadata |
| | 121 | |
|
| | 122 | | bool IModifiable.HasBeenModified |
| | 123 | | { |
| | 124 | | //This class is compile time readonly so it cannot have been modified |
| 0 | 125 | | get { return false; } |
| | 126 | | } |
| | 127 | |
|
| | 128 | | bool IReadOnly.IsReadOnly |
| | 129 | | { |
| 0 | 130 | | get { return true; } |
| | 131 | | set |
| | 132 | | { |
| | 133 | | // This class is compile time readonly already |
| 1572 | 134 | | } |
| | 135 | | } |
| | 136 | |
|
| | 137 | | #endregion // IPropertyMetadata |
| | 138 | | } |
| | 139 | | } |