Package com.azure.compute.batch.models
Class ExitCodeMapping
java.lang.Object
com.azure.compute.batch.models.ExitCodeMapping
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ExitCodeMapping>
public final class ExitCodeMapping
extends Object
implements com.azure.json.JsonSerializable<ExitCodeMapping>
How the Batch service should respond if a Task exits with a particular exit
code.
-
Constructor Summary
ConstructorsConstructorDescriptionExitCodeMapping
(int code, ExitOptions exitOptions) Creates an instance of ExitCodeMapping class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ExitCodeMapping
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of ExitCodeMapping from the JsonReader.int
getCode()
Get the code property: A process exit code.Get the exitOptions property: How the Batch service should respond if the Task exits with this exit code.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
-
ExitCodeMapping
Creates an instance of ExitCodeMapping class.- Parameters:
code
- the code value to set.exitOptions
- the exitOptions value to set.
-
-
Method Details
-
getCode
public int getCode()Get the code property: A process exit code.- Returns:
- the code value.
-
getExitOptions
Get the exitOptions property: How the Batch service should respond if the Task exits with this exit code.- Returns:
- the exitOptions value.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<ExitCodeMapping>
- Throws:
IOException
-
fromJson
Reads an instance of ExitCodeMapping from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of ExitCodeMapping 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 ExitCodeMapping.
-