artifacts/models/
claim_pending_item_data_schema.rs1use crate::models;
2use serde::{Deserialize, Serialize};
3
4#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
6#[cfg_attr(feature = "specta", derive(specta::Type))]
7pub struct ClaimPendingItemDataSchema {
8 #[serde(rename = "cooldown")]
10 pub cooldown: Box<models::CooldownSchema>,
11 #[serde(rename = "item")]
13 pub item: Box<models::PendingItemSchema>,
14 #[serde(rename = "character")]
16 pub character: Box<models::CharacterSchema>,
17}
18
19impl ClaimPendingItemDataSchema {
20 pub fn new(
22 cooldown: models::CooldownSchema,
23 item: models::PendingItemSchema,
24 character: models::CharacterSchema,
25 ) -> ClaimPendingItemDataSchema {
26 ClaimPendingItemDataSchema {
27 cooldown: Box::new(cooldown),
28 item: Box::new(item),
29 character: Box::new(character),
30 }
31 }
32}
33
34impl crate::traits::GetCooldown for ClaimPendingItemDataSchema {
35 fn get_cooldown(&self) -> &crate::models::CooldownSchema {
36 &self.cooldown
37 }
38}
39
40impl crate::traits::GetCharacter for ClaimPendingItemDataSchema {
41 fn get_character(&self) -> &crate::models::CharacterSchema {
42 &self.character
43 }
44}