eve_esi 0.4.9

Thread-safe, asynchronous client for EVE Online's ESI & OAuth2
Documentation
//! # EVE ESI Alliance Models
//!
//! This module defines the `Alliance` struct, which models the core properties of an alliance in EVE Online.
//!
//! ## ESI Documentation
//! - <https://developers.eveonline.com/api-explorer>
//!
//! ## Models
//! - [`Alliance`]: Represents an alliance in EVE Online.
//! - [`AllianceIcons`]: Represents the 128x128 & 64x64 icon URLs for an alliance

use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};

/// Represents an alliance in EVE Online
///
/// # Documentation
/// - <https://developers.eveonline.com/api-explorer#/schemas/AlliancesAllianceIdGet>
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq)]
pub struct Alliance {
    /// The ID of the corporation that created the alliance.
    pub creator_corporation_id: i64,
    /// The ID of the character that created the alliance.
    pub creator_id: i64,
    /// The date and time when the alliance was founded.
    pub date_founded: DateTime<Utc>,
    /// The ID of the alliance's executor corporation.
    /// If the alliance is disbanded, this will return as None.
    pub executor_corporation_id: Option<i64>,
    /// The ID of the alliance's faction if applicable.
    pub faction_id: Option<i64>,
    /// The name of the alliance.
    pub name: String,
    /// The ticker of the alliance.
    pub ticker: String,
}

/// Represents the 128x128 & 64x64 icon URLs for an alliance
///
/// # Documentation
/// - <https://developers.eveonline.com/api-explorer#/schemas/AlliancesAllianceIdIconsGet>
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq)]
pub struct AllianceIcons {
    /// 128x128 icon URL for an alliance
    pub px128x128: String,
    /// 64x64 icon URL for an alliance
    pub px64x64: String,
}