Class MessageTextFilePathAnnotation

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

public final class MessageTextFilePathAnnotation extends MessageTextAnnotation
A citation within the message that points to a file located at a specific path.
  • Constructor Details

    • MessageTextFilePathAnnotation

      public MessageTextFilePathAnnotation(String text, MessageTextFilePathDetails filePath)
      Creates an instance of MessageTextFilePathAnnotation class.
      Parameters:
      text - the text value to set.
      filePath - the filePath value to set.
  • Method Details

    • getFilePath

      public MessageTextFilePathDetails getFilePath()
      Get the filePath property: A URL for the file that's generated when the assistant used the code_interpreter tool to generate a file.
      Returns:
      the filePath value.
    • toJson

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

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

      public String getType()
      Get the type property: The object type.
      Overrides:
      getType in class MessageTextAnnotation
      Returns:
      the type value.
    • getStartIndex

      public Integer getStartIndex()
      Get the startIndex property: The first text index associated with this text annotation.
      Returns:
      the startIndex value.
    • getEndIndex

      public Integer getEndIndex()
      Get the endIndex property: The last text index associated with this text annotation.
      Returns:
      the endIndex value.
    • setStartIndex

      public MessageTextFilePathAnnotation setStartIndex(Integer startIndex)
      Set the startIndex property: The first text index associated with this text annotation.
      Parameters:
      startIndex - the startIndex value to set.
      Returns:
      the MessageTextFilePathAnnotation object itself.
    • setEndIndex

      public MessageTextFilePathAnnotation setEndIndex(Integer endIndex)
      Set the endIndex property: The last text index associated with this text annotation.
      Parameters:
      endIndex - the endIndex value to set.
      Returns:
      the MessageTextFilePathAnnotation object itself.