rivet_matchmaker/
model.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// A region that the player can connect to.
3#[non_exhaustive]
4#[derive(std::clone::Clone, std::cmp::PartialEq)]
5pub struct RegionInfo {
6	/// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short.
7	pub region_id: std::option::Option<std::string::String>,
8	/// A universally unique identifier.
9	pub provider_display_name: std::option::Option<std::string::String>,
10	/// A universally unique identifier.
11	pub region_display_name: std::option::Option<std::string::String>,
12	/// Geographical coordinates for a location on Planet Earth.
13	pub datacenter_coord: std::option::Option<crate::model::Coord>,
14	/// Distance available in multiple units.
15	pub datacenter_distance_from_client: std::option::Option<crate::model::Distance>,
16}
17impl RegionInfo {
18	/// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short.
19	pub fn region_id(&self) -> std::option::Option<&str> {
20		self.region_id.as_deref()
21	}
22	/// A universally unique identifier.
23	pub fn provider_display_name(&self) -> std::option::Option<&str> {
24		self.provider_display_name.as_deref()
25	}
26	/// A universally unique identifier.
27	pub fn region_display_name(&self) -> std::option::Option<&str> {
28		self.region_display_name.as_deref()
29	}
30	/// Geographical coordinates for a location on Planet Earth.
31	pub fn datacenter_coord(&self) -> std::option::Option<&crate::model::Coord> {
32		self.datacenter_coord.as_ref()
33	}
34	/// Distance available in multiple units.
35	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}
53/// See [`RegionInfo`](crate::model::RegionInfo)
54pub mod region_info {
55	/// A builder for [`RegionInfo`](crate::model::RegionInfo)
56	#[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		/// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short.
67		pub fn region_id(mut self, input: impl Into<std::string::String>) -> Self {
68			self.region_id = Some(input.into());
69			self
70		}
71		/// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short.
72		pub fn set_region_id(mut self, input: std::option::Option<std::string::String>) -> Self {
73			self.region_id = input;
74			self
75		}
76		/// A universally unique identifier.
77		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		/// A universally unique identifier.
82		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		/// A universally unique identifier.
90		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		/// A universally unique identifier.
95		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		/// Geographical coordinates for a location on Planet Earth.
103		pub fn datacenter_coord(mut self, input: crate::model::Coord) -> Self {
104			self.datacenter_coord = Some(input);
105			self
106		}
107		/// Geographical coordinates for a location on Planet Earth.
108		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		/// Distance available in multiple units.
116		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		/// Distance available in multiple units.
121		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		/// Consumes the builder and constructs a [`RegionInfo`](crate::model::RegionInfo)
129		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	/// Creates a new builder-style object to manufacture [`RegionInfo`](crate::model::RegionInfo)
142	pub fn builder() -> crate::model::region_info::Builder {
143		crate::model::region_info::Builder::default()
144	}
145}
146
147/// Distance available in multiple units.
148#[non_exhaustive]
149#[derive(std::clone::Clone, std::cmp::PartialEq)]
150pub struct Distance {
151	#[allow(missing_docs)] // documentation missing in model
152	pub kilometers: std::option::Option<f64>,
153	#[allow(missing_docs)] // documentation missing in model
154	pub miles: std::option::Option<f64>,
155}
156impl Distance {
157	#[allow(missing_docs)] // documentation missing in model
158	pub fn kilometers(&self) -> std::option::Option<f64> {
159		self.kilometers
160	}
161	#[allow(missing_docs)] // documentation missing in model
162	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}
174/// See [`Distance`](crate::model::Distance)
175pub mod distance {
176	/// A builder for [`Distance`](crate::model::Distance)
177	#[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)] // documentation missing in model
185		pub fn kilometers(mut self, input: f64) -> Self {
186			self.kilometers = Some(input);
187			self
188		}
189		#[allow(missing_docs)] // documentation missing in model
190		pub fn set_kilometers(mut self, input: std::option::Option<f64>) -> Self {
191			self.kilometers = input;
192			self
193		}
194		#[allow(missing_docs)] // documentation missing in model
195		pub fn miles(mut self, input: f64) -> Self {
196			self.miles = Some(input);
197			self
198		}
199		#[allow(missing_docs)] // documentation missing in model
200		pub fn set_miles(mut self, input: std::option::Option<f64>) -> Self {
201			self.miles = input;
202			self
203		}
204		/// Consumes the builder and constructs a [`Distance`](crate::model::Distance)
205		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	/// Creates a new builder-style object to manufacture [`Distance`](crate::model::Distance)
215	pub fn builder() -> crate::model::distance::Builder {
216		crate::model::distance::Builder::default()
217	}
218}
219
220/// Geographical coordinates for a location on Planet Earth.
221#[non_exhaustive]
222#[derive(std::clone::Clone, std::cmp::PartialEq)]
223pub struct Coord {
224	#[allow(missing_docs)] // documentation missing in model
225	pub latitude: std::option::Option<f64>,
226	#[allow(missing_docs)] // documentation missing in model
227	pub longitude: std::option::Option<f64>,
228}
229impl Coord {
230	#[allow(missing_docs)] // documentation missing in model
231	pub fn latitude(&self) -> std::option::Option<f64> {
232		self.latitude
233	}
234	#[allow(missing_docs)] // documentation missing in model
235	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}
247/// See [`Coord`](crate::model::Coord)
248pub mod coord {
249	/// A builder for [`Coord`](crate::model::Coord)
250	#[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)] // documentation missing in model
258		pub fn latitude(mut self, input: f64) -> Self {
259			self.latitude = Some(input);
260			self
261		}
262		#[allow(missing_docs)] // documentation missing in model
263		pub fn set_latitude(mut self, input: std::option::Option<f64>) -> Self {
264			self.latitude = input;
265			self
266		}
267		#[allow(missing_docs)] // documentation missing in model
268		pub fn longitude(mut self, input: f64) -> Self {
269			self.longitude = Some(input);
270			self
271		}
272		#[allow(missing_docs)] // documentation missing in model
273		pub fn set_longitude(mut self, input: std::option::Option<f64>) -> Self {
274			self.longitude = input;
275			self
276		}
277		/// Consumes the builder and constructs a [`Coord`](crate::model::Coord)
278		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	/// Creates a new builder-style object to manufacture [`Coord`](crate::model::Coord)
288	pub fn builder() -> crate::model::coord::Builder {
289		crate::model::coord::Builder::default()
290	}
291}
292
293/// A public lobby in the lobby list.
294#[non_exhaustive]
295#[derive(std::clone::Clone, std::cmp::PartialEq)]
296pub struct LobbyInfo {
297	#[allow(missing_docs)] // documentation missing in model
298	pub region_id: std::option::Option<std::string::String>,
299	#[allow(missing_docs)] // documentation missing in model
300	pub game_mode_id: std::option::Option<std::string::String>,
301	/// A universally unique identifier.
302	pub lobby_id: std::option::Option<std::string::String>,
303	/// Unsigned 32 bit integer.
304	pub max_players_normal: std::option::Option<i32>,
305	/// Unsigned 32 bit integer.
306	pub max_players_direct: std::option::Option<i32>,
307	/// Unsigned 32 bit integer.
308	pub max_players_party: std::option::Option<i32>,
309	/// Unsigned 32 bit integer.
310	pub total_player_count: std::option::Option<i32>,
311}
312impl LobbyInfo {
313	#[allow(missing_docs)] // documentation missing in model
314	pub fn region_id(&self) -> std::option::Option<&str> {
315		self.region_id.as_deref()
316	}
317	#[allow(missing_docs)] // documentation missing in model
318	pub fn game_mode_id(&self) -> std::option::Option<&str> {
319		self.game_mode_id.as_deref()
320	}
321	/// A universally unique identifier.
322	pub fn lobby_id(&self) -> std::option::Option<&str> {
323		self.lobby_id.as_deref()
324	}
325	/// Unsigned 32 bit integer.
326	pub fn max_players_normal(&self) -> std::option::Option<i32> {
327		self.max_players_normal
328	}
329	/// Unsigned 32 bit integer.
330	pub fn max_players_direct(&self) -> std::option::Option<i32> {
331		self.max_players_direct
332	}
333	/// Unsigned 32 bit integer.
334	pub fn max_players_party(&self) -> std::option::Option<i32> {
335		self.max_players_party
336	}
337	/// Unsigned 32 bit integer.
338	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}
355/// See [`LobbyInfo`](crate::model::LobbyInfo)
356pub mod lobby_info {
357	/// A builder for [`LobbyInfo`](crate::model::LobbyInfo)
358	#[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)] // documentation missing in model
371		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)] // documentation missing in model
376		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)] // documentation missing in model
381		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)] // documentation missing in model
386		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		/// A universally unique identifier.
391		pub fn lobby_id(mut self, input: impl Into<std::string::String>) -> Self {
392			self.lobby_id = Some(input.into());
393			self
394		}
395		/// A universally unique identifier.
396		pub fn set_lobby_id(mut self, input: std::option::Option<std::string::String>) -> Self {
397			self.lobby_id = input;
398			self
399		}
400		/// Unsigned 32 bit integer.
401		pub fn max_players_normal(mut self, input: i32) -> Self {
402			self.max_players_normal = Some(input);
403			self
404		}
405		/// Unsigned 32 bit integer.
406		pub fn set_max_players_normal(mut self, input: std::option::Option<i32>) -> Self {
407			self.max_players_normal = input;
408			self
409		}
410		/// Unsigned 32 bit integer.
411		pub fn max_players_direct(mut self, input: i32) -> Self {
412			self.max_players_direct = Some(input);
413			self
414		}
415		/// Unsigned 32 bit integer.
416		pub fn set_max_players_direct(mut self, input: std::option::Option<i32>) -> Self {
417			self.max_players_direct = input;
418			self
419		}
420		/// Unsigned 32 bit integer.
421		pub fn max_players_party(mut self, input: i32) -> Self {
422			self.max_players_party = Some(input);
423			self
424		}
425		/// Unsigned 32 bit integer.
426		pub fn set_max_players_party(mut self, input: std::option::Option<i32>) -> Self {
427			self.max_players_party = input;
428			self
429		}
430		/// Unsigned 32 bit integer.
431		pub fn total_player_count(mut self, input: i32) -> Self {
432			self.total_player_count = Some(input);
433			self
434		}
435		/// Unsigned 32 bit integer.
436		pub fn set_total_player_count(mut self, input: std::option::Option<i32>) -> Self {
437			self.total_player_count = input;
438			self
439		}
440		/// Consumes the builder and constructs a [`LobbyInfo`](crate::model::LobbyInfo)
441		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	/// Creates a new builder-style object to manufacture [`LobbyInfo`](crate::model::LobbyInfo)
456	pub fn builder() -> crate::model::lobby_info::Builder {
457		crate::model::lobby_info::Builder::default()
458	}
459}
460
461/// A game mode that the player can join.
462#[non_exhaustive]
463#[derive(std::clone::Clone, std::cmp::PartialEq)]
464pub struct GameModeInfo {
465	/// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short.
466	pub game_mode_id: std::option::Option<std::string::String>,
467}
468impl GameModeInfo {
469	/// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short.
470	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}
481/// See [`GameModeInfo`](crate::model::GameModeInfo)
482pub mod game_mode_info {
483	/// A builder for [`GameModeInfo`](crate::model::GameModeInfo)
484	#[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		/// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short.
491		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		/// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short.
496		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		/// Consumes the builder and constructs a [`GameModeInfo`](crate::model::GameModeInfo)
501		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	/// Creates a new builder-style object to manufacture [`GameModeInfo`](crate::model::GameModeInfo)
510	pub fn builder() -> crate::model::game_mode_info::Builder {
511		crate::model::game_mode_info::Builder::default()
512	}
513}
514
515/// A matchmaker lobby.
516#[non_exhaustive]
517#[derive(std::clone::Clone, std::cmp::PartialEq)]
518pub struct MatchmakerLobbyJoinInfo {
519	/// A universally unique identifier.
520	pub lobby_id: std::option::Option<std::string::String>,
521	/// A matchmaker lobby region.
522	pub region: std::option::Option<crate::model::MatchmakerLobbyJoinInfoRegion>,
523	/// A list of lobby ports.
524	pub ports: std::option::Option<
525		std::collections::HashMap<std::string::String, crate::model::MatchmakerLobbyJoinInfoPort>,
526	>,
527	/// A matchmaker lobby player.
528	pub player: std::option::Option<crate::model::MatchmakerLobbyJoinInfoPlayer>,
529}
530impl MatchmakerLobbyJoinInfo {
531	/// A universally unique identifier.
532	pub fn lobby_id(&self) -> std::option::Option<&str> {
533		self.lobby_id.as_deref()
534	}
535	/// A matchmaker lobby region.
536	pub fn region(&self) -> std::option::Option<&crate::model::MatchmakerLobbyJoinInfoRegion> {
537		self.region.as_ref()
538	}
539	/// A list of lobby ports.
540	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	/// A matchmaker lobby player.
548	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}
562/// See [`MatchmakerLobbyJoinInfo`](crate::model::MatchmakerLobbyJoinInfo)
563pub mod matchmaker_lobby_join_info {
564	/// A builder for [`MatchmakerLobbyJoinInfo`](crate::model::MatchmakerLobbyJoinInfo)
565	#[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		/// A universally unique identifier.
580		pub fn lobby_id(mut self, input: impl Into<std::string::String>) -> Self {
581			self.lobby_id = Some(input.into());
582			self
583		}
584		/// A universally unique identifier.
585		pub fn set_lobby_id(mut self, input: std::option::Option<std::string::String>) -> Self {
586			self.lobby_id = input;
587			self
588		}
589		/// A matchmaker lobby region.
590		pub fn region(mut self, input: crate::model::MatchmakerLobbyJoinInfoRegion) -> Self {
591			self.region = Some(input);
592			self
593		}
594		/// A matchmaker lobby region.
595		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		/// Adds a key-value pair to `ports`.
603		///
604		/// To override the contents of this collection use [`set_ports`](Self::set_ports).
605		///
606		/// A list of lobby ports.
607		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		/// A list of lobby ports.
618		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		/// A matchmaker lobby player.
631		pub fn player(mut self, input: crate::model::MatchmakerLobbyJoinInfoPlayer) -> Self {
632			self.player = Some(input);
633			self
634		}
635		/// A matchmaker lobby player.
636		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		/// Consumes the builder and constructs a [`MatchmakerLobbyJoinInfo`](crate::model::MatchmakerLobbyJoinInfo)
644		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	/// Creates a new builder-style object to manufacture [`MatchmakerLobbyJoinInfo`](crate::model::MatchmakerLobbyJoinInfo)
656	pub fn builder() -> crate::model::matchmaker_lobby_join_info::Builder {
657		crate::model::matchmaker_lobby_join_info::Builder::default()
658	}
659}
660
661/// A matchmaker lobby player.
662#[non_exhaustive]
663#[derive(std::clone::Clone, std::cmp::PartialEq)]
664pub struct MatchmakerLobbyJoinInfoPlayer {
665	/// Pass this token through the socket to the lobby server. The lobby server will validate this token with `rivet.api.matchmaker#PlayerConnected$player_token`.
666	pub token: std::option::Option<std::string::String>,
667}
668impl MatchmakerLobbyJoinInfoPlayer {
669	/// Pass this token through the socket to the lobby server. The lobby server will validate this token with `rivet.api.matchmaker#PlayerConnected$player_token`.
670	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}
681/// See [`MatchmakerLobbyJoinInfoPlayer`](crate::model::MatchmakerLobbyJoinInfoPlayer)
682pub mod matchmaker_lobby_join_info_player {
683	/// A builder for [`MatchmakerLobbyJoinInfoPlayer`](crate::model::MatchmakerLobbyJoinInfoPlayer)
684	#[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		/// Pass this token through the socket to the lobby server. The lobby server will validate this token with `rivet.api.matchmaker#PlayerConnected$player_token`.
691		pub fn token(mut self, input: impl Into<std::string::String>) -> Self {
692			self.token = Some(input.into());
693			self
694		}
695		/// Pass this token through the socket to the lobby server. The lobby server will validate this token with `rivet.api.matchmaker#PlayerConnected$player_token`.
696		pub fn set_token(mut self, input: std::option::Option<std::string::String>) -> Self {
697			self.token = input;
698			self
699		}
700		/// Consumes the builder and constructs a [`MatchmakerLobbyJoinInfoPlayer`](crate::model::MatchmakerLobbyJoinInfoPlayer)
701		pub fn build(self) -> crate::model::MatchmakerLobbyJoinInfoPlayer {
702			crate::model::MatchmakerLobbyJoinInfoPlayer { token: self.token }
703		}
704	}
705}
706impl MatchmakerLobbyJoinInfoPlayer {
707	/// Creates a new builder-style object to manufacture [`MatchmakerLobbyJoinInfoPlayer`](crate::model::MatchmakerLobbyJoinInfoPlayer)
708	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/// A matchmaker lobby port. Configured by `rivet.cloud#LobbyGroupRuntimeDockerPort$label`.
714#[non_exhaustive]
715#[derive(std::clone::Clone, std::cmp::PartialEq)]
716pub struct MatchmakerLobbyJoinInfoPort {
717	/// The host for the given port. Will be null if using a port range.
718	pub host: std::option::Option<std::string::String>,
719	/// The hostname for the given port.
720	pub hostname: std::option::Option<std::string::String>,
721	/// The port number for this lobby. Will be null if using a port range.
722	pub port: std::option::Option<i32>,
723	/// The port range for this lobby.
724	pub port_range: std::option::Option<crate::model::MatchmakerLobbyJoinInfoPortRange>,
725	/// Wether or not this lobby port uses TLS. You cannot mix a non-TLS and TLS ports.
726	pub is_tls: std::option::Option<bool>,
727}
728impl MatchmakerLobbyJoinInfoPort {
729	/// The host for the given port. Will be null if using a port range.
730	pub fn host(&self) -> std::option::Option<&str> {
731		self.host.as_deref()
732	}
733	/// The hostname for the given port.
734	pub fn hostname(&self) -> std::option::Option<&str> {
735		self.hostname.as_deref()
736	}
737	/// The port number for this lobby. Will be null if using a port range.
738	pub fn port(&self) -> std::option::Option<i32> {
739		self.port
740	}
741	/// The port range for this lobby.
742	pub fn port_range(
743		&self,
744	) -> std::option::Option<&crate::model::MatchmakerLobbyJoinInfoPortRange> {
745		self.port_range.as_ref()
746	}
747	/// Wether or not this lobby port uses TLS. You cannot mix a non-TLS and TLS ports.
748	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}
763/// See [`MatchmakerLobbyJoinInfoPort`](crate::model::MatchmakerLobbyJoinInfoPort)
764pub mod matchmaker_lobby_join_info_port {
765	/// A builder for [`MatchmakerLobbyJoinInfoPort`](crate::model::MatchmakerLobbyJoinInfoPort)
766	#[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		/// The host for the given port. Will be null if using a port range.
777		pub fn host(mut self, input: impl Into<std::string::String>) -> Self {
778			self.host = Some(input.into());
779			self
780		}
781		/// The host for the given port. Will be null if using a port range.
782		pub fn set_host(mut self, input: std::option::Option<std::string::String>) -> Self {
783			self.host = input;
784			self
785		}
786		/// The hostname for the given port.
787		pub fn hostname(mut self, input: impl Into<std::string::String>) -> Self {
788			self.hostname = Some(input.into());
789			self
790		}
791		/// The hostname for the given port.
792		pub fn set_hostname(mut self, input: std::option::Option<std::string::String>) -> Self {
793			self.hostname = input;
794			self
795		}
796		/// The port number for this lobby. Will be null if using a port range.
797		pub fn port(mut self, input: i32) -> Self {
798			self.port = Some(input);
799			self
800		}
801		/// The port number for this lobby. Will be null if using a port range.
802		pub fn set_port(mut self, input: std::option::Option<i32>) -> Self {
803			self.port = input;
804			self
805		}
806		/// The port range for this lobby.
807		pub fn port_range(mut self, input: crate::model::MatchmakerLobbyJoinInfoPortRange) -> Self {
808			self.port_range = Some(input);
809			self
810		}
811		/// The port range for this lobby.
812		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		/// Wether or not this lobby port uses TLS. You cannot mix a non-TLS and TLS ports.
820		pub fn is_tls(mut self, input: bool) -> Self {
821			self.is_tls = Some(input);
822			self
823		}
824		/// Wether or not this lobby port uses TLS. You cannot mix a non-TLS and TLS ports.
825		pub fn set_is_tls(mut self, input: std::option::Option<bool>) -> Self {
826			self.is_tls = input;
827			self
828		}
829		/// Consumes the builder and constructs a [`MatchmakerLobbyJoinInfoPort`](crate::model::MatchmakerLobbyJoinInfoPort)
830		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	/// Creates a new builder-style object to manufacture [`MatchmakerLobbyJoinInfoPort`](crate::model::MatchmakerLobbyJoinInfoPort)
843	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/// Inclusive range of ports that can be connected to.
849#[non_exhaustive]
850#[derive(std::clone::Clone, std::cmp::PartialEq)]
851pub struct MatchmakerLobbyJoinInfoPortRange {
852	/// Minimum port that can be connected to. Inclusive range.
853	pub min: std::option::Option<i32>,
854	/// Maximum port that can be connected to. Inclusive range.
855	pub max: std::option::Option<i32>,
856}
857impl MatchmakerLobbyJoinInfoPortRange {
858	/// Minimum port that can be connected to. Inclusive range.
859	pub fn min(&self) -> std::option::Option<i32> {
860		self.min
861	}
862	/// Maximum port that can be connected to. Inclusive range.
863	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}
875/// See [`MatchmakerLobbyJoinInfoPortRange`](crate::model::MatchmakerLobbyJoinInfoPortRange)
876pub mod matchmaker_lobby_join_info_port_range {
877	/// A builder for [`MatchmakerLobbyJoinInfoPortRange`](crate::model::MatchmakerLobbyJoinInfoPortRange)
878	#[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		/// Minimum port that can be connected to. Inclusive range.
886		pub fn min(mut self, input: i32) -> Self {
887			self.min = Some(input);
888			self
889		}
890		/// Minimum port that can be connected to. Inclusive range.
891		pub fn set_min(mut self, input: std::option::Option<i32>) -> Self {
892			self.min = input;
893			self
894		}
895		/// Maximum port that can be connected to. Inclusive range.
896		pub fn max(mut self, input: i32) -> Self {
897			self.max = Some(input);
898			self
899		}
900		/// Maximum port that can be connected to. Inclusive range.
901		pub fn set_max(mut self, input: std::option::Option<i32>) -> Self {
902			self.max = input;
903			self
904		}
905		/// Consumes the builder and constructs a [`MatchmakerLobbyJoinInfoPortRange`](crate::model::MatchmakerLobbyJoinInfoPortRange)
906		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	/// Creates a new builder-style object to manufacture [`MatchmakerLobbyJoinInfoPortRange`](crate::model::MatchmakerLobbyJoinInfoPortRange)
916	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/// A matchmaker lobby region.
922#[non_exhaustive]
923#[derive(std::clone::Clone, std::cmp::PartialEq)]
924pub struct MatchmakerLobbyJoinInfoRegion {
925	/// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short.
926	pub region_id: std::option::Option<std::string::String>,
927	/// Represent a resource's readable display name.
928	pub display_name: std::option::Option<std::string::String>,
929}
930impl MatchmakerLobbyJoinInfoRegion {
931	/// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short.
932	pub fn region_id(&self) -> std::option::Option<&str> {
933		self.region_id.as_deref()
934	}
935	/// Represent a resource's readable display name.
936	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}
948/// See [`MatchmakerLobbyJoinInfoRegion`](crate::model::MatchmakerLobbyJoinInfoRegion)
949pub mod matchmaker_lobby_join_info_region {
950	/// A builder for [`MatchmakerLobbyJoinInfoRegion`](crate::model::MatchmakerLobbyJoinInfoRegion)
951	#[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		/// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short.
959		pub fn region_id(mut self, input: impl Into<std::string::String>) -> Self {
960			self.region_id = Some(input.into());
961			self
962		}
963		/// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short.
964		pub fn set_region_id(mut self, input: std::option::Option<std::string::String>) -> Self {
965			self.region_id = input;
966			self
967		}
968		/// Represent a resource's readable display name.
969		pub fn display_name(mut self, input: impl Into<std::string::String>) -> Self {
970			self.display_name = Some(input.into());
971			self
972		}
973		/// Represent a resource's readable display name.
974		pub fn set_display_name(mut self, input: std::option::Option<std::string::String>) -> Self {
975			self.display_name = input;
976			self
977		}
978		/// Consumes the builder and constructs a [`MatchmakerLobbyJoinInfoRegion`](crate::model::MatchmakerLobbyJoinInfoRegion)
979		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	/// Creates a new builder-style object to manufacture [`MatchmakerLobbyJoinInfoRegion`](crate::model::MatchmakerLobbyJoinInfoRegion)
989	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/// Methods to verify a captcha.
995#[non_exhaustive]
996#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
997pub enum CaptchaConfig {
998	/// hCaptcha configuration.
999	Hcaptcha(crate::model::CaptchaConfigHcaptcha),
1000	/// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version.
1001	/// An unknown enum variant
1002	///
1003	/// _Note: If you encounter this error, consider upgrading your SDK to the latest version._
1004	/// The `Unknown` variant represents cases where the server sent a value that wasn't recognized
1005	/// by the client. This can happen when the server adds new functionality, but the client has not been updated.
1006	/// To investigate this, consider turning on debug logging to print the raw HTTP response.
1007	#[non_exhaustive]
1008	Unknown,
1009}
1010impl CaptchaConfig {
1011	#[allow(irrefutable_let_patterns)]
1012	/// Tries to convert the enum instance into [`Hcaptcha`](crate::model::CaptchaConfig::Hcaptcha), extracting the inner [`CaptchaConfigHcaptcha`](crate::model::CaptchaConfigHcaptcha).
1013	/// Returns `Err(&Self)` if it can't be converted.
1014	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	/// Returns true if this is a [`Hcaptcha`](crate::model::CaptchaConfig::Hcaptcha).
1022	pub fn is_hcaptcha(&self) -> bool {
1023		self.as_hcaptcha().is_ok()
1024	}
1025	/// Returns true if the enum instance is the `Unknown` variant.
1026	pub fn is_unknown(&self) -> bool {
1027		matches!(self, Self::Unknown)
1028	}
1029}
1030
1031/// hCaptcha configuration.
1032#[non_exhaustive]
1033#[derive(std::clone::Clone, std::cmp::PartialEq)]
1034pub struct CaptchaConfigHcaptcha {
1035	#[allow(missing_docs)] // documentation missing in model
1036	pub client_response: std::option::Option<std::string::String>,
1037}
1038impl CaptchaConfigHcaptcha {
1039	#[allow(missing_docs)] // documentation missing in model
1040	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}
1051/// See [`CaptchaConfigHcaptcha`](crate::model::CaptchaConfigHcaptcha)
1052pub mod captcha_config_hcaptcha {
1053	/// A builder for [`CaptchaConfigHcaptcha`](crate::model::CaptchaConfigHcaptcha)
1054	#[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)] // documentation missing in model
1061		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)] // documentation missing in model
1066		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		/// Consumes the builder and constructs a [`CaptchaConfigHcaptcha`](crate::model::CaptchaConfigHcaptcha)
1074		pub fn build(self) -> crate::model::CaptchaConfigHcaptcha {
1075			crate::model::CaptchaConfigHcaptcha {
1076				client_response: self.client_response,
1077			}
1078		}
1079	}
1080}
1081impl CaptchaConfigHcaptcha {
1082	/// Creates a new builder-style object to manufacture [`CaptchaConfigHcaptcha`](crate::model::CaptchaConfigHcaptcha)
1083	pub fn builder() -> crate::model::captcha_config_hcaptcha::Builder {
1084		crate::model::captcha_config_hcaptcha::Builder::default()
1085	}
1086}