// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
/// An uploaded file: its `id`, `filename`, MIME type, page count, and timestamps.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct File {
    /// Defaults to `file`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub object: Option<String>,
    /// The unique identifier of the file
    pub id: String,
    /// The name of the file
    pub filename: String,
    /// The MIME type of the file
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub mime_type: Option<String>,
    /// When the file was created
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub created_at: Option<String>,
    /// When the file was last updated
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub updated_at: Option<String>,
    /// Number of pages in the file
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub page_count: Option<i64>,
}
impl File {
    /// Construct a new `File` with the required fields set.
    #[allow(deprecated)]
    pub fn new(id: impl Into<String>, filename: impl Into<String>) -> Self {
        Self {
            object: Default::default(),
            id: id.into(),
            filename: filename.into(),
            mime_type: Default::default(),
            created_at: Default::default(),
            updated_at: Default::default(),
            page_count: Default::default(),
        }
    }
}
