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

    Constructors
    Constructor
    Description
    ExitCodeMapping(int code, ExitOptions exitOptions)
    Creates an instance of ExitCodeMapping class.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of ExitCodeMapping from the JsonReader.
    int
    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

      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

    • 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 com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<ExitCodeMapping>
      Throws:
      IOException
    • fromJson

      public static ExitCodeMapping fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.