space_traders/models/
deliver_contract_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 DeliverContractRequest {
10    /// Symbol of a ship located in the destination to deliver a contract and that has a good to deliver in its cargo.
11    #[serde(rename = "shipSymbol")]
12    pub ship_symbol: String,
13    /// The symbol of the good to deliver.
14    #[serde(rename = "tradeSymbol")]
15    pub trade_symbol: String,
16    /// Amount of units to deliver.
17    #[serde(rename = "units")]
18    pub units: i32,
19}
20
21impl DeliverContractRequest {
22    /// Create value with optional fields set to `None`.
23    #[allow(clippy::too_many_arguments)]
24    pub fn new(ship_symbol: String, trade_symbol: String, units: i32) -> DeliverContractRequest {
25        DeliverContractRequest {
26            ship_symbol,
27            trade_symbol,
28            units,
29        }
30    }
31}