artifacts-rs 1.5.1

Rust client for Artifacts
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::models;
use serde::{Deserialize, Serialize};

/// SpawnEventRequest : Model for the request to spawn a specific event
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
#[cfg_attr(feature = "specta", derive(specta::Type))]
pub struct SpawnEventRequest {
    /// Code of the event to spawn
    #[serde(rename = "code")]
    pub code: String,
}

impl SpawnEventRequest {
    /// Model for the request to spawn a specific event
    pub fn new(code: String) -> SpawnEventRequest {
        SpawnEventRequest { code }
    }
}