/// <summary> /// Initializes a new instance of the CloudJob class. /// </summary> /// <param name="id">A string that uniquely identifies the Job within /// the Account.</param> /// <param name="displayName">The display name for the Job.</param> /// <param name="usesTaskDependencies">Whether Tasks in the Job can /// define dependencies on each other. The default is false.</param> /// <param name="url">The URL of the Job.</param> /// <param name="eTag">The ETag of the Job.</param> /// <param name="lastModified">The last modified time of the /// Job.</param> /// <param name="creationTime">The creation time of the Job.</param> /// <param name="state">The current state of the Job.</param> /// <param name="stateTransitionTime">The time at which the Job entered /// its current state.</param> /// <param name="previousState">The previous state of the Job.</param> /// <param name="previousStateTransitionTime">The time at which the Job /// entered its previous state.</param> /// <param name="priority">The priority of the Job.</param> /// <param name="maxParallelTasks">The maximum number of tasks that can /// be executed in parallel for the job.</param> /// <param name="constraints">The execution constraints for the /// Job.</param> /// <param name="jobManagerTask">Details of a Job Manager Task to be /// launched when the Job is started.</param> /// <param name="jobPreparationTask">The Job Preparation Task.</param> /// <param name="jobReleaseTask">The Job Release Task.</param> /// <param name="commonEnvironmentSettings">The list of common /// environment variable settings. These environment variables are set /// for all Tasks in the Job (including the Job Manager, Job /// Preparation and Job Release Tasks).</param> /// <param name="poolInfo">The Pool settings associated with the /// Job.</param> /// <param name="onAllTasksComplete">The action the Batch service /// should take when all Tasks in the Job are in the completed /// state.</param> /// <param name="onTaskFailure">The action the Batch service should /// take when any Task in the Job fails.</param> /// <param name="networkConfiguration">The network configuration for /// the Job.</param> /// <param name="metadata">A list of name-value pairs associated with /// the Job as metadata.</param> /// <param name="executionInfo">The execution information for the /// Job.</param> /// <param name="stats">Resource usage statistics for the entire /// lifetime of the Job.</param> public CloudJob(string id = default(string), string displayName = default(string), bool?usesTaskDependencies = default(bool?), string url = default(string), string eTag = default(string), System.DateTime?lastModified = default(System.DateTime?), System.DateTime?creationTime = default(System.DateTime?), JobState?state = default(JobState?), System.DateTime?stateTransitionTime = default(System.DateTime?), JobState?previousState = default(JobState?), System.DateTime?previousStateTransitionTime = default(System.DateTime?), int?priority = default(int?), int?maxParallelTasks = default(int?), JobConstraints constraints = default(JobConstraints), JobManagerTask jobManagerTask = default(JobManagerTask), JobPreparationTask jobPreparationTask = default(JobPreparationTask), JobReleaseTask jobReleaseTask = default(JobReleaseTask), IList <EnvironmentSetting> commonEnvironmentSettings = default(IList <EnvironmentSetting>), PoolInformation poolInfo = default(PoolInformation), OnAllTasksComplete?onAllTasksComplete = default(OnAllTasksComplete?), OnTaskFailure?onTaskFailure = default(OnTaskFailure?), JobNetworkConfiguration networkConfiguration = default(JobNetworkConfiguration), IList <MetadataItem> metadata = default(IList <MetadataItem>), JobExecutionInformation executionInfo = default(JobExecutionInformation), JobStatistics stats = default(JobStatistics)) { Id = id; DisplayName = displayName; UsesTaskDependencies = usesTaskDependencies; Url = url; ETag = eTag; LastModified = lastModified; CreationTime = creationTime; State = state; StateTransitionTime = stateTransitionTime; PreviousState = previousState; PreviousStateTransitionTime = previousStateTransitionTime; Priority = priority; MaxParallelTasks = maxParallelTasks; Constraints = constraints; JobManagerTask = jobManagerTask; JobPreparationTask = jobPreparationTask; JobReleaseTask = jobReleaseTask; CommonEnvironmentSettings = commonEnvironmentSettings; PoolInfo = poolInfo; OnAllTasksComplete = onAllTasksComplete; OnTaskFailure = onTaskFailure; NetworkConfiguration = networkConfiguration; Metadata = metadata; ExecutionInfo = executionInfo; Stats = stats; CustomInit(); }
/// <summary> /// Builds a CloudJobStatisticsResponse object.Note: Using startTime for validating if the pipeline return the correct values /// </summary> public static AzureOperationResponse <ProxyModels.JobStatistics, ProxyModels.JobGetAllLifetimeStatisticsHeaders> CreateJobStatisticsResponse(DateTime startTime) { var stats = new ProxyModels.JobStatistics() { StartTime = startTime }; var response = new AzureOperationResponse <ProxyModels.JobStatistics, ProxyModels.JobGetAllLifetimeStatisticsHeaders>() { Body = stats, Response = new HttpResponseMessage(HttpStatusCode.Accepted) }; return(response); }
internal JobStatistics(Models.JobStatistics protocolObject) { this.FailedTaskCount = protocolObject.NumFailedTasks; this.KernelCpuTime = protocolObject.KernelCPUTime; this.LastUpdateTime = protocolObject.LastUpdateTime; this.ReadIOGiB = protocolObject.ReadIOGiB; this.ReadIOps = protocolObject.ReadIOps; this.StartTime = protocolObject.StartTime; this.SucceededTaskCount = protocolObject.NumSucceededTasks; this.TaskRetryCount = protocolObject.NumTaskRetries; this.Url = protocolObject.Url; this.UserCpuTime = protocolObject.UserCPUTime; this.WaitTime = protocolObject.WaitTime; this.WallClockTime = protocolObject.WallClockTime; this.WriteIOGiB = protocolObject.WriteIOGiB; this.WriteIOps = protocolObject.WriteIOps; }