use serde::{Deserialize, Serialize}; /// The object type, which is always "model". #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum ModelObject { Model, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Model { /// The model identifier, which can be referenced in the API endpoints. pub id: Id, /// The Unix timestamp (in seconds) when the model was created. pub created: i64, /// The object type, which is always "model". pub object: ModelObject, /// The organization that owns the model. pub owned_by: String, /// The date when the model will shut down, or null if not announced. #[serde(skip_serializing_if = "Option::is_none")] pub shutdown_date: Option, } /// The object type, which is always "list". #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum ListObject { List, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct ListModelsResponse { /// The list of currently available models. pub data: Vec>, /// The object type, which is always "list". pub object: ListObject, }