space_traders/models/
transfer_cargo_request.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 TransferCargoRequest {
10    #[serde(rename = "tradeSymbol")]
11    pub trade_symbol: crate::models::TradeSymbol,
12    /// Amount of units to transfer.
13    #[serde(rename = "units")]
14    pub units: i32,
15    /// The symbol of the ship to transfer to.
16    #[serde(rename = "shipSymbol")]
17    pub ship_symbol: String,
18}
19
20impl TransferCargoRequest {
21    /// Create value with optional fields set to `None`.
22    #[allow(clippy::too_many_arguments)]
23    pub fn new(
24        trade_symbol: crate::models::TradeSymbol,
25        units: i32,
26        ship_symbol: String,
27    ) -> TransferCargoRequest {
28        TransferCargoRequest {
29            trade_symbol,
30            units,
31            ship_symbol,
32        }
33    }
34}