Package com.azure.compute.batch.models
Class ExitCodeRangeMapping
java.lang.Object
com.azure.compute.batch.models.ExitCodeRangeMapping
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ExitCodeRangeMapping>
public final class ExitCodeRangeMapping
extends Object
implements com.azure.json.JsonSerializable<ExitCodeRangeMapping>
A range of exit codes and how the Batch service should respond to exit codes
within that range.
-
Constructor Summary
ConstructorsConstructorDescriptionExitCodeRangeMapping(int start, int end, ExitOptions exitOptions) Creates an instance of ExitCodeRangeMapping class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ExitCodeRangeMappingfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ExitCodeRangeMapping from the JsonReader.intgetEnd()Get the end property: The last exit code in the range.Get the exitOptions property: How the Batch service should respond if the Task exits with an exit code in the range start to end (inclusive).intgetStart()Get the start property: The first exit code in the range.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
ExitCodeRangeMapping
Creates an instance of ExitCodeRangeMapping class.- Parameters:
start- the start value to set.end- the end value to set.exitOptions- the exitOptions value to set.
-
-
Method Details
-
getStart
public int getStart()Get the start property: The first exit code in the range.- Returns:
- the start value.
-
getEnd
public int getEnd()Get the end property: The last exit code in the range.- Returns:
- the end value.
-
getExitOptions
Get the exitOptions property: How the Batch service should respond if the Task exits with an exit code in the range start to end (inclusive).- Returns:
- the exitOptions value.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ExitCodeRangeMapping>- Throws:
IOException
-
fromJson
public static ExitCodeRangeMapping fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ExitCodeRangeMapping from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ExitCodeRangeMapping if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the ExitCodeRangeMapping.
-