| | 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 | | /// Details about the execution of a <see cref="CloudJob.JobPreparationTask">Job Preparation task</see> on a compute |
| | 22 | | /// node. |
| | 23 | | /// </summary> |
| | 24 | | public partial class JobPreparationTaskExecutionInformation : IPropertyMetadata |
| | 25 | | { |
| | 26 | | #region Constructors |
| | 27 | |
|
| 491 | 28 | | internal JobPreparationTaskExecutionInformation(Models.JobPreparationTaskExecutionInformation protocolObject) |
| | 29 | | { |
| 714 | 30 | | this.ContainerInformation = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.ContainerInfo, o => n |
| 491 | 31 | | this.EndTime = protocolObject.EndTime; |
| 491 | 32 | | this.ExitCode = protocolObject.ExitCode; |
| 711 | 33 | | this.FailureInformation = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.FailureInfo, o => new T |
| 491 | 34 | | this.LastRetryTime = protocolObject.LastRetryTime; |
| 491 | 35 | | this.Result = UtilitiesInternal.MapNullableEnum<Models.TaskExecutionResult, Common.TaskExecutionResult>(prot |
| 491 | 36 | | this.RetryCount = protocolObject.RetryCount; |
| 491 | 37 | | this.StartTime = protocolObject.StartTime; |
| 491 | 38 | | this.State = UtilitiesInternal.MapEnum<Models.JobPreparationTaskState, Common.JobPreparationTaskState>(proto |
| 491 | 39 | | this.TaskRootDirectory = protocolObject.TaskRootDirectory; |
| 491 | 40 | | this.TaskRootDirectoryUrl = protocolObject.TaskRootDirectoryUrl; |
| 491 | 41 | | } |
| | 42 | |
|
| | 43 | | #endregion Constructors |
| | 44 | |
|
| | 45 | | #region JobPreparationTaskExecutionInformation |
| | 46 | |
|
| | 47 | | /// <summary> |
| | 48 | | /// Gets information about the container under which the task is executing. |
| | 49 | | /// </summary> |
| | 50 | | /// <remarks> |
| | 51 | | /// This property is set only if the task runs in a container context. |
| | 52 | | /// </remarks> |
| 490 | 53 | | public TaskContainerExecutionInformation ContainerInformation { get; } |
| | 54 | |
|
| | 55 | | /// <summary> |
| | 56 | | /// Gets the time at which the task completed. |
| | 57 | | /// </summary> |
| | 58 | | /// <remarks> |
| | 59 | | /// This property is only returned if the task is in the <see cref="Common.JobPreparationTaskState.Completed"/> |
| | 60 | | /// </remarks> |
| 490 | 61 | | public DateTime? EndTime { get; } |
| | 62 | |
|
| | 63 | | /// <summary> |
| | 64 | | /// Gets the exit code of the program specified on the task command line. |
| | 65 | | /// </summary> |
| | 66 | | /// <remarks> |
| | 67 | | /// This property is only returned if the task is in the <see cref="Common.JobPreparationTaskState.Completed"/> |
| | 68 | | /// The exit code for a process reflects the specific convention implemented by the application developer for th |
| | 69 | | /// process. If you use the exit code value to make decisions in your code, be sure that you know the exit code |
| | 70 | | /// used by the application process. Note that the exit code may also be generated by the compute node operating |
| | 71 | | /// system, such as when a process is forcibly terminated. |
| | 72 | | /// </remarks> |
| 490 | 73 | | public int? ExitCode { get; } |
| | 74 | |
|
| | 75 | | /// <summary> |
| | 76 | | /// Gets information describing the task failure, if any. |
| | 77 | | /// </summary> |
| | 78 | | /// <remarks> |
| | 79 | | /// This property is set only if the task is in the <see cref="Common.JobPreparationTaskState.Completed"/> state |
| | 80 | | /// and encountered a failure. |
| | 81 | | /// </remarks> |
| 490 | 82 | | public TaskFailureInformation FailureInformation { get; } |
| | 83 | |
|
| | 84 | | /// <summary> |
| | 85 | | /// Gets the most recent time at which this task's execution was retried by the Batch service. |
| | 86 | | /// </summary> |
| | 87 | | /// <remarks> |
| | 88 | | /// This is only returned if the <see cref="RetryCount"/> is not 0. |
| | 89 | | /// </remarks> |
| 490 | 90 | | public DateTime? LastRetryTime { get; } |
| | 91 | |
|
| | 92 | | /// <summary> |
| | 93 | | /// Gets the result of the task execution. |
| | 94 | | /// </summary> |
| | 95 | | /// <remarks> |
| | 96 | | /// If the value is <see cref="Common.TaskExecutionResult.Failure" />, then the details of the failure can be fo |
| | 97 | | /// in the <see cref="FailureInformation" /> property. |
| | 98 | | /// </remarks> |
| 490 | 99 | | public Common.TaskExecutionResult? Result { get; } |
| | 100 | |
|
| | 101 | | /// <summary> |
| | 102 | | /// Gets the number of times the task has been retried by the Batch service. Every time the task exits with a no |
| | 103 | | /// exit code, it is deemed a task failure. The Batch service will retry the task up to the limit specified by t |
| | 104 | | /// <see cref="JobPreparationTask.Constraints"/>. |
| | 105 | | /// </summary> |
| 490 | 106 | | public int RetryCount { get; } |
| | 107 | |
|
| | 108 | | /// <summary> |
| | 109 | | /// Gets the time at which the task started running. Note that every time the task is restarted, this value is u |
| | 110 | | /// </summary> |
| 490 | 111 | | public DateTime StartTime { get; } |
| | 112 | |
|
| | 113 | | /// <summary> |
| | 114 | | /// Gets the current state of the task. |
| | 115 | | /// </summary> |
| | 116 | | /// <remarks> |
| | 117 | | /// Running means the task is currently running. Completed means the task has completed. The Completed state inc |
| | 118 | | /// the case where the task exits successfully with exit code 0 and the cases where the system fails to start th |
| | 119 | | /// task process due to scheduling errors or the retry limit has reached after numerous task failures. |
| | 120 | | /// </remarks> |
| 490 | 121 | | public Common.JobPreparationTaskState State { get; } |
| | 122 | |
|
| | 123 | | /// <summary> |
| | 124 | | /// Gets the root directory of the Job Preparation task on the compute node. You can use this path to retrieve f |
| | 125 | | /// created by the task, such as log files. |
| | 126 | | /// </summary> |
| 490 | 127 | | public string TaskRootDirectory { get; } |
| | 128 | |
|
| | 129 | | /// <summary> |
| | 130 | | /// Gets the URL to the root directory of the Job Preparation task on the compute node. |
| | 131 | | /// </summary> |
| 490 | 132 | | public string TaskRootDirectoryUrl { get; } |
| | 133 | |
|
| | 134 | | #endregion // JobPreparationTaskExecutionInformation |
| | 135 | |
|
| | 136 | | #region IPropertyMetadata |
| | 137 | |
|
| | 138 | | bool IModifiable.HasBeenModified |
| | 139 | | { |
| | 140 | | //This class is compile time readonly so it cannot have been modified |
| 0 | 141 | | get { return false; } |
| | 142 | | } |
| | 143 | |
|
| | 144 | | bool IReadOnly.IsReadOnly |
| | 145 | | { |
| 0 | 146 | | get { return true; } |
| | 147 | | set |
| | 148 | | { |
| | 149 | | // This class is compile time readonly already |
| 491 | 150 | | } |
| | 151 | | } |
| | 152 | |
|
| | 153 | | #endregion // IPropertyMetadata |
| | 154 | | } |
| | 155 | | } |