Skip to main content

artifacts/models/
spawn_event_request_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 SpawnEventRequestSchema {
7    /// Code of the event to spawn
8    #[serde(rename = "code")]
9    pub code: String,
10}
11
12impl SpawnEventRequestSchema {
13    pub fn new(code: String) -> SpawnEventRequestSchema {
14        SpawnEventRequestSchema { code }
15    }
16}