tba_openapi_rust/models/
award.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 Award {
16    /// The name of the award as provided by FIRST. May vary for the same award type.
17    #[serde(rename = "name")]
18    pub name: String,
19    /// Type of award given. See https://github.com/the-blue-alliance/the-blue-alliance/blob/master/consts/award_type.py#L6
20    #[serde(rename = "award_type")]
21    pub award_type: i32,
22    /// The event_key of the event the award was won at.
23    #[serde(rename = "event_key")]
24    pub event_key: String,
25    /// A list of recipients of the award at the event. May have either a team_key or an awardee, both, or neither (in the case the award wasn't awarded at the event).
26    #[serde(rename = "recipient_list")]
27    pub recipient_list: Vec<crate::models::AwardRecipient>,
28    /// The year this award was won.
29    #[serde(rename = "year")]
30    pub year: i32,
31}
32
33impl Award {
34    pub fn new(name: String, award_type: i32, event_key: String, recipient_list: Vec<crate::models::AwardRecipient>, year: i32) -> Award {
35        Award {
36            name,
37            award_type,
38            event_key,
39            recipient_list,
40            year,
41        }
42    }
43}
44
45