Class BatchJobUpdateContent

java.lang.Object
com.azure.compute.batch.models.BatchJobUpdateContent
All Implemented Interfaces:
com.azure.json.JsonSerializable<BatchJobUpdateContent>

public final class BatchJobUpdateContent extends Object implements com.azure.json.JsonSerializable<BatchJobUpdateContent>
Parameters for updating an Azure Batch Job.
  • Constructor Details

    • BatchJobUpdateContent

      public BatchJobUpdateContent()
      Creates an instance of BatchJobUpdateContent class.
  • Method Details

    • getPriority

      public Integer getPriority()
      Get the priority property: 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, the priority of the Job is left unchanged.
      Returns:
      the priority value.
    • setPriority

      public BatchJobUpdateContent setPriority(Integer priority)
      Set the priority property: 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, the priority of the Job is left unchanged.
      Parameters:
      priority - the priority value to set.
      Returns:
      the BatchJobUpdateContent object itself.
    • isAllowTaskPreemption

      public Boolean isAllowTaskPreemption()
      Get the allowTaskPreemption property: Whether Tasks in this job can be preempted by other high priority jobs. If the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job. You can update a job's allowTaskPreemption after it has been created using the update job API.
      Returns:
      the allowTaskPreemption value.
    • setAllowTaskPreemption

      public BatchJobUpdateContent setAllowTaskPreemption(Boolean allowTaskPreemption)
      Set the allowTaskPreemption property: Whether Tasks in this job can be preempted by other high priority jobs. If the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job. You can update a job's allowTaskPreemption after it has been created using the update job API.
      Parameters:
      allowTaskPreemption - the allowTaskPreemption value to set.
      Returns:
      the BatchJobUpdateContent object itself.
    • getMaxParallelTasks

      public Integer getMaxParallelTasks()
      Get the maxParallelTasks property: The maximum number of tasks that can be executed in parallel for the job. The value of maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default value is -1, which means there's no limit to the number of tasks that can be run at once. You can update a job's maxParallelTasks after it has been created using the update job API.
      Returns:
      the maxParallelTasks value.
    • setMaxParallelTasks

      public BatchJobUpdateContent setMaxParallelTasks(Integer maxParallelTasks)
      Set the maxParallelTasks property: The maximum number of tasks that can be executed in parallel for the job. The value of maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default value is -1, which means there's no limit to the number of tasks that can be run at once. You can update a job's maxParallelTasks after it has been created using the update job API.
      Parameters:
      maxParallelTasks - the maxParallelTasks value to set.
      Returns:
      the BatchJobUpdateContent object itself.
    • getConstraints

      public BatchJobConstraints getConstraints()
      Get the constraints property: The execution constraints for the Job. If omitted, the existing execution constraints are left unchanged.
      Returns:
      the constraints value.
    • setConstraints

      public BatchJobUpdateContent setConstraints(BatchJobConstraints constraints)
      Set the constraints property: The execution constraints for the Job. If omitted, the existing execution constraints are left unchanged.
      Parameters:
      constraints - the constraints value to set.
      Returns:
      the BatchJobUpdateContent object itself.
    • getPoolInfo

      public BatchPoolInfo getPoolInfo()
      Get the poolInfo property: 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 Patch Job call will fail if you include the poolInfo element and the Job is not disabled. If you specify an autoPoolSpecification in the poolInfo, only the keepAlive property of the autoPoolSpecification can be updated, and then only if the autoPoolSpecification has a poolLifetimeOption of Job (other job properties can be updated as normal). If omitted, the Job continues to run on its current Pool.
      Returns:
      the poolInfo value.
    • setPoolInfo

      public BatchJobUpdateContent setPoolInfo(BatchPoolInfo poolInfo)
      Set the poolInfo property: 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 Patch Job call will fail if you include the poolInfo element and the Job is not disabled. If you specify an autoPoolSpecification in the poolInfo, only the keepAlive property of the autoPoolSpecification can be updated, and then only if the autoPoolSpecification has a poolLifetimeOption of Job (other job properties can be updated as normal). If omitted, the Job continues to run on its current Pool.
      Parameters:
      poolInfo - the poolInfo value to set.
      Returns:
      the BatchJobUpdateContent object itself.
    • getOnAllTasksComplete

      public OnAllBatchTasksComplete getOnAllTasksComplete()
      Get the onAllTasksComplete property: The action the Batch service should take when all Tasks in the Job are in the completed state. If omitted, the completion behavior is left unchanged. You may not change the value from terminatejob to noaction - that is, once you have engaged automatic Job termination, you cannot turn it off again. If you try to do this, the request fails with an 'invalid property value' error response; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).
      Returns:
      the onAllTasksComplete value.
    • setOnAllTasksComplete

      public BatchJobUpdateContent setOnAllTasksComplete(OnAllBatchTasksComplete onAllTasksComplete)
      Set the onAllTasksComplete property: The action the Batch service should take when all Tasks in the Job are in the completed state. If omitted, the completion behavior is left unchanged. You may not change the value from terminatejob to noaction - that is, once you have engaged automatic Job termination, you cannot turn it off again. If you try to do this, the request fails with an 'invalid property value' error response; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).
      Parameters:
      onAllTasksComplete - the onAllTasksComplete value to set.
      Returns:
      the BatchJobUpdateContent object itself.
    • getMetadata

      public List<MetadataItem> getMetadata()
      Get the metadata property: A list of name-value pairs associated with the Job as metadata. If omitted, the existing Job metadata is left unchanged.
      Returns:
      the metadata value.
    • setMetadata

      public BatchJobUpdateContent setMetadata(List<MetadataItem> metadata)
      Set the metadata property: A list of name-value pairs associated with the Job as metadata. If omitted, the existing Job metadata is left unchanged.
      Parameters:
      metadata - the metadata value to set.
      Returns:
      the BatchJobUpdateContent object itself.
    • getNetworkConfiguration

      public BatchJobNetworkConfiguration getNetworkConfiguration()
      Get the networkConfiguration property: The network configuration for the Job.
      Returns:
      the networkConfiguration value.
    • setNetworkConfiguration

      public BatchJobUpdateContent setNetworkConfiguration(BatchJobNetworkConfiguration networkConfiguration)
      Set the networkConfiguration property: The network configuration for the Job.
      Parameters:
      networkConfiguration - the networkConfiguration value to set.
      Returns:
      the BatchJobUpdateContent object itself.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<BatchJobUpdateContent>
      Throws:
      IOException
    • fromJson

      public static BatchJobUpdateContent fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of BatchJobUpdateContent from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of BatchJobUpdateContent if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the BatchJobUpdateContent.