Class ExitConditions

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

public final class ExitConditions extends Object implements com.azure.json.JsonSerializable<ExitConditions>
Specifies how the Batch service should respond when the Task completes.
  • Constructor Details

    • ExitConditions

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

    • getExitCodes

      public List<ExitCodeMapping> getExitCodes()
      Get the exitCodes property: A list of individual Task exit codes and how the Batch service should respond to them.
      Returns:
      the exitCodes value.
    • setExitCodes

      public ExitConditions setExitCodes(List<ExitCodeMapping> exitCodes)
      Set the exitCodes property: A list of individual Task exit codes and how the Batch service should respond to them.
      Parameters:
      exitCodes - the exitCodes value to set.
      Returns:
      the ExitConditions object itself.
    • getExitCodeRanges

      public List<ExitCodeRangeMapping> getExitCodeRanges()
      Get the exitCodeRanges property: A list of Task exit code ranges and how the Batch service should respond to them.
      Returns:
      the exitCodeRanges value.
    • setExitCodeRanges

      public ExitConditions setExitCodeRanges(List<ExitCodeRangeMapping> exitCodeRanges)
      Set the exitCodeRanges property: A list of Task exit code ranges and how the Batch service should respond to them.
      Parameters:
      exitCodeRanges - the exitCodeRanges value to set.
      Returns:
      the ExitConditions object itself.
    • getPreProcessingError

      public ExitOptions getPreProcessingError()
      Get the preProcessingError property: How the Batch service should respond if the Task fails to start due to an error.
      Returns:
      the preProcessingError value.
    • setPreProcessingError

      public ExitConditions setPreProcessingError(ExitOptions preProcessingError)
      Set the preProcessingError property: How the Batch service should respond if the Task fails to start due to an error.
      Parameters:
      preProcessingError - the preProcessingError value to set.
      Returns:
      the ExitConditions object itself.
    • getFileUploadError

      public ExitOptions getFileUploadError()
      Get the fileUploadError property: How the Batch service should respond if a file upload error occurs. If the Task exited with an exit code that was specified via exitCodes or exitCodeRanges, and then encountered a file upload error, then the action specified by the exit code takes precedence.
      Returns:
      the fileUploadError value.
    • setFileUploadError

      public ExitConditions setFileUploadError(ExitOptions fileUploadError)
      Set the fileUploadError property: How the Batch service should respond if a file upload error occurs. If the Task exited with an exit code that was specified via exitCodes or exitCodeRanges, and then encountered a file upload error, then the action specified by the exit code takes precedence.
      Parameters:
      fileUploadError - the fileUploadError value to set.
      Returns:
      the ExitConditions object itself.
    • getDefaultProperty

      public ExitOptions getDefaultProperty()
      Get the defaultProperty property: How the Batch service should respond if the Task fails with an exit condition not covered by any of the other properties. This value is used if the Task exits with any nonzero exit code not listed in the exitCodes or exitCodeRanges collection, with a pre-processing error if the preProcessingError property is not present, or with a file upload error if the fileUploadError property is not present. If you want non-default behavior on exit code 0, you must list it explicitly using the exitCodes or exitCodeRanges collection.
      Returns:
      the defaultProperty value.
    • setDefaultProperty

      public ExitConditions setDefaultProperty(ExitOptions defaultProperty)
      Set the defaultProperty property: How the Batch service should respond if the Task fails with an exit condition not covered by any of the other properties. This value is used if the Task exits with any nonzero exit code not listed in the exitCodes or exitCodeRanges collection, with a pre-processing error if the preProcessingError property is not present, or with a file upload error if the fileUploadError property is not present. If you want non-default behavior on exit code 0, you must list it explicitly using the exitCodes or exitCodeRanges collection.
      Parameters:
      defaultProperty - the defaultProperty value to set.
      Returns:
      the ExitConditions 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<ExitConditions>
      Throws:
      IOException
    • fromJson

      public static ExitConditions fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of ExitConditions from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of ExitConditions 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 ExitConditions.