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};

/// Ship cargo details.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ShipCargo {
    /// The max number of items that can be stored in the cargo hold.
    #[serde(rename = "capacity")]
    pub capacity: u32,
    /// The number of items currently stored in the cargo hold.
    #[serde(rename = "units")]
    pub units: u32,
    /// The items currently in the cargo hold.
    #[serde(rename = "inventory")]
    pub inventory: Vec<crate::models::ShipCargoItem>,
}

impl ShipCargo {
    /// Create value with optional fields set to `None`.
    #[allow(clippy::too_many_arguments)]
    pub fn new(
        capacity: u32,
        units: u32,
        inventory: Vec<crate::models::ShipCargoItem>,
    ) -> ShipCargo {
        ShipCargo {
            capacity,
            units,
            inventory,
        }
    }
}