tba-openapi-rust 3.8.2

# 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).
Documentation
/*
 * 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,
        }
    }
}