space_traders/models/
ship_nav_route.rs

1//! Generated by: <https://openapi-generator.tech>
2//!
3//! Version of specification: `2.0.0`
4
5use serde::{Deserialize, Serialize};
6
7/// The routing information for the ship's most recent transit or current location.
8#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
9pub struct ShipNavRoute {
10    #[serde(rename = "destination")]
11    pub destination: crate::models::ShipNavRouteWaypoint,
12    #[serde(rename = "departure")]
13    pub departure: crate::models::ShipNavRouteWaypoint,
14    /// The date time of the ship's departure.
15    #[serde(rename = "departureTime")]
16    pub departure_time: String,
17    /// The date time of the ship's arrival. If the ship is in-transit, this is the expected time of arrival.
18    #[serde(rename = "arrival")]
19    pub arrival: String,
20}
21
22impl ShipNavRoute {
23    /// Create value with optional fields set to `None`.
24    #[allow(clippy::too_many_arguments)]
25    pub fn new(
26        destination: crate::models::ShipNavRouteWaypoint,
27        departure: crate::models::ShipNavRouteWaypoint,
28        departure_time: String,
29        arrival: String,
30    ) -> ShipNavRoute {
31        ShipNavRoute {
32            destination,
33            departure,
34            departure_time,
35            arrival,
36        }
37    }
38}