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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
* 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 Webcast {
/// Type of webcast, typically descriptive of the streaming provider.
#[serde(rename = "type")]
pub r#type: RHashType,
/// Type specific channel information. May be the YouTube stream, or Twitch channel name. In the case of iframe types, contains HTML to embed the stream in an HTML iframe.
#[serde(rename = "channel")]
pub channel: String,
/// The date for the webcast in `yyyy-mm-dd` format. May be null.
#[serde(rename = "date", skip_serializing_if = "Option::is_none")]
pub date: Option<String>,
/// File identification as may be required for some types. May be null.
#[serde(rename = "file", skip_serializing_if = "Option::is_none")]
pub file: Option<String>,
}
impl Webcast {
pub fn new(r#type: RHashType, channel: String) -> Webcast {
Webcast {
r#type,
channel,
date: None,
file: None,
}
}
}
/// Type of webcast, typically descriptive of the streaming provider.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum RHashType {
#[serde(rename = "youtube")]
Youtube,
#[serde(rename = "twitch")]
Twitch,
#[serde(rename = "ustream")]
Ustream,
#[serde(rename = "iframe")]
Iframe,
#[serde(rename = "html5")]
Html5,
#[serde(rename = "rtmp")]
Rtmp,
#[serde(rename = "livestream")]
Livestream,
#[serde(rename = "direct_link")]
DirectLink,
#[serde(rename = "mms")]
Mms,
#[serde(rename = "justin")]
Justin,
#[serde(rename = "stemtv")]
Stemtv,
#[serde(rename = "dacast")]
Dacast,
}
impl Default for RHashType {
fn default() -> RHashType {
Self::Youtube
}
}