1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
use mangadex_api_types::{
ContentRating, Demographic, Language, MangaDexDateTime, MangaState, MangaStatus,
};
use serde::Deserialize;
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")]
#[non_exhaustive]
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,
#[serde(with = "language_array_or_skip_null")]
pub available_translated_languages: Vec<Language>,
pub tags: Vec<ApiObject<TagAttributes>>,
pub state: MangaState,
pub created_at: MangaDexDateTime,
pub updated_at: Option<MangaDexDateTime>,
pub version: u32,
}