space_traders/models/
survey.rs

1//! Generated by: <https://openapi-generator.tech>
2//!
3//! Version of specification: `2.0.0`
4
5use serde::{Deserialize, Serialize};
6
7/// A resource survey of a waypoint, detailing a specific extraction location and the types of resources that can be found there.
8#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
9pub struct Survey {
10    /// A unique signature for the location of this survey. This signature is verified when attempting an extraction using this survey.
11    #[serde(rename = "signature")]
12    pub signature: String,
13    /// The symbol of the waypoint that this survey is for.
14    #[serde(rename = "symbol")]
15    pub symbol: String,
16    /// A list of deposits that can be found at this location.
17    #[serde(rename = "deposits")]
18    pub deposits: Vec<crate::models::SurveyDeposit>,
19    /// The date and time when the survey expires. After this date and time, the survey will no longer be available for extraction.
20    #[serde(rename = "expiration")]
21    pub expiration: String,
22    /// The size of the deposit. This value indicates how much can be extracted from the survey before it is exhausted.
23    #[serde(rename = "size")]
24    pub size: Size,
25}
26
27impl Survey {
28    /// Create value with optional fields set to `None`.
29    #[allow(clippy::too_many_arguments)]
30    pub fn new(
31        signature: String,
32        symbol: String,
33        deposits: Vec<crate::models::SurveyDeposit>,
34        expiration: String,
35        size: Size,
36    ) -> Survey {
37        Survey {
38            signature,
39            symbol,
40            deposits,
41            expiration,
42            size,
43        }
44    }
45}
46
47/// The size of the deposit. This value indicates how much can be extracted from the survey before it is exhausted.
48#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
49pub enum Size {
50    #[serde(rename = "SMALL")]
51    Small,
52    #[serde(rename = "MODERATE")]
53    Moderate,
54    #[serde(rename = "LARGE")]
55    Large,
56}
57
58impl Default for Size {
59    fn default() -> Size {
60        Self::Small
61    }
62}