Class FileInfo
java.lang.Object
com.azure.ai.agents.persistent.models.FileInfo
- All Implemented Interfaces:
com.azure.json.JsonSerializable<FileInfo>
Represents an agent that can call the model and use tools.
-
Method Summary
Modifier and TypeMethodDescriptionstatic FileInfofromJson(com.azure.json.JsonReader jsonReader) Reads an instance of FileInfo from the JsonReader.intgetBytes()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.getId()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.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Method Details
-
getObject
Get the object property: The object type, which is always 'file'.- Returns:
- the object value.
-
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
Get the filename property: The name of the file.- Returns:
- the filename value.
-
getCreatedAt
Get the createdAt property: The Unix timestamp, in seconds, representing when this object was created.- Returns:
- the createdAt value.
-
getPurpose
Get the purpose property: The intended purpose of a file.- Returns:
- the purpose value.
-
getStatus
Get the status property: The state of the file. This field is available in Azure OpenAI only.- Returns:
- the status value.
-
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
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<FileInfo>- Throws:
IOException
-
fromJson
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.
-