| | 1 | | // <auto-generated> |
| | 2 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 3 | | // Licensed under the MIT License. See License.txt in the project root for |
| | 4 | | // license information. |
| | 5 | | // |
| | 6 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | 7 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | 8 | | // regenerated. |
| | 9 | | // </auto-generated> |
| | 10 | |
|
| | 11 | | namespace Microsoft.Azure.Batch.Protocol.Models |
| | 12 | | { |
| | 13 | | using Newtonsoft.Json; |
| | 14 | | using System.Collections; |
| | 15 | | using System.Collections.Generic; |
| | 16 | | using System.Linq; |
| | 17 | |
|
| | 18 | | /// <summary> |
| | 19 | | /// A Compute Node in the Batch service. |
| | 20 | | /// </summary> |
| | 21 | | public partial class ComputeNode |
| | 22 | | { |
| | 23 | | /// <summary> |
| | 24 | | /// Initializes a new instance of the ComputeNode class. |
| | 25 | | /// </summary> |
| 1003 | 26 | | public ComputeNode() |
| | 27 | | { |
| | 28 | | CustomInit(); |
| 1003 | 29 | | } |
| | 30 | |
|
| | 31 | | /// <summary> |
| | 32 | | /// Initializes a new instance of the ComputeNode class. |
| | 33 | | /// </summary> |
| | 34 | | /// <param name="id">The ID of the Compute Node.</param> |
| | 35 | | /// <param name="url">The URL of the Compute Node.</param> |
| | 36 | | /// <param name="state">The current state of the Compute Node.</param> |
| | 37 | | /// <param name="schedulingState">Whether the Compute Node is available |
| | 38 | | /// for Task scheduling.</param> |
| | 39 | | /// <param name="stateTransitionTime">The time at which the Compute |
| | 40 | | /// Node entered its current state.</param> |
| | 41 | | /// <param name="lastBootTime">The last time at which the Compute Node |
| | 42 | | /// was started.</param> |
| | 43 | | /// <param name="allocationTime">The time at which this Compute Node |
| | 44 | | /// was allocated to the Pool.</param> |
| | 45 | | /// <param name="ipAddress">The IP address that other Nodes can use to |
| | 46 | | /// communicate with this Compute Node.</param> |
| | 47 | | /// <param name="affinityId">An identifier which can be passed when |
| | 48 | | /// adding a Task to request that the Task be scheduled on this Compute |
| | 49 | | /// Node.</param> |
| | 50 | | /// <param name="vmSize">The size of the virtual machine hosting the |
| | 51 | | /// Compute Node.</param> |
| | 52 | | /// <param name="totalTasksRun">The total number of Job Tasks completed |
| | 53 | | /// on the Compute Node. This includes Job Manager Tasks and normal |
| | 54 | | /// Tasks, but not Job Preparation, Job Release or Start Tasks.</param> |
| | 55 | | /// <param name="runningTasksCount">The total number of currently |
| | 56 | | /// running Job Tasks on the Compute Node. This includes Job Manager |
| | 57 | | /// Tasks and normal Tasks, but not Job Preparation, Job Release or |
| | 58 | | /// Start Tasks.</param> |
| | 59 | | /// <param name="totalTasksSucceeded">The total number of Job Tasks |
| | 60 | | /// which completed successfully (with exitCode 0) on the Compute Node. |
| | 61 | | /// This includes Job Manager Tasks and normal Tasks, but not Job |
| | 62 | | /// Preparation, Job Release or Start Tasks.</param> |
| | 63 | | /// <param name="recentTasks">A list of Tasks whose state has recently |
| | 64 | | /// changed.</param> |
| | 65 | | /// <param name="startTask">The Task specified to run on the Compute |
| | 66 | | /// Node as it joins the Pool.</param> |
| | 67 | | /// <param name="startTaskInfo">Runtime information about the execution |
| | 68 | | /// of the StartTask on the Compute Node.</param> |
| | 69 | | /// <param name="certificateReferences">The list of Certificates |
| | 70 | | /// installed on the Compute Node.</param> |
| | 71 | | /// <param name="errors">The list of errors that are currently being |
| | 72 | | /// encountered by the Compute Node.</param> |
| | 73 | | /// <param name="isDedicated">Whether this Compute Node is a dedicated |
| | 74 | | /// Compute Node. If false, the Compute Node is a low-priority Compute |
| | 75 | | /// Node.</param> |
| | 76 | | /// <param name="endpointConfiguration">The endpoint configuration for |
| | 77 | | /// the Compute Node.</param> |
| | 78 | | /// <param name="nodeAgentInfo">Information about the Compute Node |
| | 79 | | /// agent version and the time the Compute Node upgraded to a new |
| | 80 | | /// version.</param> |
| 0 | 81 | | public ComputeNode(string id = default(string), string url = default(string), ComputeNodeState? state = default( |
| | 82 | | { |
| 0 | 83 | | Id = id; |
| 0 | 84 | | Url = url; |
| 0 | 85 | | State = state; |
| 0 | 86 | | SchedulingState = schedulingState; |
| 0 | 87 | | StateTransitionTime = stateTransitionTime; |
| 0 | 88 | | LastBootTime = lastBootTime; |
| 0 | 89 | | AllocationTime = allocationTime; |
| 0 | 90 | | IpAddress = ipAddress; |
| 0 | 91 | | AffinityId = affinityId; |
| 0 | 92 | | VmSize = vmSize; |
| 0 | 93 | | TotalTasksRun = totalTasksRun; |
| 0 | 94 | | RunningTasksCount = runningTasksCount; |
| 0 | 95 | | TotalTasksSucceeded = totalTasksSucceeded; |
| 0 | 96 | | RecentTasks = recentTasks; |
| 0 | 97 | | StartTask = startTask; |
| 0 | 98 | | StartTaskInfo = startTaskInfo; |
| 0 | 99 | | CertificateReferences = certificateReferences; |
| 0 | 100 | | Errors = errors; |
| 0 | 101 | | IsDedicated = isDedicated; |
| 0 | 102 | | EndpointConfiguration = endpointConfiguration; |
| 0 | 103 | | NodeAgentInfo = nodeAgentInfo; |
| | 104 | | CustomInit(); |
| 0 | 105 | | } |
| | 106 | |
|
| | 107 | | /// <summary> |
| | 108 | | /// An initialization method that performs custom operations like setting defaults |
| | 109 | | /// </summary> |
| | 110 | | partial void CustomInit(); |
| | 111 | |
|
| | 112 | | /// <summary> |
| | 113 | | /// Gets or sets the ID of the Compute Node. |
| | 114 | | /// </summary> |
| | 115 | | /// <remarks> |
| | 116 | | /// Every Compute Node that is added to a Pool is assigned a unique ID. |
| | 117 | | /// Whenever a Compute Node is removed from a Pool, all of its local |
| | 118 | | /// files are deleted, and the ID is reclaimed and could be reused for |
| | 119 | | /// new Compute Nodes. |
| | 120 | | /// </remarks> |
| | 121 | | [JsonProperty(PropertyName = "id")] |
| 2514 | 122 | | public string Id { get; set; } |
| | 123 | |
|
| | 124 | | /// <summary> |
| | 125 | | /// Gets or sets the URL of the Compute Node. |
| | 126 | | /// </summary> |
| | 127 | | [JsonProperty(PropertyName = "url")] |
| 2483 | 128 | | public string Url { get; set; } |
| | 129 | |
|
| | 130 | | /// <summary> |
| | 131 | | /// Gets or sets the current state of the Compute Node. |
| | 132 | | /// </summary> |
| | 133 | | /// <remarks> |
| | 134 | | /// The low-priority Compute Node has been preempted. Tasks which were |
| | 135 | | /// running on the Compute Node when it was preempted will be |
| | 136 | | /// rescheduled when another Compute Node becomes available. Possible |
| | 137 | | /// values include: 'idle', 'rebooting', 'reimaging', 'running', |
| | 138 | | /// 'unusable', 'creating', 'starting', 'waitingForStartTask', |
| | 139 | | /// 'startTaskFailed', 'unknown', 'leavingPool', 'offline', 'preempted' |
| | 140 | | /// </remarks> |
| | 141 | | [JsonProperty(PropertyName = "state")] |
| 2488 | 142 | | public ComputeNodeState? State { get; set; } |
| | 143 | |
|
| | 144 | | /// <summary> |
| | 145 | | /// Gets or sets whether the Compute Node is available for Task |
| | 146 | | /// scheduling. |
| | 147 | | /// </summary> |
| | 148 | | /// <remarks> |
| | 149 | | /// Possible values include: 'enabled', 'disabled' |
| | 150 | | /// </remarks> |
| | 151 | | [JsonProperty(PropertyName = "schedulingState")] |
| 2484 | 152 | | public SchedulingState? SchedulingState { get; set; } |
| | 153 | |
|
| | 154 | | /// <summary> |
| | 155 | | /// Gets or sets the time at which the Compute Node entered its current |
| | 156 | | /// state. |
| | 157 | | /// </summary> |
| | 158 | | [JsonProperty(PropertyName = "stateTransitionTime")] |
| 2502 | 159 | | public System.DateTime? StateTransitionTime { get; set; } |
| | 160 | |
|
| | 161 | | /// <summary> |
| | 162 | | /// Gets or sets the last time at which the Compute Node was started. |
| | 163 | | /// </summary> |
| | 164 | | /// <remarks> |
| | 165 | | /// This property may not be present if the Compute Node state is |
| | 166 | | /// unusable. |
| | 167 | | /// </remarks> |
| | 168 | | [JsonProperty(PropertyName = "lastBootTime")] |
| 2509 | 169 | | public System.DateTime? LastBootTime { get; set; } |
| | 170 | |
|
| | 171 | | /// <summary> |
| | 172 | | /// Gets or sets the time at which this Compute Node was allocated to |
| | 173 | | /// the Pool. |
| | 174 | | /// </summary> |
| | 175 | | /// <remarks> |
| | 176 | | /// This is the time when the Compute Node was initially allocated and |
| | 177 | | /// doesn't change once set. It is not updated when the Compute Node is |
| | 178 | | /// service healed or preempted. |
| | 179 | | /// </remarks> |
| | 180 | | [JsonProperty(PropertyName = "allocationTime")] |
| 2513 | 181 | | public System.DateTime? AllocationTime { get; set; } |
| | 182 | |
|
| | 183 | | /// <summary> |
| | 184 | | /// Gets or sets the IP address that other Nodes can use to communicate |
| | 185 | | /// with this Compute Node. |
| | 186 | | /// </summary> |
| | 187 | | /// <remarks> |
| | 188 | | /// Every Compute Node that is added to a Pool is assigned a unique IP |
| | 189 | | /// address. Whenever a Compute Node is removed from a Pool, all of its |
| | 190 | | /// local files are deleted, and the IP address is reclaimed and could |
| | 191 | | /// be reused for new Compute Nodes. |
| | 192 | | /// </remarks> |
| | 193 | | [JsonProperty(PropertyName = "ipAddress")] |
| 2491 | 194 | | public string IpAddress { get; set; } |
| | 195 | |
|
| | 196 | | /// <summary> |
| | 197 | | /// Gets or sets an identifier which can be passed when adding a Task |
| | 198 | | /// to request that the Task be scheduled on this Compute Node. |
| | 199 | | /// </summary> |
| | 200 | | /// <remarks> |
| | 201 | | /// Note that this is just a soft affinity. If the target Compute Node |
| | 202 | | /// is busy or unavailable at the time the Task is scheduled, then the |
| | 203 | | /// Task will be scheduled elsewhere. |
| | 204 | | /// </remarks> |
| | 205 | | [JsonProperty(PropertyName = "affinityId")] |
| 2486 | 206 | | public string AffinityId { get; set; } |
| | 207 | |
|
| | 208 | | /// <summary> |
| | 209 | | /// Gets or sets the size of the virtual machine hosting the Compute |
| | 210 | | /// Node. |
| | 211 | | /// </summary> |
| | 212 | | /// <remarks> |
| | 213 | | /// For information about available sizes of virtual machines in Pools, |
| | 214 | | /// see Choose a VM size for Compute Nodes in an Azure Batch Pool |
| | 215 | | /// (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). |
| | 216 | | /// </remarks> |
| | 217 | | [JsonProperty(PropertyName = "vmSize")] |
| 2505 | 218 | | public string VmSize { get; set; } |
| | 219 | |
|
| | 220 | | /// <summary> |
| | 221 | | /// Gets or sets the total number of Job Tasks completed on the Compute |
| | 222 | | /// Node. This includes Job Manager Tasks and normal Tasks, but not Job |
| | 223 | | /// Preparation, Job Release or Start Tasks. |
| | 224 | | /// </summary> |
| | 225 | | [JsonProperty(PropertyName = "totalTasksRun")] |
| 2506 | 226 | | public int? TotalTasksRun { get; set; } |
| | 227 | |
|
| | 228 | | /// <summary> |
| | 229 | | /// Gets or sets the total number of currently running Job Tasks on the |
| | 230 | | /// Compute Node. This includes Job Manager Tasks and normal Tasks, but |
| | 231 | | /// not Job Preparation, Job Release or Start Tasks. |
| | 232 | | /// </summary> |
| | 233 | | [JsonProperty(PropertyName = "runningTasksCount")] |
| 2509 | 234 | | public int? RunningTasksCount { get; set; } |
| | 235 | |
|
| | 236 | | /// <summary> |
| | 237 | | /// Gets or sets the total number of Job Tasks which completed |
| | 238 | | /// successfully (with exitCode 0) on the Compute Node. This includes |
| | 239 | | /// Job Manager Tasks and normal Tasks, but not Job Preparation, Job |
| | 240 | | /// Release or Start Tasks. |
| | 241 | | /// </summary> |
| | 242 | | [JsonProperty(PropertyName = "totalTasksSucceeded")] |
| 2499 | 243 | | public int? TotalTasksSucceeded { get; set; } |
| | 244 | |
|
| | 245 | | /// <summary> |
| | 246 | | /// Gets or sets a list of Tasks whose state has recently changed. |
| | 247 | | /// </summary> |
| | 248 | | /// <remarks> |
| | 249 | | /// This property is present only if at least one Task has run on this |
| | 250 | | /// Compute Node since it was assigned to the Pool. |
| | 251 | | /// </remarks> |
| | 252 | | [JsonProperty(PropertyName = "recentTasks")] |
| 2497 | 253 | | public IList<TaskInformation> RecentTasks { get; set; } |
| | 254 | |
|
| | 255 | | /// <summary> |
| | 256 | | /// Gets or sets the Task specified to run on the Compute Node as it |
| | 257 | | /// joins the Pool. |
| | 258 | | /// </summary> |
| | 259 | | [JsonProperty(PropertyName = "startTask")] |
| 2511 | 260 | | public StartTask StartTask { get; set; } |
| | 261 | |
|
| | 262 | | /// <summary> |
| | 263 | | /// Gets or sets runtime information about the execution of the |
| | 264 | | /// StartTask on the Compute Node. |
| | 265 | | /// </summary> |
| | 266 | | [JsonProperty(PropertyName = "startTaskInfo")] |
| 2506 | 267 | | public StartTaskInformation StartTaskInfo { get; set; } |
| | 268 | |
|
| | 269 | | /// <summary> |
| | 270 | | /// Gets or sets the list of Certificates installed on the Compute |
| | 271 | | /// Node. |
| | 272 | | /// </summary> |
| | 273 | | /// <remarks> |
| | 274 | | /// For Windows Nodes, the Batch service installs the Certificates to |
| | 275 | | /// the specified Certificate store and location. For Linux Compute |
| | 276 | | /// Nodes, the Certificates are stored in a directory inside the Task |
| | 277 | | /// working directory and an environment variable |
| | 278 | | /// AZ_BATCH_CERTIFICATES_DIR is supplied to the Task to query for this |
| | 279 | | /// location. For Certificates with visibility of 'remoteUser', a |
| | 280 | | /// 'certs' directory is created in the user's home directory (e.g., |
| | 281 | | /// /home/{user-name}/certs) and Certificates are placed in that |
| | 282 | | /// directory. |
| | 283 | | /// </remarks> |
| | 284 | | [JsonProperty(PropertyName = "certificateReferences")] |
| 2496 | 285 | | public IList<CertificateReference> CertificateReferences { get; set; } |
| | 286 | |
|
| | 287 | | /// <summary> |
| | 288 | | /// Gets or sets the list of errors that are currently being |
| | 289 | | /// encountered by the Compute Node. |
| | 290 | | /// </summary> |
| | 291 | | [JsonProperty(PropertyName = "errors")] |
| 2498 | 292 | | public IList<ComputeNodeError> Errors { get; set; } |
| | 293 | |
|
| | 294 | | /// <summary> |
| | 295 | | /// Gets or sets whether this Compute Node is a dedicated Compute Node. |
| | 296 | | /// If false, the Compute Node is a low-priority Compute Node. |
| | 297 | | /// </summary> |
| | 298 | | [JsonProperty(PropertyName = "isDedicated")] |
| 2517 | 299 | | public bool? IsDedicated { get; set; } |
| | 300 | |
|
| | 301 | | /// <summary> |
| | 302 | | /// Gets or sets the endpoint configuration for the Compute Node. |
| | 303 | | /// </summary> |
| | 304 | | [JsonProperty(PropertyName = "endpointConfiguration")] |
| 2491 | 305 | | public ComputeNodeEndpointConfiguration EndpointConfiguration { get; set; } |
| | 306 | |
|
| | 307 | | /// <summary> |
| | 308 | | /// Gets or sets information about the Compute Node agent version and |
| | 309 | | /// the time the Compute Node upgraded to a new version. |
| | 310 | | /// </summary> |
| | 311 | | [JsonProperty(PropertyName = "nodeAgentInfo")] |
| 2509 | 312 | | public NodeAgentInformation NodeAgentInfo { get; set; } |
| | 313 | |
|
| | 314 | | } |
| | 315 | | } |