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 Shipyard {
    /// The symbol of the shipyard. The symbol is the same as the waypoint where the shipyard is located.
    #[serde(rename = "symbol")]
    pub symbol: String,
    /// The list of ship types available for purchase at this shipyard.
    #[serde(rename = "shipTypes")]
    pub ship_types: Vec<crate::models::ShipyardShipTypesInner>,
    /// The list of recent transactions at this shipyard.
    #[serde(rename = "transactions", skip_serializing_if = "Option::is_none")]
    pub transactions: Option<Vec<crate::models::ShipyardTransaction>>,
    /// The ships that are currently available for purchase at the shipyard.
    #[serde(rename = "ships", skip_serializing_if = "Option::is_none")]
    pub ships: Option<Vec<crate::models::ShipyardShip>>,
}

impl Shipyard {
    /// Create value with optional fields set to `None`.
    #[allow(clippy::too_many_arguments)]
    pub fn new(symbol: String, ship_types: Vec<crate::models::ShipyardShipTypesInner>) -> Shipyard {
        Shipyard {
            symbol,
            ship_types,
            transactions: None,
            ships: None,
        }
    }
}