space_traders/models/
faction.rs

1//! Generated by: <https://openapi-generator.tech>
2//!
3//! Version of specification: `2.0.0`
4
5use serde::{Deserialize, Serialize};
6
7/// Faction details.
8#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
9pub struct Faction {
10    #[serde(rename = "symbol")]
11    pub symbol: crate::models::FactionSymbols,
12    /// Name of the faction.
13    #[serde(rename = "name")]
14    pub name: String,
15    /// Description of the faction.
16    #[serde(rename = "description")]
17    pub description: String,
18    /// The waypoint in which the faction's HQ is located in.
19    #[serde(rename = "headquarters")]
20    pub headquarters: String,
21    /// List of traits that define this faction.
22    #[serde(rename = "traits")]
23    pub traits: Vec<crate::models::FactionTrait>,
24    /// Whether or not the faction is currently recruiting new agents.
25    #[serde(rename = "isRecruiting")]
26    pub is_recruiting: bool,
27}
28
29impl Faction {
30    /// Create value with optional fields set to `None`.
31    #[allow(clippy::too_many_arguments)]
32    pub fn new(
33        symbol: crate::models::FactionSymbols,
34        name: String,
35        description: String,
36        headquarters: String,
37        traits: Vec<crate::models::FactionTrait>,
38        is_recruiting: bool,
39    ) -> Faction {
40        Faction {
41            symbol,
42            name,
43            description,
44            headquarters,
45            traits,
46            is_recruiting,
47        }
48    }
49}