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

    Constructors
    Constructor
    Description
    ExitCodeRangeMapping(int start, int end, ExitOptions exitOptions)
    Creates an instance of ExitCodeRangeMapping class.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of ExitCodeRangeMapping from the JsonReader.
    int
    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).
    int
    Get the start property: The first exit code in the range.
    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

    • ExitCodeRangeMapping

      public ExitCodeRangeMapping(int start, int end, ExitOptions exitOptions)
      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

      public ExitOptions 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

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