| | 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 | | /// Information about an Azure Batch subtask. |
| | 22 | | /// </summary> |
| | 23 | | public partial class SubtaskInformation : IPropertyMetadata |
| | 24 | | { |
| | 25 | | #region Constructors |
| | 26 | |
|
| 1 | 27 | | internal SubtaskInformation(Models.SubtaskInformation protocolObject) |
| | 28 | | { |
| 0 | 29 | | this.ComputeNodeInformation = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.NodeInfo, o => new |
| 0 | 30 | | this.ContainerInformation = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.ContainerInfo, o => n |
| 1 | 31 | | this.EndTime = protocolObject.EndTime; |
| 1 | 32 | | this.ExitCode = protocolObject.ExitCode; |
| 0 | 33 | | this.FailureInformation = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.FailureInfo, o => new T |
| 1 | 34 | | this.Id = protocolObject.Id; |
| 1 | 35 | | this.PreviousState = UtilitiesInternal.MapNullableEnum<Models.SubtaskState, Common.SubtaskState>(protocolObj |
| 1 | 36 | | this.PreviousStateTransitionTime = protocolObject.PreviousStateTransitionTime; |
| 1 | 37 | | this.Result = UtilitiesInternal.MapNullableEnum<Models.TaskExecutionResult, Common.TaskExecutionResult>(prot |
| 1 | 38 | | this.StartTime = protocolObject.StartTime; |
| 1 | 39 | | this.State = UtilitiesInternal.MapNullableEnum<Models.SubtaskState, Common.SubtaskState>(protocolObject.Stat |
| 1 | 40 | | this.StateTransitionTime = protocolObject.StateTransitionTime; |
| 1 | 41 | | } |
| | 42 | |
|
| | 43 | | #endregion Constructors |
| | 44 | |
|
| | 45 | | #region SubtaskInformation |
| | 46 | |
|
| | 47 | | /// <summary> |
| | 48 | | /// Gets the information about the compute node on which the subtask ran. |
| | 49 | | /// </summary> |
| 1 | 50 | | public ComputeNodeInformation ComputeNodeInformation { get; } |
| | 51 | |
|
| | 52 | | /// <summary> |
| | 53 | | /// Gets information about the container under which the task is executing. |
| | 54 | | /// </summary> |
| | 55 | | /// <remarks> |
| | 56 | | /// This property is set only if the task runs in a container context. |
| | 57 | | /// </remarks> |
| 1 | 58 | | public TaskContainerExecutionInformation ContainerInformation { get; } |
| | 59 | |
|
| | 60 | | /// <summary> |
| | 61 | | /// Gets the time at which the subtask completed. This property is set only if the subtask is in the <see cref=" |
| | 62 | | /// state. |
| | 63 | | /// </summary> |
| 1 | 64 | | public DateTime? EndTime { get; } |
| | 65 | |
|
| | 66 | | /// <summary> |
| | 67 | | /// Gets the exit code of the program specified on the subtask command line. |
| | 68 | | /// </summary> |
| | 69 | | /// <remarks> |
| | 70 | | /// This property is only returned if the subtask is in the <see cref="Common.SubtaskState.Completed"/> state. T |
| | 71 | | /// exit code for a process reflects the specific convention implemented by the application developer for that p |
| | 72 | | /// If you use the exit code value to make decisions in your code, be sure that you know the exit code conventio |
| | 73 | | /// used by the application process. Note that the exit code may also be generated by the compute node operating |
| | 74 | | /// system, such as when a process is forcibly terminated. |
| | 75 | | /// </remarks> |
| 1 | 76 | | public int? ExitCode { get; } |
| | 77 | |
|
| | 78 | | /// <summary> |
| | 79 | | /// Gets information describing the task failure, if any. |
| | 80 | | /// </summary> |
| 1 | 81 | | public TaskFailureInformation FailureInformation { get; } |
| | 82 | |
|
| | 83 | | /// <summary> |
| | 84 | | /// Gets the id of the subtask. |
| | 85 | | /// </summary> |
| 1 | 86 | | public int? Id { get; } |
| | 87 | |
|
| | 88 | | /// <summary> |
| | 89 | | /// Gets the previous state of the subtask. This property is not set if the subtask is in its initial <see cref= |
| | 90 | | /// state. |
| | 91 | | /// </summary> |
| 1 | 92 | | public Common.SubtaskState? PreviousState { get; } |
| | 93 | |
|
| | 94 | | /// <summary> |
| | 95 | | /// Gets the time at which the subtask entered its previous state. This property is not set if the subtask is in |
| | 96 | | /// its initial <see cref="Common.SubtaskState.Running"/> state. |
| | 97 | | /// </summary> |
| 1 | 98 | | public DateTime? PreviousStateTransitionTime { get; } |
| | 99 | |
|
| | 100 | | /// <summary> |
| | 101 | | /// Gets the result of the task execution. |
| | 102 | | /// </summary> |
| | 103 | | /// <remarks> |
| | 104 | | /// If the value is <see cref="Common.TaskExecutionResult.Failure" />, then the details of the failure can be fo |
| | 105 | | /// in the <see cref="FailureInformation" /> property. |
| | 106 | | /// </remarks> |
| 1 | 107 | | public Common.TaskExecutionResult? Result { get; } |
| | 108 | |
|
| | 109 | | /// <summary> |
| | 110 | | /// Gets the time at which the subtask started running. If the subtask has been restarted or retried, this is th |
| | 111 | | /// most recent time at which the subtask started running. |
| | 112 | | /// </summary> |
| 1 | 113 | | public DateTime? StartTime { get; } |
| | 114 | |
|
| | 115 | | /// <summary> |
| | 116 | | /// Gets the current state of the subtask. |
| | 117 | | /// </summary> |
| 1 | 118 | | public Common.SubtaskState? State { get; } |
| | 119 | |
|
| | 120 | | /// <summary> |
| | 121 | | /// Gets the time at which the subtask entered its current state. |
| | 122 | | /// </summary> |
| 1 | 123 | | public DateTime? StateTransitionTime { get; } |
| | 124 | |
|
| | 125 | | #endregion // SubtaskInformation |
| | 126 | |
|
| | 127 | | #region IPropertyMetadata |
| | 128 | |
|
| | 129 | | bool IModifiable.HasBeenModified |
| | 130 | | { |
| | 131 | | //This class is compile time readonly so it cannot have been modified |
| 0 | 132 | | get { return false; } |
| | 133 | | } |
| | 134 | |
|
| | 135 | | bool IReadOnly.IsReadOnly |
| | 136 | | { |
| 0 | 137 | | get { return true; } |
| | 138 | | set |
| | 139 | | { |
| | 140 | | // This class is compile time readonly already |
| 1 | 141 | | } |
| | 142 | | } |
| | 143 | |
|
| | 144 | | #endregion // IPropertyMetadata |
| | 145 | | } |
| | 146 | | } |