mangadex_api_schema_rust/v5/
manga.rsuse mangadex_api_types::{
ContentRating, Demographic, Language, MangaDexDateTime, MangaState, MangaStatus,
};
use serde::Deserialize;
use uuid::Uuid;
use crate::v5::{
language_array_or_skip_null, localizedstring_array_or_map, manga_links_array_or_struct,
ApiObject, LocalizedString, MangaLinks, TagAttributes,
};
#[derive(Debug, Deserialize, Clone)]
#[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 MangaAttributes {
pub title: LocalizedString,
pub alt_titles: Vec<LocalizedString>,
#[serde(with = "localizedstring_array_or_map")]
pub description: LocalizedString,
#[serde(default)]
pub is_locked: bool,
#[serde(with = "manga_links_array_or_struct")]
pub links: Option<MangaLinks>,
pub original_language: Language,
pub last_volume: Option<String>,
pub last_chapter: Option<String>,
pub publication_demographic: Option<Demographic>,
pub status: MangaStatus,
pub year: Option<u16>,
pub content_rating: Option<ContentRating>,
#[serde(default)]
pub chapter_numbers_reset_on_new_volume: bool,
pub latest_uploaded_chapter: Option<Uuid>,
#[serde(with = "language_array_or_skip_null")]
pub available_translated_languages: Vec<Language>,
pub tags: Vec<ApiObject<TagAttributes>>,
pub state: MangaState,
#[cfg_attr(feature = "specta", specta(type = String))]
#[cfg_attr(
feature = "serialize",
serde(serialize_with = "crate::v5::mangadex_datetime_serialize")
)]
pub created_at: MangaDexDateTime,
#[cfg_attr(feature = "specta", specta(type = Option<String>))]
#[cfg_attr(
feature = "serialize",
serde(serialize_with = "crate::v5::mangadex_datetime_serialize_option")
)]
pub updated_at: Option<MangaDexDateTime>,
pub version: u32,
}