space_traders/models/
ship_nav_route_waypoint.rs

1//! Generated by: <https://openapi-generator.tech>
2//!
3//! Version of specification: `2.0.0`
4
5use serde::{Deserialize, Serialize};
6
7/// The destination or departure of a ships nav route.
8#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
9pub struct ShipNavRouteWaypoint {
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    /// The symbol of the system the waypoint is in.
16    #[serde(rename = "systemSymbol")]
17    pub system_symbol: String,
18    /// Position in the universe in the x axis.
19    #[serde(rename = "x")]
20    pub x: i32,
21    /// Position in the universe in the y axis.
22    #[serde(rename = "y")]
23    pub y: i32,
24}
25
26impl ShipNavRouteWaypoint {
27    /// Create value with optional fields set to `None`.
28    #[allow(clippy::too_many_arguments)]
29    pub fn new(
30        symbol: String,
31        r#type: crate::models::WaypointType,
32        system_symbol: String,
33        x: i32,
34        y: i32,
35    ) -> ShipNavRouteWaypoint {
36        ShipNavRouteWaypoint {
37            symbol,
38            r#type,
39            system_symbol,
40            x,
41            y,
42        }
43    }
44}