space_traders/models/extraction_yield.rs
1//! Generated by: <https://openapi-generator.tech>
2//!
3//! Version of specification: `2.0.0`
4
5use serde::{Deserialize, Serialize};
6
7/// Yields from the extract operation.
8#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
9pub struct ExtractionYield {
10 #[serde(rename = "symbol")]
11 pub symbol: crate::models::TradeSymbol,
12 /// The number of units extracted that were placed into the ship's cargo hold.
13 #[serde(rename = "units")]
14 pub units: i32,
15}
16
17impl ExtractionYield {
18 /// Create value with optional fields set to `None`.
19 #[allow(clippy::too_many_arguments)]
20 pub fn new(symbol: crate::models::TradeSymbol, units: i32) -> ExtractionYield {
21 ExtractionYield { symbol, units }
22 }
23}