Share via


ExitCodeMapping Class

  • java.lang.Object
    • com.azure.compute.batch.models.ExitCodeMapping

Implements

public final class ExitCodeMapping
implements JsonSerializable<ExitCodeMapping>

How the Batch service should respond if a Task exits with a particular exit code.

Constructor Summary

Constructor Description
ExitCodeMapping(int code, ExitOptions exitOptions)

Creates an instance of ExitCodeMapping class.

Method Summary

Modifier and Type Method and Description
static ExitCodeMapping fromJson(JsonReader jsonReader)

Reads an instance of ExitCodeMapping from the JsonReader.

int getCode()

Get the code property: A process exit code.

ExitOptions getExitOptions()

Get the exitOptions property: How the Batch service should respond if the Task exits with this exit code.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

ExitCodeMapping

public ExitCodeMapping(int code, ExitOptions exitOptions)

Creates an instance of ExitCodeMapping class.

Parameters:

code - the code value to set.
exitOptions - the exitOptions value to set.

Method Details

fromJson

public static ExitCodeMapping fromJson(JsonReader jsonReader)

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:

IOException

- If the deserialized JSON object was missing any required properties.

getCode

public int getCode()

Get the code property: A process exit code.

Returns:

the code value.

getExitOptions

public ExitOptions getExitOptions()

Get the exitOptions property: How the Batch service should respond if the Task exits with this exit code.

Returns:

the exitOptions value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to