openai_interface/containers/files/mod.rs
1//! Manage the files of a container via `/containers/{container_id}/files`.
2//!
3//! > ![warn] This module is untested!
4//! > If you encounter any issues, please report them on the repository.
5//!
6//! Submodules: [`create`], [`retrieve`], [`delete`], [`list`] and
7//! [`content`].
8
9pub mod content;
10pub mod create;
11pub mod delete;
12pub mod list;
13pub mod retrieve;
14
15/// A file attached to a container.
16#[derive(Debug, Clone, serde::Deserialize)]
17pub struct ContainerFile {
18 /// The file ID, e.g. `cfile_...`.
19 pub id: String,
20 /// The object type, always `container.file`.
21 #[serde(default)]
22 pub object: Option<String>,
23 /// Unix timestamp (seconds) of when the file was created.
24 #[serde(default)]
25 pub created_at: Option<u64>,
26 /// The size of the file in bytes.
27 #[serde(default)]
28 pub size: Option<u64>,
29 /// The path of the file inside the container.
30 #[serde(default)]
31 pub path: Option<String>,
32 /// The source of the file (`container` or `user`).
33 #[serde(default)]
34 pub source: Option<String>,
35}
36
37crate::impl_from_str!(ContainerFile);