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

/// Details of a system was that scanned.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ScannedSystem {
    /// Symbol of the system.
    #[serde(rename = "symbol")]
    pub symbol: String,
    /// Symbol of the system's sector.
    #[serde(rename = "sectorSymbol")]
    pub sector_symbol: String,
    #[serde(rename = "type")]
    pub r#type: crate::models::SystemType,
    /// Position in the universe in the x axis.
    #[serde(rename = "x")]
    pub x: i32,
    /// Position in the universe in the y axis.
    #[serde(rename = "y")]
    pub y: i32,
    /// The system's distance from the scanning ship.
    #[serde(rename = "distance")]
    pub distance: i32,
}

impl ScannedSystem {
    /// Create value with optional fields set to `None`.
    #[allow(clippy::too_many_arguments)]
    pub fn new(
        symbol: String,
        sector_symbol: String,
        r#type: crate::models::SystemType,
        x: i32,
        y: i32,
        distance: i32,
    ) -> ScannedSystem {
        ScannedSystem {
            symbol,
            sector_symbol,
            r#type,
            x,
            y,
            distance,
        }
    }
}