qeztorncodegen/models/
faction_wars_ranked.rs

1/*
2 * Torn API
3 *
4 *   * The development of Torn's API v2 is still ongoing.  * If selections remain unaltered, they will default to the API v1 version.  * Unlike API v1, API v2 accepts both selections and IDs as path and query parameters.  * If any discrepancies or errors are found, please submit a [bug report](https://www.torn.com/forums.php#/p=forums&f=19&b=0&a=0) on the Torn Forums.
5 *
6 * The version of the OpenAPI document: 2.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct FactionWarsRanked {
16    #[serde(rename = "war_id", skip_serializing_if = "Option::is_none")]
17    pub war_id: Option<i32>,
18    #[serde(rename = "start", skip_serializing_if = "Option::is_none")]
19    pub start: Option<i32>,
20    #[serde(rename = "end", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
21    pub end: Option<Option<i32>>,
22    /// The score target of the war.
23    #[serde(rename = "target", skip_serializing_if = "Option::is_none")]
24    pub target: Option<i32>,
25    #[serde(rename = "winner", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
26    pub winner: Option<Option<i32>>,
27    /// The factions involved in the ranked war.
28    #[serde(rename = "factions", skip_serializing_if = "Option::is_none")]
29    pub factions: Option<Vec<models::FactionRankedWarParticipant>>,
30}
31
32impl FactionWarsRanked {
33    pub fn new() -> FactionWarsRanked {
34        FactionWarsRanked {
35            war_id: None,
36            start: None,
37            end: None,
38            target: None,
39            winner: None,
40            factions: None,
41        }
42    }
43}
44