space-traders 0.1.1

Async SpaceTraders API client for Rust.
Documentation
//! Generated by: <https://openapi-generator.tech>
//!
//! Version of specification: `2.0.0`

use serde::{Deserialize, Serialize};

/// Details of the ship's fuel tanks including how much fuel was consumed during the last transit or action.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ShipFuel {
    /// The current amount of fuel in the ship's tanks.
    #[serde(rename = "current")]
    pub current: u32,
    /// The maximum amount of fuel the ship's tanks can hold.
    #[serde(rename = "capacity")]
    pub capacity: u32,
    #[serde(rename = "consumed", skip_serializing_if = "Option::is_none")]
    pub consumed: Option<crate::models::ShipFuelConsumed>,
}

impl ShipFuel {
    /// Create value with optional fields set to `None`.
    #[allow(clippy::too_many_arguments)]
    pub fn new(current: u32, capacity: u32) -> ShipFuel {
        ShipFuel {
            current,
            capacity,
            consumed: None,
        }
    }
}