space_traders/models/
shipyard.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 Shipyard {
10    /// The symbol of the shipyard. The symbol is the same as the waypoint where the shipyard is located.
11    #[serde(rename = "symbol")]
12    pub symbol: String,
13    /// The list of ship types available for purchase at this shipyard.
14    #[serde(rename = "shipTypes")]
15    pub ship_types: Vec<crate::models::ShipyardShipTypesInner>,
16    /// The list of recent transactions at this shipyard.
17    #[serde(rename = "transactions", skip_serializing_if = "Option::is_none")]
18    pub transactions: Option<Vec<crate::models::ShipyardTransaction>>,
19    /// The ships that are currently available for purchase at the shipyard.
20    #[serde(rename = "ships", skip_serializing_if = "Option::is_none")]
21    pub ships: Option<Vec<crate::models::ShipyardShip>>,
22}
23
24impl Shipyard {
25    /// Create value with optional fields set to `None`.
26    #[allow(clippy::too_many_arguments)]
27    pub fn new(symbol: String, ship_types: Vec<crate::models::ShipyardShipTypesInner>) -> Shipyard {
28        Shipyard {
29            symbol,
30            ship_types,
31            transactions: None,
32            ships: None,
33        }
34    }
35}