Package com.azure.compute.batch.models
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ExitConditions
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of ExitConditions from the JsonReader.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.Get the exitCodeRanges property: A list of Task exit code ranges and how the Batch service should respond to them.Get the exitCodes property: A list of individual Task exit codes and how the Batch service should respond to them.Get the fileUploadError property: How the Batch service should respond if a file upload error occurs.Get the preProcessingError property: How the Batch service should respond if the Task fails to start due to an error.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.setExitCodeRanges
(List<ExitCodeRangeMapping> exitCodeRanges) Set the exitCodeRanges property: A list of Task exit code ranges and how the Batch service should respond to them.setExitCodes
(List<ExitCodeMapping> exitCodes) Set the exitCodes property: A list of individual Task exit codes and how the Batch service should respond to them.setFileUploadError
(ExitOptions fileUploadError) Set the fileUploadError property: How the Batch service should respond if a file upload error occurs.setPreProcessingError
(ExitOptions preProcessingError) Set the preProcessingError property: How the Batch service should respond if the Task fails to start due to an error.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
ExitConditions
public ExitConditions()Creates an instance of ExitConditions class.
-
-
Method Details
-
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
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
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
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
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
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
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
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
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
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
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<ExitConditions>
- Throws:
IOException
-
fromJson
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.
-