Class ResponsesOutputContentText

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

public final class ResponsesOutputContentText extends ResponsesContent
The ResponsesOutputContentText model.
  • Constructor Details

    • ResponsesOutputContentText

      public ResponsesOutputContentText(String text, List<ResponsesOutputTextAnnotation> annotations)
      Creates an instance of ResponsesOutputContentText class.
      Parameters:
      text - the text value to set.
      annotations - the annotations value to set.
  • Method Details

    • getType

      public ResponsesContentType getType()
      Get the type property: The type property.
      Overrides:
      getType in class ResponsesContent
      Returns:
      the type value.
    • getText

      public String getText()
      Get the text property: The text property.
      Returns:
      the text value.
    • getAnnotations

      public List<ResponsesOutputTextAnnotation> getAnnotations()
      Get the annotations property: The annotations property.
      Returns:
      the annotations value.
    • toJson

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

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