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};

/// The public registration information of the ship
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ShipRegistration {
    /// The agent's registered name of the ship
    #[serde(rename = "name")]
    pub name: String,
    /// The symbol of the faction the ship is registered with
    #[serde(rename = "factionSymbol")]
    pub faction_symbol: String,
    #[serde(rename = "role")]
    pub role: crate::models::ShipRole,
}

impl ShipRegistration {
    /// Create value with optional fields set to `None`.
    #[allow(clippy::too_many_arguments)]
    pub fn new(
        name: String,
        faction_symbol: String,
        role: crate::models::ShipRole,
    ) -> ShipRegistration {
        ShipRegistration {
            name,
            faction_symbol,
            role,
        }
    }
}