Class ResponsesComputerTool

java.lang.Object
com.azure.ai.openai.responses.models.ResponsesTool
com.azure.ai.openai.responses.models.ResponsesComputerTool
All Implemented Interfaces:
com.azure.json.JsonSerializable<ResponsesTool>

public final class ResponsesComputerTool extends ResponsesTool
The ResponsesComputerTool model.
  • Constructor Details

    • ResponsesComputerTool

      public ResponsesComputerTool(int displayWidth, int displayHeight, ResponsesComputerToolEnvironment environment)
      Creates an instance of ResponsesComputerTool class.
      Parameters:
      displayWidth - the displayWidth value to set.
      displayHeight - the displayHeight value to set.
      environment - the environment value to set.
  • Method Details

    • getType

      public ResponsesToolType getType()
      Get the type property: The type property.
      Overrides:
      getType in class ResponsesTool
      Returns:
      the type value.
    • getDisplayWidth

      public int getDisplayWidth()
      Get the displayWidth property: The display_width property.
      Returns:
      the displayWidth value.
    • getDisplayHeight

      public int getDisplayHeight()
      Get the displayHeight property: The display_height property.
      Returns:
      the displayHeight value.
    • getEnvironment

      public ResponsesComputerToolEnvironment getEnvironment()
      Get the environment property: The environment property.
      Returns:
      the environment value.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<ResponsesTool>
      Overrides:
      toJson in class ResponsesTool
      Throws:
      IOException
    • fromJson

      public static ResponsesComputerTool fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of ResponsesComputerTool from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of ResponsesComputerTool 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 ResponsesComputerTool.