Class FileInfo

java.lang.Object
com.azure.ai.agents.persistent.models.FileInfo
All Implemented Interfaces:
com.azure.json.JsonSerializable<FileInfo>

public final class FileInfo extends Object implements com.azure.json.JsonSerializable<FileInfo>
Represents an agent that can call the model and use tools.
  • Method Summary

    Modifier and Type
    Method
    Description
    static FileInfo
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of FileInfo from the JsonReader.
    int
    Get the bytes property: The size of the file, in bytes.
    Get the createdAt property: The Unix timestamp, in seconds, representing when this object was created.
    Get the filename property: The name of the file.
    Get the id property: The identifier, which can be referenced in API endpoints.
    Get the object property: The object type, which is always 'file'.
    Get the purpose property: The intended purpose of a file.
    Get the status property: The state of the file.
    Get the statusDetails property: The error message with details in case processing of this file failed.
    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
  • Method Details

    • getObject

      public String getObject()
      Get the object property: The object type, which is always 'file'.
      Returns:
      the object value.
    • getId

      public String getId()
      Get the id property: The identifier, which can be referenced in API endpoints.
      Returns:
      the id value.
    • getBytes

      public int getBytes()
      Get the bytes property: The size of the file, in bytes.
      Returns:
      the bytes value.
    • getFilename

      public String getFilename()
      Get the filename property: The name of the file.
      Returns:
      the filename value.
    • getCreatedAt

      public OffsetDateTime getCreatedAt()
      Get the createdAt property: The Unix timestamp, in seconds, representing when this object was created.
      Returns:
      the createdAt value.
    • getPurpose

      public FilePurpose getPurpose()
      Get the purpose property: The intended purpose of a file.
      Returns:
      the purpose value.
    • getStatus

      public FileState getStatus()
      Get the status property: The state of the file. This field is available in Azure OpenAI only.
      Returns:
      the status value.
    • getStatusDetails

      public String getStatusDetails()
      Get the statusDetails property: The error message with details in case processing of this file failed. This field is available in Azure OpenAI only.
      Returns:
      the statusDetails value.
    • toJson

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

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