chesscom_openapi/models/
chess_stats.rs

1/*
2 * Chess
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12
13
14#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ChessStats {
16    #[serde(rename = "last")]
17    pub last: crate::models::ChessStatsLast,
18    #[serde(rename = "best", skip_serializing_if = "Option::is_none")]
19    pub best: Option<crate::models::ChessStatsBest>,
20    #[serde(rename = "record")]
21    pub record: crate::models::ChessStatsRecord,
22    #[serde(rename = "tournament", skip_serializing_if = "Option::is_none")]
23    pub tournament: Option<crate::models::ChessStatsTournament>,
24}
25
26impl ChessStats {
27    pub fn new(last: crate::models::ChessStatsLast, record: crate::models::ChessStatsRecord) -> ChessStats {
28        ChessStats {
29            last,
30            best: None,
31            record,
32            tournament: None,
33        }
34    }
35}
36
37