space_traders/models/
jump_gate.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 JumpGate {
10    /// The maximum jump range of the gate.
11    #[serde(rename = "jumpRange")]
12    pub jump_range: f32,
13    /// The symbol of the faction that owns the gate.
14    #[serde(rename = "factionSymbol", skip_serializing_if = "Option::is_none")]
15    pub faction_symbol: Option<String>,
16    /// The systems within range of the gate that have a corresponding gate.
17    #[serde(rename = "connectedSystems")]
18    pub connected_systems: Vec<crate::models::ConnectedSystem>,
19}
20
21impl JumpGate {
22    /// Create value with optional fields set to `None`.
23    #[allow(clippy::too_many_arguments)]
24    pub fn new(
25        jump_range: f32,
26        connected_systems: Vec<crate::models::ConnectedSystem>,
27    ) -> JumpGate {
28        JumpGate {
29            jump_range,
30            faction_symbol: None,
31            connected_systems,
32        }
33    }
34}