space_traders/models/
trade_good.rs

1//! Generated by: <https://openapi-generator.tech>
2//!
3//! Version of specification: `2.0.0`
4
5use serde::{Deserialize, Serialize};
6
7/// A good that can be traded for other goods or currency.
8#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
9pub struct TradeGood {
10    #[serde(rename = "symbol")]
11    pub symbol: crate::models::TradeSymbol,
12    /// The name of the good.
13    #[serde(rename = "name")]
14    pub name: String,
15    /// The description of the good.
16    #[serde(rename = "description")]
17    pub description: String,
18}
19
20impl TradeGood {
21    /// Create value with optional fields set to `None`.
22    #[allow(clippy::too_many_arguments)]
23    pub fn new(symbol: crate::models::TradeSymbol, name: String, description: String) -> TradeGood {
24        TradeGood {
25            symbol,
26            name,
27            description,
28        }
29    }
30}