mangadex_api_schema_rust/v5/
scanlation_group.rs1use mangadex_api_types::{Language, MangaDexDateTime, MangaDexDuration, RelationshipType};
2use serde::Deserialize;
3use url::Url;
4
5use crate::{TypedAttributes, v5::LocalizedString};
6
7#[derive(Clone, Debug, Deserialize, Default)]
9#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
10#[serde(rename_all = "camelCase")]
11#[non_exhaustive]
12#[cfg_attr(feature = "specta", derive(specta::Type))]
13pub struct ScanlationGroupAttributes {
14 pub name: String,
15 pub alt_names: Vec<LocalizedString>,
16 pub website: Option<String>,
17 pub irc_server: Option<String>,
18 pub irc_channel: Option<String>,
19 pub discord: Option<String>,
20 pub contact_email: Option<String>,
21 pub description: Option<String>,
22 pub twitter: Option<Url>,
26 pub manga_updates: Option<Url>,
31 pub focused_languages: Option<Vec<Language>>,
33 pub locked: bool,
34 pub official: bool,
35 pub verified: bool,
37 pub inactive: bool,
38 #[serde(skip_serializing_if = "Option::is_none")]
39 pub ex_licensed: Option<bool>,
40 #[cfg_attr(feature = "specta", specta(type = Option<String>))]
50 pub publish_delay: Option<MangaDexDuration>,
51 pub version: u32,
52 #[cfg_attr(
54 feature = "serialize",
55 serde(serialize_with = "crate::v5::mangadex_datetime_serialize")
56 )]
57 pub created_at: MangaDexDateTime,
58 #[cfg_attr(
60 feature = "serialize",
61 serde(serialize_with = "crate::v5::mangadex_datetime_serialize")
62 )]
63 pub updated_at: MangaDexDateTime,
64}
65
66impl TypedAttributes for ScanlationGroupAttributes {
67 const TYPE_: mangadex_api_types::RelationshipType = RelationshipType::ScanlationGroup;
68}