mangadex_api_schema_rust/v5/
chapter.rsuse serde::Deserialize;
use url::Url;
use uuid::Uuid;
use crate::deserialize_null_default;
use mangadex_api_types::{Language, MangaDexDateTime};
#[derive(Clone, Debug, Deserialize, PartialEq)]
#[serde(rename_all = "camelCase")]
#[cfg_attr(feature = "non_exhaustive", non_exhaustive)]
#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
#[cfg_attr(feature = "specta", derive(specta::Type))]
pub struct ChapterAttributes {
#[serde(deserialize_with = "deserialize_null_default")]
pub title: Option<String>,
pub volume: Option<String>,
pub chapter: Option<String>,
pub pages: u32,
pub translated_language: Language,
#[serde(skip_serializing_if = "Option::is_none")]
pub uploader: Option<Uuid>,
pub external_url: Option<Url>,
pub version: u32,
#[cfg_attr(
feature = "serialize",
serde(serialize_with = "crate::v5::mangadex_datetime_serialize")
)]
pub created_at: MangaDexDateTime,
#[cfg_attr(
feature = "serialize",
serde(serialize_with = "crate::v5::mangadex_datetime_serialize_option")
)]
pub updated_at: Option<MangaDexDateTime>,
#[cfg_attr(feature = "specta", specta(type = String))]
#[cfg_attr(
feature = "serialize",
serde(serialize_with = "crate::v5::mangadex_datetime_serialize_option")
)]
pub publish_at: Option<MangaDexDateTime>,
#[cfg_attr(feature = "specta", specta(type = String))]
#[cfg_attr(
feature = "serialize",
serde(serialize_with = "crate::v5::mangadex_datetime_serialize_option")
)]
pub readable_at: Option<MangaDexDateTime>,
}