Package com.azure.ai.openai.models
Class Upload
java.lang.Object
com.azure.ai.openai.models.Upload
- All Implemented Interfaces:
com.azure.json.JsonSerializable<Upload>
The Upload object can accept byte chunks in the form of Parts.
-
Method Summary
Modifier and TypeMethodDescriptionstatic UploadfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of Upload from the JsonReader.longgetBytes()Get the bytes property: The intended number of bytes to be uploaded.Get the createdAt property: The Unix timestamp (in seconds) for when the Upload was created.Get the expiresAt property: The Unix timestamp (in seconds) for when the Upload was created.getFile()Get the file property: The ready File object after the Upload is completed.Get the filename property: The name of the file to be uploaded.getId()Get the id property: The Upload unique identifier, which can be referenced in API endpoints.Get the object property: The object type, which is always "upload".Get the purpose property: The intended purpose of the file.Get the status property: The status of the Upload.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
-
getId
Get the id property: The Upload unique identifier, which can be referenced in API endpoints.- Returns:
- the id value.
-
getCreatedAt
Get the createdAt property: The Unix timestamp (in seconds) for when the Upload was created.- Returns:
- the createdAt value.
-
getFilename
Get the filename property: The name of the file to be uploaded.- Returns:
- the filename value.
-
getBytes
public long getBytes()Get the bytes property: The intended number of bytes to be uploaded.- Returns:
- the bytes value.
-
getPurpose
Get the purpose property: The intended purpose of the file.- Returns:
- the purpose value.
-
getStatus
Get the status property: The status of the Upload.- Returns:
- the status value.
-
getExpiresAt
Get the expiresAt property: The Unix timestamp (in seconds) for when the Upload was created.- Returns:
- the expiresAt value.
-
getObject
Get the object property: The object type, which is always "upload".- Returns:
- the object value.
-
getFile
Get the file property: The ready File object after the Upload is completed.- Returns:
- the file value.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<Upload>- Throws:
IOException
-
fromJson
Reads an instance of Upload from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of Upload 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 Upload.
-