space_traders/models/
system_waypoint.rs

1//! Generated by: <https://openapi-generator.tech>
2//!
3//! Version of specification: `2.0.0`
4
5use serde::{Deserialize, Serialize};
6
7///
8#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
9pub struct SystemWaypoint {
10    /// The symbol of the waypoint.
11    #[serde(rename = "symbol")]
12    pub symbol: String,
13    #[serde(rename = "type")]
14    pub r#type: crate::models::WaypointType,
15    /// Position in the universe in the x axis.
16    #[serde(rename = "x")]
17    pub x: i32,
18    /// Position in the universe in the y axis.
19    #[serde(rename = "y")]
20    pub y: i32,
21}
22
23impl SystemWaypoint {
24    /// Create value with optional fields set to `None`.
25    #[allow(clippy::too_many_arguments)]
26    pub fn new(
27        symbol: String,
28        r#type: crate::models::WaypointType,
29        x: i32,
30        y: i32,
31    ) -> SystemWaypoint {
32        SystemWaypoint {
33            symbol,
34            r#type,
35            x,
36            y,
37        }
38    }
39}