/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/
package com.microsoft.azure.batch.protocol.models;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Parameters for a CloudJobOperations.Update request.
*/
public class JobUpdateParameter {
/**
* The priority of the job.
* Priority values can range from -1000 to 1000, with -1000 being the
* lowest priority and 1000 being the highest priority. If omitted, it is
* set to the default value 0.
*/
private Integer priority;
/**
* The execution constraints for the job.
* If omitted, the constraints are cleared.
*/
private JobConstraints constraints;
/**
* The pool on which the Batch service runs the job's tasks.
* You may change the pool for a job only when the job is disabled. The
* Update Job call will fail if you include the poolInfo element and the
* job is not disabled. If you specify an autoPoolSpecification
* specification in the poolInfo, only the keepAlive property can be
* updated, and then only if the auto pool has a poolLifetimeOption of
* job.
*/
@JsonProperty(required = true)
private PoolInformation poolInfo;
/**
* A list of name-value pairs associated with the job as metadata.
* If omitted, it takes the default value of an empty list; in effect, any
* existing metadata is deleted.
*/
private List<MetadataItem> metadata;
/**
* Specifies an action the Batch service should take when all tasks in the
* job are in the completed state. Possible values include: 'noAction',
* 'terminateJob'.
*/
private OnAllTasksComplete onAllTasksComplete;
/**
* Get the priority value.
*
* @return the priority value
*/
public Integer priority() {
return this.priority;
}
/**
* Set the priority value.
*
* @param priority the priority value to set
* @return the JobUpdateParameter object itself.
*/
public JobUpdateParameter withPriority(Integer priority) {
this.priority = priority;
return this;
}
/**
* Get the constraints value.
*
* @return the constraints value
*/
public JobConstraints constraints() {
return this.constraints;
}
/**
* Set the constraints value.
*
* @param constraints the constraints value to set
* @return the JobUpdateParameter object itself.
*/
public JobUpdateParameter withConstraints(JobConstraints constraints) {
this.constraints = constraints;
return this;
}
/**
* Get the poolInfo value.
*
* @return the poolInfo value
*/
public PoolInformation poolInfo() {
return this.poolInfo;
}
/**
* Set the poolInfo value.
*
* @param poolInfo the poolInfo value to set
* @return the JobUpdateParameter object itself.
*/
public JobUpdateParameter withPoolInfo(PoolInformation poolInfo) {
this.poolInfo = poolInfo;
return this;
}
/**
* Get the metadata value.
*
* @return the metadata value
*/
public List<MetadataItem> metadata() {
return this.metadata;
}
/**
* Set the metadata value.
*
* @param metadata the metadata value to set
* @return the JobUpdateParameter object itself.
*/
public JobUpdateParameter withMetadata(List<MetadataItem> metadata) {
this.metadata = metadata;
return this;
}
/**
* Get the onAllTasksComplete value.
*
* @return the onAllTasksComplete value
*/
public OnAllTasksComplete onAllTasksComplete() {
return this.onAllTasksComplete;
}
/**
* Set the onAllTasksComplete value.
*
* @param onAllTasksComplete the onAllTasksComplete value to set
* @return the JobUpdateParameter object itself.
*/
public JobUpdateParameter withOnAllTasksComplete(OnAllTasksComplete onAllTasksComplete) {
this.onAllTasksComplete = onAllTasksComplete;
return this;
}
}