Upload Class
- java.
lang. Object - com.
azure. ai. openai. models. Upload
- com.
Implements
public final class Upload
implements JsonSerializable<Upload>
The Upload object can accept byte chunks in the form of Parts.
Method Summary
Modifier and Type | Method and Description |
---|---|
static Upload |
fromJson(JsonReader jsonReader)
Reads an instance of Upload from the Json |
long |
getBytes()
Get the bytes property: The intended number of bytes to be uploaded. |
Offset |
getCreatedAt()
Get the created |
Offset |
getExpiresAt()
Get the expires |
Open |
getFile()
Get the file property: The ready File object after the Upload is completed. |
String |
getFilename()
Get the filename property: The name of the file to be uploaded. |
String |
getId()
Get the id property: The Upload unique identifier, which can be referenced in API endpoints. |
Upload |
getObject()
Get the object property: The object type, which is always "upload". |
Upload |
getPurpose()
Get the purpose property: The intended purpose of the file. |
Upload |
getStatus()
Get the status property: The status of the Upload. |
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from java.lang.Object
Method Details
fromJson
public static Upload fromJson(JsonReader jsonReader)
Reads an instance of Upload from the JsonReader.
Parameters:
Returns:
Throws:
getBytes
public long getBytes()
Get the bytes property: The intended number of bytes to be uploaded.
Returns:
getCreatedAt
public OffsetDateTime getCreatedAt()
Get the createdAt property: The Unix timestamp (in seconds) for when the Upload was created.
Returns:
getExpiresAt
public OffsetDateTime getExpiresAt()
Get the expiresAt property: The Unix timestamp (in seconds) for when the Upload was created.
Returns:
getFile
public OpenAIFile getFile()
Get the file property: The ready File object after the Upload is completed.
Returns:
getFilename
public String getFilename()
Get the filename property: The name of the file to be uploaded.
Returns:
getId
public String getId()
Get the id property: The Upload unique identifier, which can be referenced in API endpoints.
Returns:
getObject
public UploadObject getObject()
Get the object property: The object type, which is always "upload".
Returns:
getPurpose
public UploadPurpose getPurpose()
Get the purpose property: The intended purpose of the file.
Returns:
getStatus
public UploadStatus getStatus()
Get the status property: The status of the Upload.
Returns:
toJson
Applies to
Azure SDK for Java