tba_openapi_rust/models/
district_ranking.rs

1/*
2 * The Blue Alliance API v3
3 *
4 * # Overview    Information and statistics about FIRST Robotics Competition teams and events.   # Authentication   All endpoints require an Auth Key to be passed in the header `X-TBA-Auth-Key`. If you do not have an auth key yet, you can obtain one from your [Account Page](/account).
5 *
6 * The version of the OpenAPI document: 3.8.2
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// DistrictRanking : Rank of a team in a district.
12
13
14
15#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
16pub struct DistrictRanking {
17    /// TBA team key for the team.
18    #[serde(rename = "team_key")]
19    pub team_key: String,
20    /// Numerical rank of the team, 1 being top rank.
21    #[serde(rename = "rank")]
22    pub rank: i32,
23    /// Any points added to a team as a result of the rookie bonus.
24    #[serde(rename = "rookie_bonus", skip_serializing_if = "Option::is_none")]
25    pub rookie_bonus: Option<i32>,
26    /// Total district points for the team.
27    #[serde(rename = "point_total")]
28    pub point_total: i32,
29    /// List of events that contributed to the point total for the team.
30    #[serde(rename = "event_points", skip_serializing_if = "Option::is_none")]
31    pub event_points: Option<Vec<crate::models::DistrictRankingEventPointsInner>>,
32}
33
34impl DistrictRanking {
35    /// Rank of a team in a district.
36    pub fn new(team_key: String, rank: i32, point_total: i32) -> DistrictRanking {
37        DistrictRanking {
38            team_key,
39            rank,
40            rookie_bonus: None,
41            point_total,
42            event_points: None,
43        }
44    }
45}
46
47