space_traders/models/
ship_nav.rs

1//! Generated by: <https://openapi-generator.tech>
2//!
3//! Version of specification: `2.0.0`
4
5use serde::{Deserialize, Serialize};
6
7/// The navigation information of the ship.
8#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
9pub struct ShipNav {
10    /// The system symbol of the ship's current location.
11    #[serde(rename = "systemSymbol")]
12    pub system_symbol: String,
13    /// The waypoint symbol of the ship's current location, or if the ship is in-transit, the waypoint symbol of the ship's destination.
14    #[serde(rename = "waypointSymbol")]
15    pub waypoint_symbol: String,
16    #[serde(rename = "route")]
17    pub route: crate::models::ShipNavRoute,
18    #[serde(rename = "status")]
19    pub status: crate::models::ShipNavStatus,
20    #[serde(rename = "flightMode")]
21    pub flight_mode: crate::models::ShipNavFlightMode,
22}
23
24impl ShipNav {
25    /// Create value with optional fields set to `None`.
26    #[allow(clippy::too_many_arguments)]
27    pub fn new(
28        system_symbol: String,
29        waypoint_symbol: String,
30        route: crate::models::ShipNavRoute,
31        status: crate::models::ShipNavStatus,
32        flight_mode: crate::models::ShipNavFlightMode,
33    ) -> ShipNav {
34        ShipNav {
35            system_symbol,
36            waypoint_symbol,
37            route,
38            status,
39            flight_mode,
40        }
41    }
42}