rivet_client_api_chat/
model.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// An identity handle.
3#[non_exhaustive]
4#[derive(std::clone::Clone, std::cmp::PartialEq)]
5pub struct IdentityHandle {
6	/// A universally unique identifier.
7	pub identity_id: std::option::Option<std::string::String>,
8	/// Represent a resource's readable display name.
9	pub display_name: std::option::Option<std::string::String>,
10	/// Identity profile account number (#1234). These are assigned in addition to an identity's display name in order to allow multiple identities to have the same display name while still providing a unique handle. These are unique to each display name; you can have multiple accounts with different display names and the same account number.
11	pub account_number: std::option::Option<i32>,
12	/// The URL of this identity's avatar image.
13	pub avatar_url: std::option::Option<std::string::String>,
14	/// Information about the identity's current status, party, and active game.
15	pub presence: std::option::Option<crate::model::IdentityPresence>,
16	/// Whether or not this identity is registered with a linked account.
17	pub is_registered: std::option::Option<bool>,
18	/// External links for an identity.
19	pub external: std::option::Option<crate::model::IdentityExternalLinks>,
20}
21impl IdentityHandle {
22	/// A universally unique identifier.
23	pub fn identity_id(&self) -> std::option::Option<&str> {
24		self.identity_id.as_deref()
25	}
26	/// Represent a resource's readable display name.
27	pub fn display_name(&self) -> std::option::Option<&str> {
28		self.display_name.as_deref()
29	}
30	/// Identity profile account number (#1234). These are assigned in addition to an identity's display name in order to allow multiple identities to have the same display name while still providing a unique handle. These are unique to each display name; you can have multiple accounts with different display names and the same account number.
31	pub fn account_number(&self) -> std::option::Option<i32> {
32		self.account_number
33	}
34	/// The URL of this identity's avatar image.
35	pub fn avatar_url(&self) -> std::option::Option<&str> {
36		self.avatar_url.as_deref()
37	}
38	/// Information about the identity's current status, party, and active game.
39	pub fn presence(&self) -> std::option::Option<&crate::model::IdentityPresence> {
40		self.presence.as_ref()
41	}
42	/// Whether or not this identity is registered with a linked account.
43	pub fn is_registered(&self) -> std::option::Option<bool> {
44		self.is_registered
45	}
46	/// External links for an identity.
47	pub fn external(&self) -> std::option::Option<&crate::model::IdentityExternalLinks> {
48		self.external.as_ref()
49	}
50}
51impl std::fmt::Debug for IdentityHandle {
52	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
53		let mut formatter = f.debug_struct("IdentityHandle");
54		formatter.field("identity_id", &self.identity_id);
55		formatter.field("display_name", &self.display_name);
56		formatter.field("account_number", &self.account_number);
57		formatter.field("avatar_url", &self.avatar_url);
58		formatter.field("presence", &self.presence);
59		formatter.field("is_registered", &self.is_registered);
60		formatter.field("external", &self.external);
61		formatter.finish()
62	}
63}
64/// See [`IdentityHandle`](crate::model::IdentityHandle)
65pub mod identity_handle {
66	/// A builder for [`IdentityHandle`](crate::model::IdentityHandle)
67	#[non_exhaustive]
68	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
69	pub struct Builder {
70		pub(crate) identity_id: std::option::Option<std::string::String>,
71		pub(crate) display_name: std::option::Option<std::string::String>,
72		pub(crate) account_number: std::option::Option<i32>,
73		pub(crate) avatar_url: std::option::Option<std::string::String>,
74		pub(crate) presence: std::option::Option<crate::model::IdentityPresence>,
75		pub(crate) is_registered: std::option::Option<bool>,
76		pub(crate) external: std::option::Option<crate::model::IdentityExternalLinks>,
77	}
78	impl Builder {
79		/// A universally unique identifier.
80		pub fn identity_id(mut self, input: impl Into<std::string::String>) -> Self {
81			self.identity_id = Some(input.into());
82			self
83		}
84		/// A universally unique identifier.
85		pub fn set_identity_id(mut self, input: std::option::Option<std::string::String>) -> Self {
86			self.identity_id = input;
87			self
88		}
89		/// Represent a resource's readable display name.
90		pub fn display_name(mut self, input: impl Into<std::string::String>) -> Self {
91			self.display_name = Some(input.into());
92			self
93		}
94		/// Represent a resource's readable display name.
95		pub fn set_display_name(mut self, input: std::option::Option<std::string::String>) -> Self {
96			self.display_name = input;
97			self
98		}
99		/// Identity profile account number (#1234). These are assigned in addition to an identity's display name in order to allow multiple identities to have the same display name while still providing a unique handle. These are unique to each display name; you can have multiple accounts with different display names and the same account number.
100		pub fn account_number(mut self, input: i32) -> Self {
101			self.account_number = Some(input);
102			self
103		}
104		/// Identity profile account number (#1234). These are assigned in addition to an identity's display name in order to allow multiple identities to have the same display name while still providing a unique handle. These are unique to each display name; you can have multiple accounts with different display names and the same account number.
105		pub fn set_account_number(mut self, input: std::option::Option<i32>) -> Self {
106			self.account_number = input;
107			self
108		}
109		/// The URL of this identity's avatar image.
110		pub fn avatar_url(mut self, input: impl Into<std::string::String>) -> Self {
111			self.avatar_url = Some(input.into());
112			self
113		}
114		/// The URL of this identity's avatar image.
115		pub fn set_avatar_url(mut self, input: std::option::Option<std::string::String>) -> Self {
116			self.avatar_url = input;
117			self
118		}
119		/// Information about the identity's current status, party, and active game.
120		pub fn presence(mut self, input: crate::model::IdentityPresence) -> Self {
121			self.presence = Some(input);
122			self
123		}
124		/// Information about the identity's current status, party, and active game.
125		pub fn set_presence(
126			mut self,
127			input: std::option::Option<crate::model::IdentityPresence>,
128		) -> Self {
129			self.presence = input;
130			self
131		}
132		/// Whether or not this identity is registered with a linked account.
133		pub fn is_registered(mut self, input: bool) -> Self {
134			self.is_registered = Some(input);
135			self
136		}
137		/// Whether or not this identity is registered with a linked account.
138		pub fn set_is_registered(mut self, input: std::option::Option<bool>) -> Self {
139			self.is_registered = input;
140			self
141		}
142		/// External links for an identity.
143		pub fn external(mut self, input: crate::model::IdentityExternalLinks) -> Self {
144			self.external = Some(input);
145			self
146		}
147		/// External links for an identity.
148		pub fn set_external(
149			mut self,
150			input: std::option::Option<crate::model::IdentityExternalLinks>,
151		) -> Self {
152			self.external = input;
153			self
154		}
155		/// Consumes the builder and constructs a [`IdentityHandle`](crate::model::IdentityHandle)
156		pub fn build(self) -> crate::model::IdentityHandle {
157			crate::model::IdentityHandle {
158				identity_id: self.identity_id,
159				display_name: self.display_name,
160				account_number: self.account_number,
161				avatar_url: self.avatar_url,
162				presence: self.presence,
163				is_registered: self.is_registered,
164				external: self.external,
165			}
166		}
167	}
168}
169impl IdentityHandle {
170	/// Creates a new builder-style object to manufacture [`IdentityHandle`](crate::model::IdentityHandle)
171	pub fn builder() -> crate::model::identity_handle::Builder {
172		crate::model::identity_handle::Builder::default()
173	}
174}
175
176/// External links for an identity.
177#[non_exhaustive]
178#[derive(std::clone::Clone, std::cmp::PartialEq)]
179pub struct IdentityExternalLinks {
180	/// A link to this identity's profile page.
181	pub profile: std::option::Option<std::string::String>,
182	/// A link to the Rivet settings page.
183	pub settings: std::option::Option<std::string::String>,
184	/// A link to a chat page with the given identity.
185	pub chat: std::option::Option<std::string::String>,
186}
187impl IdentityExternalLinks {
188	/// A link to this identity's profile page.
189	pub fn profile(&self) -> std::option::Option<&str> {
190		self.profile.as_deref()
191	}
192	/// A link to the Rivet settings page.
193	pub fn settings(&self) -> std::option::Option<&str> {
194		self.settings.as_deref()
195	}
196	/// A link to a chat page with the given identity.
197	pub fn chat(&self) -> std::option::Option<&str> {
198		self.chat.as_deref()
199	}
200}
201impl std::fmt::Debug for IdentityExternalLinks {
202	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
203		let mut formatter = f.debug_struct("IdentityExternalLinks");
204		formatter.field("profile", &self.profile);
205		formatter.field("settings", &self.settings);
206		formatter.field("chat", &self.chat);
207		formatter.finish()
208	}
209}
210/// See [`IdentityExternalLinks`](crate::model::IdentityExternalLinks)
211pub mod identity_external_links {
212	/// A builder for [`IdentityExternalLinks`](crate::model::IdentityExternalLinks)
213	#[non_exhaustive]
214	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
215	pub struct Builder {
216		pub(crate) profile: std::option::Option<std::string::String>,
217		pub(crate) settings: std::option::Option<std::string::String>,
218		pub(crate) chat: std::option::Option<std::string::String>,
219	}
220	impl Builder {
221		/// A link to this identity's profile page.
222		pub fn profile(mut self, input: impl Into<std::string::String>) -> Self {
223			self.profile = Some(input.into());
224			self
225		}
226		/// A link to this identity's profile page.
227		pub fn set_profile(mut self, input: std::option::Option<std::string::String>) -> Self {
228			self.profile = input;
229			self
230		}
231		/// A link to the Rivet settings page.
232		pub fn settings(mut self, input: impl Into<std::string::String>) -> Self {
233			self.settings = Some(input.into());
234			self
235		}
236		/// A link to the Rivet settings page.
237		pub fn set_settings(mut self, input: std::option::Option<std::string::String>) -> Self {
238			self.settings = input;
239			self
240		}
241		/// A link to a chat page with the given identity.
242		pub fn chat(mut self, input: impl Into<std::string::String>) -> Self {
243			self.chat = Some(input.into());
244			self
245		}
246		/// A link to a chat page with the given identity.
247		pub fn set_chat(mut self, input: std::option::Option<std::string::String>) -> Self {
248			self.chat = input;
249			self
250		}
251		/// Consumes the builder and constructs a [`IdentityExternalLinks`](crate::model::IdentityExternalLinks)
252		pub fn build(self) -> crate::model::IdentityExternalLinks {
253			crate::model::IdentityExternalLinks {
254				profile: self.profile,
255				settings: self.settings,
256				chat: self.chat,
257			}
258		}
259	}
260}
261impl IdentityExternalLinks {
262	/// Creates a new builder-style object to manufacture [`IdentityExternalLinks`](crate::model::IdentityExternalLinks)
263	pub fn builder() -> crate::model::identity_external_links::Builder {
264		crate::model::identity_external_links::Builder::default()
265	}
266}
267
268/// Information about the identity's current status, party, and active game.
269#[non_exhaustive]
270#[derive(std::clone::Clone, std::cmp::PartialEq)]
271pub struct IdentityPresence {
272	/// Time since UNIX epoch (in milliseconds).
273	pub update_ts: std::option::Option<i64>,
274	/// The current status of an identity. This helps players understand if another player is currently playing or has their game in the background.
275	pub status: std::option::Option<crate::model::IdentityStatus>,
276	/// A party handle.
277	pub party: std::option::Option<crate::model::PartyHandle>,
278	/// The game an identity is currently participating in.
279	pub game_activity: std::option::Option<crate::model::IdentityGameActivity>,
280}
281impl IdentityPresence {
282	/// Time since UNIX epoch (in milliseconds).
283	pub fn update_ts(&self) -> std::option::Option<i64> {
284		self.update_ts
285	}
286	/// The current status of an identity. This helps players understand if another player is currently playing or has their game in the background.
287	pub fn status(&self) -> std::option::Option<&crate::model::IdentityStatus> {
288		self.status.as_ref()
289	}
290	/// A party handle.
291	pub fn party(&self) -> std::option::Option<&crate::model::PartyHandle> {
292		self.party.as_ref()
293	}
294	/// The game an identity is currently participating in.
295	pub fn game_activity(&self) -> std::option::Option<&crate::model::IdentityGameActivity> {
296		self.game_activity.as_ref()
297	}
298}
299impl std::fmt::Debug for IdentityPresence {
300	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
301		let mut formatter = f.debug_struct("IdentityPresence");
302		formatter.field("update_ts", &self.update_ts);
303		formatter.field("status", &self.status);
304		formatter.field("party", &self.party);
305		formatter.field("game_activity", &self.game_activity);
306		formatter.finish()
307	}
308}
309/// See [`IdentityPresence`](crate::model::IdentityPresence)
310pub mod identity_presence {
311	/// A builder for [`IdentityPresence`](crate::model::IdentityPresence)
312	#[non_exhaustive]
313	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
314	pub struct Builder {
315		pub(crate) update_ts: std::option::Option<i64>,
316		pub(crate) status: std::option::Option<crate::model::IdentityStatus>,
317		pub(crate) party: std::option::Option<crate::model::PartyHandle>,
318		pub(crate) game_activity: std::option::Option<crate::model::IdentityGameActivity>,
319	}
320	impl Builder {
321		/// Time since UNIX epoch (in milliseconds).
322		pub fn update_ts(mut self, input: i64) -> Self {
323			self.update_ts = Some(input);
324			self
325		}
326		/// Time since UNIX epoch (in milliseconds).
327		pub fn set_update_ts(mut self, input: std::option::Option<i64>) -> Self {
328			self.update_ts = input;
329			self
330		}
331		/// The current status of an identity. This helps players understand if another player is currently playing or has their game in the background.
332		pub fn status(mut self, input: crate::model::IdentityStatus) -> Self {
333			self.status = Some(input);
334			self
335		}
336		/// The current status of an identity. This helps players understand if another player is currently playing or has their game in the background.
337		pub fn set_status(
338			mut self,
339			input: std::option::Option<crate::model::IdentityStatus>,
340		) -> Self {
341			self.status = input;
342			self
343		}
344		/// A party handle.
345		pub fn party(mut self, input: crate::model::PartyHandle) -> Self {
346			self.party = Some(input);
347			self
348		}
349		/// A party handle.
350		pub fn set_party(mut self, input: std::option::Option<crate::model::PartyHandle>) -> Self {
351			self.party = input;
352			self
353		}
354		/// The game an identity is currently participating in.
355		pub fn game_activity(mut self, input: crate::model::IdentityGameActivity) -> Self {
356			self.game_activity = Some(input);
357			self
358		}
359		/// The game an identity is currently participating in.
360		pub fn set_game_activity(
361			mut self,
362			input: std::option::Option<crate::model::IdentityGameActivity>,
363		) -> Self {
364			self.game_activity = input;
365			self
366		}
367		/// Consumes the builder and constructs a [`IdentityPresence`](crate::model::IdentityPresence)
368		pub fn build(self) -> crate::model::IdentityPresence {
369			crate::model::IdentityPresence {
370				update_ts: self.update_ts,
371				status: self.status,
372				party: self.party,
373				game_activity: self.game_activity,
374			}
375		}
376	}
377}
378impl IdentityPresence {
379	/// Creates a new builder-style object to manufacture [`IdentityPresence`](crate::model::IdentityPresence)
380	pub fn builder() -> crate::model::identity_presence::Builder {
381		crate::model::identity_presence::Builder::default()
382	}
383}
384
385/// The game an identity is currently participating in.
386#[non_exhaustive]
387#[derive(std::clone::Clone, std::cmp::PartialEq)]
388pub struct IdentityGameActivity {
389	/// A game handle.
390	pub game: std::option::Option<crate::model::GameHandle>,
391	/// A short activity message about the current game activity.
392	pub message: std::option::Option<std::string::String>,
393	/// JSON data seen by anyone.
394	pub public_metadata: std::option::Option<aws_smithy_types::Document>,
395	/// JSON data seen only by the given identity and their friends.
396	pub friend_metadata: std::option::Option<aws_smithy_types::Document>,
397}
398impl IdentityGameActivity {
399	/// A game handle.
400	pub fn game(&self) -> std::option::Option<&crate::model::GameHandle> {
401		self.game.as_ref()
402	}
403	/// A short activity message about the current game activity.
404	pub fn message(&self) -> std::option::Option<&str> {
405		self.message.as_deref()
406	}
407	/// JSON data seen by anyone.
408	pub fn public_metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
409		self.public_metadata.as_ref()
410	}
411	/// JSON data seen only by the given identity and their friends.
412	pub fn friend_metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
413		self.friend_metadata.as_ref()
414	}
415}
416impl std::fmt::Debug for IdentityGameActivity {
417	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
418		let mut formatter = f.debug_struct("IdentityGameActivity");
419		formatter.field("game", &self.game);
420		formatter.field("message", &self.message);
421		formatter.field("public_metadata", &self.public_metadata);
422		formatter.field("friend_metadata", &self.friend_metadata);
423		formatter.finish()
424	}
425}
426/// See [`IdentityGameActivity`](crate::model::IdentityGameActivity)
427pub mod identity_game_activity {
428	/// A builder for [`IdentityGameActivity`](crate::model::IdentityGameActivity)
429	#[non_exhaustive]
430	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
431	pub struct Builder {
432		pub(crate) game: std::option::Option<crate::model::GameHandle>,
433		pub(crate) message: std::option::Option<std::string::String>,
434		pub(crate) public_metadata: std::option::Option<aws_smithy_types::Document>,
435		pub(crate) friend_metadata: std::option::Option<aws_smithy_types::Document>,
436	}
437	impl Builder {
438		/// A game handle.
439		pub fn game(mut self, input: crate::model::GameHandle) -> Self {
440			self.game = Some(input);
441			self
442		}
443		/// A game handle.
444		pub fn set_game(mut self, input: std::option::Option<crate::model::GameHandle>) -> Self {
445			self.game = input;
446			self
447		}
448		/// A short activity message about the current game activity.
449		pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
450			self.message = Some(input.into());
451			self
452		}
453		/// A short activity message about the current game activity.
454		pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
455			self.message = input;
456			self
457		}
458		/// JSON data seen by anyone.
459		pub fn public_metadata(mut self, input: aws_smithy_types::Document) -> Self {
460			self.public_metadata = Some(input);
461			self
462		}
463		/// JSON data seen by anyone.
464		pub fn set_public_metadata(
465			mut self,
466			input: std::option::Option<aws_smithy_types::Document>,
467		) -> Self {
468			self.public_metadata = input;
469			self
470		}
471		/// JSON data seen only by the given identity and their friends.
472		pub fn friend_metadata(mut self, input: aws_smithy_types::Document) -> Self {
473			self.friend_metadata = Some(input);
474			self
475		}
476		/// JSON data seen only by the given identity and their friends.
477		pub fn set_friend_metadata(
478			mut self,
479			input: std::option::Option<aws_smithy_types::Document>,
480		) -> Self {
481			self.friend_metadata = input;
482			self
483		}
484		/// Consumes the builder and constructs a [`IdentityGameActivity`](crate::model::IdentityGameActivity)
485		pub fn build(self) -> crate::model::IdentityGameActivity {
486			crate::model::IdentityGameActivity {
487				game: self.game,
488				message: self.message,
489				public_metadata: self.public_metadata,
490				friend_metadata: self.friend_metadata,
491			}
492		}
493	}
494}
495impl IdentityGameActivity {
496	/// Creates a new builder-style object to manufacture [`IdentityGameActivity`](crate::model::IdentityGameActivity)
497	pub fn builder() -> crate::model::identity_game_activity::Builder {
498		crate::model::identity_game_activity::Builder::default()
499	}
500}
501
502/// A game handle.
503#[non_exhaustive]
504#[derive(std::clone::Clone, std::cmp::PartialEq)]
505pub struct GameHandle {
506	/// A universally unique identifier.
507	pub game_id: std::option::Option<std::string::String>,
508	/// 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.
509	pub name_id: std::option::Option<std::string::String>,
510	/// Represent a resource's readable display name.
511	pub display_name: std::option::Option<std::string::String>,
512	/// The URL of this game's logo image.
513	pub logo_url: std::option::Option<std::string::String>,
514	/// The URL of this game's banner image.
515	pub banner_url: std::option::Option<std::string::String>,
516}
517impl GameHandle {
518	/// A universally unique identifier.
519	pub fn game_id(&self) -> std::option::Option<&str> {
520		self.game_id.as_deref()
521	}
522	/// 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.
523	pub fn name_id(&self) -> std::option::Option<&str> {
524		self.name_id.as_deref()
525	}
526	/// Represent a resource's readable display name.
527	pub fn display_name(&self) -> std::option::Option<&str> {
528		self.display_name.as_deref()
529	}
530	/// The URL of this game's logo image.
531	pub fn logo_url(&self) -> std::option::Option<&str> {
532		self.logo_url.as_deref()
533	}
534	/// The URL of this game's banner image.
535	pub fn banner_url(&self) -> std::option::Option<&str> {
536		self.banner_url.as_deref()
537	}
538}
539impl std::fmt::Debug for GameHandle {
540	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
541		let mut formatter = f.debug_struct("GameHandle");
542		formatter.field("game_id", &self.game_id);
543		formatter.field("name_id", &self.name_id);
544		formatter.field("display_name", &self.display_name);
545		formatter.field("logo_url", &self.logo_url);
546		formatter.field("banner_url", &self.banner_url);
547		formatter.finish()
548	}
549}
550/// See [`GameHandle`](crate::model::GameHandle)
551pub mod game_handle {
552	/// A builder for [`GameHandle`](crate::model::GameHandle)
553	#[non_exhaustive]
554	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
555	pub struct Builder {
556		pub(crate) game_id: std::option::Option<std::string::String>,
557		pub(crate) name_id: std::option::Option<std::string::String>,
558		pub(crate) display_name: std::option::Option<std::string::String>,
559		pub(crate) logo_url: std::option::Option<std::string::String>,
560		pub(crate) banner_url: std::option::Option<std::string::String>,
561	}
562	impl Builder {
563		/// A universally unique identifier.
564		pub fn game_id(mut self, input: impl Into<std::string::String>) -> Self {
565			self.game_id = Some(input.into());
566			self
567		}
568		/// A universally unique identifier.
569		pub fn set_game_id(mut self, input: std::option::Option<std::string::String>) -> Self {
570			self.game_id = input;
571			self
572		}
573		/// 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.
574		pub fn name_id(mut self, input: impl Into<std::string::String>) -> Self {
575			self.name_id = Some(input.into());
576			self
577		}
578		/// 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.
579		pub fn set_name_id(mut self, input: std::option::Option<std::string::String>) -> Self {
580			self.name_id = input;
581			self
582		}
583		/// Represent a resource's readable display name.
584		pub fn display_name(mut self, input: impl Into<std::string::String>) -> Self {
585			self.display_name = Some(input.into());
586			self
587		}
588		/// Represent a resource's readable display name.
589		pub fn set_display_name(mut self, input: std::option::Option<std::string::String>) -> Self {
590			self.display_name = input;
591			self
592		}
593		/// The URL of this game's logo image.
594		pub fn logo_url(mut self, input: impl Into<std::string::String>) -> Self {
595			self.logo_url = Some(input.into());
596			self
597		}
598		/// The URL of this game's logo image.
599		pub fn set_logo_url(mut self, input: std::option::Option<std::string::String>) -> Self {
600			self.logo_url = input;
601			self
602		}
603		/// The URL of this game's banner image.
604		pub fn banner_url(mut self, input: impl Into<std::string::String>) -> Self {
605			self.banner_url = Some(input.into());
606			self
607		}
608		/// The URL of this game's banner image.
609		pub fn set_banner_url(mut self, input: std::option::Option<std::string::String>) -> Self {
610			self.banner_url = input;
611			self
612		}
613		/// Consumes the builder and constructs a [`GameHandle`](crate::model::GameHandle)
614		pub fn build(self) -> crate::model::GameHandle {
615			crate::model::GameHandle {
616				game_id: self.game_id,
617				name_id: self.name_id,
618				display_name: self.display_name,
619				logo_url: self.logo_url,
620				banner_url: self.banner_url,
621			}
622		}
623	}
624}
625impl GameHandle {
626	/// Creates a new builder-style object to manufacture [`GameHandle`](crate::model::GameHandle)
627	pub fn builder() -> crate::model::game_handle::Builder {
628		crate::model::game_handle::Builder::default()
629	}
630}
631
632/// A party handle.
633#[non_exhaustive]
634#[derive(std::clone::Clone, std::cmp::PartialEq)]
635pub struct PartyHandle {
636	/// A universally unique identifier.
637	pub party_id: std::option::Option<std::string::String>,
638	/// Time since UNIX epoch (in milliseconds).
639	pub create_ts: std::option::Option<i64>,
640	/// A union representing the activity of a given party.
641	pub activity: std::option::Option<crate::model::PartyActivity>,
642	/// External links for a party.
643	pub external: std::option::Option<crate::model::PartyExternalLinks>,
644}
645impl PartyHandle {
646	/// A universally unique identifier.
647	pub fn party_id(&self) -> std::option::Option<&str> {
648		self.party_id.as_deref()
649	}
650	/// Time since UNIX epoch (in milliseconds).
651	pub fn create_ts(&self) -> std::option::Option<i64> {
652		self.create_ts
653	}
654	/// A union representing the activity of a given party.
655	pub fn activity(&self) -> std::option::Option<&crate::model::PartyActivity> {
656		self.activity.as_ref()
657	}
658	/// External links for a party.
659	pub fn external(&self) -> std::option::Option<&crate::model::PartyExternalLinks> {
660		self.external.as_ref()
661	}
662}
663impl std::fmt::Debug for PartyHandle {
664	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
665		let mut formatter = f.debug_struct("PartyHandle");
666		formatter.field("party_id", &self.party_id);
667		formatter.field("create_ts", &self.create_ts);
668		formatter.field("activity", &self.activity);
669		formatter.field("external", &self.external);
670		formatter.finish()
671	}
672}
673/// See [`PartyHandle`](crate::model::PartyHandle)
674pub mod party_handle {
675	/// A builder for [`PartyHandle`](crate::model::PartyHandle)
676	#[non_exhaustive]
677	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
678	pub struct Builder {
679		pub(crate) party_id: std::option::Option<std::string::String>,
680		pub(crate) create_ts: std::option::Option<i64>,
681		pub(crate) activity: std::option::Option<crate::model::PartyActivity>,
682		pub(crate) external: std::option::Option<crate::model::PartyExternalLinks>,
683	}
684	impl Builder {
685		/// A universally unique identifier.
686		pub fn party_id(mut self, input: impl Into<std::string::String>) -> Self {
687			self.party_id = Some(input.into());
688			self
689		}
690		/// A universally unique identifier.
691		pub fn set_party_id(mut self, input: std::option::Option<std::string::String>) -> Self {
692			self.party_id = input;
693			self
694		}
695		/// Time since UNIX epoch (in milliseconds).
696		pub fn create_ts(mut self, input: i64) -> Self {
697			self.create_ts = Some(input);
698			self
699		}
700		/// Time since UNIX epoch (in milliseconds).
701		pub fn set_create_ts(mut self, input: std::option::Option<i64>) -> Self {
702			self.create_ts = input;
703			self
704		}
705		/// A union representing the activity of a given party.
706		pub fn activity(mut self, input: crate::model::PartyActivity) -> Self {
707			self.activity = Some(input);
708			self
709		}
710		/// A union representing the activity of a given party.
711		pub fn set_activity(
712			mut self,
713			input: std::option::Option<crate::model::PartyActivity>,
714		) -> Self {
715			self.activity = input;
716			self
717		}
718		/// External links for a party.
719		pub fn external(mut self, input: crate::model::PartyExternalLinks) -> Self {
720			self.external = Some(input);
721			self
722		}
723		/// External links for a party.
724		pub fn set_external(
725			mut self,
726			input: std::option::Option<crate::model::PartyExternalLinks>,
727		) -> Self {
728			self.external = input;
729			self
730		}
731		/// Consumes the builder and constructs a [`PartyHandle`](crate::model::PartyHandle)
732		pub fn build(self) -> crate::model::PartyHandle {
733			crate::model::PartyHandle {
734				party_id: self.party_id,
735				create_ts: self.create_ts,
736				activity: self.activity,
737				external: self.external,
738			}
739		}
740	}
741}
742impl PartyHandle {
743	/// Creates a new builder-style object to manufacture [`PartyHandle`](crate::model::PartyHandle)
744	pub fn builder() -> crate::model::party_handle::Builder {
745		crate::model::party_handle::Builder::default()
746	}
747}
748
749/// External links for a party.
750#[non_exhaustive]
751#[derive(std::clone::Clone, std::cmp::PartialEq)]
752pub struct PartyExternalLinks {
753	/// A link to the given party's chat thread.
754	pub chat: std::option::Option<std::string::String>,
755}
756impl PartyExternalLinks {
757	/// A link to the given party's chat thread.
758	pub fn chat(&self) -> std::option::Option<&str> {
759		self.chat.as_deref()
760	}
761}
762impl std::fmt::Debug for PartyExternalLinks {
763	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
764		let mut formatter = f.debug_struct("PartyExternalLinks");
765		formatter.field("chat", &self.chat);
766		formatter.finish()
767	}
768}
769/// See [`PartyExternalLinks`](crate::model::PartyExternalLinks)
770pub mod party_external_links {
771	/// A builder for [`PartyExternalLinks`](crate::model::PartyExternalLinks)
772	#[non_exhaustive]
773	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
774	pub struct Builder {
775		pub(crate) chat: std::option::Option<std::string::String>,
776	}
777	impl Builder {
778		/// A link to the given party's chat thread.
779		pub fn chat(mut self, input: impl Into<std::string::String>) -> Self {
780			self.chat = Some(input.into());
781			self
782		}
783		/// A link to the given party's chat thread.
784		pub fn set_chat(mut self, input: std::option::Option<std::string::String>) -> Self {
785			self.chat = input;
786			self
787		}
788		/// Consumes the builder and constructs a [`PartyExternalLinks`](crate::model::PartyExternalLinks)
789		pub fn build(self) -> crate::model::PartyExternalLinks {
790			crate::model::PartyExternalLinks { chat: self.chat }
791		}
792	}
793}
794impl PartyExternalLinks {
795	/// Creates a new builder-style object to manufacture [`PartyExternalLinks`](crate::model::PartyExternalLinks)
796	pub fn builder() -> crate::model::party_external_links::Builder {
797		crate::model::party_external_links::Builder::default()
798	}
799}
800
801/// A union representing the activity of a given party.
802#[non_exhaustive]
803#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
804pub enum PartyActivity {
805	/// A party activity denoting that the party is idle.
806	Idle(crate::model::PartyActivityIdle),
807	/// A party activity denoting that the party is currently searching for a lobby.
808	MatchmakerFindingLobby(crate::model::PartyActivityMatchmakerFindingLobby),
809	/// A party activity denoting that the party is currently in a lobby.
810	MatchmakerLobby(crate::model::PartyActivityMatchmakerLobby),
811	/// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version.
812	/// An unknown enum variant
813	///
814	/// _Note: If you encounter this error, consider upgrading your SDK to the latest version._
815	/// The `Unknown` variant represents cases where the server sent a value that wasn't recognized
816	/// by the client. This can happen when the server adds new functionality, but the client has not been updated.
817	/// To investigate this, consider turning on debug logging to print the raw HTTP response.
818	#[non_exhaustive]
819	Unknown,
820}
821impl PartyActivity {
822	/// Tries to convert the enum instance into [`Idle`](crate::model::PartyActivity::Idle), extracting the inner [`PartyActivityIdle`](crate::model::PartyActivityIdle).
823	/// Returns `Err(&Self)` if it can't be converted.
824	pub fn as_idle(&self) -> std::result::Result<&crate::model::PartyActivityIdle, &Self> {
825		if let PartyActivity::Idle(val) = &self {
826			Ok(val)
827		} else {
828			Err(self)
829		}
830	}
831	/// Returns true if this is a [`Idle`](crate::model::PartyActivity::Idle).
832	pub fn is_idle(&self) -> bool {
833		self.as_idle().is_ok()
834	}
835	/// Tries to convert the enum instance into [`MatchmakerFindingLobby`](crate::model::PartyActivity::MatchmakerFindingLobby), extracting the inner [`PartyActivityMatchmakerFindingLobby`](crate::model::PartyActivityMatchmakerFindingLobby).
836	/// Returns `Err(&Self)` if it can't be converted.
837	pub fn as_matchmaker_finding_lobby(
838		&self,
839	) -> std::result::Result<&crate::model::PartyActivityMatchmakerFindingLobby, &Self> {
840		if let PartyActivity::MatchmakerFindingLobby(val) = &self {
841			Ok(val)
842		} else {
843			Err(self)
844		}
845	}
846	/// Returns true if this is a [`MatchmakerFindingLobby`](crate::model::PartyActivity::MatchmakerFindingLobby).
847	pub fn is_matchmaker_finding_lobby(&self) -> bool {
848		self.as_matchmaker_finding_lobby().is_ok()
849	}
850	/// Tries to convert the enum instance into [`MatchmakerLobby`](crate::model::PartyActivity::MatchmakerLobby), extracting the inner [`PartyActivityMatchmakerLobby`](crate::model::PartyActivityMatchmakerLobby).
851	/// Returns `Err(&Self)` if it can't be converted.
852	pub fn as_matchmaker_lobby(
853		&self,
854	) -> std::result::Result<&crate::model::PartyActivityMatchmakerLobby, &Self> {
855		if let PartyActivity::MatchmakerLobby(val) = &self {
856			Ok(val)
857		} else {
858			Err(self)
859		}
860	}
861	/// Returns true if this is a [`MatchmakerLobby`](crate::model::PartyActivity::MatchmakerLobby).
862	pub fn is_matchmaker_lobby(&self) -> bool {
863		self.as_matchmaker_lobby().is_ok()
864	}
865	/// Returns true if the enum instance is the `Unknown` variant.
866	pub fn is_unknown(&self) -> bool {
867		matches!(self, Self::Unknown)
868	}
869}
870
871/// A party activity denoting that the party is currently in a lobby.
872#[non_exhaustive]
873#[derive(std::clone::Clone, std::cmp::PartialEq)]
874pub struct PartyActivityMatchmakerLobby {
875	/// A party lobby.
876	pub lobby: std::option::Option<crate::model::PartyMatchmakerLobby>,
877	/// A game handle.
878	pub game: std::option::Option<crate::model::GameHandle>,
879}
880impl PartyActivityMatchmakerLobby {
881	/// A party lobby.
882	pub fn lobby(&self) -> std::option::Option<&crate::model::PartyMatchmakerLobby> {
883		self.lobby.as_ref()
884	}
885	/// A game handle.
886	pub fn game(&self) -> std::option::Option<&crate::model::GameHandle> {
887		self.game.as_ref()
888	}
889}
890impl std::fmt::Debug for PartyActivityMatchmakerLobby {
891	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
892		let mut formatter = f.debug_struct("PartyActivityMatchmakerLobby");
893		formatter.field("lobby", &self.lobby);
894		formatter.field("game", &self.game);
895		formatter.finish()
896	}
897}
898/// See [`PartyActivityMatchmakerLobby`](crate::model::PartyActivityMatchmakerLobby)
899pub mod party_activity_matchmaker_lobby {
900	/// A builder for [`PartyActivityMatchmakerLobby`](crate::model::PartyActivityMatchmakerLobby)
901	#[non_exhaustive]
902	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
903	pub struct Builder {
904		pub(crate) lobby: std::option::Option<crate::model::PartyMatchmakerLobby>,
905		pub(crate) game: std::option::Option<crate::model::GameHandle>,
906	}
907	impl Builder {
908		/// A party lobby.
909		pub fn lobby(mut self, input: crate::model::PartyMatchmakerLobby) -> Self {
910			self.lobby = Some(input);
911			self
912		}
913		/// A party lobby.
914		pub fn set_lobby(
915			mut self,
916			input: std::option::Option<crate::model::PartyMatchmakerLobby>,
917		) -> Self {
918			self.lobby = input;
919			self
920		}
921		/// A game handle.
922		pub fn game(mut self, input: crate::model::GameHandle) -> Self {
923			self.game = Some(input);
924			self
925		}
926		/// A game handle.
927		pub fn set_game(mut self, input: std::option::Option<crate::model::GameHandle>) -> Self {
928			self.game = input;
929			self
930		}
931		/// Consumes the builder and constructs a [`PartyActivityMatchmakerLobby`](crate::model::PartyActivityMatchmakerLobby)
932		pub fn build(self) -> crate::model::PartyActivityMatchmakerLobby {
933			crate::model::PartyActivityMatchmakerLobby {
934				lobby: self.lobby,
935				game: self.game,
936			}
937		}
938	}
939}
940impl PartyActivityMatchmakerLobby {
941	/// Creates a new builder-style object to manufacture [`PartyActivityMatchmakerLobby`](crate::model::PartyActivityMatchmakerLobby)
942	pub fn builder() -> crate::model::party_activity_matchmaker_lobby::Builder {
943		crate::model::party_activity_matchmaker_lobby::Builder::default()
944	}
945}
946
947/// A party lobby.
948#[non_exhaustive]
949#[derive(std::clone::Clone, std::cmp::PartialEq)]
950pub struct PartyMatchmakerLobby {
951	/// A universally unique identifier.
952	pub lobby_id: std::option::Option<std::string::String>,
953}
954impl PartyMatchmakerLobby {
955	/// A universally unique identifier.
956	pub fn lobby_id(&self) -> std::option::Option<&str> {
957		self.lobby_id.as_deref()
958	}
959}
960impl std::fmt::Debug for PartyMatchmakerLobby {
961	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
962		let mut formatter = f.debug_struct("PartyMatchmakerLobby");
963		formatter.field("lobby_id", &self.lobby_id);
964		formatter.finish()
965	}
966}
967/// See [`PartyMatchmakerLobby`](crate::model::PartyMatchmakerLobby)
968pub mod party_matchmaker_lobby {
969	/// A builder for [`PartyMatchmakerLobby`](crate::model::PartyMatchmakerLobby)
970	#[non_exhaustive]
971	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
972	pub struct Builder {
973		pub(crate) lobby_id: std::option::Option<std::string::String>,
974	}
975	impl Builder {
976		/// A universally unique identifier.
977		pub fn lobby_id(mut self, input: impl Into<std::string::String>) -> Self {
978			self.lobby_id = Some(input.into());
979			self
980		}
981		/// A universally unique identifier.
982		pub fn set_lobby_id(mut self, input: std::option::Option<std::string::String>) -> Self {
983			self.lobby_id = input;
984			self
985		}
986		/// Consumes the builder and constructs a [`PartyMatchmakerLobby`](crate::model::PartyMatchmakerLobby)
987		pub fn build(self) -> crate::model::PartyMatchmakerLobby {
988			crate::model::PartyMatchmakerLobby {
989				lobby_id: self.lobby_id,
990			}
991		}
992	}
993}
994impl PartyMatchmakerLobby {
995	/// Creates a new builder-style object to manufacture [`PartyMatchmakerLobby`](crate::model::PartyMatchmakerLobby)
996	pub fn builder() -> crate::model::party_matchmaker_lobby::Builder {
997		crate::model::party_matchmaker_lobby::Builder::default()
998	}
999}
1000
1001/// A party activity denoting that the party is currently searching for a lobby.
1002#[non_exhaustive]
1003#[derive(std::clone::Clone, std::cmp::PartialEq)]
1004pub struct PartyActivityMatchmakerFindingLobby {
1005	/// A game handle.
1006	pub game: std::option::Option<crate::model::GameHandle>,
1007}
1008impl PartyActivityMatchmakerFindingLobby {
1009	/// A game handle.
1010	pub fn game(&self) -> std::option::Option<&crate::model::GameHandle> {
1011		self.game.as_ref()
1012	}
1013}
1014impl std::fmt::Debug for PartyActivityMatchmakerFindingLobby {
1015	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1016		let mut formatter = f.debug_struct("PartyActivityMatchmakerFindingLobby");
1017		formatter.field("game", &self.game);
1018		formatter.finish()
1019	}
1020}
1021/// See [`PartyActivityMatchmakerFindingLobby`](crate::model::PartyActivityMatchmakerFindingLobby)
1022pub mod party_activity_matchmaker_finding_lobby {
1023	/// A builder for [`PartyActivityMatchmakerFindingLobby`](crate::model::PartyActivityMatchmakerFindingLobby)
1024	#[non_exhaustive]
1025	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1026	pub struct Builder {
1027		pub(crate) game: std::option::Option<crate::model::GameHandle>,
1028	}
1029	impl Builder {
1030		/// A game handle.
1031		pub fn game(mut self, input: crate::model::GameHandle) -> Self {
1032			self.game = Some(input);
1033			self
1034		}
1035		/// A game handle.
1036		pub fn set_game(mut self, input: std::option::Option<crate::model::GameHandle>) -> Self {
1037			self.game = input;
1038			self
1039		}
1040		/// Consumes the builder and constructs a [`PartyActivityMatchmakerFindingLobby`](crate::model::PartyActivityMatchmakerFindingLobby)
1041		pub fn build(self) -> crate::model::PartyActivityMatchmakerFindingLobby {
1042			crate::model::PartyActivityMatchmakerFindingLobby { game: self.game }
1043		}
1044	}
1045}
1046impl PartyActivityMatchmakerFindingLobby {
1047	/// Creates a new builder-style object to manufacture [`PartyActivityMatchmakerFindingLobby`](crate::model::PartyActivityMatchmakerFindingLobby)
1048	pub fn builder() -> crate::model::party_activity_matchmaker_finding_lobby::Builder {
1049		crate::model::party_activity_matchmaker_finding_lobby::Builder::default()
1050	}
1051}
1052
1053/// A party activity denoting that the party is idle.
1054#[non_exhaustive]
1055#[derive(std::clone::Clone, std::cmp::PartialEq)]
1056pub struct PartyActivityIdle {}
1057impl std::fmt::Debug for PartyActivityIdle {
1058	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1059		let mut formatter = f.debug_struct("PartyActivityIdle");
1060		formatter.finish()
1061	}
1062}
1063/// See [`PartyActivityIdle`](crate::model::PartyActivityIdle)
1064pub mod party_activity_idle {
1065	/// A builder for [`PartyActivityIdle`](crate::model::PartyActivityIdle)
1066	#[non_exhaustive]
1067	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1068	pub struct Builder {}
1069	impl Builder {
1070		/// Consumes the builder and constructs a [`PartyActivityIdle`](crate::model::PartyActivityIdle)
1071		pub fn build(self) -> crate::model::PartyActivityIdle {
1072			crate::model::PartyActivityIdle {}
1073		}
1074	}
1075}
1076impl PartyActivityIdle {
1077	/// Creates a new builder-style object to manufacture [`PartyActivityIdle`](crate::model::PartyActivityIdle)
1078	pub fn builder() -> crate::model::party_activity_idle::Builder {
1079		crate::model::party_activity_idle::Builder::default()
1080	}
1081}
1082
1083/// The current status of an identity. This helps players understand if another
1084/// player is currently playing or has their game in the background.
1085#[non_exhaustive]
1086#[derive(
1087	std::clone::Clone,
1088	std::cmp::Eq,
1089	std::cmp::Ord,
1090	std::cmp::PartialEq,
1091	std::cmp::PartialOrd,
1092	std::fmt::Debug,
1093	std::hash::Hash,
1094)]
1095pub enum IdentityStatus {
1096	#[allow(missing_docs)] // documentation missing in model
1097	Away,
1098	#[allow(missing_docs)] // documentation missing in model
1099	Offline,
1100	#[allow(missing_docs)] // documentation missing in model
1101	Online,
1102	/// Unknown contains new variants that have been added since this code was generated.
1103	Unknown(String),
1104}
1105impl std::convert::From<&str> for IdentityStatus {
1106	fn from(s: &str) -> Self {
1107		match s {
1108			"away" => IdentityStatus::Away,
1109			"offline" => IdentityStatus::Offline,
1110			"online" => IdentityStatus::Online,
1111			other => IdentityStatus::Unknown(other.to_owned()),
1112		}
1113	}
1114}
1115impl std::str::FromStr for IdentityStatus {
1116	type Err = std::convert::Infallible;
1117
1118	fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
1119		Ok(IdentityStatus::from(s))
1120	}
1121}
1122impl IdentityStatus {
1123	/// Returns the `&str` value of the enum member.
1124	pub fn as_str(&self) -> &str {
1125		match self {
1126			IdentityStatus::Away => "away",
1127			IdentityStatus::Offline => "offline",
1128			IdentityStatus::Online => "online",
1129			IdentityStatus::Unknown(s) => s.as_ref(),
1130		}
1131	}
1132	/// Returns all the `&str` values of the enum members.
1133	pub fn values() -> &'static [&'static str] {
1134		&["away", "offline", "online"]
1135	}
1136}
1137impl AsRef<str> for IdentityStatus {
1138	fn as_ref(&self) -> &str {
1139		self.as_str()
1140	}
1141}
1142
1143/// Data to send in a chat message.
1144#[non_exhaustive]
1145#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1146pub enum SendMessageBody {
1147	/// `rivet.api.chat.common#SendMessageBody` variant for text messages.
1148	Text(crate::model::SendMessageBodyText),
1149	/// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version.
1150	/// An unknown enum variant
1151	///
1152	/// _Note: If you encounter this error, consider upgrading your SDK to the latest version._
1153	/// The `Unknown` variant represents cases where the server sent a value that wasn't recognized
1154	/// by the client. This can happen when the server adds new functionality, but the client has not been updated.
1155	/// To investigate this, consider turning on debug logging to print the raw HTTP response.
1156	#[non_exhaustive]
1157	Unknown,
1158}
1159impl SendMessageBody {
1160	#[allow(irrefutable_let_patterns)]
1161	/// Tries to convert the enum instance into [`Text`](crate::model::SendMessageBody::Text), extracting the inner [`SendMessageBodyText`](crate::model::SendMessageBodyText).
1162	/// Returns `Err(&Self)` if it can't be converted.
1163	pub fn as_text(&self) -> std::result::Result<&crate::model::SendMessageBodyText, &Self> {
1164		if let SendMessageBody::Text(val) = &self {
1165			Ok(val)
1166		} else {
1167			Err(self)
1168		}
1169	}
1170	/// Returns true if this is a [`Text`](crate::model::SendMessageBody::Text).
1171	pub fn is_text(&self) -> bool {
1172		self.as_text().is_ok()
1173	}
1174	/// Returns true if the enum instance is the `Unknown` variant.
1175	pub fn is_unknown(&self) -> bool {
1176		matches!(self, Self::Unknown)
1177	}
1178}
1179
1180/// `rivet.api.chat.common#SendMessageBody` variant for text messages.
1181#[non_exhaustive]
1182#[derive(std::clone::Clone, std::cmp::PartialEq)]
1183pub struct SendMessageBodyText {
1184	#[allow(missing_docs)] // documentation missing in model
1185	pub body: std::option::Option<std::string::String>,
1186}
1187impl SendMessageBodyText {
1188	#[allow(missing_docs)] // documentation missing in model
1189	pub fn body(&self) -> std::option::Option<&str> {
1190		self.body.as_deref()
1191	}
1192}
1193impl std::fmt::Debug for SendMessageBodyText {
1194	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1195		let mut formatter = f.debug_struct("SendMessageBodyText");
1196		formatter.field("body", &self.body);
1197		formatter.finish()
1198	}
1199}
1200/// See [`SendMessageBodyText`](crate::model::SendMessageBodyText)
1201pub mod send_message_body_text {
1202	/// A builder for [`SendMessageBodyText`](crate::model::SendMessageBodyText)
1203	#[non_exhaustive]
1204	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1205	pub struct Builder {
1206		pub(crate) body: std::option::Option<std::string::String>,
1207	}
1208	impl Builder {
1209		#[allow(missing_docs)] // documentation missing in model
1210		pub fn body(mut self, input: impl Into<std::string::String>) -> Self {
1211			self.body = Some(input.into());
1212			self
1213		}
1214		#[allow(missing_docs)] // documentation missing in model
1215		pub fn set_body(mut self, input: std::option::Option<std::string::String>) -> Self {
1216			self.body = input;
1217			self
1218		}
1219		/// Consumes the builder and constructs a [`SendMessageBodyText`](crate::model::SendMessageBodyText)
1220		pub fn build(self) -> crate::model::SendMessageBodyText {
1221			crate::model::SendMessageBodyText { body: self.body }
1222		}
1223	}
1224}
1225impl SendMessageBodyText {
1226	/// Creates a new builder-style object to manufacture [`SendMessageBodyText`](crate::model::SendMessageBodyText)
1227	pub fn builder() -> crate::model::send_message_body_text::Builder {
1228		crate::model::send_message_body_text::Builder::default()
1229	}
1230}
1231
1232/// Topic to send a chat message to. If you already know the thread ID, use `thread_id`.
1233#[non_exhaustive]
1234#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1235pub enum SendChatTopic {
1236	/// `rivet.api.chat.common#SendChatTopic` variant for direct messages.
1237	Direct(crate::model::SendChatTopicDirect),
1238	/// `rivet.api.chat.common#SendChatTopic` variant for groups.
1239	Group(crate::model::SendChatTopicGroup),
1240	/// `rivet.api.chat.common#SendChatTopic` variant for parties.
1241	Party(crate::model::SendChatTopicParty),
1242	/// A universally unique identifier.
1243	ThreadId(std::string::String),
1244	/// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version.
1245	/// An unknown enum variant
1246	///
1247	/// _Note: If you encounter this error, consider upgrading your SDK to the latest version._
1248	/// The `Unknown` variant represents cases where the server sent a value that wasn't recognized
1249	/// by the client. This can happen when the server adds new functionality, but the client has not been updated.
1250	/// To investigate this, consider turning on debug logging to print the raw HTTP response.
1251	#[non_exhaustive]
1252	Unknown,
1253}
1254impl SendChatTopic {
1255	/// Tries to convert the enum instance into [`Direct`](crate::model::SendChatTopic::Direct), extracting the inner [`SendChatTopicDirect`](crate::model::SendChatTopicDirect).
1256	/// Returns `Err(&Self)` if it can't be converted.
1257	pub fn as_direct(&self) -> std::result::Result<&crate::model::SendChatTopicDirect, &Self> {
1258		if let SendChatTopic::Direct(val) = &self {
1259			Ok(val)
1260		} else {
1261			Err(self)
1262		}
1263	}
1264	/// Returns true if this is a [`Direct`](crate::model::SendChatTopic::Direct).
1265	pub fn is_direct(&self) -> bool {
1266		self.as_direct().is_ok()
1267	}
1268	/// Tries to convert the enum instance into [`Group`](crate::model::SendChatTopic::Group), extracting the inner [`SendChatTopicGroup`](crate::model::SendChatTopicGroup).
1269	/// Returns `Err(&Self)` if it can't be converted.
1270	pub fn as_group(&self) -> std::result::Result<&crate::model::SendChatTopicGroup, &Self> {
1271		if let SendChatTopic::Group(val) = &self {
1272			Ok(val)
1273		} else {
1274			Err(self)
1275		}
1276	}
1277	/// Returns true if this is a [`Group`](crate::model::SendChatTopic::Group).
1278	pub fn is_group(&self) -> bool {
1279		self.as_group().is_ok()
1280	}
1281	/// Tries to convert the enum instance into [`Party`](crate::model::SendChatTopic::Party), extracting the inner [`SendChatTopicParty`](crate::model::SendChatTopicParty).
1282	/// Returns `Err(&Self)` if it can't be converted.
1283	pub fn as_party(&self) -> std::result::Result<&crate::model::SendChatTopicParty, &Self> {
1284		if let SendChatTopic::Party(val) = &self {
1285			Ok(val)
1286		} else {
1287			Err(self)
1288		}
1289	}
1290	/// Returns true if this is a [`Party`](crate::model::SendChatTopic::Party).
1291	pub fn is_party(&self) -> bool {
1292		self.as_party().is_ok()
1293	}
1294	/// Tries to convert the enum instance into [`ThreadId`](crate::model::SendChatTopic::ThreadId), extracting the inner [`String`](std::string::String).
1295	/// Returns `Err(&Self)` if it can't be converted.
1296	pub fn as_thread_id(&self) -> std::result::Result<&std::string::String, &Self> {
1297		if let SendChatTopic::ThreadId(val) = &self {
1298			Ok(val)
1299		} else {
1300			Err(self)
1301		}
1302	}
1303	/// Returns true if this is a [`ThreadId`](crate::model::SendChatTopic::ThreadId).
1304	pub fn is_thread_id(&self) -> bool {
1305		self.as_thread_id().is_ok()
1306	}
1307	/// Returns true if the enum instance is the `Unknown` variant.
1308	pub fn is_unknown(&self) -> bool {
1309		matches!(self, Self::Unknown)
1310	}
1311}
1312
1313/// `rivet.api.chat.common#SendChatTopic` variant for direct messages.
1314#[non_exhaustive]
1315#[derive(std::clone::Clone, std::cmp::PartialEq)]
1316pub struct SendChatTopicDirect {
1317	/// A universally unique identifier.
1318	pub identity_id: std::option::Option<std::string::String>,
1319}
1320impl SendChatTopicDirect {
1321	/// A universally unique identifier.
1322	pub fn identity_id(&self) -> std::option::Option<&str> {
1323		self.identity_id.as_deref()
1324	}
1325}
1326impl std::fmt::Debug for SendChatTopicDirect {
1327	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1328		let mut formatter = f.debug_struct("SendChatTopicDirect");
1329		formatter.field("identity_id", &self.identity_id);
1330		formatter.finish()
1331	}
1332}
1333/// See [`SendChatTopicDirect`](crate::model::SendChatTopicDirect)
1334pub mod send_chat_topic_direct {
1335	/// A builder for [`SendChatTopicDirect`](crate::model::SendChatTopicDirect)
1336	#[non_exhaustive]
1337	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1338	pub struct Builder {
1339		pub(crate) identity_id: std::option::Option<std::string::String>,
1340	}
1341	impl Builder {
1342		/// A universally unique identifier.
1343		pub fn identity_id(mut self, input: impl Into<std::string::String>) -> Self {
1344			self.identity_id = Some(input.into());
1345			self
1346		}
1347		/// A universally unique identifier.
1348		pub fn set_identity_id(mut self, input: std::option::Option<std::string::String>) -> Self {
1349			self.identity_id = input;
1350			self
1351		}
1352		/// Consumes the builder and constructs a [`SendChatTopicDirect`](crate::model::SendChatTopicDirect)
1353		pub fn build(self) -> crate::model::SendChatTopicDirect {
1354			crate::model::SendChatTopicDirect {
1355				identity_id: self.identity_id,
1356			}
1357		}
1358	}
1359}
1360impl SendChatTopicDirect {
1361	/// Creates a new builder-style object to manufacture [`SendChatTopicDirect`](crate::model::SendChatTopicDirect)
1362	pub fn builder() -> crate::model::send_chat_topic_direct::Builder {
1363		crate::model::send_chat_topic_direct::Builder::default()
1364	}
1365}
1366
1367/// `rivet.api.chat.common#SendChatTopic` variant for parties.
1368#[non_exhaustive]
1369#[derive(std::clone::Clone, std::cmp::PartialEq)]
1370pub struct SendChatTopicParty {
1371	/// A universally unique identifier.
1372	pub party_id: std::option::Option<std::string::String>,
1373}
1374impl SendChatTopicParty {
1375	/// A universally unique identifier.
1376	pub fn party_id(&self) -> std::option::Option<&str> {
1377		self.party_id.as_deref()
1378	}
1379}
1380impl std::fmt::Debug for SendChatTopicParty {
1381	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1382		let mut formatter = f.debug_struct("SendChatTopicParty");
1383		formatter.field("party_id", &self.party_id);
1384		formatter.finish()
1385	}
1386}
1387/// See [`SendChatTopicParty`](crate::model::SendChatTopicParty)
1388pub mod send_chat_topic_party {
1389	/// A builder for [`SendChatTopicParty`](crate::model::SendChatTopicParty)
1390	#[non_exhaustive]
1391	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1392	pub struct Builder {
1393		pub(crate) party_id: std::option::Option<std::string::String>,
1394	}
1395	impl Builder {
1396		/// A universally unique identifier.
1397		pub fn party_id(mut self, input: impl Into<std::string::String>) -> Self {
1398			self.party_id = Some(input.into());
1399			self
1400		}
1401		/// A universally unique identifier.
1402		pub fn set_party_id(mut self, input: std::option::Option<std::string::String>) -> Self {
1403			self.party_id = input;
1404			self
1405		}
1406		/// Consumes the builder and constructs a [`SendChatTopicParty`](crate::model::SendChatTopicParty)
1407		pub fn build(self) -> crate::model::SendChatTopicParty {
1408			crate::model::SendChatTopicParty {
1409				party_id: self.party_id,
1410			}
1411		}
1412	}
1413}
1414impl SendChatTopicParty {
1415	/// Creates a new builder-style object to manufacture [`SendChatTopicParty`](crate::model::SendChatTopicParty)
1416	pub fn builder() -> crate::model::send_chat_topic_party::Builder {
1417		crate::model::send_chat_topic_party::Builder::default()
1418	}
1419}
1420
1421/// `rivet.api.chat.common#SendChatTopic` variant for groups.
1422#[non_exhaustive]
1423#[derive(std::clone::Clone, std::cmp::PartialEq)]
1424pub struct SendChatTopicGroup {
1425	/// A universally unique identifier.
1426	pub group_id: std::option::Option<std::string::String>,
1427}
1428impl SendChatTopicGroup {
1429	/// A universally unique identifier.
1430	pub fn group_id(&self) -> std::option::Option<&str> {
1431		self.group_id.as_deref()
1432	}
1433}
1434impl std::fmt::Debug for SendChatTopicGroup {
1435	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1436		let mut formatter = f.debug_struct("SendChatTopicGroup");
1437		formatter.field("group_id", &self.group_id);
1438		formatter.finish()
1439	}
1440}
1441/// See [`SendChatTopicGroup`](crate::model::SendChatTopicGroup)
1442pub mod send_chat_topic_group {
1443	/// A builder for [`SendChatTopicGroup`](crate::model::SendChatTopicGroup)
1444	#[non_exhaustive]
1445	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1446	pub struct Builder {
1447		pub(crate) group_id: std::option::Option<std::string::String>,
1448	}
1449	impl Builder {
1450		/// A universally unique identifier.
1451		pub fn group_id(mut self, input: impl Into<std::string::String>) -> Self {
1452			self.group_id = Some(input.into());
1453			self
1454		}
1455		/// A universally unique identifier.
1456		pub fn set_group_id(mut self, input: std::option::Option<std::string::String>) -> Self {
1457			self.group_id = input;
1458			self
1459		}
1460		/// Consumes the builder and constructs a [`SendChatTopicGroup`](crate::model::SendChatTopicGroup)
1461		pub fn build(self) -> crate::model::SendChatTopicGroup {
1462			crate::model::SendChatTopicGroup {
1463				group_id: self.group_id,
1464			}
1465		}
1466	}
1467}
1468impl SendChatTopicGroup {
1469	/// Creates a new builder-style object to manufacture [`SendChatTopicGroup`](crate::model::SendChatTopicGroup)
1470	pub fn builder() -> crate::model::send_chat_topic_group::Builder {
1471		crate::model::send_chat_topic_group::Builder::default()
1472	}
1473}
1474
1475/// Represents a chat typing status.
1476#[non_exhaustive]
1477#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1478pub enum ChatTypingStatus {
1479	/// Not typing.
1480	Idle(crate::model::Unit),
1481	/// Typing.
1482	Typing(crate::model::Unit),
1483	/// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version.
1484	/// An unknown enum variant
1485	///
1486	/// _Note: If you encounter this error, consider upgrading your SDK to the latest version._
1487	/// The `Unknown` variant represents cases where the server sent a value that wasn't recognized
1488	/// by the client. This can happen when the server adds new functionality, but the client has not been updated.
1489	/// To investigate this, consider turning on debug logging to print the raw HTTP response.
1490	#[non_exhaustive]
1491	Unknown,
1492}
1493impl ChatTypingStatus {
1494	/// Tries to convert the enum instance into [`Idle`](crate::model::ChatTypingStatus::Idle), extracting the inner [`Unit`](crate::model::Unit).
1495	/// Returns `Err(&Self)` if it can't be converted.
1496	pub fn as_idle(&self) -> std::result::Result<&crate::model::Unit, &Self> {
1497		if let ChatTypingStatus::Idle(val) = &self {
1498			Ok(val)
1499		} else {
1500			Err(self)
1501		}
1502	}
1503	/// Returns true if this is a [`Idle`](crate::model::ChatTypingStatus::Idle).
1504	pub fn is_idle(&self) -> bool {
1505		self.as_idle().is_ok()
1506	}
1507	/// Tries to convert the enum instance into [`Typing`](crate::model::ChatTypingStatus::Typing), extracting the inner [`Unit`](crate::model::Unit).
1508	/// Returns `Err(&Self)` if it can't be converted.
1509	pub fn as_typing(&self) -> std::result::Result<&crate::model::Unit, &Self> {
1510		if let ChatTypingStatus::Typing(val) = &self {
1511			Ok(val)
1512		} else {
1513			Err(self)
1514		}
1515	}
1516	/// Returns true if this is a [`Typing`](crate::model::ChatTypingStatus::Typing).
1517	pub fn is_typing(&self) -> bool {
1518		self.as_typing().is_ok()
1519	}
1520	/// Returns true if the enum instance is the `Unknown` variant.
1521	pub fn is_unknown(&self) -> bool {
1522		matches!(self, Self::Unknown)
1523	}
1524}
1525
1526#[allow(missing_docs)] // documentation missing in model
1527#[non_exhaustive]
1528#[derive(std::clone::Clone, std::cmp::PartialEq)]
1529pub struct Unit {}
1530impl std::fmt::Debug for Unit {
1531	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1532		let mut formatter = f.debug_struct("Unit");
1533		formatter.finish()
1534	}
1535}
1536/// See [`Unit`](crate::model::Unit)
1537pub mod unit {
1538	/// A builder for [`Unit`](crate::model::Unit)
1539	#[non_exhaustive]
1540	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1541	pub struct Builder {}
1542	impl Builder {
1543		/// Consumes the builder and constructs a [`Unit`](crate::model::Unit)
1544		pub fn build(self) -> crate::model::Unit {
1545			crate::model::Unit {}
1546		}
1547	}
1548}
1549impl Unit {
1550	/// Creates a new builder-style object to manufacture [`Unit`](crate::model::Unit)
1551	pub fn builder() -> crate::model::unit::Builder {
1552		crate::model::unit::Builder::default()
1553	}
1554}
1555
1556/// A chat message.
1557#[non_exhaustive]
1558#[derive(std::clone::Clone, std::cmp::PartialEq)]
1559pub struct ChatMessage {
1560	/// A universally unique identifier.
1561	pub chat_message_id: std::option::Option<std::string::String>,
1562	/// A universally unique identifier.
1563	pub thread_id: std::option::Option<std::string::String>,
1564	/// Time since UNIX epoch (in milliseconds).
1565	pub send_ts: std::option::Option<i64>,
1566	/// Represents types of chat message bodies.
1567	pub body: std::option::Option<crate::model::ChatMessageBody>,
1568}
1569impl ChatMessage {
1570	/// A universally unique identifier.
1571	pub fn chat_message_id(&self) -> std::option::Option<&str> {
1572		self.chat_message_id.as_deref()
1573	}
1574	/// A universally unique identifier.
1575	pub fn thread_id(&self) -> std::option::Option<&str> {
1576		self.thread_id.as_deref()
1577	}
1578	/// Time since UNIX epoch (in milliseconds).
1579	pub fn send_ts(&self) -> std::option::Option<i64> {
1580		self.send_ts
1581	}
1582	/// Represents types of chat message bodies.
1583	pub fn body(&self) -> std::option::Option<&crate::model::ChatMessageBody> {
1584		self.body.as_ref()
1585	}
1586}
1587impl std::fmt::Debug for ChatMessage {
1588	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1589		let mut formatter = f.debug_struct("ChatMessage");
1590		formatter.field("chat_message_id", &self.chat_message_id);
1591		formatter.field("thread_id", &self.thread_id);
1592		formatter.field("send_ts", &self.send_ts);
1593		formatter.field("body", &self.body);
1594		formatter.finish()
1595	}
1596}
1597/// See [`ChatMessage`](crate::model::ChatMessage)
1598pub mod chat_message {
1599	/// A builder for [`ChatMessage`](crate::model::ChatMessage)
1600	#[non_exhaustive]
1601	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1602	pub struct Builder {
1603		pub(crate) chat_message_id: std::option::Option<std::string::String>,
1604		pub(crate) thread_id: std::option::Option<std::string::String>,
1605		pub(crate) send_ts: std::option::Option<i64>,
1606		pub(crate) body: std::option::Option<crate::model::ChatMessageBody>,
1607	}
1608	impl Builder {
1609		/// A universally unique identifier.
1610		pub fn chat_message_id(mut self, input: impl Into<std::string::String>) -> Self {
1611			self.chat_message_id = Some(input.into());
1612			self
1613		}
1614		/// A universally unique identifier.
1615		pub fn set_chat_message_id(
1616			mut self,
1617			input: std::option::Option<std::string::String>,
1618		) -> Self {
1619			self.chat_message_id = input;
1620			self
1621		}
1622		/// A universally unique identifier.
1623		pub fn thread_id(mut self, input: impl Into<std::string::String>) -> Self {
1624			self.thread_id = Some(input.into());
1625			self
1626		}
1627		/// A universally unique identifier.
1628		pub fn set_thread_id(mut self, input: std::option::Option<std::string::String>) -> Self {
1629			self.thread_id = input;
1630			self
1631		}
1632		/// Time since UNIX epoch (in milliseconds).
1633		pub fn send_ts(mut self, input: i64) -> Self {
1634			self.send_ts = Some(input);
1635			self
1636		}
1637		/// Time since UNIX epoch (in milliseconds).
1638		pub fn set_send_ts(mut self, input: std::option::Option<i64>) -> Self {
1639			self.send_ts = input;
1640			self
1641		}
1642		/// Represents types of chat message bodies.
1643		pub fn body(mut self, input: crate::model::ChatMessageBody) -> Self {
1644			self.body = Some(input);
1645			self
1646		}
1647		/// Represents types of chat message bodies.
1648		pub fn set_body(
1649			mut self,
1650			input: std::option::Option<crate::model::ChatMessageBody>,
1651		) -> Self {
1652			self.body = input;
1653			self
1654		}
1655		/// Consumes the builder and constructs a [`ChatMessage`](crate::model::ChatMessage)
1656		pub fn build(self) -> crate::model::ChatMessage {
1657			crate::model::ChatMessage {
1658				chat_message_id: self.chat_message_id,
1659				thread_id: self.thread_id,
1660				send_ts: self.send_ts,
1661				body: self.body,
1662			}
1663		}
1664	}
1665}
1666impl ChatMessage {
1667	/// Creates a new builder-style object to manufacture [`ChatMessage`](crate::model::ChatMessage)
1668	pub fn builder() -> crate::model::chat_message::Builder {
1669		crate::model::chat_message::Builder::default()
1670	}
1671}
1672
1673/// Represents types of chat message bodies.
1674#[non_exhaustive]
1675#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1676pub enum ChatMessageBody {
1677	/// `rivet.chat#ChatMessageBody` variant for indicating a new chat was created.
1678	ChatCreate(crate::model::ChatMessageBodyChatCreate),
1679	/// `rivet.chat#ChatMessageBody` variant for indicating an identity joined the group.
1680	GroupJoin(crate::model::ChatMessageBodyGroupJoin),
1681	/// `rivet.chat#ChatMessageBody` variant for indicating an identity left the group.
1682	GroupLeave(crate::model::ChatMessageBodyGroupLeave),
1683	/// `rivet.chat#ChatMessageBody` variant for indicating an identity followed the identity.
1684	IdentityFollow(crate::model::ChatMessageBodyIdentityFollow),
1685	/// `rivet.chat#ChatMessageBody` variant for indicating a change in the party's current activity.
1686	PartyActivityChange(crate::model::ChatMessageBodyPartyActivityChange),
1687	/// `rivet.chat#ChatMessageBody` variant holding an a party invitation.
1688	PartyInvite(crate::model::ChatMessageBodyPartyInvite),
1689	/// `rivet.chat#ChatMessageBody` variant for indicating an identity joined the party.
1690	PartyJoin(crate::model::ChatMessageBodyPartyJoin),
1691	/// `rivet.chat#ChatMessageBody` variant for indicating an identity left the party.
1692	PartyLeave(crate::model::ChatMessageBodyPartyLeave),
1693	/// `rivet.chat#ChatMessageBody` variant for text messages. Sent by other identities using the chat interface.
1694	Text(crate::model::ChatMessageBodyText),
1695	/// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version.
1696	/// An unknown enum variant
1697	///
1698	/// _Note: If you encounter this error, consider upgrading your SDK to the latest version._
1699	/// The `Unknown` variant represents cases where the server sent a value that wasn't recognized
1700	/// by the client. This can happen when the server adds new functionality, but the client has not been updated.
1701	/// To investigate this, consider turning on debug logging to print the raw HTTP response.
1702	#[non_exhaustive]
1703	Unknown,
1704}
1705impl ChatMessageBody {
1706	/// Tries to convert the enum instance into [`ChatCreate`](crate::model::ChatMessageBody::ChatCreate), extracting the inner [`ChatMessageBodyChatCreate`](crate::model::ChatMessageBodyChatCreate).
1707	/// Returns `Err(&Self)` if it can't be converted.
1708	pub fn as_chat_create(
1709		&self,
1710	) -> std::result::Result<&crate::model::ChatMessageBodyChatCreate, &Self> {
1711		if let ChatMessageBody::ChatCreate(val) = &self {
1712			Ok(val)
1713		} else {
1714			Err(self)
1715		}
1716	}
1717	/// Returns true if this is a [`ChatCreate`](crate::model::ChatMessageBody::ChatCreate).
1718	pub fn is_chat_create(&self) -> bool {
1719		self.as_chat_create().is_ok()
1720	}
1721	/// Tries to convert the enum instance into [`GroupJoin`](crate::model::ChatMessageBody::GroupJoin), extracting the inner [`ChatMessageBodyGroupJoin`](crate::model::ChatMessageBodyGroupJoin).
1722	/// Returns `Err(&Self)` if it can't be converted.
1723	pub fn as_group_join(
1724		&self,
1725	) -> std::result::Result<&crate::model::ChatMessageBodyGroupJoin, &Self> {
1726		if let ChatMessageBody::GroupJoin(val) = &self {
1727			Ok(val)
1728		} else {
1729			Err(self)
1730		}
1731	}
1732	/// Returns true if this is a [`GroupJoin`](crate::model::ChatMessageBody::GroupJoin).
1733	pub fn is_group_join(&self) -> bool {
1734		self.as_group_join().is_ok()
1735	}
1736	/// Tries to convert the enum instance into [`GroupLeave`](crate::model::ChatMessageBody::GroupLeave), extracting the inner [`ChatMessageBodyGroupLeave`](crate::model::ChatMessageBodyGroupLeave).
1737	/// Returns `Err(&Self)` if it can't be converted.
1738	pub fn as_group_leave(
1739		&self,
1740	) -> std::result::Result<&crate::model::ChatMessageBodyGroupLeave, &Self> {
1741		if let ChatMessageBody::GroupLeave(val) = &self {
1742			Ok(val)
1743		} else {
1744			Err(self)
1745		}
1746	}
1747	/// Returns true if this is a [`GroupLeave`](crate::model::ChatMessageBody::GroupLeave).
1748	pub fn is_group_leave(&self) -> bool {
1749		self.as_group_leave().is_ok()
1750	}
1751	/// Tries to convert the enum instance into [`IdentityFollow`](crate::model::ChatMessageBody::IdentityFollow), extracting the inner [`ChatMessageBodyIdentityFollow`](crate::model::ChatMessageBodyIdentityFollow).
1752	/// Returns `Err(&Self)` if it can't be converted.
1753	pub fn as_identity_follow(
1754		&self,
1755	) -> std::result::Result<&crate::model::ChatMessageBodyIdentityFollow, &Self> {
1756		if let ChatMessageBody::IdentityFollow(val) = &self {
1757			Ok(val)
1758		} else {
1759			Err(self)
1760		}
1761	}
1762	/// Returns true if this is a [`IdentityFollow`](crate::model::ChatMessageBody::IdentityFollow).
1763	pub fn is_identity_follow(&self) -> bool {
1764		self.as_identity_follow().is_ok()
1765	}
1766	/// Tries to convert the enum instance into [`PartyActivityChange`](crate::model::ChatMessageBody::PartyActivityChange), extracting the inner [`ChatMessageBodyPartyActivityChange`](crate::model::ChatMessageBodyPartyActivityChange).
1767	/// Returns `Err(&Self)` if it can't be converted.
1768	pub fn as_party_activity_change(
1769		&self,
1770	) -> std::result::Result<&crate::model::ChatMessageBodyPartyActivityChange, &Self> {
1771		if let ChatMessageBody::PartyActivityChange(val) = &self {
1772			Ok(val)
1773		} else {
1774			Err(self)
1775		}
1776	}
1777	/// Returns true if this is a [`PartyActivityChange`](crate::model::ChatMessageBody::PartyActivityChange).
1778	pub fn is_party_activity_change(&self) -> bool {
1779		self.as_party_activity_change().is_ok()
1780	}
1781	/// Tries to convert the enum instance into [`PartyInvite`](crate::model::ChatMessageBody::PartyInvite), extracting the inner [`ChatMessageBodyPartyInvite`](crate::model::ChatMessageBodyPartyInvite).
1782	/// Returns `Err(&Self)` if it can't be converted.
1783	pub fn as_party_invite(
1784		&self,
1785	) -> std::result::Result<&crate::model::ChatMessageBodyPartyInvite, &Self> {
1786		if let ChatMessageBody::PartyInvite(val) = &self {
1787			Ok(val)
1788		} else {
1789			Err(self)
1790		}
1791	}
1792	/// Returns true if this is a [`PartyInvite`](crate::model::ChatMessageBody::PartyInvite).
1793	pub fn is_party_invite(&self) -> bool {
1794		self.as_party_invite().is_ok()
1795	}
1796	/// Tries to convert the enum instance into [`PartyJoin`](crate::model::ChatMessageBody::PartyJoin), extracting the inner [`ChatMessageBodyPartyJoin`](crate::model::ChatMessageBodyPartyJoin).
1797	/// Returns `Err(&Self)` if it can't be converted.
1798	pub fn as_party_join(
1799		&self,
1800	) -> std::result::Result<&crate::model::ChatMessageBodyPartyJoin, &Self> {
1801		if let ChatMessageBody::PartyJoin(val) = &self {
1802			Ok(val)
1803		} else {
1804			Err(self)
1805		}
1806	}
1807	/// Returns true if this is a [`PartyJoin`](crate::model::ChatMessageBody::PartyJoin).
1808	pub fn is_party_join(&self) -> bool {
1809		self.as_party_join().is_ok()
1810	}
1811	/// Tries to convert the enum instance into [`PartyLeave`](crate::model::ChatMessageBody::PartyLeave), extracting the inner [`ChatMessageBodyPartyLeave`](crate::model::ChatMessageBodyPartyLeave).
1812	/// Returns `Err(&Self)` if it can't be converted.
1813	pub fn as_party_leave(
1814		&self,
1815	) -> std::result::Result<&crate::model::ChatMessageBodyPartyLeave, &Self> {
1816		if let ChatMessageBody::PartyLeave(val) = &self {
1817			Ok(val)
1818		} else {
1819			Err(self)
1820		}
1821	}
1822	/// Returns true if this is a [`PartyLeave`](crate::model::ChatMessageBody::PartyLeave).
1823	pub fn is_party_leave(&self) -> bool {
1824		self.as_party_leave().is_ok()
1825	}
1826	/// Tries to convert the enum instance into [`Text`](crate::model::ChatMessageBody::Text), extracting the inner [`ChatMessageBodyText`](crate::model::ChatMessageBodyText).
1827	/// Returns `Err(&Self)` if it can't be converted.
1828	pub fn as_text(&self) -> std::result::Result<&crate::model::ChatMessageBodyText, &Self> {
1829		if let ChatMessageBody::Text(val) = &self {
1830			Ok(val)
1831		} else {
1832			Err(self)
1833		}
1834	}
1835	/// Returns true if this is a [`Text`](crate::model::ChatMessageBody::Text).
1836	pub fn is_text(&self) -> bool {
1837		self.as_text().is_ok()
1838	}
1839	/// Returns true if the enum instance is the `Unknown` variant.
1840	pub fn is_unknown(&self) -> bool {
1841		matches!(self, Self::Unknown)
1842	}
1843}
1844
1845/// `rivet.chat#ChatMessageBody` variant for indicating a change in the party's current activity.
1846#[non_exhaustive]
1847#[derive(std::clone::Clone, std::cmp::PartialEq)]
1848pub struct ChatMessageBodyPartyActivityChange {}
1849impl std::fmt::Debug for ChatMessageBodyPartyActivityChange {
1850	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1851		let mut formatter = f.debug_struct("ChatMessageBodyPartyActivityChange");
1852		formatter.finish()
1853	}
1854}
1855/// See [`ChatMessageBodyPartyActivityChange`](crate::model::ChatMessageBodyPartyActivityChange)
1856pub mod chat_message_body_party_activity_change {
1857	/// A builder for [`ChatMessageBodyPartyActivityChange`](crate::model::ChatMessageBodyPartyActivityChange)
1858	#[non_exhaustive]
1859	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1860	pub struct Builder {}
1861	impl Builder {
1862		/// Consumes the builder and constructs a [`ChatMessageBodyPartyActivityChange`](crate::model::ChatMessageBodyPartyActivityChange)
1863		pub fn build(self) -> crate::model::ChatMessageBodyPartyActivityChange {
1864			crate::model::ChatMessageBodyPartyActivityChange {}
1865		}
1866	}
1867}
1868impl ChatMessageBodyPartyActivityChange {
1869	/// Creates a new builder-style object to manufacture [`ChatMessageBodyPartyActivityChange`](crate::model::ChatMessageBodyPartyActivityChange)
1870	pub fn builder() -> crate::model::chat_message_body_party_activity_change::Builder {
1871		crate::model::chat_message_body_party_activity_change::Builder::default()
1872	}
1873}
1874
1875/// `rivet.chat#ChatMessageBody` variant for indicating an identity left the party.
1876#[non_exhaustive]
1877#[derive(std::clone::Clone, std::cmp::PartialEq)]
1878pub struct ChatMessageBodyPartyLeave {
1879	/// An identity handle.
1880	pub identity: std::option::Option<crate::model::IdentityHandle>,
1881}
1882impl ChatMessageBodyPartyLeave {
1883	/// An identity handle.
1884	pub fn identity(&self) -> std::option::Option<&crate::model::IdentityHandle> {
1885		self.identity.as_ref()
1886	}
1887}
1888impl std::fmt::Debug for ChatMessageBodyPartyLeave {
1889	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1890		let mut formatter = f.debug_struct("ChatMessageBodyPartyLeave");
1891		formatter.field("identity", &self.identity);
1892		formatter.finish()
1893	}
1894}
1895/// See [`ChatMessageBodyPartyLeave`](crate::model::ChatMessageBodyPartyLeave)
1896pub mod chat_message_body_party_leave {
1897	/// A builder for [`ChatMessageBodyPartyLeave`](crate::model::ChatMessageBodyPartyLeave)
1898	#[non_exhaustive]
1899	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1900	pub struct Builder {
1901		pub(crate) identity: std::option::Option<crate::model::IdentityHandle>,
1902	}
1903	impl Builder {
1904		/// An identity handle.
1905		pub fn identity(mut self, input: crate::model::IdentityHandle) -> Self {
1906			self.identity = Some(input);
1907			self
1908		}
1909		/// An identity handle.
1910		pub fn set_identity(
1911			mut self,
1912			input: std::option::Option<crate::model::IdentityHandle>,
1913		) -> Self {
1914			self.identity = input;
1915			self
1916		}
1917		/// Consumes the builder and constructs a [`ChatMessageBodyPartyLeave`](crate::model::ChatMessageBodyPartyLeave)
1918		pub fn build(self) -> crate::model::ChatMessageBodyPartyLeave {
1919			crate::model::ChatMessageBodyPartyLeave {
1920				identity: self.identity,
1921			}
1922		}
1923	}
1924}
1925impl ChatMessageBodyPartyLeave {
1926	/// Creates a new builder-style object to manufacture [`ChatMessageBodyPartyLeave`](crate::model::ChatMessageBodyPartyLeave)
1927	pub fn builder() -> crate::model::chat_message_body_party_leave::Builder {
1928		crate::model::chat_message_body_party_leave::Builder::default()
1929	}
1930}
1931
1932/// `rivet.chat#ChatMessageBody` variant for indicating an identity joined the party.
1933#[non_exhaustive]
1934#[derive(std::clone::Clone, std::cmp::PartialEq)]
1935pub struct ChatMessageBodyPartyJoin {
1936	/// An identity handle.
1937	pub identity: std::option::Option<crate::model::IdentityHandle>,
1938}
1939impl ChatMessageBodyPartyJoin {
1940	/// An identity handle.
1941	pub fn identity(&self) -> std::option::Option<&crate::model::IdentityHandle> {
1942		self.identity.as_ref()
1943	}
1944}
1945impl std::fmt::Debug for ChatMessageBodyPartyJoin {
1946	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1947		let mut formatter = f.debug_struct("ChatMessageBodyPartyJoin");
1948		formatter.field("identity", &self.identity);
1949		formatter.finish()
1950	}
1951}
1952/// See [`ChatMessageBodyPartyJoin`](crate::model::ChatMessageBodyPartyJoin)
1953pub mod chat_message_body_party_join {
1954	/// A builder for [`ChatMessageBodyPartyJoin`](crate::model::ChatMessageBodyPartyJoin)
1955	#[non_exhaustive]
1956	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1957	pub struct Builder {
1958		pub(crate) identity: std::option::Option<crate::model::IdentityHandle>,
1959	}
1960	impl Builder {
1961		/// An identity handle.
1962		pub fn identity(mut self, input: crate::model::IdentityHandle) -> Self {
1963			self.identity = Some(input);
1964			self
1965		}
1966		/// An identity handle.
1967		pub fn set_identity(
1968			mut self,
1969			input: std::option::Option<crate::model::IdentityHandle>,
1970		) -> Self {
1971			self.identity = input;
1972			self
1973		}
1974		/// Consumes the builder and constructs a [`ChatMessageBodyPartyJoin`](crate::model::ChatMessageBodyPartyJoin)
1975		pub fn build(self) -> crate::model::ChatMessageBodyPartyJoin {
1976			crate::model::ChatMessageBodyPartyJoin {
1977				identity: self.identity,
1978			}
1979		}
1980	}
1981}
1982impl ChatMessageBodyPartyJoin {
1983	/// Creates a new builder-style object to manufacture [`ChatMessageBodyPartyJoin`](crate::model::ChatMessageBodyPartyJoin)
1984	pub fn builder() -> crate::model::chat_message_body_party_join::Builder {
1985		crate::model::chat_message_body_party_join::Builder::default()
1986	}
1987}
1988
1989/// `rivet.chat#ChatMessageBody` variant holding an a party invitation.
1990#[non_exhaustive]
1991#[derive(std::clone::Clone, std::cmp::PartialEq)]
1992pub struct ChatMessageBodyPartyInvite {
1993	/// An identity handle.
1994	pub sender: std::option::Option<crate::model::IdentityHandle>,
1995	/// A party handle.
1996	pub party: std::option::Option<crate::model::PartyHandle>,
1997	/// Pass to `rivet.api.party#GetPartyFromInvite$token` to view more information about the party. Pass to `rivet.api.party.common#JoinPartyInvite$token` to join the party.
1998	pub invite_token: std::option::Option<std::string::String>,
1999}
2000impl ChatMessageBodyPartyInvite {
2001	/// An identity handle.
2002	pub fn sender(&self) -> std::option::Option<&crate::model::IdentityHandle> {
2003		self.sender.as_ref()
2004	}
2005	/// A party handle.
2006	pub fn party(&self) -> std::option::Option<&crate::model::PartyHandle> {
2007		self.party.as_ref()
2008	}
2009	/// Pass to `rivet.api.party#GetPartyFromInvite$token` to view more information about the party. Pass to `rivet.api.party.common#JoinPartyInvite$token` to join the party.
2010	pub fn invite_token(&self) -> std::option::Option<&str> {
2011		self.invite_token.as_deref()
2012	}
2013}
2014impl std::fmt::Debug for ChatMessageBodyPartyInvite {
2015	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2016		let mut formatter = f.debug_struct("ChatMessageBodyPartyInvite");
2017		formatter.field("sender", &self.sender);
2018		formatter.field("party", &self.party);
2019		formatter.field("invite_token", &"*** Sensitive Data Redacted ***");
2020		formatter.finish()
2021	}
2022}
2023/// See [`ChatMessageBodyPartyInvite`](crate::model::ChatMessageBodyPartyInvite)
2024pub mod chat_message_body_party_invite {
2025	/// A builder for [`ChatMessageBodyPartyInvite`](crate::model::ChatMessageBodyPartyInvite)
2026	#[non_exhaustive]
2027	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
2028	pub struct Builder {
2029		pub(crate) sender: std::option::Option<crate::model::IdentityHandle>,
2030		pub(crate) party: std::option::Option<crate::model::PartyHandle>,
2031		pub(crate) invite_token: std::option::Option<std::string::String>,
2032	}
2033	impl Builder {
2034		/// An identity handle.
2035		pub fn sender(mut self, input: crate::model::IdentityHandle) -> Self {
2036			self.sender = Some(input);
2037			self
2038		}
2039		/// An identity handle.
2040		pub fn set_sender(
2041			mut self,
2042			input: std::option::Option<crate::model::IdentityHandle>,
2043		) -> Self {
2044			self.sender = input;
2045			self
2046		}
2047		/// A party handle.
2048		pub fn party(mut self, input: crate::model::PartyHandle) -> Self {
2049			self.party = Some(input);
2050			self
2051		}
2052		/// A party handle.
2053		pub fn set_party(mut self, input: std::option::Option<crate::model::PartyHandle>) -> Self {
2054			self.party = input;
2055			self
2056		}
2057		/// Pass to `rivet.api.party#GetPartyFromInvite$token` to view more information about the party. Pass to `rivet.api.party.common#JoinPartyInvite$token` to join the party.
2058		pub fn invite_token(mut self, input: impl Into<std::string::String>) -> Self {
2059			self.invite_token = Some(input.into());
2060			self
2061		}
2062		/// Pass to `rivet.api.party#GetPartyFromInvite$token` to view more information about the party. Pass to `rivet.api.party.common#JoinPartyInvite$token` to join the party.
2063		pub fn set_invite_token(mut self, input: std::option::Option<std::string::String>) -> Self {
2064			self.invite_token = input;
2065			self
2066		}
2067		/// Consumes the builder and constructs a [`ChatMessageBodyPartyInvite`](crate::model::ChatMessageBodyPartyInvite)
2068		pub fn build(self) -> crate::model::ChatMessageBodyPartyInvite {
2069			crate::model::ChatMessageBodyPartyInvite {
2070				sender: self.sender,
2071				party: self.party,
2072				invite_token: self.invite_token,
2073			}
2074		}
2075	}
2076}
2077impl ChatMessageBodyPartyInvite {
2078	/// Creates a new builder-style object to manufacture [`ChatMessageBodyPartyInvite`](crate::model::ChatMessageBodyPartyInvite)
2079	pub fn builder() -> crate::model::chat_message_body_party_invite::Builder {
2080		crate::model::chat_message_body_party_invite::Builder::default()
2081	}
2082}
2083
2084/// `rivet.chat#ChatMessageBody` variant for indicating an identity left the group.
2085#[non_exhaustive]
2086#[derive(std::clone::Clone, std::cmp::PartialEq)]
2087pub struct ChatMessageBodyGroupLeave {
2088	/// An identity handle.
2089	pub identity: std::option::Option<crate::model::IdentityHandle>,
2090}
2091impl ChatMessageBodyGroupLeave {
2092	/// An identity handle.
2093	pub fn identity(&self) -> std::option::Option<&crate::model::IdentityHandle> {
2094		self.identity.as_ref()
2095	}
2096}
2097impl std::fmt::Debug for ChatMessageBodyGroupLeave {
2098	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2099		let mut formatter = f.debug_struct("ChatMessageBodyGroupLeave");
2100		formatter.field("identity", &self.identity);
2101		formatter.finish()
2102	}
2103}
2104/// See [`ChatMessageBodyGroupLeave`](crate::model::ChatMessageBodyGroupLeave)
2105pub mod chat_message_body_group_leave {
2106	/// A builder for [`ChatMessageBodyGroupLeave`](crate::model::ChatMessageBodyGroupLeave)
2107	#[non_exhaustive]
2108	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
2109	pub struct Builder {
2110		pub(crate) identity: std::option::Option<crate::model::IdentityHandle>,
2111	}
2112	impl Builder {
2113		/// An identity handle.
2114		pub fn identity(mut self, input: crate::model::IdentityHandle) -> Self {
2115			self.identity = Some(input);
2116			self
2117		}
2118		/// An identity handle.
2119		pub fn set_identity(
2120			mut self,
2121			input: std::option::Option<crate::model::IdentityHandle>,
2122		) -> Self {
2123			self.identity = input;
2124			self
2125		}
2126		/// Consumes the builder and constructs a [`ChatMessageBodyGroupLeave`](crate::model::ChatMessageBodyGroupLeave)
2127		pub fn build(self) -> crate::model::ChatMessageBodyGroupLeave {
2128			crate::model::ChatMessageBodyGroupLeave {
2129				identity: self.identity,
2130			}
2131		}
2132	}
2133}
2134impl ChatMessageBodyGroupLeave {
2135	/// Creates a new builder-style object to manufacture [`ChatMessageBodyGroupLeave`](crate::model::ChatMessageBodyGroupLeave)
2136	pub fn builder() -> crate::model::chat_message_body_group_leave::Builder {
2137		crate::model::chat_message_body_group_leave::Builder::default()
2138	}
2139}
2140
2141/// `rivet.chat#ChatMessageBody` variant for indicating an identity joined the group.
2142#[non_exhaustive]
2143#[derive(std::clone::Clone, std::cmp::PartialEq)]
2144pub struct ChatMessageBodyGroupJoin {
2145	/// An identity handle.
2146	pub identity: std::option::Option<crate::model::IdentityHandle>,
2147}
2148impl ChatMessageBodyGroupJoin {
2149	/// An identity handle.
2150	pub fn identity(&self) -> std::option::Option<&crate::model::IdentityHandle> {
2151		self.identity.as_ref()
2152	}
2153}
2154impl std::fmt::Debug for ChatMessageBodyGroupJoin {
2155	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2156		let mut formatter = f.debug_struct("ChatMessageBodyGroupJoin");
2157		formatter.field("identity", &self.identity);
2158		formatter.finish()
2159	}
2160}
2161/// See [`ChatMessageBodyGroupJoin`](crate::model::ChatMessageBodyGroupJoin)
2162pub mod chat_message_body_group_join {
2163	/// A builder for [`ChatMessageBodyGroupJoin`](crate::model::ChatMessageBodyGroupJoin)
2164	#[non_exhaustive]
2165	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
2166	pub struct Builder {
2167		pub(crate) identity: std::option::Option<crate::model::IdentityHandle>,
2168	}
2169	impl Builder {
2170		/// An identity handle.
2171		pub fn identity(mut self, input: crate::model::IdentityHandle) -> Self {
2172			self.identity = Some(input);
2173			self
2174		}
2175		/// An identity handle.
2176		pub fn set_identity(
2177			mut self,
2178			input: std::option::Option<crate::model::IdentityHandle>,
2179		) -> Self {
2180			self.identity = input;
2181			self
2182		}
2183		/// Consumes the builder and constructs a [`ChatMessageBodyGroupJoin`](crate::model::ChatMessageBodyGroupJoin)
2184		pub fn build(self) -> crate::model::ChatMessageBodyGroupJoin {
2185			crate::model::ChatMessageBodyGroupJoin {
2186				identity: self.identity,
2187			}
2188		}
2189	}
2190}
2191impl ChatMessageBodyGroupJoin {
2192	/// Creates a new builder-style object to manufacture [`ChatMessageBodyGroupJoin`](crate::model::ChatMessageBodyGroupJoin)
2193	pub fn builder() -> crate::model::chat_message_body_group_join::Builder {
2194		crate::model::chat_message_body_group_join::Builder::default()
2195	}
2196}
2197
2198/// `rivet.chat#ChatMessageBody` variant for indicating an identity followed the identity.
2199#[non_exhaustive]
2200#[derive(std::clone::Clone, std::cmp::PartialEq)]
2201pub struct ChatMessageBodyIdentityFollow {}
2202impl std::fmt::Debug for ChatMessageBodyIdentityFollow {
2203	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2204		let mut formatter = f.debug_struct("ChatMessageBodyIdentityFollow");
2205		formatter.finish()
2206	}
2207}
2208/// See [`ChatMessageBodyIdentityFollow`](crate::model::ChatMessageBodyIdentityFollow)
2209pub mod chat_message_body_identity_follow {
2210	/// A builder for [`ChatMessageBodyIdentityFollow`](crate::model::ChatMessageBodyIdentityFollow)
2211	#[non_exhaustive]
2212	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
2213	pub struct Builder {}
2214	impl Builder {
2215		/// Consumes the builder and constructs a [`ChatMessageBodyIdentityFollow`](crate::model::ChatMessageBodyIdentityFollow)
2216		pub fn build(self) -> crate::model::ChatMessageBodyIdentityFollow {
2217			crate::model::ChatMessageBodyIdentityFollow {}
2218		}
2219	}
2220}
2221impl ChatMessageBodyIdentityFollow {
2222	/// Creates a new builder-style object to manufacture [`ChatMessageBodyIdentityFollow`](crate::model::ChatMessageBodyIdentityFollow)
2223	pub fn builder() -> crate::model::chat_message_body_identity_follow::Builder {
2224		crate::model::chat_message_body_identity_follow::Builder::default()
2225	}
2226}
2227
2228/// `rivet.chat#ChatMessageBody` variant for indicating a new chat was created.
2229#[non_exhaustive]
2230#[derive(std::clone::Clone, std::cmp::PartialEq)]
2231pub struct ChatMessageBodyChatCreate {}
2232impl std::fmt::Debug for ChatMessageBodyChatCreate {
2233	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2234		let mut formatter = f.debug_struct("ChatMessageBodyChatCreate");
2235		formatter.finish()
2236	}
2237}
2238/// See [`ChatMessageBodyChatCreate`](crate::model::ChatMessageBodyChatCreate)
2239pub mod chat_message_body_chat_create {
2240	/// A builder for [`ChatMessageBodyChatCreate`](crate::model::ChatMessageBodyChatCreate)
2241	#[non_exhaustive]
2242	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
2243	pub struct Builder {}
2244	impl Builder {
2245		/// Consumes the builder and constructs a [`ChatMessageBodyChatCreate`](crate::model::ChatMessageBodyChatCreate)
2246		pub fn build(self) -> crate::model::ChatMessageBodyChatCreate {
2247			crate::model::ChatMessageBodyChatCreate {}
2248		}
2249	}
2250}
2251impl ChatMessageBodyChatCreate {
2252	/// Creates a new builder-style object to manufacture [`ChatMessageBodyChatCreate`](crate::model::ChatMessageBodyChatCreate)
2253	pub fn builder() -> crate::model::chat_message_body_chat_create::Builder {
2254		crate::model::chat_message_body_chat_create::Builder::default()
2255	}
2256}
2257
2258/// `rivet.chat#ChatMessageBody` variant for text messages. Sent by other identities using the chat interface.
2259#[non_exhaustive]
2260#[derive(std::clone::Clone, std::cmp::PartialEq)]
2261pub struct ChatMessageBodyText {
2262	/// An identity handle.
2263	pub sender: std::option::Option<crate::model::IdentityHandle>,
2264	/// The text in the message.
2265	pub body: std::option::Option<std::string::String>,
2266}
2267impl ChatMessageBodyText {
2268	/// An identity handle.
2269	pub fn sender(&self) -> std::option::Option<&crate::model::IdentityHandle> {
2270		self.sender.as_ref()
2271	}
2272	/// The text in the message.
2273	pub fn body(&self) -> std::option::Option<&str> {
2274		self.body.as_deref()
2275	}
2276}
2277impl std::fmt::Debug for ChatMessageBodyText {
2278	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2279		let mut formatter = f.debug_struct("ChatMessageBodyText");
2280		formatter.field("sender", &self.sender);
2281		formatter.field("body", &self.body);
2282		formatter.finish()
2283	}
2284}
2285/// See [`ChatMessageBodyText`](crate::model::ChatMessageBodyText)
2286pub mod chat_message_body_text {
2287	/// A builder for [`ChatMessageBodyText`](crate::model::ChatMessageBodyText)
2288	#[non_exhaustive]
2289	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
2290	pub struct Builder {
2291		pub(crate) sender: std::option::Option<crate::model::IdentityHandle>,
2292		pub(crate) body: std::option::Option<std::string::String>,
2293	}
2294	impl Builder {
2295		/// An identity handle.
2296		pub fn sender(mut self, input: crate::model::IdentityHandle) -> Self {
2297			self.sender = Some(input);
2298			self
2299		}
2300		/// An identity handle.
2301		pub fn set_sender(
2302			mut self,
2303			input: std::option::Option<crate::model::IdentityHandle>,
2304		) -> Self {
2305			self.sender = input;
2306			self
2307		}
2308		/// The text in the message.
2309		pub fn body(mut self, input: impl Into<std::string::String>) -> Self {
2310			self.body = Some(input.into());
2311			self
2312		}
2313		/// The text in the message.
2314		pub fn set_body(mut self, input: std::option::Option<std::string::String>) -> Self {
2315			self.body = input;
2316			self
2317		}
2318		/// Consumes the builder and constructs a [`ChatMessageBodyText`](crate::model::ChatMessageBodyText)
2319		pub fn build(self) -> crate::model::ChatMessageBodyText {
2320			crate::model::ChatMessageBodyText {
2321				sender: self.sender,
2322				body: self.body,
2323			}
2324		}
2325	}
2326}
2327impl ChatMessageBodyText {
2328	/// Creates a new builder-style object to manufacture [`ChatMessageBodyText`](crate::model::ChatMessageBodyText)
2329	pub fn builder() -> crate::model::chat_message_body_text::Builder {
2330		crate::model::chat_message_body_text::Builder::default()
2331	}
2332}
2333
2334/// Represents which direction to query messages from relative to the given
2335/// timestamp.
2336#[non_exhaustive]
2337#[derive(
2338	std::clone::Clone,
2339	std::cmp::Eq,
2340	std::cmp::Ord,
2341	std::cmp::PartialEq,
2342	std::cmp::PartialOrd,
2343	std::fmt::Debug,
2344	std::hash::Hash,
2345)]
2346pub enum QueryDirection {
2347	/// Query messages after given timestamp.
2348	After,
2349	/// Query messages send before given timestmap.
2350	Before,
2351	/// Query messages before and after the given timestamp. This will return at most `count * 2` messages.
2352	BeforeAndAfter,
2353	/// Unknown contains new variants that have been added since this code was generated.
2354	Unknown(String),
2355}
2356impl std::convert::From<&str> for QueryDirection {
2357	fn from(s: &str) -> Self {
2358		match s {
2359			"after" => QueryDirection::After,
2360			"before" => QueryDirection::Before,
2361			"before_and_after" => QueryDirection::BeforeAndAfter,
2362			other => QueryDirection::Unknown(other.to_owned()),
2363		}
2364	}
2365}
2366impl std::str::FromStr for QueryDirection {
2367	type Err = std::convert::Infallible;
2368
2369	fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
2370		Ok(QueryDirection::from(s))
2371	}
2372}
2373impl QueryDirection {
2374	/// Returns the `&str` value of the enum member.
2375	pub fn as_str(&self) -> &str {
2376		match self {
2377			QueryDirection::After => "after",
2378			QueryDirection::Before => "before",
2379			QueryDirection::BeforeAndAfter => "before_and_after",
2380			QueryDirection::Unknown(s) => s.as_ref(),
2381		}
2382	}
2383	/// Returns all the `&str` values of the enum members.
2384	pub fn values() -> &'static [&'static str] {
2385		&["after", "before", "before_and_after"]
2386	}
2387}
2388impl AsRef<str> for QueryDirection {
2389	fn as_ref(&self) -> &str {
2390		self.as_str()
2391	}
2392}
2393
2394/// Provided by watchable endpoints used in blocking loops.
2395#[non_exhaustive]
2396#[derive(std::clone::Clone, std::cmp::PartialEq)]
2397pub struct WatchResponse {
2398	/// Index indicating the version of the data responded. Pas this to `rivet.common#WatchQuery` to block and wait for the next response.
2399	pub index: std::option::Option<std::string::String>,
2400}
2401impl WatchResponse {
2402	/// Index indicating the version of the data responded. Pas this to `rivet.common#WatchQuery` to block and wait for the next response.
2403	pub fn index(&self) -> std::option::Option<&str> {
2404		self.index.as_deref()
2405	}
2406}
2407impl std::fmt::Debug for WatchResponse {
2408	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2409		let mut formatter = f.debug_struct("WatchResponse");
2410		formatter.field("index", &self.index);
2411		formatter.finish()
2412	}
2413}
2414/// See [`WatchResponse`](crate::model::WatchResponse)
2415pub mod watch_response {
2416	/// A builder for [`WatchResponse`](crate::model::WatchResponse)
2417	#[non_exhaustive]
2418	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
2419	pub struct Builder {
2420		pub(crate) index: std::option::Option<std::string::String>,
2421	}
2422	impl Builder {
2423		/// Index indicating the version of the data responded. Pas this to `rivet.common#WatchQuery` to block and wait for the next response.
2424		pub fn index(mut self, input: impl Into<std::string::String>) -> Self {
2425			self.index = Some(input.into());
2426			self
2427		}
2428		/// Index indicating the version of the data responded. Pas this to `rivet.common#WatchQuery` to block and wait for the next response.
2429		pub fn set_index(mut self, input: std::option::Option<std::string::String>) -> Self {
2430			self.index = input;
2431			self
2432		}
2433		/// Consumes the builder and constructs a [`WatchResponse`](crate::model::WatchResponse)
2434		pub fn build(self) -> crate::model::WatchResponse {
2435			crate::model::WatchResponse { index: self.index }
2436		}
2437	}
2438}
2439impl WatchResponse {
2440	/// Creates a new builder-style object to manufacture [`WatchResponse`](crate::model::WatchResponse)
2441	pub fn builder() -> crate::model::watch_response::Builder {
2442		crate::model::watch_response::Builder::default()
2443	}
2444}
2445
2446/// The chat typing status of an identity.
2447#[non_exhaustive]
2448#[derive(std::clone::Clone, std::cmp::PartialEq)]
2449pub struct ChatIdentityTypingStatus {
2450	/// An identity handle.
2451	pub identity: std::option::Option<crate::model::IdentityHandle>,
2452	/// Represents a chat typing status.
2453	pub status: std::option::Option<crate::model::ChatTypingStatus>,
2454}
2455impl ChatIdentityTypingStatus {
2456	/// An identity handle.
2457	pub fn identity(&self) -> std::option::Option<&crate::model::IdentityHandle> {
2458		self.identity.as_ref()
2459	}
2460	/// Represents a chat typing status.
2461	pub fn status(&self) -> std::option::Option<&crate::model::ChatTypingStatus> {
2462		self.status.as_ref()
2463	}
2464}
2465impl std::fmt::Debug for ChatIdentityTypingStatus {
2466	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2467		let mut formatter = f.debug_struct("ChatIdentityTypingStatus");
2468		formatter.field("identity", &self.identity);
2469		formatter.field("status", &self.status);
2470		formatter.finish()
2471	}
2472}
2473/// See [`ChatIdentityTypingStatus`](crate::model::ChatIdentityTypingStatus)
2474pub mod chat_identity_typing_status {
2475	/// A builder for [`ChatIdentityTypingStatus`](crate::model::ChatIdentityTypingStatus)
2476	#[non_exhaustive]
2477	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
2478	pub struct Builder {
2479		pub(crate) identity: std::option::Option<crate::model::IdentityHandle>,
2480		pub(crate) status: std::option::Option<crate::model::ChatTypingStatus>,
2481	}
2482	impl Builder {
2483		/// An identity handle.
2484		pub fn identity(mut self, input: crate::model::IdentityHandle) -> Self {
2485			self.identity = Some(input);
2486			self
2487		}
2488		/// An identity handle.
2489		pub fn set_identity(
2490			mut self,
2491			input: std::option::Option<crate::model::IdentityHandle>,
2492		) -> Self {
2493			self.identity = input;
2494			self
2495		}
2496		/// Represents a chat typing status.
2497		pub fn status(mut self, input: crate::model::ChatTypingStatus) -> Self {
2498			self.status = Some(input);
2499			self
2500		}
2501		/// Represents a chat typing status.
2502		pub fn set_status(
2503			mut self,
2504			input: std::option::Option<crate::model::ChatTypingStatus>,
2505		) -> Self {
2506			self.status = input;
2507			self
2508		}
2509		/// Consumes the builder and constructs a [`ChatIdentityTypingStatus`](crate::model::ChatIdentityTypingStatus)
2510		pub fn build(self) -> crate::model::ChatIdentityTypingStatus {
2511			crate::model::ChatIdentityTypingStatus {
2512				identity: self.identity,
2513				status: self.status,
2514			}
2515		}
2516	}
2517}
2518impl ChatIdentityTypingStatus {
2519	/// Creates a new builder-style object to manufacture [`ChatIdentityTypingStatus`](crate::model::ChatIdentityTypingStatus)
2520	pub fn builder() -> crate::model::chat_identity_typing_status::Builder {
2521		crate::model::chat_identity_typing_status::Builder::default()
2522	}
2523}
2524
2525/// Represents a topic of the given chat thread without the associated handles for the topic.
2526#[non_exhaustive]
2527#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
2528pub enum ChatSimpleTopic {
2529	/// `rivet.chat#ChatSimpleTopic` variant for direct (identity to identity) chats.
2530	Direct(crate::model::ChatSimpleTopicDirect),
2531	/// `rivet.chat#ChatSimpleTopic` variant for groups.
2532	Group(crate::model::ChatSimpleTopicGroup),
2533	/// `rivet.chat#ChatSimpleTopic` variant for parties.
2534	Party(crate::model::ChatSimpleTopicParty),
2535	/// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version.
2536	/// An unknown enum variant
2537	///
2538	/// _Note: If you encounter this error, consider upgrading your SDK to the latest version._
2539	/// The `Unknown` variant represents cases where the server sent a value that wasn't recognized
2540	/// by the client. This can happen when the server adds new functionality, but the client has not been updated.
2541	/// To investigate this, consider turning on debug logging to print the raw HTTP response.
2542	#[non_exhaustive]
2543	Unknown,
2544}
2545impl ChatSimpleTopic {
2546	/// Tries to convert the enum instance into [`Direct`](crate::model::ChatSimpleTopic::Direct), extracting the inner [`ChatSimpleTopicDirect`](crate::model::ChatSimpleTopicDirect).
2547	/// Returns `Err(&Self)` if it can't be converted.
2548	pub fn as_direct(&self) -> std::result::Result<&crate::model::ChatSimpleTopicDirect, &Self> {
2549		if let ChatSimpleTopic::Direct(val) = &self {
2550			Ok(val)
2551		} else {
2552			Err(self)
2553		}
2554	}
2555	/// Returns true if this is a [`Direct`](crate::model::ChatSimpleTopic::Direct).
2556	pub fn is_direct(&self) -> bool {
2557		self.as_direct().is_ok()
2558	}
2559	/// Tries to convert the enum instance into [`Group`](crate::model::ChatSimpleTopic::Group), extracting the inner [`ChatSimpleTopicGroup`](crate::model::ChatSimpleTopicGroup).
2560	/// Returns `Err(&Self)` if it can't be converted.
2561	pub fn as_group(&self) -> std::result::Result<&crate::model::ChatSimpleTopicGroup, &Self> {
2562		if let ChatSimpleTopic::Group(val) = &self {
2563			Ok(val)
2564		} else {
2565			Err(self)
2566		}
2567	}
2568	/// Returns true if this is a [`Group`](crate::model::ChatSimpleTopic::Group).
2569	pub fn is_group(&self) -> bool {
2570		self.as_group().is_ok()
2571	}
2572	/// Tries to convert the enum instance into [`Party`](crate::model::ChatSimpleTopic::Party), extracting the inner [`ChatSimpleTopicParty`](crate::model::ChatSimpleTopicParty).
2573	/// Returns `Err(&Self)` if it can't be converted.
2574	pub fn as_party(&self) -> std::result::Result<&crate::model::ChatSimpleTopicParty, &Self> {
2575		if let ChatSimpleTopic::Party(val) = &self {
2576			Ok(val)
2577		} else {
2578			Err(self)
2579		}
2580	}
2581	/// Returns true if this is a [`Party`](crate::model::ChatSimpleTopic::Party).
2582	pub fn is_party(&self) -> bool {
2583		self.as_party().is_ok()
2584	}
2585	/// Returns true if the enum instance is the `Unknown` variant.
2586	pub fn is_unknown(&self) -> bool {
2587		matches!(self, Self::Unknown)
2588	}
2589}
2590
2591/// `rivet.chat#ChatSimpleTopic` variant for direct (identity to identity) chats.
2592#[non_exhaustive]
2593#[derive(std::clone::Clone, std::cmp::PartialEq)]
2594pub struct ChatSimpleTopicDirect {
2595	/// A universally unique identifier.
2596	pub identity_a_id: std::option::Option<std::string::String>,
2597	/// A universally unique identifier.
2598	pub identity_b_id: std::option::Option<std::string::String>,
2599}
2600impl ChatSimpleTopicDirect {
2601	/// A universally unique identifier.
2602	pub fn identity_a_id(&self) -> std::option::Option<&str> {
2603		self.identity_a_id.as_deref()
2604	}
2605	/// A universally unique identifier.
2606	pub fn identity_b_id(&self) -> std::option::Option<&str> {
2607		self.identity_b_id.as_deref()
2608	}
2609}
2610impl std::fmt::Debug for ChatSimpleTopicDirect {
2611	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2612		let mut formatter = f.debug_struct("ChatSimpleTopicDirect");
2613		formatter.field("identity_a_id", &self.identity_a_id);
2614		formatter.field("identity_b_id", &self.identity_b_id);
2615		formatter.finish()
2616	}
2617}
2618/// See [`ChatSimpleTopicDirect`](crate::model::ChatSimpleTopicDirect)
2619pub mod chat_simple_topic_direct {
2620	/// A builder for [`ChatSimpleTopicDirect`](crate::model::ChatSimpleTopicDirect)
2621	#[non_exhaustive]
2622	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
2623	pub struct Builder {
2624		pub(crate) identity_a_id: std::option::Option<std::string::String>,
2625		pub(crate) identity_b_id: std::option::Option<std::string::String>,
2626	}
2627	impl Builder {
2628		/// A universally unique identifier.
2629		pub fn identity_a_id(mut self, input: impl Into<std::string::String>) -> Self {
2630			self.identity_a_id = Some(input.into());
2631			self
2632		}
2633		/// A universally unique identifier.
2634		pub fn set_identity_a_id(
2635			mut self,
2636			input: std::option::Option<std::string::String>,
2637		) -> Self {
2638			self.identity_a_id = input;
2639			self
2640		}
2641		/// A universally unique identifier.
2642		pub fn identity_b_id(mut self, input: impl Into<std::string::String>) -> Self {
2643			self.identity_b_id = Some(input.into());
2644			self
2645		}
2646		/// A universally unique identifier.
2647		pub fn set_identity_b_id(
2648			mut self,
2649			input: std::option::Option<std::string::String>,
2650		) -> Self {
2651			self.identity_b_id = input;
2652			self
2653		}
2654		/// Consumes the builder and constructs a [`ChatSimpleTopicDirect`](crate::model::ChatSimpleTopicDirect)
2655		pub fn build(self) -> crate::model::ChatSimpleTopicDirect {
2656			crate::model::ChatSimpleTopicDirect {
2657				identity_a_id: self.identity_a_id,
2658				identity_b_id: self.identity_b_id,
2659			}
2660		}
2661	}
2662}
2663impl ChatSimpleTopicDirect {
2664	/// Creates a new builder-style object to manufacture [`ChatSimpleTopicDirect`](crate::model::ChatSimpleTopicDirect)
2665	pub fn builder() -> crate::model::chat_simple_topic_direct::Builder {
2666		crate::model::chat_simple_topic_direct::Builder::default()
2667	}
2668}
2669
2670/// `rivet.chat#ChatSimpleTopic` variant for parties.
2671#[non_exhaustive]
2672#[derive(std::clone::Clone, std::cmp::PartialEq)]
2673pub struct ChatSimpleTopicParty {
2674	/// A universally unique identifier.
2675	pub party_id: std::option::Option<std::string::String>,
2676}
2677impl ChatSimpleTopicParty {
2678	/// A universally unique identifier.
2679	pub fn party_id(&self) -> std::option::Option<&str> {
2680		self.party_id.as_deref()
2681	}
2682}
2683impl std::fmt::Debug for ChatSimpleTopicParty {
2684	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2685		let mut formatter = f.debug_struct("ChatSimpleTopicParty");
2686		formatter.field("party_id", &self.party_id);
2687		formatter.finish()
2688	}
2689}
2690/// See [`ChatSimpleTopicParty`](crate::model::ChatSimpleTopicParty)
2691pub mod chat_simple_topic_party {
2692	/// A builder for [`ChatSimpleTopicParty`](crate::model::ChatSimpleTopicParty)
2693	#[non_exhaustive]
2694	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
2695	pub struct Builder {
2696		pub(crate) party_id: std::option::Option<std::string::String>,
2697	}
2698	impl Builder {
2699		/// A universally unique identifier.
2700		pub fn party_id(mut self, input: impl Into<std::string::String>) -> Self {
2701			self.party_id = Some(input.into());
2702			self
2703		}
2704		/// A universally unique identifier.
2705		pub fn set_party_id(mut self, input: std::option::Option<std::string::String>) -> Self {
2706			self.party_id = input;
2707			self
2708		}
2709		/// Consumes the builder and constructs a [`ChatSimpleTopicParty`](crate::model::ChatSimpleTopicParty)
2710		pub fn build(self) -> crate::model::ChatSimpleTopicParty {
2711			crate::model::ChatSimpleTopicParty {
2712				party_id: self.party_id,
2713			}
2714		}
2715	}
2716}
2717impl ChatSimpleTopicParty {
2718	/// Creates a new builder-style object to manufacture [`ChatSimpleTopicParty`](crate::model::ChatSimpleTopicParty)
2719	pub fn builder() -> crate::model::chat_simple_topic_party::Builder {
2720		crate::model::chat_simple_topic_party::Builder::default()
2721	}
2722}
2723
2724/// `rivet.chat#ChatSimpleTopic` variant for groups.
2725#[non_exhaustive]
2726#[derive(std::clone::Clone, std::cmp::PartialEq)]
2727pub struct ChatSimpleTopicGroup {
2728	/// A universally unique identifier.
2729	pub group_id: std::option::Option<std::string::String>,
2730}
2731impl ChatSimpleTopicGroup {
2732	/// A universally unique identifier.
2733	pub fn group_id(&self) -> std::option::Option<&str> {
2734		self.group_id.as_deref()
2735	}
2736}
2737impl std::fmt::Debug for ChatSimpleTopicGroup {
2738	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2739		let mut formatter = f.debug_struct("ChatSimpleTopicGroup");
2740		formatter.field("group_id", &self.group_id);
2741		formatter.finish()
2742	}
2743}
2744/// See [`ChatSimpleTopicGroup`](crate::model::ChatSimpleTopicGroup)
2745pub mod chat_simple_topic_group {
2746	/// A builder for [`ChatSimpleTopicGroup`](crate::model::ChatSimpleTopicGroup)
2747	#[non_exhaustive]
2748	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
2749	pub struct Builder {
2750		pub(crate) group_id: std::option::Option<std::string::String>,
2751	}
2752	impl Builder {
2753		/// A universally unique identifier.
2754		pub fn group_id(mut self, input: impl Into<std::string::String>) -> Self {
2755			self.group_id = Some(input.into());
2756			self
2757		}
2758		/// A universally unique identifier.
2759		pub fn set_group_id(mut self, input: std::option::Option<std::string::String>) -> Self {
2760			self.group_id = input;
2761			self
2762		}
2763		/// Consumes the builder and constructs a [`ChatSimpleTopicGroup`](crate::model::ChatSimpleTopicGroup)
2764		pub fn build(self) -> crate::model::ChatSimpleTopicGroup {
2765			crate::model::ChatSimpleTopicGroup {
2766				group_id: self.group_id,
2767			}
2768		}
2769	}
2770}
2771impl ChatSimpleTopicGroup {
2772	/// Creates a new builder-style object to manufacture [`ChatSimpleTopicGroup`](crate::model::ChatSimpleTopicGroup)
2773	pub fn builder() -> crate::model::chat_simple_topic_group::Builder {
2774		crate::model::chat_simple_topic_group::Builder::default()
2775	}
2776}