Class MessageTextDetails

java.lang.Object
com.azure.ai.openai.assistants.models.MessageTextDetails
All Implemented Interfaces:
com.azure.json.JsonSerializable<MessageTextDetails>

public final class MessageTextDetails extends Object implements com.azure.json.JsonSerializable<MessageTextDetails>
The text and associated annotations for a single item of assistant thread message content.
  • Constructor Details

    • MessageTextDetails

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

    • getValue

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

      public List<MessageTextAnnotation> getAnnotations()
      Get the annotations property: A list of annotations associated with this text.
      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<MessageTextDetails>
      Throws:
      IOException
    • fromJson

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