space_traders/models/
contract_terms.rs

1//! Generated by: <https://openapi-generator.tech>
2//!
3//! Version of specification: `2.0.0`
4
5use serde::{Deserialize, Serialize};
6
7/// The terms to fulfill the contract.
8#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
9pub struct ContractTerms {
10    /// The deadline for the contract.
11    #[serde(rename = "deadline")]
12    pub deadline: String,
13    #[serde(rename = "payment")]
14    pub payment: crate::models::ContractPayment,
15    /// The cargo that needs to be delivered to fulfill the contract.
16    #[serde(rename = "deliver", skip_serializing_if = "Option::is_none")]
17    pub deliver: Option<Vec<crate::models::ContractDeliverGood>>,
18}
19
20impl ContractTerms {
21    /// Create value with optional fields set to `None`.
22    #[allow(clippy::too_many_arguments)]
23    pub fn new(deadline: String, payment: crate::models::ContractPayment) -> ContractTerms {
24        ContractTerms {
25            deadline,
26            payment,
27            deliver: None,
28        }
29    }
30}