space_traders/models/
refuel_ship_request.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 RefuelShipRequest {
10    /// The amount of fuel to fill in the ship's tanks. When not specified, the ship will be refueled to its maximum fuel capacity. If the amount specified is greater than the ship's remaining capacity, the ship will only be refueled to its maximum fuel capacity. The amount specified is not in market units but in ship fuel units.
11    #[serde(rename = "units", skip_serializing_if = "Option::is_none")]
12    pub units: Option<u32>,
13}
14
15impl Default for RefuelShipRequest {
16    fn default() -> Self {
17        Self::new()
18    }
19}
20
21impl RefuelShipRequest {
22    /// Create value with optional fields set to `None`.
23    #[allow(clippy::too_many_arguments)]
24    pub fn new() -> RefuelShipRequest {
25        RefuelShipRequest { units: None }
26    }
27}