1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//! Generated by: <https://openapi-generator.tech>
//!
//! Version of specification: `2.0.0`
use serde::{Deserialize, Serialize};
///
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Market {
/// The symbol of the market. The symbol is the same as the waypoint where the market is located.
#[serde(rename = "symbol")]
pub symbol: String,
/// The list of goods that are exported from this market.
#[serde(rename = "exports")]
pub exports: Vec<crate::models::TradeGood>,
/// The list of goods that are sought as imports in this market.
#[serde(rename = "imports")]
pub imports: Vec<crate::models::TradeGood>,
/// The list of goods that are bought and sold between agents at this market.
#[serde(rename = "exchange")]
pub exchange: Vec<crate::models::TradeGood>,
/// The list of recent transactions at this market. Visible only when a ship is present at the market.
#[serde(rename = "transactions", skip_serializing_if = "Option::is_none")]
pub transactions: Option<Vec<crate::models::MarketTransaction>>,
/// The list of goods that are traded at this market. Visible only when a ship is present at the market.
#[serde(rename = "tradeGoods", skip_serializing_if = "Option::is_none")]
pub trade_goods: Option<Vec<crate::models::MarketTradeGood>>,
}
impl Market {
/// Create value with optional fields set to `None`.
#[allow(clippy::too_many_arguments)]
pub fn new(
symbol: String,
exports: Vec<crate::models::TradeGood>,
imports: Vec<crate::models::TradeGood>,
exchange: Vec<crate::models::TradeGood>,
) -> Market {
Market {
symbol,
exports,
imports,
exchange,
transactions: None,
trade_goods: None,
}
}
}