| | 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 | | /// Specifies the detailed runtime information of the start task, including current state, error details, exit code, |
| | 22 | | /// start time, end time, etc. |
| | 23 | | /// </summary> |
| | 24 | | public partial class StartTaskInformation : IPropertyMetadata |
| | 25 | | { |
| | 26 | | #region Constructors |
| | 27 | |
|
| 504 | 28 | | internal StartTaskInformation(Models.StartTaskInformation protocolObject) |
| | 29 | | { |
| 761 | 30 | | this.ContainerInformation = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.ContainerInfo, o => n |
| 504 | 31 | | this.EndTime = protocolObject.EndTime; |
| 504 | 32 | | this.ExitCode = protocolObject.ExitCode; |
| 742 | 33 | | this.FailureInformation = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.FailureInfo, o => new T |
| 504 | 34 | | this.LastRetryTime = protocolObject.LastRetryTime; |
| 504 | 35 | | this.Result = UtilitiesInternal.MapNullableEnum<Models.TaskExecutionResult, Common.TaskExecutionResult>(prot |
| 504 | 36 | | this.RetryCount = protocolObject.RetryCount; |
| 504 | 37 | | this.StartTime = protocolObject.StartTime; |
| 504 | 38 | | this.State = UtilitiesInternal.MapEnum<Models.StartTaskState, Common.StartTaskState>(protocolObject.State); |
| 504 | 39 | | } |
| | 40 | |
|
| | 41 | | #endregion Constructors |
| | 42 | |
|
| | 43 | | #region StartTaskInformation |
| | 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> |
| 504 | 51 | | public TaskContainerExecutionInformation ContainerInformation { get; } |
| | 52 | |
|
| | 53 | | /// <summary> |
| | 54 | | /// Gets the time at which the task completed. |
| | 55 | | /// </summary> |
| 504 | 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.StartTaskState.Completed"/> state. Th |
| | 63 | | /// exit code for a process reflects the specific convention implemented by the application developer for that p |
| | 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> |
| 504 | 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.StartTaskState.Completed"/> state and enco |
| | 75 | | /// a failure. |
| | 76 | | /// </remarks> |
| 504 | 77 | | public TaskFailureInformation FailureInformation { get; } |
| | 78 | |
|
| | 79 | | /// <summary> |
| | 80 | | /// Gets the most recent time at which execution of the start task was retried by the Batch service. |
| | 81 | | /// </summary> |
| 504 | 82 | | public DateTime? LastRetryTime { get; } |
| | 83 | |
|
| | 84 | | /// <summary> |
| | 85 | | /// Gets the result of the task execution. |
| | 86 | | /// </summary> |
| | 87 | | /// <remarks> |
| | 88 | | /// If the value is <see cref="Common.TaskExecutionResult.Failure" />, then the details of the failure can be fo |
| | 89 | | /// in the <see cref="FailureInformation" /> property. |
| | 90 | | /// </remarks> |
| 504 | 91 | | public Common.TaskExecutionResult? Result { get; } |
| | 92 | |
|
| | 93 | | /// <summary> |
| | 94 | | /// Gets the number of times the start task has been retried by the Batch system. |
| | 95 | | /// </summary> |
| 504 | 96 | | public int RetryCount { get; } |
| | 97 | |
|
| | 98 | | /// <summary> |
| | 99 | | /// Gets the time at which the task started running. |
| | 100 | | /// </summary> |
| 504 | 101 | | public DateTime StartTime { get; } |
| | 102 | |
|
| | 103 | | /// <summary> |
| | 104 | | /// Gets the current running state of the start task. |
| | 105 | | /// </summary> |
| 504 | 106 | | public Common.StartTaskState State { get; } |
| | 107 | |
|
| | 108 | | #endregion // StartTaskInformation |
| | 109 | |
|
| | 110 | | #region IPropertyMetadata |
| | 111 | |
|
| | 112 | | bool IModifiable.HasBeenModified |
| | 113 | | { |
| | 114 | | //This class is compile time readonly so it cannot have been modified |
| 0 | 115 | | get { return false; } |
| | 116 | | } |
| | 117 | |
|
| | 118 | | bool IReadOnly.IsReadOnly |
| | 119 | | { |
| 0 | 120 | | get { return true; } |
| | 121 | | set |
| | 122 | | { |
| | 123 | | // This class is compile time readonly already |
| 504 | 124 | | } |
| | 125 | | } |
| | 126 | |
|
| | 127 | | #endregion // IPropertyMetadata |
| | 128 | | } |
| | 129 | | } |