space_traders/models/
ship_registration.rs

1//! Generated by: <https://openapi-generator.tech>
2//!
3//! Version of specification: `2.0.0`
4
5use serde::{Deserialize, Serialize};
6
7/// The public registration information of the ship
8#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
9pub struct ShipRegistration {
10    /// The agent's registered name of the ship
11    #[serde(rename = "name")]
12    pub name: String,
13    /// The symbol of the faction the ship is registered with
14    #[serde(rename = "factionSymbol")]
15    pub faction_symbol: String,
16    #[serde(rename = "role")]
17    pub role: crate::models::ShipRole,
18}
19
20impl ShipRegistration {
21    /// Create value with optional fields set to `None`.
22    #[allow(clippy::too_many_arguments)]
23    pub fn new(
24        name: String,
25        faction_symbol: String,
26        role: crate::models::ShipRole,
27    ) -> ShipRegistration {
28        ShipRegistration {
29            name,
30            faction_symbol,
31            role,
32        }
33    }
34}