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

/// Faction details.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Faction {
    #[serde(rename = "symbol")]
    pub symbol: crate::models::FactionSymbols,
    /// Name of the faction.
    #[serde(rename = "name")]
    pub name: String,
    /// Description of the faction.
    #[serde(rename = "description")]
    pub description: String,
    /// The waypoint in which the faction's HQ is located in.
    #[serde(rename = "headquarters")]
    pub headquarters: String,
    /// List of traits that define this faction.
    #[serde(rename = "traits")]
    pub traits: Vec<crate::models::FactionTrait>,
    /// Whether or not the faction is currently recruiting new agents.
    #[serde(rename = "isRecruiting")]
    pub is_recruiting: bool,
}

impl Faction {
    /// Create value with optional fields set to `None`.
    #[allow(clippy::too_many_arguments)]
    pub fn new(
        symbol: crate::models::FactionSymbols,
        name: String,
        description: String,
        headquarters: String,
        traits: Vec<crate::models::FactionTrait>,
        is_recruiting: bool,
    ) -> Faction {
        Faction {
            symbol,
            name,
            description,
            headquarters,
            traits,
            is_recruiting,
        }
    }
}