space-traders 0.1.1

Async SpaceTraders API client for Rust.
Documentation
//! Generated by: <https://openapi-generator.tech>
//!
//! Version of specification: `2.0.0`

use serde::{Deserialize, Serialize};

///
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct RegisterRequest {
    #[serde(rename = "faction")]
    pub faction: crate::models::FactionSymbols,
    /// Your desired agent symbol. This will be a unique name used to represent your agent, and will be the prefix for your ships.
    #[serde(rename = "symbol")]
    pub symbol: String,
    /// Your email address. This is used if you reserved your call sign between resets.
    #[serde(rename = "email", skip_serializing_if = "Option::is_none")]
    pub email: Option<String>,
}

impl RegisterRequest {
    /// Create value with optional fields set to `None`.
    #[allow(clippy::too_many_arguments)]
    pub fn new(faction: crate::models::FactionSymbols, symbol: String) -> RegisterRequest {
        RegisterRequest {
            faction,
            symbol,
            email: None,
        }
    }
}