space_traders/models/
ship_requirements.rs

1//! Generated by: <https://openapi-generator.tech>
2//!
3//! Version of specification: `2.0.0`
4
5use serde::{Deserialize, Serialize};
6
7/// The requirements for installation on a ship
8#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
9pub struct ShipRequirements {
10    /// The amount of power required from the reactor.
11    #[serde(rename = "power", skip_serializing_if = "Option::is_none")]
12    pub power: Option<i32>,
13    /// The number of crew required for operation.
14    #[serde(rename = "crew", skip_serializing_if = "Option::is_none")]
15    pub crew: Option<i32>,
16    /// The number of module slots required for installation.
17    #[serde(rename = "slots", skip_serializing_if = "Option::is_none")]
18    pub slots: Option<i32>,
19}
20
21impl Default for ShipRequirements {
22    fn default() -> Self {
23        Self::new()
24    }
25}
26
27impl ShipRequirements {
28    /// Create value with optional fields set to `None`.
29    #[allow(clippy::too_many_arguments)]
30    pub fn new() -> ShipRequirements {
31        ShipRequirements {
32            power: None,
33            crew: None,
34            slots: None,
35        }
36    }
37}