space_traders/models/
register_request.rs

1//! Generated by: <https://openapi-generator.tech>
2//!
3//! Version of specification: `2.0.0`
4
5use serde::{Deserialize, Serialize};
6
7///
8#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
9pub struct RegisterRequest {
10    #[serde(rename = "faction")]
11    pub faction: crate::models::FactionSymbols,
12    /// Your desired agent symbol. This will be a unique name used to represent your agent, and will be the prefix for your ships.
13    #[serde(rename = "symbol")]
14    pub symbol: String,
15    /// Your email address. This is used if you reserved your call sign between resets.
16    #[serde(rename = "email", skip_serializing_if = "Option::is_none")]
17    pub email: Option<String>,
18}
19
20impl RegisterRequest {
21    /// Create value with optional fields set to `None`.
22    #[allow(clippy::too_many_arguments)]
23    pub fn new(faction: crate::models::FactionSymbols, symbol: String) -> RegisterRequest {
24        RegisterRequest {
25            faction,
26            symbol,
27            email: None,
28        }
29    }
30}