space_traders/models/
chart.rs

1//! Generated by: <https://openapi-generator.tech>
2//!
3//! Version of specification: `2.0.0`
4
5use serde::{Deserialize, Serialize};
6
7/// The chart of a system or waypoint, which makes the location visible to other agents.
8#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
9pub struct Chart {
10    /// The symbol of the waypoint.
11    #[serde(rename = "waypointSymbol", skip_serializing_if = "Option::is_none")]
12    pub waypoint_symbol: Option<String>,
13    /// The agent that submitted the chart for this waypoint.
14    #[serde(rename = "submittedBy", skip_serializing_if = "Option::is_none")]
15    pub submitted_by: Option<String>,
16    /// The time the chart for this waypoint was submitted.
17    #[serde(rename = "submittedOn", skip_serializing_if = "Option::is_none")]
18    pub submitted_on: Option<String>,
19}
20
21impl Default for Chart {
22    fn default() -> Self {
23        Self::new()
24    }
25}
26
27impl Chart {
28    /// Create value with optional fields set to `None`.
29    #[allow(clippy::too_many_arguments)]
30    pub fn new() -> Chart {
31        Chart {
32            waypoint_symbol: None,
33            submitted_by: None,
34            submitted_on: None,
35        }
36    }
37}