1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
* The Blue Alliance API v3
*
* # 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).
*
* The version of the OpenAPI document: 3.8.2
*
* Generated by: https://openapi-generator.tech
*/
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct TeamSimple {
/// TBA team key with the format `frcXXXX` with `XXXX` representing the team number.
#[serde(rename = "key")]
pub key: String,
/// Official team number issued by FIRST.
#[serde(rename = "team_number")]
pub team_number: i32,
/// Team nickname provided by FIRST.
#[serde(rename = "nickname", skip_serializing_if = "Option::is_none")]
pub nickname: Option<String>,
/// Official long name registered with FIRST.
#[serde(rename = "name")]
pub name: String,
/// City of team derived from parsing the address registered with FIRST.
#[serde(rename = "city", skip_serializing_if = "Option::is_none")]
pub city: Option<String>,
/// State of team derived from parsing the address registered with FIRST.
#[serde(rename = "state_prov", skip_serializing_if = "Option::is_none")]
pub state_prov: Option<String>,
/// Country of team derived from parsing the address registered with FIRST.
#[serde(rename = "country", skip_serializing_if = "Option::is_none")]
pub country: Option<String>,
}
impl TeamSimple {
pub fn new(key: String, team_number: i32, name: String) -> TeamSimple {
TeamSimple {
key,
team_number,
nickname: None,
name,
city: None,
state_prov: None,
country: None,
}
}
}