space_traders/models/ship_fuel_consumed.rs
1//! Generated by: <https://openapi-generator.tech>
2//!
3//! Version of specification: `2.0.0`
4
5use serde::{Deserialize, Serialize};
6
7/// An object that only shows up when an action has consumed fuel in the process. Shows the fuel consumption data.
8#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
9pub struct ShipFuelConsumed {
10 /// The amount of fuel consumed by the most recent transit or action.
11 #[serde(rename = "amount")]
12 pub amount: u32,
13 /// The time at which the fuel was consumed.
14 #[serde(rename = "timestamp")]
15 pub timestamp: String,
16}
17
18impl ShipFuelConsumed {
19 /// Create value with optional fields set to `None`.
20 #[allow(clippy::too_many_arguments)]
21 pub fn new(amount: u32, timestamp: String) -> ShipFuelConsumed {
22 ShipFuelConsumed { amount, timestamp }
23 }
24}