tba_openapi_rust/models/
zebra.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
12
13
14#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
15pub struct Zebra {
16    /// TBA match key with the format `yyyy[EVENT_CODE]_[COMP_LEVEL]m[MATCH_NUMBER]`, where `yyyy` is the year, and `EVENT_CODE` is the event code of the event, `COMP_LEVEL` is (qm, ef, qf, sf, f), and `MATCH_NUMBER` is the match number in the competition level. A set number may be appended to the competition level if more than one match in required per set.
17    #[serde(rename = "key")]
18    pub key: String,
19    /// A list of relative timestamps for each data point. Each timestamp will correspond to the X and Y value at the same index in a team xs and ys arrays. `times`, all teams `xs` and all teams `ys` are guarenteed to be the same length.
20    #[serde(rename = "times")]
21    pub times: Vec<f64>,
22    #[serde(rename = "alliances")]
23    pub alliances: Box<crate::models::ZebraAlliances>,
24}
25
26impl Zebra {
27    pub fn new(key: String, times: Vec<f64>, alliances: crate::models::ZebraAlliances) -> Zebra {
28        Zebra {
29            key,
30            times,
31            alliances: Box::new(alliances),
32        }
33    }
34}
35
36