pub struct Upload {
pub id: String,
pub created_at: u64,
pub filename: String,
pub bytes: u64,
pub purpose: String,
pub status: UploadStatus,
pub expires_at: u64,
pub file: Option<OpenAiFile>,
}
Expand description
The Upload object can accept byte chunks in the form of Parts.
Fields§
§id: String
The Upload unique identifier, which can be referenced in API endpoints.
created_at: u64
The Unix timestamp (in seconds) for when the Upload was created.
filename: String
The name of the file to be uploaded.
bytes: u64
The intended number of bytes to be uploaded.
purpose: String
The intended purpose of the file. Please refer here for acceptable values.
status: UploadStatus
The status of the Upload.
expires_at: u64
The Unix timestamp (in seconds) for when the Upload will expire.
file: Option<OpenAiFile>
The ready File object after the Upload is completed.
Implementations§
Source§impl Upload
impl Upload
Sourcepub fn builder() -> UploadBuilder<((), (), (), (), (), (), (), ())>
pub fn builder() -> UploadBuilder<((), (), (), (), (), (), (), ())>
Create a builder for building Upload
.
On the builder, call .id(...)
, .created_at(...)
, .filename(...)
, .bytes(...)
, .purpose(...)
, .status(...)
, .expires_at(...)
, .file(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of Upload
.