1#[non_exhaustive]
4#[derive(std::clone::Clone, std::cmp::PartialEq)]
5pub struct RegionInfo {
6 pub region_id: std::option::Option<std::string::String>,
8 pub provider_display_name: std::option::Option<std::string::String>,
10 pub region_display_name: std::option::Option<std::string::String>,
12 pub datacenter_coord: std::option::Option<crate::model::Coord>,
14 pub datacenter_distance_from_client: std::option::Option<crate::model::Distance>,
16}
17impl RegionInfo {
18 pub fn region_id(&self) -> std::option::Option<&str> {
20 self.region_id.as_deref()
21 }
22 pub fn provider_display_name(&self) -> std::option::Option<&str> {
24 self.provider_display_name.as_deref()
25 }
26 pub fn region_display_name(&self) -> std::option::Option<&str> {
28 self.region_display_name.as_deref()
29 }
30 pub fn datacenter_coord(&self) -> std::option::Option<&crate::model::Coord> {
32 self.datacenter_coord.as_ref()
33 }
34 pub fn datacenter_distance_from_client(&self) -> std::option::Option<&crate::model::Distance> {
36 self.datacenter_distance_from_client.as_ref()
37 }
38}
39impl std::fmt::Debug for RegionInfo {
40 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
41 let mut formatter = f.debug_struct("RegionInfo");
42 formatter.field("region_id", &self.region_id);
43 formatter.field("provider_display_name", &self.provider_display_name);
44 formatter.field("region_display_name", &self.region_display_name);
45 formatter.field("datacenter_coord", &self.datacenter_coord);
46 formatter.field(
47 "datacenter_distance_from_client",
48 &self.datacenter_distance_from_client,
49 );
50 formatter.finish()
51 }
52}
53pub mod region_info {
55 #[non_exhaustive]
57 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
58 pub struct Builder {
59 pub(crate) region_id: std::option::Option<std::string::String>,
60 pub(crate) provider_display_name: std::option::Option<std::string::String>,
61 pub(crate) region_display_name: std::option::Option<std::string::String>,
62 pub(crate) datacenter_coord: std::option::Option<crate::model::Coord>,
63 pub(crate) datacenter_distance_from_client: std::option::Option<crate::model::Distance>,
64 }
65 impl Builder {
66 pub fn region_id(mut self, input: impl Into<std::string::String>) -> Self {
68 self.region_id = Some(input.into());
69 self
70 }
71 pub fn set_region_id(mut self, input: std::option::Option<std::string::String>) -> Self {
73 self.region_id = input;
74 self
75 }
76 pub fn provider_display_name(mut self, input: impl Into<std::string::String>) -> Self {
78 self.provider_display_name = Some(input.into());
79 self
80 }
81 pub fn set_provider_display_name(
83 mut self,
84 input: std::option::Option<std::string::String>,
85 ) -> Self {
86 self.provider_display_name = input;
87 self
88 }
89 pub fn region_display_name(mut self, input: impl Into<std::string::String>) -> Self {
91 self.region_display_name = Some(input.into());
92 self
93 }
94 pub fn set_region_display_name(
96 mut self,
97 input: std::option::Option<std::string::String>,
98 ) -> Self {
99 self.region_display_name = input;
100 self
101 }
102 pub fn datacenter_coord(mut self, input: crate::model::Coord) -> Self {
104 self.datacenter_coord = Some(input);
105 self
106 }
107 pub fn set_datacenter_coord(
109 mut self,
110 input: std::option::Option<crate::model::Coord>,
111 ) -> Self {
112 self.datacenter_coord = input;
113 self
114 }
115 pub fn datacenter_distance_from_client(mut self, input: crate::model::Distance) -> Self {
117 self.datacenter_distance_from_client = Some(input);
118 self
119 }
120 pub fn set_datacenter_distance_from_client(
122 mut self,
123 input: std::option::Option<crate::model::Distance>,
124 ) -> Self {
125 self.datacenter_distance_from_client = input;
126 self
127 }
128 pub fn build(self) -> crate::model::RegionInfo {
130 crate::model::RegionInfo {
131 region_id: self.region_id,
132 provider_display_name: self.provider_display_name,
133 region_display_name: self.region_display_name,
134 datacenter_coord: self.datacenter_coord,
135 datacenter_distance_from_client: self.datacenter_distance_from_client,
136 }
137 }
138 }
139}
140impl RegionInfo {
141 pub fn builder() -> crate::model::region_info::Builder {
143 crate::model::region_info::Builder::default()
144 }
145}
146
147#[non_exhaustive]
149#[derive(std::clone::Clone, std::cmp::PartialEq)]
150pub struct Distance {
151 #[allow(missing_docs)] pub kilometers: std::option::Option<f64>,
153 #[allow(missing_docs)] pub miles: std::option::Option<f64>,
155}
156impl Distance {
157 #[allow(missing_docs)] pub fn kilometers(&self) -> std::option::Option<f64> {
159 self.kilometers
160 }
161 #[allow(missing_docs)] pub fn miles(&self) -> std::option::Option<f64> {
163 self.miles
164 }
165}
166impl std::fmt::Debug for Distance {
167 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
168 let mut formatter = f.debug_struct("Distance");
169 formatter.field("kilometers", &self.kilometers);
170 formatter.field("miles", &self.miles);
171 formatter.finish()
172 }
173}
174pub mod distance {
176 #[non_exhaustive]
178 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
179 pub struct Builder {
180 pub(crate) kilometers: std::option::Option<f64>,
181 pub(crate) miles: std::option::Option<f64>,
182 }
183 impl Builder {
184 #[allow(missing_docs)] pub fn kilometers(mut self, input: f64) -> Self {
186 self.kilometers = Some(input);
187 self
188 }
189 #[allow(missing_docs)] pub fn set_kilometers(mut self, input: std::option::Option<f64>) -> Self {
191 self.kilometers = input;
192 self
193 }
194 #[allow(missing_docs)] pub fn miles(mut self, input: f64) -> Self {
196 self.miles = Some(input);
197 self
198 }
199 #[allow(missing_docs)] pub fn set_miles(mut self, input: std::option::Option<f64>) -> Self {
201 self.miles = input;
202 self
203 }
204 pub fn build(self) -> crate::model::Distance {
206 crate::model::Distance {
207 kilometers: self.kilometers,
208 miles: self.miles,
209 }
210 }
211 }
212}
213impl Distance {
214 pub fn builder() -> crate::model::distance::Builder {
216 crate::model::distance::Builder::default()
217 }
218}
219
220#[non_exhaustive]
222#[derive(std::clone::Clone, std::cmp::PartialEq)]
223pub struct Coord {
224 #[allow(missing_docs)] pub latitude: std::option::Option<f64>,
226 #[allow(missing_docs)] pub longitude: std::option::Option<f64>,
228}
229impl Coord {
230 #[allow(missing_docs)] pub fn latitude(&self) -> std::option::Option<f64> {
232 self.latitude
233 }
234 #[allow(missing_docs)] pub fn longitude(&self) -> std::option::Option<f64> {
236 self.longitude
237 }
238}
239impl std::fmt::Debug for Coord {
240 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
241 let mut formatter = f.debug_struct("Coord");
242 formatter.field("latitude", &self.latitude);
243 formatter.field("longitude", &self.longitude);
244 formatter.finish()
245 }
246}
247pub mod coord {
249 #[non_exhaustive]
251 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
252 pub struct Builder {
253 pub(crate) latitude: std::option::Option<f64>,
254 pub(crate) longitude: std::option::Option<f64>,
255 }
256 impl Builder {
257 #[allow(missing_docs)] pub fn latitude(mut self, input: f64) -> Self {
259 self.latitude = Some(input);
260 self
261 }
262 #[allow(missing_docs)] pub fn set_latitude(mut self, input: std::option::Option<f64>) -> Self {
264 self.latitude = input;
265 self
266 }
267 #[allow(missing_docs)] pub fn longitude(mut self, input: f64) -> Self {
269 self.longitude = Some(input);
270 self
271 }
272 #[allow(missing_docs)] pub fn set_longitude(mut self, input: std::option::Option<f64>) -> Self {
274 self.longitude = input;
275 self
276 }
277 pub fn build(self) -> crate::model::Coord {
279 crate::model::Coord {
280 latitude: self.latitude,
281 longitude: self.longitude,
282 }
283 }
284 }
285}
286impl Coord {
287 pub fn builder() -> crate::model::coord::Builder {
289 crate::model::coord::Builder::default()
290 }
291}
292
293#[non_exhaustive]
295#[derive(std::clone::Clone, std::cmp::PartialEq)]
296pub struct LobbyInfo {
297 #[allow(missing_docs)] pub region_id: std::option::Option<std::string::String>,
299 #[allow(missing_docs)] pub game_mode_id: std::option::Option<std::string::String>,
301 pub lobby_id: std::option::Option<std::string::String>,
303 pub max_players_normal: std::option::Option<i32>,
305 pub max_players_direct: std::option::Option<i32>,
307 pub max_players_party: std::option::Option<i32>,
309 pub total_player_count: std::option::Option<i32>,
311}
312impl LobbyInfo {
313 #[allow(missing_docs)] pub fn region_id(&self) -> std::option::Option<&str> {
315 self.region_id.as_deref()
316 }
317 #[allow(missing_docs)] pub fn game_mode_id(&self) -> std::option::Option<&str> {
319 self.game_mode_id.as_deref()
320 }
321 pub fn lobby_id(&self) -> std::option::Option<&str> {
323 self.lobby_id.as_deref()
324 }
325 pub fn max_players_normal(&self) -> std::option::Option<i32> {
327 self.max_players_normal
328 }
329 pub fn max_players_direct(&self) -> std::option::Option<i32> {
331 self.max_players_direct
332 }
333 pub fn max_players_party(&self) -> std::option::Option<i32> {
335 self.max_players_party
336 }
337 pub fn total_player_count(&self) -> std::option::Option<i32> {
339 self.total_player_count
340 }
341}
342impl std::fmt::Debug for LobbyInfo {
343 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
344 let mut formatter = f.debug_struct("LobbyInfo");
345 formatter.field("region_id", &self.region_id);
346 formatter.field("game_mode_id", &self.game_mode_id);
347 formatter.field("lobby_id", &self.lobby_id);
348 formatter.field("max_players_normal", &self.max_players_normal);
349 formatter.field("max_players_direct", &self.max_players_direct);
350 formatter.field("max_players_party", &self.max_players_party);
351 formatter.field("total_player_count", &self.total_player_count);
352 formatter.finish()
353 }
354}
355pub mod lobby_info {
357 #[non_exhaustive]
359 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
360 pub struct Builder {
361 pub(crate) region_id: std::option::Option<std::string::String>,
362 pub(crate) game_mode_id: std::option::Option<std::string::String>,
363 pub(crate) lobby_id: std::option::Option<std::string::String>,
364 pub(crate) max_players_normal: std::option::Option<i32>,
365 pub(crate) max_players_direct: std::option::Option<i32>,
366 pub(crate) max_players_party: std::option::Option<i32>,
367 pub(crate) total_player_count: std::option::Option<i32>,
368 }
369 impl Builder {
370 #[allow(missing_docs)] pub fn region_id(mut self, input: impl Into<std::string::String>) -> Self {
372 self.region_id = Some(input.into());
373 self
374 }
375 #[allow(missing_docs)] pub fn set_region_id(mut self, input: std::option::Option<std::string::String>) -> Self {
377 self.region_id = input;
378 self
379 }
380 #[allow(missing_docs)] pub fn game_mode_id(mut self, input: impl Into<std::string::String>) -> Self {
382 self.game_mode_id = Some(input.into());
383 self
384 }
385 #[allow(missing_docs)] pub fn set_game_mode_id(mut self, input: std::option::Option<std::string::String>) -> Self {
387 self.game_mode_id = input;
388 self
389 }
390 pub fn lobby_id(mut self, input: impl Into<std::string::String>) -> Self {
392 self.lobby_id = Some(input.into());
393 self
394 }
395 pub fn set_lobby_id(mut self, input: std::option::Option<std::string::String>) -> Self {
397 self.lobby_id = input;
398 self
399 }
400 pub fn max_players_normal(mut self, input: i32) -> Self {
402 self.max_players_normal = Some(input);
403 self
404 }
405 pub fn set_max_players_normal(mut self, input: std::option::Option<i32>) -> Self {
407 self.max_players_normal = input;
408 self
409 }
410 pub fn max_players_direct(mut self, input: i32) -> Self {
412 self.max_players_direct = Some(input);
413 self
414 }
415 pub fn set_max_players_direct(mut self, input: std::option::Option<i32>) -> Self {
417 self.max_players_direct = input;
418 self
419 }
420 pub fn max_players_party(mut self, input: i32) -> Self {
422 self.max_players_party = Some(input);
423 self
424 }
425 pub fn set_max_players_party(mut self, input: std::option::Option<i32>) -> Self {
427 self.max_players_party = input;
428 self
429 }
430 pub fn total_player_count(mut self, input: i32) -> Self {
432 self.total_player_count = Some(input);
433 self
434 }
435 pub fn set_total_player_count(mut self, input: std::option::Option<i32>) -> Self {
437 self.total_player_count = input;
438 self
439 }
440 pub fn build(self) -> crate::model::LobbyInfo {
442 crate::model::LobbyInfo {
443 region_id: self.region_id,
444 game_mode_id: self.game_mode_id,
445 lobby_id: self.lobby_id,
446 max_players_normal: self.max_players_normal,
447 max_players_direct: self.max_players_direct,
448 max_players_party: self.max_players_party,
449 total_player_count: self.total_player_count,
450 }
451 }
452 }
453}
454impl LobbyInfo {
455 pub fn builder() -> crate::model::lobby_info::Builder {
457 crate::model::lobby_info::Builder::default()
458 }
459}
460
461#[non_exhaustive]
463#[derive(std::clone::Clone, std::cmp::PartialEq)]
464pub struct GameModeInfo {
465 pub game_mode_id: std::option::Option<std::string::String>,
467}
468impl GameModeInfo {
469 pub fn game_mode_id(&self) -> std::option::Option<&str> {
471 self.game_mode_id.as_deref()
472 }
473}
474impl std::fmt::Debug for GameModeInfo {
475 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
476 let mut formatter = f.debug_struct("GameModeInfo");
477 formatter.field("game_mode_id", &self.game_mode_id);
478 formatter.finish()
479 }
480}
481pub mod game_mode_info {
483 #[non_exhaustive]
485 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
486 pub struct Builder {
487 pub(crate) game_mode_id: std::option::Option<std::string::String>,
488 }
489 impl Builder {
490 pub fn game_mode_id(mut self, input: impl Into<std::string::String>) -> Self {
492 self.game_mode_id = Some(input.into());
493 self
494 }
495 pub fn set_game_mode_id(mut self, input: std::option::Option<std::string::String>) -> Self {
497 self.game_mode_id = input;
498 self
499 }
500 pub fn build(self) -> crate::model::GameModeInfo {
502 crate::model::GameModeInfo {
503 game_mode_id: self.game_mode_id,
504 }
505 }
506 }
507}
508impl GameModeInfo {
509 pub fn builder() -> crate::model::game_mode_info::Builder {
511 crate::model::game_mode_info::Builder::default()
512 }
513}
514
515#[non_exhaustive]
517#[derive(std::clone::Clone, std::cmp::PartialEq)]
518pub struct MatchmakerLobbyJoinInfo {
519 pub lobby_id: std::option::Option<std::string::String>,
521 pub region: std::option::Option<crate::model::MatchmakerLobbyJoinInfoRegion>,
523 pub ports: std::option::Option<
525 std::collections::HashMap<std::string::String, crate::model::MatchmakerLobbyJoinInfoPort>,
526 >,
527 pub player: std::option::Option<crate::model::MatchmakerLobbyJoinInfoPlayer>,
529}
530impl MatchmakerLobbyJoinInfo {
531 pub fn lobby_id(&self) -> std::option::Option<&str> {
533 self.lobby_id.as_deref()
534 }
535 pub fn region(&self) -> std::option::Option<&crate::model::MatchmakerLobbyJoinInfoRegion> {
537 self.region.as_ref()
538 }
539 pub fn ports(
541 &self,
542 ) -> std::option::Option<
543 &std::collections::HashMap<std::string::String, crate::model::MatchmakerLobbyJoinInfoPort>,
544 > {
545 self.ports.as_ref()
546 }
547 pub fn player(&self) -> std::option::Option<&crate::model::MatchmakerLobbyJoinInfoPlayer> {
549 self.player.as_ref()
550 }
551}
552impl std::fmt::Debug for MatchmakerLobbyJoinInfo {
553 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
554 let mut formatter = f.debug_struct("MatchmakerLobbyJoinInfo");
555 formatter.field("lobby_id", &self.lobby_id);
556 formatter.field("region", &self.region);
557 formatter.field("ports", &self.ports);
558 formatter.field("player", &self.player);
559 formatter.finish()
560 }
561}
562pub mod matchmaker_lobby_join_info {
564 #[non_exhaustive]
566 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
567 pub struct Builder {
568 pub(crate) lobby_id: std::option::Option<std::string::String>,
569 pub(crate) region: std::option::Option<crate::model::MatchmakerLobbyJoinInfoRegion>,
570 pub(crate) ports: std::option::Option<
571 std::collections::HashMap<
572 std::string::String,
573 crate::model::MatchmakerLobbyJoinInfoPort,
574 >,
575 >,
576 pub(crate) player: std::option::Option<crate::model::MatchmakerLobbyJoinInfoPlayer>,
577 }
578 impl Builder {
579 pub fn lobby_id(mut self, input: impl Into<std::string::String>) -> Self {
581 self.lobby_id = Some(input.into());
582 self
583 }
584 pub fn set_lobby_id(mut self, input: std::option::Option<std::string::String>) -> Self {
586 self.lobby_id = input;
587 self
588 }
589 pub fn region(mut self, input: crate::model::MatchmakerLobbyJoinInfoRegion) -> Self {
591 self.region = Some(input);
592 self
593 }
594 pub fn set_region(
596 mut self,
597 input: std::option::Option<crate::model::MatchmakerLobbyJoinInfoRegion>,
598 ) -> Self {
599 self.region = input;
600 self
601 }
602 pub fn ports(
608 mut self,
609 k: impl Into<std::string::String>,
610 v: crate::model::MatchmakerLobbyJoinInfoPort,
611 ) -> Self {
612 let mut hash_map = self.ports.unwrap_or_default();
613 hash_map.insert(k.into(), v);
614 self.ports = Some(hash_map);
615 self
616 }
617 pub fn set_ports(
619 mut self,
620 input: std::option::Option<
621 std::collections::HashMap<
622 std::string::String,
623 crate::model::MatchmakerLobbyJoinInfoPort,
624 >,
625 >,
626 ) -> Self {
627 self.ports = input;
628 self
629 }
630 pub fn player(mut self, input: crate::model::MatchmakerLobbyJoinInfoPlayer) -> Self {
632 self.player = Some(input);
633 self
634 }
635 pub fn set_player(
637 mut self,
638 input: std::option::Option<crate::model::MatchmakerLobbyJoinInfoPlayer>,
639 ) -> Self {
640 self.player = input;
641 self
642 }
643 pub fn build(self) -> crate::model::MatchmakerLobbyJoinInfo {
645 crate::model::MatchmakerLobbyJoinInfo {
646 lobby_id: self.lobby_id,
647 region: self.region,
648 ports: self.ports,
649 player: self.player,
650 }
651 }
652 }
653}
654impl MatchmakerLobbyJoinInfo {
655 pub fn builder() -> crate::model::matchmaker_lobby_join_info::Builder {
657 crate::model::matchmaker_lobby_join_info::Builder::default()
658 }
659}
660
661#[non_exhaustive]
663#[derive(std::clone::Clone, std::cmp::PartialEq)]
664pub struct MatchmakerLobbyJoinInfoPlayer {
665 pub token: std::option::Option<std::string::String>,
667}
668impl MatchmakerLobbyJoinInfoPlayer {
669 pub fn token(&self) -> std::option::Option<&str> {
671 self.token.as_deref()
672 }
673}
674impl std::fmt::Debug for MatchmakerLobbyJoinInfoPlayer {
675 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
676 let mut formatter = f.debug_struct("MatchmakerLobbyJoinInfoPlayer");
677 formatter.field("token", &"*** Sensitive Data Redacted ***");
678 formatter.finish()
679 }
680}
681pub mod matchmaker_lobby_join_info_player {
683 #[non_exhaustive]
685 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
686 pub struct Builder {
687 pub(crate) token: std::option::Option<std::string::String>,
688 }
689 impl Builder {
690 pub fn token(mut self, input: impl Into<std::string::String>) -> Self {
692 self.token = Some(input.into());
693 self
694 }
695 pub fn set_token(mut self, input: std::option::Option<std::string::String>) -> Self {
697 self.token = input;
698 self
699 }
700 pub fn build(self) -> crate::model::MatchmakerLobbyJoinInfoPlayer {
702 crate::model::MatchmakerLobbyJoinInfoPlayer { token: self.token }
703 }
704 }
705}
706impl MatchmakerLobbyJoinInfoPlayer {
707 pub fn builder() -> crate::model::matchmaker_lobby_join_info_player::Builder {
709 crate::model::matchmaker_lobby_join_info_player::Builder::default()
710 }
711}
712
713#[non_exhaustive]
715#[derive(std::clone::Clone, std::cmp::PartialEq)]
716pub struct MatchmakerLobbyJoinInfoPort {
717 pub host: std::option::Option<std::string::String>,
719 pub hostname: std::option::Option<std::string::String>,
721 pub port: std::option::Option<i32>,
723 pub port_range: std::option::Option<crate::model::MatchmakerLobbyJoinInfoPortRange>,
725 pub is_tls: std::option::Option<bool>,
727}
728impl MatchmakerLobbyJoinInfoPort {
729 pub fn host(&self) -> std::option::Option<&str> {
731 self.host.as_deref()
732 }
733 pub fn hostname(&self) -> std::option::Option<&str> {
735 self.hostname.as_deref()
736 }
737 pub fn port(&self) -> std::option::Option<i32> {
739 self.port
740 }
741 pub fn port_range(
743 &self,
744 ) -> std::option::Option<&crate::model::MatchmakerLobbyJoinInfoPortRange> {
745 self.port_range.as_ref()
746 }
747 pub fn is_tls(&self) -> std::option::Option<bool> {
749 self.is_tls
750 }
751}
752impl std::fmt::Debug for MatchmakerLobbyJoinInfoPort {
753 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
754 let mut formatter = f.debug_struct("MatchmakerLobbyJoinInfoPort");
755 formatter.field("host", &self.host);
756 formatter.field("hostname", &self.hostname);
757 formatter.field("port", &self.port);
758 formatter.field("port_range", &self.port_range);
759 formatter.field("is_tls", &self.is_tls);
760 formatter.finish()
761 }
762}
763pub mod matchmaker_lobby_join_info_port {
765 #[non_exhaustive]
767 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
768 pub struct Builder {
769 pub(crate) host: std::option::Option<std::string::String>,
770 pub(crate) hostname: std::option::Option<std::string::String>,
771 pub(crate) port: std::option::Option<i32>,
772 pub(crate) port_range: std::option::Option<crate::model::MatchmakerLobbyJoinInfoPortRange>,
773 pub(crate) is_tls: std::option::Option<bool>,
774 }
775 impl Builder {
776 pub fn host(mut self, input: impl Into<std::string::String>) -> Self {
778 self.host = Some(input.into());
779 self
780 }
781 pub fn set_host(mut self, input: std::option::Option<std::string::String>) -> Self {
783 self.host = input;
784 self
785 }
786 pub fn hostname(mut self, input: impl Into<std::string::String>) -> Self {
788 self.hostname = Some(input.into());
789 self
790 }
791 pub fn set_hostname(mut self, input: std::option::Option<std::string::String>) -> Self {
793 self.hostname = input;
794 self
795 }
796 pub fn port(mut self, input: i32) -> Self {
798 self.port = Some(input);
799 self
800 }
801 pub fn set_port(mut self, input: std::option::Option<i32>) -> Self {
803 self.port = input;
804 self
805 }
806 pub fn port_range(mut self, input: crate::model::MatchmakerLobbyJoinInfoPortRange) -> Self {
808 self.port_range = Some(input);
809 self
810 }
811 pub fn set_port_range(
813 mut self,
814 input: std::option::Option<crate::model::MatchmakerLobbyJoinInfoPortRange>,
815 ) -> Self {
816 self.port_range = input;
817 self
818 }
819 pub fn is_tls(mut self, input: bool) -> Self {
821 self.is_tls = Some(input);
822 self
823 }
824 pub fn set_is_tls(mut self, input: std::option::Option<bool>) -> Self {
826 self.is_tls = input;
827 self
828 }
829 pub fn build(self) -> crate::model::MatchmakerLobbyJoinInfoPort {
831 crate::model::MatchmakerLobbyJoinInfoPort {
832 host: self.host,
833 hostname: self.hostname,
834 port: self.port,
835 port_range: self.port_range,
836 is_tls: self.is_tls,
837 }
838 }
839 }
840}
841impl MatchmakerLobbyJoinInfoPort {
842 pub fn builder() -> crate::model::matchmaker_lobby_join_info_port::Builder {
844 crate::model::matchmaker_lobby_join_info_port::Builder::default()
845 }
846}
847
848#[non_exhaustive]
850#[derive(std::clone::Clone, std::cmp::PartialEq)]
851pub struct MatchmakerLobbyJoinInfoPortRange {
852 pub min: std::option::Option<i32>,
854 pub max: std::option::Option<i32>,
856}
857impl MatchmakerLobbyJoinInfoPortRange {
858 pub fn min(&self) -> std::option::Option<i32> {
860 self.min
861 }
862 pub fn max(&self) -> std::option::Option<i32> {
864 self.max
865 }
866}
867impl std::fmt::Debug for MatchmakerLobbyJoinInfoPortRange {
868 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
869 let mut formatter = f.debug_struct("MatchmakerLobbyJoinInfoPortRange");
870 formatter.field("min", &self.min);
871 formatter.field("max", &self.max);
872 formatter.finish()
873 }
874}
875pub mod matchmaker_lobby_join_info_port_range {
877 #[non_exhaustive]
879 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
880 pub struct Builder {
881 pub(crate) min: std::option::Option<i32>,
882 pub(crate) max: std::option::Option<i32>,
883 }
884 impl Builder {
885 pub fn min(mut self, input: i32) -> Self {
887 self.min = Some(input);
888 self
889 }
890 pub fn set_min(mut self, input: std::option::Option<i32>) -> Self {
892 self.min = input;
893 self
894 }
895 pub fn max(mut self, input: i32) -> Self {
897 self.max = Some(input);
898 self
899 }
900 pub fn set_max(mut self, input: std::option::Option<i32>) -> Self {
902 self.max = input;
903 self
904 }
905 pub fn build(self) -> crate::model::MatchmakerLobbyJoinInfoPortRange {
907 crate::model::MatchmakerLobbyJoinInfoPortRange {
908 min: self.min,
909 max: self.max,
910 }
911 }
912 }
913}
914impl MatchmakerLobbyJoinInfoPortRange {
915 pub fn builder() -> crate::model::matchmaker_lobby_join_info_port_range::Builder {
917 crate::model::matchmaker_lobby_join_info_port_range::Builder::default()
918 }
919}
920
921#[non_exhaustive]
923#[derive(std::clone::Clone, std::cmp::PartialEq)]
924pub struct MatchmakerLobbyJoinInfoRegion {
925 pub region_id: std::option::Option<std::string::String>,
927 pub display_name: std::option::Option<std::string::String>,
929}
930impl MatchmakerLobbyJoinInfoRegion {
931 pub fn region_id(&self) -> std::option::Option<&str> {
933 self.region_id.as_deref()
934 }
935 pub fn display_name(&self) -> std::option::Option<&str> {
937 self.display_name.as_deref()
938 }
939}
940impl std::fmt::Debug for MatchmakerLobbyJoinInfoRegion {
941 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
942 let mut formatter = f.debug_struct("MatchmakerLobbyJoinInfoRegion");
943 formatter.field("region_id", &self.region_id);
944 formatter.field("display_name", &self.display_name);
945 formatter.finish()
946 }
947}
948pub mod matchmaker_lobby_join_info_region {
950 #[non_exhaustive]
952 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
953 pub struct Builder {
954 pub(crate) region_id: std::option::Option<std::string::String>,
955 pub(crate) display_name: std::option::Option<std::string::String>,
956 }
957 impl Builder {
958 pub fn region_id(mut self, input: impl Into<std::string::String>) -> Self {
960 self.region_id = Some(input.into());
961 self
962 }
963 pub fn set_region_id(mut self, input: std::option::Option<std::string::String>) -> Self {
965 self.region_id = input;
966 self
967 }
968 pub fn display_name(mut self, input: impl Into<std::string::String>) -> Self {
970 self.display_name = Some(input.into());
971 self
972 }
973 pub fn set_display_name(mut self, input: std::option::Option<std::string::String>) -> Self {
975 self.display_name = input;
976 self
977 }
978 pub fn build(self) -> crate::model::MatchmakerLobbyJoinInfoRegion {
980 crate::model::MatchmakerLobbyJoinInfoRegion {
981 region_id: self.region_id,
982 display_name: self.display_name,
983 }
984 }
985 }
986}
987impl MatchmakerLobbyJoinInfoRegion {
988 pub fn builder() -> crate::model::matchmaker_lobby_join_info_region::Builder {
990 crate::model::matchmaker_lobby_join_info_region::Builder::default()
991 }
992}
993
994#[non_exhaustive]
996#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
997pub enum CaptchaConfig {
998 Hcaptcha(crate::model::CaptchaConfigHcaptcha),
1000 #[non_exhaustive]
1008 Unknown,
1009}
1010impl CaptchaConfig {
1011 #[allow(irrefutable_let_patterns)]
1012 pub fn as_hcaptcha(&self) -> std::result::Result<&crate::model::CaptchaConfigHcaptcha, &Self> {
1015 if let CaptchaConfig::Hcaptcha(val) = &self {
1016 Ok(val)
1017 } else {
1018 Err(self)
1019 }
1020 }
1021 pub fn is_hcaptcha(&self) -> bool {
1023 self.as_hcaptcha().is_ok()
1024 }
1025 pub fn is_unknown(&self) -> bool {
1027 matches!(self, Self::Unknown)
1028 }
1029}
1030
1031#[non_exhaustive]
1033#[derive(std::clone::Clone, std::cmp::PartialEq)]
1034pub struct CaptchaConfigHcaptcha {
1035 #[allow(missing_docs)] pub client_response: std::option::Option<std::string::String>,
1037}
1038impl CaptchaConfigHcaptcha {
1039 #[allow(missing_docs)] pub fn client_response(&self) -> std::option::Option<&str> {
1041 self.client_response.as_deref()
1042 }
1043}
1044impl std::fmt::Debug for CaptchaConfigHcaptcha {
1045 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1046 let mut formatter = f.debug_struct("CaptchaConfigHcaptcha");
1047 formatter.field("client_response", &self.client_response);
1048 formatter.finish()
1049 }
1050}
1051pub mod captcha_config_hcaptcha {
1053 #[non_exhaustive]
1055 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1056 pub struct Builder {
1057 pub(crate) client_response: std::option::Option<std::string::String>,
1058 }
1059 impl Builder {
1060 #[allow(missing_docs)] pub fn client_response(mut self, input: impl Into<std::string::String>) -> Self {
1062 self.client_response = Some(input.into());
1063 self
1064 }
1065 #[allow(missing_docs)] pub fn set_client_response(
1067 mut self,
1068 input: std::option::Option<std::string::String>,
1069 ) -> Self {
1070 self.client_response = input;
1071 self
1072 }
1073 pub fn build(self) -> crate::model::CaptchaConfigHcaptcha {
1075 crate::model::CaptchaConfigHcaptcha {
1076 client_response: self.client_response,
1077 }
1078 }
1079 }
1080}
1081impl CaptchaConfigHcaptcha {
1082 pub fn builder() -> crate::model::captcha_config_hcaptcha::Builder {
1084 crate::model::captcha_config_hcaptcha::Builder::default()
1085 }
1086}