/// <summary>
 /// Initializes a new instance of the ComputeNode class.
 /// </summary>
 /// <param name="id">The ID of the Compute Node.</param>
 /// <param name="url">The URL of the Compute Node.</param>
 /// <param name="state">The current state of the Compute Node.</param>
 /// <param name="schedulingState">Whether the Compute Node is available
 /// for Task scheduling.</param>
 /// <param name="stateTransitionTime">The time at which the Compute
 /// Node entered its current state.</param>
 /// <param name="lastBootTime">The last time at which the Compute Node
 /// was started.</param>
 /// <param name="allocationTime">The time at which this Compute Node
 /// was allocated to the Pool.</param>
 /// <param name="ipAddress">The IP address that other Nodes can use to
 /// communicate with this Compute Node.</param>
 /// <param name="affinityId">An identifier which can be passed when
 /// adding a Task to request that the Task be scheduled on this Compute
 /// Node.</param>
 /// <param name="vmSize">The size of the virtual machine hosting the
 /// Compute Node.</param>
 /// <param name="totalTasksRun">The total number of Job Tasks completed
 /// on the Compute Node. This includes Job Manager Tasks and normal
 /// Tasks, but not Job Preparation, Job Release or Start Tasks.</param>
 /// <param name="runningTasksCount">The total number of currently
 /// running Job Tasks on the Compute Node. This includes Job Manager
 /// Tasks and normal Tasks, but not Job Preparation, Job Release or
 /// Start Tasks.</param>
 /// <param name="runningTaskSlotsCount">The total number of scheduling
 /// slots used by currently running Job Tasks on the Compute Node. This
 /// includes Job Manager Tasks and normal Tasks, but not Job
 /// Preparation, Job Release or Start Tasks.</param>
 /// <param name="totalTasksSucceeded">The total number of Job Tasks
 /// which completed successfully (with exitCode 0) on the Compute Node.
 /// This includes Job Manager Tasks and normal Tasks, but not Job
 /// Preparation, Job Release or Start Tasks.</param>
 /// <param name="recentTasks">A list of Tasks whose state has recently
 /// changed.</param>
 /// <param name="startTask">The Task specified to run on the Compute
 /// Node as it joins the Pool.</param>
 /// <param name="startTaskInfo">Runtime information about the execution
 /// of the StartTask on the Compute Node.</param>
 /// <param name="certificateReferences">The list of Certificates
 /// installed on the Compute Node.</param>
 /// <param name="errors">The list of errors that are currently being
 /// encountered by the Compute Node.</param>
 /// <param name="isDedicated">Whether this Compute Node is a dedicated
 /// Compute Node. If false, the Compute Node is a low-priority Compute
 /// Node.</param>
 /// <param name="endpointConfiguration">The endpoint configuration for
 /// the Compute Node.</param>
 /// <param name="nodeAgentInfo">Information about the Compute Node
 /// agent version and the time the Compute Node upgraded to a new
 /// version.</param>
 /// <param name="virtualMachineInfo">Info about the current state of
 /// the virtual machine.</param>
 public ComputeNode(string id = default(string), string url = default(string), ComputeNodeState?state = default(ComputeNodeState?), SchedulingState?schedulingState = default(SchedulingState?), System.DateTime?stateTransitionTime = default(System.DateTime?), System.DateTime?lastBootTime = default(System.DateTime?), System.DateTime?allocationTime = default(System.DateTime?), string ipAddress = default(string), string affinityId = default(string), string vmSize = default(string), int?totalTasksRun = default(int?), int?runningTasksCount = default(int?), int?runningTaskSlotsCount = default(int?), int?totalTasksSucceeded = default(int?), IList <TaskInformation> recentTasks = default(IList <TaskInformation>), StartTask startTask = default(StartTask), StartTaskInformation startTaskInfo = default(StartTaskInformation), IList <CertificateReference> certificateReferences = default(IList <CertificateReference>), IList <ComputeNodeError> errors = default(IList <ComputeNodeError>), bool?isDedicated = default(bool?), ComputeNodeEndpointConfiguration endpointConfiguration = default(ComputeNodeEndpointConfiguration), NodeAgentInformation nodeAgentInfo = default(NodeAgentInformation), VirtualMachineInfo virtualMachineInfo = default(VirtualMachineInfo))
 {
     Id                    = id;
     Url                   = url;
     State                 = state;
     SchedulingState       = schedulingState;
     StateTransitionTime   = stateTransitionTime;
     LastBootTime          = lastBootTime;
     AllocationTime        = allocationTime;
     IpAddress             = ipAddress;
     AffinityId            = affinityId;
     VmSize                = vmSize;
     TotalTasksRun         = totalTasksRun;
     RunningTasksCount     = runningTasksCount;
     RunningTaskSlotsCount = runningTaskSlotsCount;
     TotalTasksSucceeded   = totalTasksSucceeded;
     RecentTasks           = recentTasks;
     StartTask             = startTask;
     StartTaskInfo         = startTaskInfo;
     CertificateReferences = certificateReferences;
     Errors                = errors;
     IsDedicated           = isDedicated;
     EndpointConfiguration = endpointConfiguration;
     NodeAgentInfo         = nodeAgentInfo;
     VirtualMachineInfo    = virtualMachineInfo;
     CustomInit();
 }
 internal StartTaskInformation(Models.StartTaskInformation protocolObject)
 {
     this.endTime         = protocolObject.EndTime;
     this.exitCode        = protocolObject.ExitCode;
     this.lastRetryTime   = protocolObject.LastRetryTime;
     this.retryCount      = protocolObject.RetryCount;
     this.schedulingError = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.SchedulingError, o => new TaskSchedulingError(o).Freeze());
     this.startTime       = protocolObject.StartTime;
     this.state           = UtilitiesInternal.MapEnum <Models.StartTaskState, Common.StartTaskState>(protocolObject.State);
 }
 internal StartTaskInformation(Models.StartTaskInformation protocolObject)
 {
     this.ContainerInformation = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.ContainerInfo, o => new TaskContainerExecutionInformation(o).Freeze());
     this.EndTime            = protocolObject.EndTime;
     this.ExitCode           = protocolObject.ExitCode;
     this.FailureInformation = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.FailureInfo, o => new TaskFailureInformation(o).Freeze());
     this.LastRetryTime      = protocolObject.LastRetryTime;
     this.Result             = UtilitiesInternal.MapNullableEnum <Models.TaskExecutionResult, Common.TaskExecutionResult>(protocolObject.Result);
     this.RetryCount         = protocolObject.RetryCount;
     this.StartTime          = protocolObject.StartTime;
     this.State = UtilitiesInternal.MapEnum <Models.StartTaskState, Common.StartTaskState>(protocolObject.State);
 }
