artifacts/models/
interaction_schema.rs

1use crate::models;
2use serde::{Deserialize, Serialize};
3
4#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
5#[cfg_attr(feature = "specta", derive(specta::Type))]
6pub struct InteractionSchema {
7    /// Content of the map.
8    #[serde(rename = "content", skip_serializing_if = "Option::is_none")]
9    pub content: Option<Box<models::MapContentSchema>>,
10    /// Transition to another map.
11    #[serde(rename = "transition", skip_serializing_if = "Option::is_none")]
12    pub transition: Option<Box<models::TransitionSchema>>,
13}
14
15impl InteractionSchema {
16    pub fn new() -> InteractionSchema {
17        InteractionSchema {
18            content: None,
19            transition: None,
20        }
21    }
22}