1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = RTCIceCandidatePairStats)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `RtcIceCandidatePairStats` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
12 pub type RtcIceCandidatePairStats;
13 #[doc = "Get the `id` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
16 #[wasm_bindgen(method, getter = "id")]
17 pub fn get_id(this: &RtcIceCandidatePairStats) -> Option<::alloc::string::String>;
18 #[doc = "Change the `id` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
21 #[wasm_bindgen(method, setter = "id")]
22 pub fn set_id(this: &RtcIceCandidatePairStats, val: &str);
23 #[doc = "Get the `timestamp` field of this object."]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
26 #[wasm_bindgen(method, getter = "timestamp")]
27 pub fn get_timestamp(this: &RtcIceCandidatePairStats) -> Option<f64>;
28 #[doc = "Change the `timestamp` field of this object."]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
31 #[wasm_bindgen(method, setter = "timestamp")]
32 pub fn set_timestamp(this: &RtcIceCandidatePairStats, val: f64);
33 #[cfg(feature = "RtcStatsType")]
34 #[doc = "Get the `type` field of this object."]
35 #[doc = ""]
36 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`, `RtcStatsType`*"]
37 #[wasm_bindgen(method, getter = "type")]
38 pub fn get_type(this: &RtcIceCandidatePairStats) -> Option<RtcStatsType>;
39 #[cfg(feature = "RtcStatsType")]
40 #[doc = "Change the `type` field of this object."]
41 #[doc = ""]
42 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`, `RtcStatsType`*"]
43 #[wasm_bindgen(method, setter = "type")]
44 pub fn set_type(this: &RtcIceCandidatePairStats, val: RtcStatsType);
45 #[doc = "Get the `bytesReceived` field of this object."]
46 #[doc = ""]
47 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
48 #[wasm_bindgen(method, getter = "bytesReceived")]
49 pub fn get_bytes_received(this: &RtcIceCandidatePairStats) -> Option<f64>;
50 #[doc = "Change the `bytesReceived` field of this object."]
51 #[doc = ""]
52 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
53 #[wasm_bindgen(method, setter = "bytesReceived")]
54 pub fn set_bytes_received(this: &RtcIceCandidatePairStats, val: f64);
55 #[doc = "Change the `bytesReceived` field of this object."]
56 #[doc = ""]
57 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
58 #[wasm_bindgen(method, setter = "bytesReceived")]
59 pub fn set_bytes_received_u32(this: &RtcIceCandidatePairStats, val: u32);
60 #[doc = "Change the `bytesReceived` field of this object."]
61 #[doc = ""]
62 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
63 #[wasm_bindgen(method, setter = "bytesReceived")]
64 pub fn set_bytes_received_f64(this: &RtcIceCandidatePairStats, val: f64);
65 #[doc = "Get the `bytesSent` field of this object."]
66 #[doc = ""]
67 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
68 #[wasm_bindgen(method, getter = "bytesSent")]
69 pub fn get_bytes_sent(this: &RtcIceCandidatePairStats) -> Option<f64>;
70 #[doc = "Change the `bytesSent` field of this object."]
71 #[doc = ""]
72 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
73 #[wasm_bindgen(method, setter = "bytesSent")]
74 pub fn set_bytes_sent(this: &RtcIceCandidatePairStats, val: f64);
75 #[doc = "Change the `bytesSent` field of this object."]
76 #[doc = ""]
77 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
78 #[wasm_bindgen(method, setter = "bytesSent")]
79 pub fn set_bytes_sent_u32(this: &RtcIceCandidatePairStats, val: u32);
80 #[doc = "Change the `bytesSent` field of this object."]
81 #[doc = ""]
82 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
83 #[wasm_bindgen(method, setter = "bytesSent")]
84 pub fn set_bytes_sent_f64(this: &RtcIceCandidatePairStats, val: f64);
85 #[doc = "Get the `componentId` field of this object."]
86 #[doc = ""]
87 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
88 #[wasm_bindgen(method, getter = "componentId")]
89 pub fn get_component_id(this: &RtcIceCandidatePairStats) -> Option<u32>;
90 #[doc = "Change the `componentId` field of this object."]
91 #[doc = ""]
92 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
93 #[wasm_bindgen(method, setter = "componentId")]
94 pub fn set_component_id(this: &RtcIceCandidatePairStats, val: u32);
95 #[doc = "Get the `lastPacketReceivedTimestamp` field of this object."]
96 #[doc = ""]
97 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
98 #[wasm_bindgen(method, getter = "lastPacketReceivedTimestamp")]
99 pub fn get_last_packet_received_timestamp(this: &RtcIceCandidatePairStats) -> Option<f64>;
100 #[doc = "Change the `lastPacketReceivedTimestamp` field of this object."]
101 #[doc = ""]
102 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
103 #[wasm_bindgen(method, setter = "lastPacketReceivedTimestamp")]
104 pub fn set_last_packet_received_timestamp(this: &RtcIceCandidatePairStats, val: f64);
105 #[doc = "Get the `lastPacketSentTimestamp` field of this object."]
106 #[doc = ""]
107 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
108 #[wasm_bindgen(method, getter = "lastPacketSentTimestamp")]
109 pub fn get_last_packet_sent_timestamp(this: &RtcIceCandidatePairStats) -> Option<f64>;
110 #[doc = "Change the `lastPacketSentTimestamp` field of this object."]
111 #[doc = ""]
112 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
113 #[wasm_bindgen(method, setter = "lastPacketSentTimestamp")]
114 pub fn set_last_packet_sent_timestamp(this: &RtcIceCandidatePairStats, val: f64);
115 #[doc = "Get the `localCandidateId` field of this object."]
116 #[doc = ""]
117 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
118 #[wasm_bindgen(method, getter = "localCandidateId")]
119 pub fn get_local_candidate_id(
120 this: &RtcIceCandidatePairStats,
121 ) -> Option<::alloc::string::String>;
122 #[doc = "Change the `localCandidateId` field of this object."]
123 #[doc = ""]
124 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
125 #[wasm_bindgen(method, setter = "localCandidateId")]
126 pub fn set_local_candidate_id(this: &RtcIceCandidatePairStats, val: &str);
127 #[doc = "Get the `nominated` field of this object."]
128 #[doc = ""]
129 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
130 #[wasm_bindgen(method, getter = "nominated")]
131 pub fn get_nominated(this: &RtcIceCandidatePairStats) -> Option<bool>;
132 #[doc = "Change the `nominated` field of this object."]
133 #[doc = ""]
134 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
135 #[wasm_bindgen(method, setter = "nominated")]
136 pub fn set_nominated(this: &RtcIceCandidatePairStats, val: bool);
137 #[doc = "Get the `priority` field of this object."]
138 #[doc = ""]
139 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
140 #[wasm_bindgen(method, getter = "priority")]
141 pub fn get_priority(this: &RtcIceCandidatePairStats) -> Option<f64>;
142 #[doc = "Change the `priority` field of this object."]
143 #[doc = ""]
144 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
145 #[wasm_bindgen(method, setter = "priority")]
146 pub fn set_priority(this: &RtcIceCandidatePairStats, val: f64);
147 #[doc = "Change the `priority` field of this object."]
148 #[doc = ""]
149 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
150 #[wasm_bindgen(method, setter = "priority")]
151 pub fn set_priority_u32(this: &RtcIceCandidatePairStats, val: u32);
152 #[doc = "Change the `priority` field of this object."]
153 #[doc = ""]
154 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
155 #[wasm_bindgen(method, setter = "priority")]
156 pub fn set_priority_f64(this: &RtcIceCandidatePairStats, val: f64);
157 #[doc = "Get the `readable` field of this object."]
158 #[doc = ""]
159 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
160 #[wasm_bindgen(method, getter = "readable")]
161 pub fn get_readable(this: &RtcIceCandidatePairStats) -> Option<bool>;
162 #[doc = "Change the `readable` field of this object."]
163 #[doc = ""]
164 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
165 #[wasm_bindgen(method, setter = "readable")]
166 pub fn set_readable(this: &RtcIceCandidatePairStats, val: bool);
167 #[doc = "Get the `remoteCandidateId` field of this object."]
168 #[doc = ""]
169 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
170 #[wasm_bindgen(method, getter = "remoteCandidateId")]
171 pub fn get_remote_candidate_id(
172 this: &RtcIceCandidatePairStats,
173 ) -> Option<::alloc::string::String>;
174 #[doc = "Change the `remoteCandidateId` field of this object."]
175 #[doc = ""]
176 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
177 #[wasm_bindgen(method, setter = "remoteCandidateId")]
178 pub fn set_remote_candidate_id(this: &RtcIceCandidatePairStats, val: &str);
179 #[doc = "Get the `selected` field of this object."]
180 #[doc = ""]
181 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
182 #[wasm_bindgen(method, getter = "selected")]
183 pub fn get_selected(this: &RtcIceCandidatePairStats) -> Option<bool>;
184 #[doc = "Change the `selected` field of this object."]
185 #[doc = ""]
186 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
187 #[wasm_bindgen(method, setter = "selected")]
188 pub fn set_selected(this: &RtcIceCandidatePairStats, val: bool);
189 #[cfg(feature = "RtcStatsIceCandidatePairState")]
190 #[doc = "Get the `state` field of this object."]
191 #[doc = ""]
192 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`, `RtcStatsIceCandidatePairState`*"]
193 #[wasm_bindgen(method, getter = "state")]
194 pub fn get_state(this: &RtcIceCandidatePairStats) -> Option<RtcStatsIceCandidatePairState>;
195 #[cfg(feature = "RtcStatsIceCandidatePairState")]
196 #[doc = "Change the `state` field of this object."]
197 #[doc = ""]
198 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`, `RtcStatsIceCandidatePairState`*"]
199 #[wasm_bindgen(method, setter = "state")]
200 pub fn set_state(this: &RtcIceCandidatePairStats, val: RtcStatsIceCandidatePairState);
201 #[doc = "Get the `transportId` field of this object."]
202 #[doc = ""]
203 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
204 #[wasm_bindgen(method, getter = "transportId")]
205 pub fn get_transport_id(this: &RtcIceCandidatePairStats) -> Option<::alloc::string::String>;
206 #[doc = "Change the `transportId` field of this object."]
207 #[doc = ""]
208 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
209 #[wasm_bindgen(method, setter = "transportId")]
210 pub fn set_transport_id(this: &RtcIceCandidatePairStats, val: &str);
211 #[doc = "Get the `writable` field of this object."]
212 #[doc = ""]
213 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
214 #[wasm_bindgen(method, getter = "writable")]
215 pub fn get_writable(this: &RtcIceCandidatePairStats) -> Option<bool>;
216 #[doc = "Change the `writable` field of this object."]
217 #[doc = ""]
218 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
219 #[wasm_bindgen(method, setter = "writable")]
220 pub fn set_writable(this: &RtcIceCandidatePairStats, val: bool);
221}
222impl RtcIceCandidatePairStats {
223 #[doc = "Construct a new `RtcIceCandidatePairStats`."]
224 #[doc = ""]
225 #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
226 pub fn new() -> Self {
227 #[allow(unused_mut)]
228 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
229 ret
230 }
231 #[deprecated = "Use `set_id()` instead."]
232 pub fn id(&mut self, val: &str) -> &mut Self {
233 self.set_id(val);
234 self
235 }
236 #[deprecated = "Use `set_timestamp()` instead."]
237 pub fn timestamp(&mut self, val: f64) -> &mut Self {
238 self.set_timestamp(val);
239 self
240 }
241 #[cfg(feature = "RtcStatsType")]
242 #[deprecated = "Use `set_type()` instead."]
243 pub fn type_(&mut self, val: RtcStatsType) -> &mut Self {
244 self.set_type(val);
245 self
246 }
247 #[deprecated = "Use `set_bytes_received()` instead."]
248 pub fn bytes_received(&mut self, val: f64) -> &mut Self {
249 self.set_bytes_received(val);
250 self
251 }
252 #[deprecated = "Use `set_bytes_sent()` instead."]
253 pub fn bytes_sent(&mut self, val: f64) -> &mut Self {
254 self.set_bytes_sent(val);
255 self
256 }
257 #[deprecated = "Use `set_component_id()` instead."]
258 pub fn component_id(&mut self, val: u32) -> &mut Self {
259 self.set_component_id(val);
260 self
261 }
262 #[deprecated = "Use `set_last_packet_received_timestamp()` instead."]
263 pub fn last_packet_received_timestamp(&mut self, val: f64) -> &mut Self {
264 self.set_last_packet_received_timestamp(val);
265 self
266 }
267 #[deprecated = "Use `set_last_packet_sent_timestamp()` instead."]
268 pub fn last_packet_sent_timestamp(&mut self, val: f64) -> &mut Self {
269 self.set_last_packet_sent_timestamp(val);
270 self
271 }
272 #[deprecated = "Use `set_local_candidate_id()` instead."]
273 pub fn local_candidate_id(&mut self, val: &str) -> &mut Self {
274 self.set_local_candidate_id(val);
275 self
276 }
277 #[deprecated = "Use `set_nominated()` instead."]
278 pub fn nominated(&mut self, val: bool) -> &mut Self {
279 self.set_nominated(val);
280 self
281 }
282 #[deprecated = "Use `set_priority()` instead."]
283 pub fn priority(&mut self, val: f64) -> &mut Self {
284 self.set_priority(val);
285 self
286 }
287 #[deprecated = "Use `set_readable()` instead."]
288 pub fn readable(&mut self, val: bool) -> &mut Self {
289 self.set_readable(val);
290 self
291 }
292 #[deprecated = "Use `set_remote_candidate_id()` instead."]
293 pub fn remote_candidate_id(&mut self, val: &str) -> &mut Self {
294 self.set_remote_candidate_id(val);
295 self
296 }
297 #[deprecated = "Use `set_selected()` instead."]
298 pub fn selected(&mut self, val: bool) -> &mut Self {
299 self.set_selected(val);
300 self
301 }
302 #[cfg(feature = "RtcStatsIceCandidatePairState")]
303 #[deprecated = "Use `set_state()` instead."]
304 pub fn state(&mut self, val: RtcStatsIceCandidatePairState) -> &mut Self {
305 self.set_state(val);
306 self
307 }
308 #[deprecated = "Use `set_transport_id()` instead."]
309 pub fn transport_id(&mut self, val: &str) -> &mut Self {
310 self.set_transport_id(val);
311 self
312 }
313 #[deprecated = "Use `set_writable()` instead."]
314 pub fn writable(&mut self, val: bool) -> &mut Self {
315 self.set_writable(val);
316 self
317 }
318}
319impl Default for RtcIceCandidatePairStats {
320 fn default() -> Self {
321 Self::new()
322 }
323}