Exemple #4
0
 /// <summary>
 /// Initializes a new instance of the ComputeNode class.
 /// </summary>
 /// <param name="id">The id of the compute node.</param>
 /// <param name="url">The URL of the compute node.</param>
 /// <param name="state">The current state of the compute node.</param>
 /// <param name="schedulingState">Whether the compute node should be
 /// available for task scheduling.</param>
 /// <param name="stateTransitionTime">The time at which the compute
 /// node entered its current state.</param>
 /// <param name="lastBootTime">The time at which the compute node was
 /// started.</param>
 /// <param name="allocationTime">The time at which this compute node
 /// was allocated to the pool.</param>
 /// <param name="ipAddress">The IP address that other compute nodes
 /// can use to communicate with this compute node.</param>
 /// <param name="affinityId">An identifier which can be passed in the
 /// Add Task API to request that the task be scheduled close to this
 /// compute node.</param>
 /// <param name="vmSize">The size of the virtual machine hosting the
 /// compute node.</param>
 /// <param name="totalTasksRun">The total number of job tasks
 /// completed on the compute node. This includes Job Preparation, Job
 /// Release and Job Manager tasks, but not the pool start
 /// task.</param>
 /// <param name="runningTasksCount">The total number of currently
 /// running job tasks on the compute node. This includes Job
 /// Preparation, Job Release, and Job Manager tasks, but not the pool
 /// start task.</param>
 /// <param name="totalTasksSucceeded">The total number of job tasks
 /// which completed successfully (with exitCode 0) on the compute
 /// node. This includes Job Preparation, Job Release, and Job Manager
 /// tasks, but not the pool start task.</param>
 /// <param name="recentTasks">The list of tasks that are currently
 /// running on the compute node.</param>
 /// <param name="startTask">The task specified to run on the compute
 /// node as it joins the pool.</param>
 /// <param name="startTaskInfo">Runtime information about the
 /// execution of the start task on the compute node.</param>
 /// <param name="certificateReferences">The list of certificates
 /// installed on the compute node.</param>
 /// <param name="errors">The list of errors that are currently being
 /// encountered by the compute node.</param>
 public ComputeNode(string id = default(string), string url = default(string), ComputeNodeState?state = default(ComputeNodeState?), SchedulingState?schedulingState = default(SchedulingState?), System.DateTime?stateTransitionTime = default(System.DateTime?), System.DateTime?lastBootTime = default(System.DateTime?), System.DateTime?allocationTime = default(System.DateTime?), string ipAddress = default(string), string affinityId = default(string), string vmSize = default(string), int?totalTasksRun = default(int?), int?runningTasksCount = default(int?), int?totalTasksSucceeded = default(int?), System.Collections.Generic.IList <TaskInformation> recentTasks = default(System.Collections.Generic.IList <TaskInformation>), StartTask startTask = default(StartTask), StartTaskInformation startTaskInfo = default(StartTaskInformation), System.Collections.Generic.IList <CertificateReference> certificateReferences = default(System.Collections.Generic.IList <CertificateReference>), System.Collections.Generic.IList <ComputeNodeError> errors = default(System.Collections.Generic.IList <ComputeNodeError>))
 {
     Id                    = id;
     Url                   = url;
     State                 = state;
     SchedulingState       = schedulingState;
     StateTransitionTime   = stateTransitionTime;
     LastBootTime          = lastBootTime;
     AllocationTime        = allocationTime;
     IpAddress             = ipAddress;
     AffinityId            = affinityId;
     VmSize                = vmSize;
     TotalTasksRun         = totalTasksRun;
     RunningTasksCount     = runningTasksCount;
     TotalTasksSucceeded   = totalTasksSucceeded;
     RecentTasks           = recentTasks;
     StartTask             = startTask;
     StartTaskInfo         = startTaskInfo;
     CertificateReferences = certificateReferences;
     Errors                = errors;
 }