1#[non_exhaustive]
4#[derive(std::clone::Clone, std::cmp::PartialEq)]
5pub struct PartySummary {
6 pub party_id: std::option::Option<std::string::String>,
8 pub create_ts: std::option::Option<aws_smithy_types::DateTime>,
10 pub activity: std::option::Option<crate::model::PartyActivity>,
12 pub external: std::option::Option<crate::model::PartyExternalLinks>,
14 #[allow(missing_docs)] pub publicity: std::option::Option<crate::model::PartyPublicity>,
16 pub party_size: std::option::Option<i32>,
18 pub members: std::option::Option<std::vec::Vec<crate::model::PartyMemberSummary>>,
20 pub thread_id: std::option::Option<std::string::String>,
22}
23impl PartySummary {
24 pub fn party_id(&self) -> std::option::Option<&str> {
26 self.party_id.as_deref()
27 }
28 pub fn create_ts(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
30 self.create_ts.as_ref()
31 }
32 pub fn activity(&self) -> std::option::Option<&crate::model::PartyActivity> {
34 self.activity.as_ref()
35 }
36 pub fn external(&self) -> std::option::Option<&crate::model::PartyExternalLinks> {
38 self.external.as_ref()
39 }
40 #[allow(missing_docs)] pub fn publicity(&self) -> std::option::Option<&crate::model::PartyPublicity> {
42 self.publicity.as_ref()
43 }
44 pub fn party_size(&self) -> std::option::Option<i32> {
46 self.party_size
47 }
48 pub fn members(&self) -> std::option::Option<&[crate::model::PartyMemberSummary]> {
50 self.members.as_deref()
51 }
52 pub fn thread_id(&self) -> std::option::Option<&str> {
54 self.thread_id.as_deref()
55 }
56}
57impl std::fmt::Debug for PartySummary {
58 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
59 let mut formatter = f.debug_struct("PartySummary");
60 formatter.field("party_id", &self.party_id);
61 formatter.field("create_ts", &self.create_ts);
62 formatter.field("activity", &self.activity);
63 formatter.field("external", &self.external);
64 formatter.field("publicity", &self.publicity);
65 formatter.field("party_size", &self.party_size);
66 formatter.field("members", &self.members);
67 formatter.field("thread_id", &self.thread_id);
68 formatter.finish()
69 }
70}
71pub mod party_summary {
73 #[non_exhaustive]
75 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
76 pub struct Builder {
77 pub(crate) party_id: std::option::Option<std::string::String>,
78 pub(crate) create_ts: std::option::Option<aws_smithy_types::DateTime>,
79 pub(crate) activity: std::option::Option<crate::model::PartyActivity>,
80 pub(crate) external: std::option::Option<crate::model::PartyExternalLinks>,
81 pub(crate) publicity: std::option::Option<crate::model::PartyPublicity>,
82 pub(crate) party_size: std::option::Option<i32>,
83 pub(crate) members: std::option::Option<std::vec::Vec<crate::model::PartyMemberSummary>>,
84 pub(crate) thread_id: std::option::Option<std::string::String>,
85 }
86 impl Builder {
87 pub fn party_id(mut self, input: impl Into<std::string::String>) -> Self {
89 self.party_id = Some(input.into());
90 self
91 }
92 pub fn set_party_id(mut self, input: std::option::Option<std::string::String>) -> Self {
94 self.party_id = input;
95 self
96 }
97 pub fn create_ts(mut self, input: aws_smithy_types::DateTime) -> Self {
99 self.create_ts = Some(input);
100 self
101 }
102 pub fn set_create_ts(
104 mut self,
105 input: std::option::Option<aws_smithy_types::DateTime>,
106 ) -> Self {
107 self.create_ts = input;
108 self
109 }
110 pub fn activity(mut self, input: crate::model::PartyActivity) -> Self {
112 self.activity = Some(input);
113 self
114 }
115 pub fn set_activity(
117 mut self,
118 input: std::option::Option<crate::model::PartyActivity>,
119 ) -> Self {
120 self.activity = input;
121 self
122 }
123 pub fn external(mut self, input: crate::model::PartyExternalLinks) -> Self {
125 self.external = Some(input);
126 self
127 }
128 pub fn set_external(
130 mut self,
131 input: std::option::Option<crate::model::PartyExternalLinks>,
132 ) -> Self {
133 self.external = input;
134 self
135 }
136 #[allow(missing_docs)] pub fn publicity(mut self, input: crate::model::PartyPublicity) -> Self {
138 self.publicity = Some(input);
139 self
140 }
141 #[allow(missing_docs)] pub fn set_publicity(
143 mut self,
144 input: std::option::Option<crate::model::PartyPublicity>,
145 ) -> Self {
146 self.publicity = input;
147 self
148 }
149 pub fn party_size(mut self, input: i32) -> Self {
151 self.party_size = Some(input);
152 self
153 }
154 pub fn set_party_size(mut self, input: std::option::Option<i32>) -> Self {
156 self.party_size = input;
157 self
158 }
159 pub fn members(mut self, input: crate::model::PartyMemberSummary) -> Self {
165 let mut v = self.members.unwrap_or_default();
166 v.push(input);
167 self.members = Some(v);
168 self
169 }
170 pub fn set_members(
172 mut self,
173 input: std::option::Option<std::vec::Vec<crate::model::PartyMemberSummary>>,
174 ) -> Self {
175 self.members = input;
176 self
177 }
178 pub fn thread_id(mut self, input: impl Into<std::string::String>) -> Self {
180 self.thread_id = Some(input.into());
181 self
182 }
183 pub fn set_thread_id(mut self, input: std::option::Option<std::string::String>) -> Self {
185 self.thread_id = input;
186 self
187 }
188 pub fn build(self) -> crate::model::PartySummary {
190 crate::model::PartySummary {
191 party_id: self.party_id,
192 create_ts: self.create_ts,
193 activity: self.activity,
194 external: self.external,
195 publicity: self.publicity,
196 party_size: self.party_size,
197 members: self.members,
198 thread_id: self.thread_id,
199 }
200 }
201 }
202}
203impl PartySummary {
204 pub fn builder() -> crate::model::party_summary::Builder {
206 crate::model::party_summary::Builder::default()
207 }
208}
209
210#[non_exhaustive]
212#[derive(std::clone::Clone, std::cmp::PartialEq)]
213pub struct PartyMemberSummary {
214 pub identity: std::option::Option<crate::model::IdentityHandle>,
216 pub is_leader: std::option::Option<bool>,
218 pub join_ts: std::option::Option<aws_smithy_types::DateTime>,
220 pub state: std::option::Option<crate::model::PartyMemberState>,
222}
223impl PartyMemberSummary {
224 pub fn identity(&self) -> std::option::Option<&crate::model::IdentityHandle> {
226 self.identity.as_ref()
227 }
228 pub fn is_leader(&self) -> std::option::Option<bool> {
230 self.is_leader
231 }
232 pub fn join_ts(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
234 self.join_ts.as_ref()
235 }
236 pub fn state(&self) -> std::option::Option<&crate::model::PartyMemberState> {
238 self.state.as_ref()
239 }
240}
241impl std::fmt::Debug for PartyMemberSummary {
242 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
243 let mut formatter = f.debug_struct("PartyMemberSummary");
244 formatter.field("identity", &self.identity);
245 formatter.field("is_leader", &self.is_leader);
246 formatter.field("join_ts", &self.join_ts);
247 formatter.field("state", &self.state);
248 formatter.finish()
249 }
250}
251pub mod party_member_summary {
253 #[non_exhaustive]
255 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
256 pub struct Builder {
257 pub(crate) identity: std::option::Option<crate::model::IdentityHandle>,
258 pub(crate) is_leader: std::option::Option<bool>,
259 pub(crate) join_ts: std::option::Option<aws_smithy_types::DateTime>,
260 pub(crate) state: std::option::Option<crate::model::PartyMemberState>,
261 }
262 impl Builder {
263 pub fn identity(mut self, input: crate::model::IdentityHandle) -> Self {
265 self.identity = Some(input);
266 self
267 }
268 pub fn set_identity(
270 mut self,
271 input: std::option::Option<crate::model::IdentityHandle>,
272 ) -> Self {
273 self.identity = input;
274 self
275 }
276 pub fn is_leader(mut self, input: bool) -> Self {
278 self.is_leader = Some(input);
279 self
280 }
281 pub fn set_is_leader(mut self, input: std::option::Option<bool>) -> Self {
283 self.is_leader = input;
284 self
285 }
286 pub fn join_ts(mut self, input: aws_smithy_types::DateTime) -> Self {
288 self.join_ts = Some(input);
289 self
290 }
291 pub fn set_join_ts(
293 mut self,
294 input: std::option::Option<aws_smithy_types::DateTime>,
295 ) -> Self {
296 self.join_ts = input;
297 self
298 }
299 pub fn state(mut self, input: crate::model::PartyMemberState) -> Self {
301 self.state = Some(input);
302 self
303 }
304 pub fn set_state(
306 mut self,
307 input: std::option::Option<crate::model::PartyMemberState>,
308 ) -> Self {
309 self.state = input;
310 self
311 }
312 pub fn build(self) -> crate::model::PartyMemberSummary {
314 crate::model::PartyMemberSummary {
315 identity: self.identity,
316 is_leader: self.is_leader,
317 join_ts: self.join_ts,
318 state: self.state,
319 }
320 }
321 }
322}
323impl PartyMemberSummary {
324 pub fn builder() -> crate::model::party_member_summary::Builder {
326 crate::model::party_member_summary::Builder::default()
327 }
328}
329
330#[non_exhaustive]
332#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
333pub enum PartyMemberState {
334 Idle(crate::model::PartyMemberStateIdle),
336 MatchmakerFindingLobby(crate::model::PartyMemberStateMatchmakerFindingLobby),
338 MatchmakerLobby(crate::model::PartyMemberStateMatchmakerLobby),
340 MatchmakerPending(crate::model::PartyMemberStateMatchmakerPending),
342 #[non_exhaustive]
350 Unknown,
351}
352impl PartyMemberState {
353 pub fn as_idle(&self) -> std::result::Result<&crate::model::PartyMemberStateIdle, &Self> {
356 if let PartyMemberState::Idle(val) = &self {
357 Ok(val)
358 } else {
359 Err(self)
360 }
361 }
362 pub fn is_idle(&self) -> bool {
364 self.as_idle().is_ok()
365 }
366 pub fn as_matchmaker_finding_lobby(
369 &self,
370 ) -> std::result::Result<&crate::model::PartyMemberStateMatchmakerFindingLobby, &Self> {
371 if let PartyMemberState::MatchmakerFindingLobby(val) = &self {
372 Ok(val)
373 } else {
374 Err(self)
375 }
376 }
377 pub fn is_matchmaker_finding_lobby(&self) -> bool {
379 self.as_matchmaker_finding_lobby().is_ok()
380 }
381 pub fn as_matchmaker_lobby(
384 &self,
385 ) -> std::result::Result<&crate::model::PartyMemberStateMatchmakerLobby, &Self> {
386 if let PartyMemberState::MatchmakerLobby(val) = &self {
387 Ok(val)
388 } else {
389 Err(self)
390 }
391 }
392 pub fn is_matchmaker_lobby(&self) -> bool {
394 self.as_matchmaker_lobby().is_ok()
395 }
396 pub fn as_matchmaker_pending(
399 &self,
400 ) -> std::result::Result<&crate::model::PartyMemberStateMatchmakerPending, &Self> {
401 if let PartyMemberState::MatchmakerPending(val) = &self {
402 Ok(val)
403 } else {
404 Err(self)
405 }
406 }
407 pub fn is_matchmaker_pending(&self) -> bool {
409 self.as_matchmaker_pending().is_ok()
410 }
411 pub fn is_unknown(&self) -> bool {
413 matches!(self, Self::Unknown)
414 }
415}
416
417#[non_exhaustive]
419#[derive(std::clone::Clone, std::cmp::PartialEq)]
420pub struct PartyMemberStateMatchmakerLobby {
421 pub player_id: std::option::Option<std::string::String>,
423}
424impl PartyMemberStateMatchmakerLobby {
425 pub fn player_id(&self) -> std::option::Option<&str> {
427 self.player_id.as_deref()
428 }
429}
430impl std::fmt::Debug for PartyMemberStateMatchmakerLobby {
431 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
432 let mut formatter = f.debug_struct("PartyMemberStateMatchmakerLobby");
433 formatter.field("player_id", &self.player_id);
434 formatter.finish()
435 }
436}
437pub mod party_member_state_matchmaker_lobby {
439 #[non_exhaustive]
441 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
442 pub struct Builder {
443 pub(crate) player_id: std::option::Option<std::string::String>,
444 }
445 impl Builder {
446 pub fn player_id(mut self, input: impl Into<std::string::String>) -> Self {
448 self.player_id = Some(input.into());
449 self
450 }
451 pub fn set_player_id(mut self, input: std::option::Option<std::string::String>) -> Self {
453 self.player_id = input;
454 self
455 }
456 pub fn build(self) -> crate::model::PartyMemberStateMatchmakerLobby {
458 crate::model::PartyMemberStateMatchmakerLobby {
459 player_id: self.player_id,
460 }
461 }
462 }
463}
464impl PartyMemberStateMatchmakerLobby {
465 pub fn builder() -> crate::model::party_member_state_matchmaker_lobby::Builder {
467 crate::model::party_member_state_matchmaker_lobby::Builder::default()
468 }
469}
470
471#[non_exhaustive]
473#[derive(std::clone::Clone, std::cmp::PartialEq)]
474pub struct PartyMemberStateMatchmakerFindingLobby {}
475impl std::fmt::Debug for PartyMemberStateMatchmakerFindingLobby {
476 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
477 let mut formatter = f.debug_struct("PartyMemberStateMatchmakerFindingLobby");
478 formatter.finish()
479 }
480}
481pub mod party_member_state_matchmaker_finding_lobby {
483 #[non_exhaustive]
485 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
486 pub struct Builder {}
487 impl Builder {
488 pub fn build(self) -> crate::model::PartyMemberStateMatchmakerFindingLobby {
490 crate::model::PartyMemberStateMatchmakerFindingLobby {}
491 }
492 }
493}
494impl PartyMemberStateMatchmakerFindingLobby {
495 pub fn builder() -> crate::model::party_member_state_matchmaker_finding_lobby::Builder {
497 crate::model::party_member_state_matchmaker_finding_lobby::Builder::default()
498 }
499}
500
501#[non_exhaustive]
503#[derive(std::clone::Clone, std::cmp::PartialEq)]
504pub struct PartyMemberStateMatchmakerPending {}
505impl std::fmt::Debug for PartyMemberStateMatchmakerPending {
506 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
507 let mut formatter = f.debug_struct("PartyMemberStateMatchmakerPending");
508 formatter.finish()
509 }
510}
511pub mod party_member_state_matchmaker_pending {
513 #[non_exhaustive]
515 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
516 pub struct Builder {}
517 impl Builder {
518 pub fn build(self) -> crate::model::PartyMemberStateMatchmakerPending {
520 crate::model::PartyMemberStateMatchmakerPending {}
521 }
522 }
523}
524impl PartyMemberStateMatchmakerPending {
525 pub fn builder() -> crate::model::party_member_state_matchmaker_pending::Builder {
527 crate::model::party_member_state_matchmaker_pending::Builder::default()
528 }
529}
530
531#[non_exhaustive]
533#[derive(std::clone::Clone, std::cmp::PartialEq)]
534pub struct PartyMemberStateIdle {}
535impl std::fmt::Debug for PartyMemberStateIdle {
536 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
537 let mut formatter = f.debug_struct("PartyMemberStateIdle");
538 formatter.finish()
539 }
540}
541pub mod party_member_state_idle {
543 #[non_exhaustive]
545 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
546 pub struct Builder {}
547 impl Builder {
548 pub fn build(self) -> crate::model::PartyMemberStateIdle {
550 crate::model::PartyMemberStateIdle {}
551 }
552 }
553}
554impl PartyMemberStateIdle {
555 pub fn builder() -> crate::model::party_member_state_idle::Builder {
557 crate::model::party_member_state_idle::Builder::default()
558 }
559}
560
561#[non_exhaustive]
563#[derive(std::clone::Clone, std::cmp::PartialEq)]
564pub struct IdentityHandle {
565 pub identity_id: std::option::Option<std::string::String>,
567 pub display_name: std::option::Option<std::string::String>,
569 pub account_number: std::option::Option<i32>,
571 pub avatar_url: std::option::Option<std::string::String>,
573 pub presence: std::option::Option<crate::model::IdentityPresence>,
575 pub party: std::option::Option<crate::model::PartyHandle>,
577 pub is_registered: std::option::Option<bool>,
579 pub external: std::option::Option<crate::model::IdentityExternalLinks>,
581}
582impl IdentityHandle {
583 pub fn identity_id(&self) -> std::option::Option<&str> {
585 self.identity_id.as_deref()
586 }
587 pub fn display_name(&self) -> std::option::Option<&str> {
589 self.display_name.as_deref()
590 }
591 pub fn account_number(&self) -> std::option::Option<i32> {
593 self.account_number
594 }
595 pub fn avatar_url(&self) -> std::option::Option<&str> {
597 self.avatar_url.as_deref()
598 }
599 pub fn presence(&self) -> std::option::Option<&crate::model::IdentityPresence> {
601 self.presence.as_ref()
602 }
603 pub fn party(&self) -> std::option::Option<&crate::model::PartyHandle> {
605 self.party.as_ref()
606 }
607 pub fn is_registered(&self) -> std::option::Option<bool> {
609 self.is_registered
610 }
611 pub fn external(&self) -> std::option::Option<&crate::model::IdentityExternalLinks> {
613 self.external.as_ref()
614 }
615}
616impl std::fmt::Debug for IdentityHandle {
617 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
618 let mut formatter = f.debug_struct("IdentityHandle");
619 formatter.field("identity_id", &self.identity_id);
620 formatter.field("display_name", &self.display_name);
621 formatter.field("account_number", &self.account_number);
622 formatter.field("avatar_url", &self.avatar_url);
623 formatter.field("presence", &self.presence);
624 formatter.field("party", &self.party);
625 formatter.field("is_registered", &self.is_registered);
626 formatter.field("external", &self.external);
627 formatter.finish()
628 }
629}
630pub mod identity_handle {
632 #[non_exhaustive]
634 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
635 pub struct Builder {
636 pub(crate) identity_id: std::option::Option<std::string::String>,
637 pub(crate) display_name: std::option::Option<std::string::String>,
638 pub(crate) account_number: std::option::Option<i32>,
639 pub(crate) avatar_url: std::option::Option<std::string::String>,
640 pub(crate) presence: std::option::Option<crate::model::IdentityPresence>,
641 pub(crate) party: std::option::Option<crate::model::PartyHandle>,
642 pub(crate) is_registered: std::option::Option<bool>,
643 pub(crate) external: std::option::Option<crate::model::IdentityExternalLinks>,
644 }
645 impl Builder {
646 pub fn identity_id(mut self, input: impl Into<std::string::String>) -> Self {
648 self.identity_id = Some(input.into());
649 self
650 }
651 pub fn set_identity_id(mut self, input: std::option::Option<std::string::String>) -> Self {
653 self.identity_id = input;
654 self
655 }
656 pub fn display_name(mut self, input: impl Into<std::string::String>) -> Self {
658 self.display_name = Some(input.into());
659 self
660 }
661 pub fn set_display_name(mut self, input: std::option::Option<std::string::String>) -> Self {
663 self.display_name = input;
664 self
665 }
666 pub fn account_number(mut self, input: i32) -> Self {
668 self.account_number = Some(input);
669 self
670 }
671 pub fn set_account_number(mut self, input: std::option::Option<i32>) -> Self {
673 self.account_number = input;
674 self
675 }
676 pub fn avatar_url(mut self, input: impl Into<std::string::String>) -> Self {
678 self.avatar_url = Some(input.into());
679 self
680 }
681 pub fn set_avatar_url(mut self, input: std::option::Option<std::string::String>) -> Self {
683 self.avatar_url = input;
684 self
685 }
686 pub fn presence(mut self, input: crate::model::IdentityPresence) -> Self {
688 self.presence = Some(input);
689 self
690 }
691 pub fn set_presence(
693 mut self,
694 input: std::option::Option<crate::model::IdentityPresence>,
695 ) -> Self {
696 self.presence = input;
697 self
698 }
699 pub fn party(mut self, input: crate::model::PartyHandle) -> Self {
701 self.party = Some(input);
702 self
703 }
704 pub fn set_party(mut self, input: std::option::Option<crate::model::PartyHandle>) -> Self {
706 self.party = input;
707 self
708 }
709 pub fn is_registered(mut self, input: bool) -> Self {
711 self.is_registered = Some(input);
712 self
713 }
714 pub fn set_is_registered(mut self, input: std::option::Option<bool>) -> Self {
716 self.is_registered = input;
717 self
718 }
719 pub fn external(mut self, input: crate::model::IdentityExternalLinks) -> Self {
721 self.external = Some(input);
722 self
723 }
724 pub fn set_external(
726 mut self,
727 input: std::option::Option<crate::model::IdentityExternalLinks>,
728 ) -> Self {
729 self.external = input;
730 self
731 }
732 pub fn build(self) -> crate::model::IdentityHandle {
734 crate::model::IdentityHandle {
735 identity_id: self.identity_id,
736 display_name: self.display_name,
737 account_number: self.account_number,
738 avatar_url: self.avatar_url,
739 presence: self.presence,
740 party: self.party,
741 is_registered: self.is_registered,
742 external: self.external,
743 }
744 }
745 }
746}
747impl IdentityHandle {
748 pub fn builder() -> crate::model::identity_handle::Builder {
750 crate::model::identity_handle::Builder::default()
751 }
752}
753
754#[non_exhaustive]
756#[derive(std::clone::Clone, std::cmp::PartialEq)]
757pub struct IdentityExternalLinks {
758 pub profile: std::option::Option<std::string::String>,
760 pub settings: std::option::Option<std::string::String>,
762 pub chat: std::option::Option<std::string::String>,
764}
765impl IdentityExternalLinks {
766 pub fn profile(&self) -> std::option::Option<&str> {
768 self.profile.as_deref()
769 }
770 pub fn settings(&self) -> std::option::Option<&str> {
772 self.settings.as_deref()
773 }
774 pub fn chat(&self) -> std::option::Option<&str> {
776 self.chat.as_deref()
777 }
778}
779impl std::fmt::Debug for IdentityExternalLinks {
780 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
781 let mut formatter = f.debug_struct("IdentityExternalLinks");
782 formatter.field("profile", &self.profile);
783 formatter.field("settings", &self.settings);
784 formatter.field("chat", &self.chat);
785 formatter.finish()
786 }
787}
788pub mod identity_external_links {
790 #[non_exhaustive]
792 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
793 pub struct Builder {
794 pub(crate) profile: std::option::Option<std::string::String>,
795 pub(crate) settings: std::option::Option<std::string::String>,
796 pub(crate) chat: std::option::Option<std::string::String>,
797 }
798 impl Builder {
799 pub fn profile(mut self, input: impl Into<std::string::String>) -> Self {
801 self.profile = Some(input.into());
802 self
803 }
804 pub fn set_profile(mut self, input: std::option::Option<std::string::String>) -> Self {
806 self.profile = input;
807 self
808 }
809 pub fn settings(mut self, input: impl Into<std::string::String>) -> Self {
811 self.settings = Some(input.into());
812 self
813 }
814 pub fn set_settings(mut self, input: std::option::Option<std::string::String>) -> Self {
816 self.settings = input;
817 self
818 }
819 pub fn chat(mut self, input: impl Into<std::string::String>) -> Self {
821 self.chat = Some(input.into());
822 self
823 }
824 pub fn set_chat(mut self, input: std::option::Option<std::string::String>) -> Self {
826 self.chat = input;
827 self
828 }
829 pub fn build(self) -> crate::model::IdentityExternalLinks {
831 crate::model::IdentityExternalLinks {
832 profile: self.profile,
833 settings: self.settings,
834 chat: self.chat,
835 }
836 }
837 }
838}
839impl IdentityExternalLinks {
840 pub fn builder() -> crate::model::identity_external_links::Builder {
842 crate::model::identity_external_links::Builder::default()
843 }
844}
845
846#[non_exhaustive]
848#[derive(std::clone::Clone, std::cmp::PartialEq)]
849pub struct PartyHandle {
850 pub party_id: std::option::Option<std::string::String>,
852 pub create_ts: std::option::Option<aws_smithy_types::DateTime>,
854 pub activity: std::option::Option<crate::model::PartyActivity>,
856 pub external: std::option::Option<crate::model::PartyExternalLinks>,
858}
859impl PartyHandle {
860 pub fn party_id(&self) -> std::option::Option<&str> {
862 self.party_id.as_deref()
863 }
864 pub fn create_ts(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
866 self.create_ts.as_ref()
867 }
868 pub fn activity(&self) -> std::option::Option<&crate::model::PartyActivity> {
870 self.activity.as_ref()
871 }
872 pub fn external(&self) -> std::option::Option<&crate::model::PartyExternalLinks> {
874 self.external.as_ref()
875 }
876}
877impl std::fmt::Debug for PartyHandle {
878 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
879 let mut formatter = f.debug_struct("PartyHandle");
880 formatter.field("party_id", &self.party_id);
881 formatter.field("create_ts", &self.create_ts);
882 formatter.field("activity", &self.activity);
883 formatter.field("external", &self.external);
884 formatter.finish()
885 }
886}
887pub mod party_handle {
889 #[non_exhaustive]
891 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
892 pub struct Builder {
893 pub(crate) party_id: std::option::Option<std::string::String>,
894 pub(crate) create_ts: std::option::Option<aws_smithy_types::DateTime>,
895 pub(crate) activity: std::option::Option<crate::model::PartyActivity>,
896 pub(crate) external: std::option::Option<crate::model::PartyExternalLinks>,
897 }
898 impl Builder {
899 pub fn party_id(mut self, input: impl Into<std::string::String>) -> Self {
901 self.party_id = Some(input.into());
902 self
903 }
904 pub fn set_party_id(mut self, input: std::option::Option<std::string::String>) -> Self {
906 self.party_id = input;
907 self
908 }
909 pub fn create_ts(mut self, input: aws_smithy_types::DateTime) -> Self {
911 self.create_ts = Some(input);
912 self
913 }
914 pub fn set_create_ts(
916 mut self,
917 input: std::option::Option<aws_smithy_types::DateTime>,
918 ) -> Self {
919 self.create_ts = input;
920 self
921 }
922 pub fn activity(mut self, input: crate::model::PartyActivity) -> Self {
924 self.activity = Some(input);
925 self
926 }
927 pub fn set_activity(
929 mut self,
930 input: std::option::Option<crate::model::PartyActivity>,
931 ) -> Self {
932 self.activity = input;
933 self
934 }
935 pub fn external(mut self, input: crate::model::PartyExternalLinks) -> Self {
937 self.external = Some(input);
938 self
939 }
940 pub fn set_external(
942 mut self,
943 input: std::option::Option<crate::model::PartyExternalLinks>,
944 ) -> Self {
945 self.external = input;
946 self
947 }
948 pub fn build(self) -> crate::model::PartyHandle {
950 crate::model::PartyHandle {
951 party_id: self.party_id,
952 create_ts: self.create_ts,
953 activity: self.activity,
954 external: self.external,
955 }
956 }
957 }
958}
959impl PartyHandle {
960 pub fn builder() -> crate::model::party_handle::Builder {
962 crate::model::party_handle::Builder::default()
963 }
964}
965
966#[non_exhaustive]
968#[derive(std::clone::Clone, std::cmp::PartialEq)]
969pub struct PartyExternalLinks {
970 pub chat: std::option::Option<std::string::String>,
972}
973impl PartyExternalLinks {
974 pub fn chat(&self) -> std::option::Option<&str> {
976 self.chat.as_deref()
977 }
978}
979impl std::fmt::Debug for PartyExternalLinks {
980 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
981 let mut formatter = f.debug_struct("PartyExternalLinks");
982 formatter.field("chat", &self.chat);
983 formatter.finish()
984 }
985}
986pub mod party_external_links {
988 #[non_exhaustive]
990 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
991 pub struct Builder {
992 pub(crate) chat: std::option::Option<std::string::String>,
993 }
994 impl Builder {
995 pub fn chat(mut self, input: impl Into<std::string::String>) -> Self {
997 self.chat = Some(input.into());
998 self
999 }
1000 pub fn set_chat(mut self, input: std::option::Option<std::string::String>) -> Self {
1002 self.chat = input;
1003 self
1004 }
1005 pub fn build(self) -> crate::model::PartyExternalLinks {
1007 crate::model::PartyExternalLinks { chat: self.chat }
1008 }
1009 }
1010}
1011impl PartyExternalLinks {
1012 pub fn builder() -> crate::model::party_external_links::Builder {
1014 crate::model::party_external_links::Builder::default()
1015 }
1016}
1017
1018#[non_exhaustive]
1020#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1021pub enum PartyActivity {
1022 Idle(crate::model::PartyActivityIdle),
1024 MatchmakerFindingLobby(crate::model::PartyActivityMatchmakerFindingLobby),
1026 MatchmakerLobby(crate::model::PartyActivityMatchmakerLobby),
1028 #[non_exhaustive]
1036 Unknown,
1037}
1038impl PartyActivity {
1039 pub fn as_idle(&self) -> std::result::Result<&crate::model::PartyActivityIdle, &Self> {
1042 if let PartyActivity::Idle(val) = &self {
1043 Ok(val)
1044 } else {
1045 Err(self)
1046 }
1047 }
1048 pub fn is_idle(&self) -> bool {
1050 self.as_idle().is_ok()
1051 }
1052 pub fn as_matchmaker_finding_lobby(
1055 &self,
1056 ) -> std::result::Result<&crate::model::PartyActivityMatchmakerFindingLobby, &Self> {
1057 if let PartyActivity::MatchmakerFindingLobby(val) = &self {
1058 Ok(val)
1059 } else {
1060 Err(self)
1061 }
1062 }
1063 pub fn is_matchmaker_finding_lobby(&self) -> bool {
1065 self.as_matchmaker_finding_lobby().is_ok()
1066 }
1067 pub fn as_matchmaker_lobby(
1070 &self,
1071 ) -> std::result::Result<&crate::model::PartyActivityMatchmakerLobby, &Self> {
1072 if let PartyActivity::MatchmakerLobby(val) = &self {
1073 Ok(val)
1074 } else {
1075 Err(self)
1076 }
1077 }
1078 pub fn is_matchmaker_lobby(&self) -> bool {
1080 self.as_matchmaker_lobby().is_ok()
1081 }
1082 pub fn is_unknown(&self) -> bool {
1084 matches!(self, Self::Unknown)
1085 }
1086}
1087
1088#[non_exhaustive]
1090#[derive(std::clone::Clone, std::cmp::PartialEq)]
1091pub struct PartyActivityMatchmakerLobby {
1092 pub lobby: std::option::Option<crate::model::PartyMatchmakerLobby>,
1094 pub game: std::option::Option<crate::model::GameHandle>,
1096}
1097impl PartyActivityMatchmakerLobby {
1098 pub fn lobby(&self) -> std::option::Option<&crate::model::PartyMatchmakerLobby> {
1100 self.lobby.as_ref()
1101 }
1102 pub fn game(&self) -> std::option::Option<&crate::model::GameHandle> {
1104 self.game.as_ref()
1105 }
1106}
1107impl std::fmt::Debug for PartyActivityMatchmakerLobby {
1108 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1109 let mut formatter = f.debug_struct("PartyActivityMatchmakerLobby");
1110 formatter.field("lobby", &self.lobby);
1111 formatter.field("game", &self.game);
1112 formatter.finish()
1113 }
1114}
1115pub mod party_activity_matchmaker_lobby {
1117 #[non_exhaustive]
1119 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1120 pub struct Builder {
1121 pub(crate) lobby: std::option::Option<crate::model::PartyMatchmakerLobby>,
1122 pub(crate) game: std::option::Option<crate::model::GameHandle>,
1123 }
1124 impl Builder {
1125 pub fn lobby(mut self, input: crate::model::PartyMatchmakerLobby) -> Self {
1127 self.lobby = Some(input);
1128 self
1129 }
1130 pub fn set_lobby(
1132 mut self,
1133 input: std::option::Option<crate::model::PartyMatchmakerLobby>,
1134 ) -> Self {
1135 self.lobby = input;
1136 self
1137 }
1138 pub fn game(mut self, input: crate::model::GameHandle) -> Self {
1140 self.game = Some(input);
1141 self
1142 }
1143 pub fn set_game(mut self, input: std::option::Option<crate::model::GameHandle>) -> Self {
1145 self.game = input;
1146 self
1147 }
1148 pub fn build(self) -> crate::model::PartyActivityMatchmakerLobby {
1150 crate::model::PartyActivityMatchmakerLobby {
1151 lobby: self.lobby,
1152 game: self.game,
1153 }
1154 }
1155 }
1156}
1157impl PartyActivityMatchmakerLobby {
1158 pub fn builder() -> crate::model::party_activity_matchmaker_lobby::Builder {
1160 crate::model::party_activity_matchmaker_lobby::Builder::default()
1161 }
1162}
1163
1164#[non_exhaustive]
1166#[derive(std::clone::Clone, std::cmp::PartialEq)]
1167pub struct GameHandle {
1168 pub game_id: std::option::Option<std::string::String>,
1170 pub name_id: std::option::Option<std::string::String>,
1172 pub display_name: std::option::Option<std::string::String>,
1174 pub logo_url: std::option::Option<std::string::String>,
1176 pub banner_url: std::option::Option<std::string::String>,
1178}
1179impl GameHandle {
1180 pub fn game_id(&self) -> std::option::Option<&str> {
1182 self.game_id.as_deref()
1183 }
1184 pub fn name_id(&self) -> std::option::Option<&str> {
1186 self.name_id.as_deref()
1187 }
1188 pub fn display_name(&self) -> std::option::Option<&str> {
1190 self.display_name.as_deref()
1191 }
1192 pub fn logo_url(&self) -> std::option::Option<&str> {
1194 self.logo_url.as_deref()
1195 }
1196 pub fn banner_url(&self) -> std::option::Option<&str> {
1198 self.banner_url.as_deref()
1199 }
1200}
1201impl std::fmt::Debug for GameHandle {
1202 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1203 let mut formatter = f.debug_struct("GameHandle");
1204 formatter.field("game_id", &self.game_id);
1205 formatter.field("name_id", &self.name_id);
1206 formatter.field("display_name", &self.display_name);
1207 formatter.field("logo_url", &self.logo_url);
1208 formatter.field("banner_url", &self.banner_url);
1209 formatter.finish()
1210 }
1211}
1212pub mod game_handle {
1214 #[non_exhaustive]
1216 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1217 pub struct Builder {
1218 pub(crate) game_id: std::option::Option<std::string::String>,
1219 pub(crate) name_id: std::option::Option<std::string::String>,
1220 pub(crate) display_name: std::option::Option<std::string::String>,
1221 pub(crate) logo_url: std::option::Option<std::string::String>,
1222 pub(crate) banner_url: std::option::Option<std::string::String>,
1223 }
1224 impl Builder {
1225 pub fn game_id(mut self, input: impl Into<std::string::String>) -> Self {
1227 self.game_id = Some(input.into());
1228 self
1229 }
1230 pub fn set_game_id(mut self, input: std::option::Option<std::string::String>) -> Self {
1232 self.game_id = input;
1233 self
1234 }
1235 pub fn name_id(mut self, input: impl Into<std::string::String>) -> Self {
1237 self.name_id = Some(input.into());
1238 self
1239 }
1240 pub fn set_name_id(mut self, input: std::option::Option<std::string::String>) -> Self {
1242 self.name_id = input;
1243 self
1244 }
1245 pub fn display_name(mut self, input: impl Into<std::string::String>) -> Self {
1247 self.display_name = Some(input.into());
1248 self
1249 }
1250 pub fn set_display_name(mut self, input: std::option::Option<std::string::String>) -> Self {
1252 self.display_name = input;
1253 self
1254 }
1255 pub fn logo_url(mut self, input: impl Into<std::string::String>) -> Self {
1257 self.logo_url = Some(input.into());
1258 self
1259 }
1260 pub fn set_logo_url(mut self, input: std::option::Option<std::string::String>) -> Self {
1262 self.logo_url = input;
1263 self
1264 }
1265 pub fn banner_url(mut self, input: impl Into<std::string::String>) -> Self {
1267 self.banner_url = Some(input.into());
1268 self
1269 }
1270 pub fn set_banner_url(mut self, input: std::option::Option<std::string::String>) -> Self {
1272 self.banner_url = input;
1273 self
1274 }
1275 pub fn build(self) -> crate::model::GameHandle {
1277 crate::model::GameHandle {
1278 game_id: self.game_id,
1279 name_id: self.name_id,
1280 display_name: self.display_name,
1281 logo_url: self.logo_url,
1282 banner_url: self.banner_url,
1283 }
1284 }
1285 }
1286}
1287impl GameHandle {
1288 pub fn builder() -> crate::model::game_handle::Builder {
1290 crate::model::game_handle::Builder::default()
1291 }
1292}
1293
1294#[non_exhaustive]
1296#[derive(std::clone::Clone, std::cmp::PartialEq)]
1297pub struct PartyMatchmakerLobby {
1298 pub lobby_id: std::option::Option<std::string::String>,
1300}
1301impl PartyMatchmakerLobby {
1302 pub fn lobby_id(&self) -> std::option::Option<&str> {
1304 self.lobby_id.as_deref()
1305 }
1306}
1307impl std::fmt::Debug for PartyMatchmakerLobby {
1308 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1309 let mut formatter = f.debug_struct("PartyMatchmakerLobby");
1310 formatter.field("lobby_id", &self.lobby_id);
1311 formatter.finish()
1312 }
1313}
1314pub mod party_matchmaker_lobby {
1316 #[non_exhaustive]
1318 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1319 pub struct Builder {
1320 pub(crate) lobby_id: std::option::Option<std::string::String>,
1321 }
1322 impl Builder {
1323 pub fn lobby_id(mut self, input: impl Into<std::string::String>) -> Self {
1325 self.lobby_id = Some(input.into());
1326 self
1327 }
1328 pub fn set_lobby_id(mut self, input: std::option::Option<std::string::String>) -> Self {
1330 self.lobby_id = input;
1331 self
1332 }
1333 pub fn build(self) -> crate::model::PartyMatchmakerLobby {
1335 crate::model::PartyMatchmakerLobby {
1336 lobby_id: self.lobby_id,
1337 }
1338 }
1339 }
1340}
1341impl PartyMatchmakerLobby {
1342 pub fn builder() -> crate::model::party_matchmaker_lobby::Builder {
1344 crate::model::party_matchmaker_lobby::Builder::default()
1345 }
1346}
1347
1348#[non_exhaustive]
1350#[derive(std::clone::Clone, std::cmp::PartialEq)]
1351pub struct PartyActivityMatchmakerFindingLobby {
1352 pub game: std::option::Option<crate::model::GameHandle>,
1354}
1355impl PartyActivityMatchmakerFindingLobby {
1356 pub fn game(&self) -> std::option::Option<&crate::model::GameHandle> {
1358 self.game.as_ref()
1359 }
1360}
1361impl std::fmt::Debug for PartyActivityMatchmakerFindingLobby {
1362 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1363 let mut formatter = f.debug_struct("PartyActivityMatchmakerFindingLobby");
1364 formatter.field("game", &self.game);
1365 formatter.finish()
1366 }
1367}
1368pub mod party_activity_matchmaker_finding_lobby {
1370 #[non_exhaustive]
1372 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1373 pub struct Builder {
1374 pub(crate) game: std::option::Option<crate::model::GameHandle>,
1375 }
1376 impl Builder {
1377 pub fn game(mut self, input: crate::model::GameHandle) -> Self {
1379 self.game = Some(input);
1380 self
1381 }
1382 pub fn set_game(mut self, input: std::option::Option<crate::model::GameHandle>) -> Self {
1384 self.game = input;
1385 self
1386 }
1387 pub fn build(self) -> crate::model::PartyActivityMatchmakerFindingLobby {
1389 crate::model::PartyActivityMatchmakerFindingLobby { game: self.game }
1390 }
1391 }
1392}
1393impl PartyActivityMatchmakerFindingLobby {
1394 pub fn builder() -> crate::model::party_activity_matchmaker_finding_lobby::Builder {
1396 crate::model::party_activity_matchmaker_finding_lobby::Builder::default()
1397 }
1398}
1399
1400#[non_exhaustive]
1402#[derive(std::clone::Clone, std::cmp::PartialEq)]
1403pub struct PartyActivityIdle {}
1404impl std::fmt::Debug for PartyActivityIdle {
1405 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1406 let mut formatter = f.debug_struct("PartyActivityIdle");
1407 formatter.finish()
1408 }
1409}
1410pub mod party_activity_idle {
1412 #[non_exhaustive]
1414 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1415 pub struct Builder {}
1416 impl Builder {
1417 pub fn build(self) -> crate::model::PartyActivityIdle {
1419 crate::model::PartyActivityIdle {}
1420 }
1421 }
1422}
1423impl PartyActivityIdle {
1424 pub fn builder() -> crate::model::party_activity_idle::Builder {
1426 crate::model::party_activity_idle::Builder::default()
1427 }
1428}
1429
1430#[non_exhaustive]
1432#[derive(std::clone::Clone, std::cmp::PartialEq)]
1433pub struct IdentityPresence {
1434 pub update_ts: std::option::Option<aws_smithy_types::DateTime>,
1436 pub status: std::option::Option<crate::model::IdentityStatus>,
1438 pub game_activity: std::option::Option<crate::model::IdentityGameActivity>,
1440}
1441impl IdentityPresence {
1442 pub fn update_ts(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
1444 self.update_ts.as_ref()
1445 }
1446 pub fn status(&self) -> std::option::Option<&crate::model::IdentityStatus> {
1448 self.status.as_ref()
1449 }
1450 pub fn game_activity(&self) -> std::option::Option<&crate::model::IdentityGameActivity> {
1452 self.game_activity.as_ref()
1453 }
1454}
1455impl std::fmt::Debug for IdentityPresence {
1456 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1457 let mut formatter = f.debug_struct("IdentityPresence");
1458 formatter.field("update_ts", &self.update_ts);
1459 formatter.field("status", &self.status);
1460 formatter.field("game_activity", &self.game_activity);
1461 formatter.finish()
1462 }
1463}
1464pub mod identity_presence {
1466 #[non_exhaustive]
1468 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1469 pub struct Builder {
1470 pub(crate) update_ts: std::option::Option<aws_smithy_types::DateTime>,
1471 pub(crate) status: std::option::Option<crate::model::IdentityStatus>,
1472 pub(crate) game_activity: std::option::Option<crate::model::IdentityGameActivity>,
1473 }
1474 impl Builder {
1475 pub fn update_ts(mut self, input: aws_smithy_types::DateTime) -> Self {
1477 self.update_ts = Some(input);
1478 self
1479 }
1480 pub fn set_update_ts(
1482 mut self,
1483 input: std::option::Option<aws_smithy_types::DateTime>,
1484 ) -> Self {
1485 self.update_ts = input;
1486 self
1487 }
1488 pub fn status(mut self, input: crate::model::IdentityStatus) -> Self {
1490 self.status = Some(input);
1491 self
1492 }
1493 pub fn set_status(
1495 mut self,
1496 input: std::option::Option<crate::model::IdentityStatus>,
1497 ) -> Self {
1498 self.status = input;
1499 self
1500 }
1501 pub fn game_activity(mut self, input: crate::model::IdentityGameActivity) -> Self {
1503 self.game_activity = Some(input);
1504 self
1505 }
1506 pub fn set_game_activity(
1508 mut self,
1509 input: std::option::Option<crate::model::IdentityGameActivity>,
1510 ) -> Self {
1511 self.game_activity = input;
1512 self
1513 }
1514 pub fn build(self) -> crate::model::IdentityPresence {
1516 crate::model::IdentityPresence {
1517 update_ts: self.update_ts,
1518 status: self.status,
1519 game_activity: self.game_activity,
1520 }
1521 }
1522 }
1523}
1524impl IdentityPresence {
1525 pub fn builder() -> crate::model::identity_presence::Builder {
1527 crate::model::identity_presence::Builder::default()
1528 }
1529}
1530
1531#[non_exhaustive]
1533#[derive(std::clone::Clone, std::cmp::PartialEq)]
1534pub struct IdentityGameActivity {
1535 pub game: std::option::Option<crate::model::GameHandle>,
1537 pub message: std::option::Option<std::string::String>,
1539 pub public_metadata: std::option::Option<aws_smithy_types::Document>,
1541 pub mutual_metadata: std::option::Option<aws_smithy_types::Document>,
1543}
1544impl IdentityGameActivity {
1545 pub fn game(&self) -> std::option::Option<&crate::model::GameHandle> {
1547 self.game.as_ref()
1548 }
1549 pub fn message(&self) -> std::option::Option<&str> {
1551 self.message.as_deref()
1552 }
1553 pub fn public_metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
1555 self.public_metadata.as_ref()
1556 }
1557 pub fn mutual_metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
1559 self.mutual_metadata.as_ref()
1560 }
1561}
1562impl std::fmt::Debug for IdentityGameActivity {
1563 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1564 let mut formatter = f.debug_struct("IdentityGameActivity");
1565 formatter.field("game", &self.game);
1566 formatter.field("message", &self.message);
1567 formatter.field("public_metadata", &self.public_metadata);
1568 formatter.field("mutual_metadata", &self.mutual_metadata);
1569 formatter.finish()
1570 }
1571}
1572pub mod identity_game_activity {
1574 #[non_exhaustive]
1576 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1577 pub struct Builder {
1578 pub(crate) game: std::option::Option<crate::model::GameHandle>,
1579 pub(crate) message: std::option::Option<std::string::String>,
1580 pub(crate) public_metadata: std::option::Option<aws_smithy_types::Document>,
1581 pub(crate) mutual_metadata: std::option::Option<aws_smithy_types::Document>,
1582 }
1583 impl Builder {
1584 pub fn game(mut self, input: crate::model::GameHandle) -> Self {
1586 self.game = Some(input);
1587 self
1588 }
1589 pub fn set_game(mut self, input: std::option::Option<crate::model::GameHandle>) -> Self {
1591 self.game = input;
1592 self
1593 }
1594 pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
1596 self.message = Some(input.into());
1597 self
1598 }
1599 pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
1601 self.message = input;
1602 self
1603 }
1604 pub fn public_metadata(mut self, input: aws_smithy_types::Document) -> Self {
1606 self.public_metadata = Some(input);
1607 self
1608 }
1609 pub fn set_public_metadata(
1611 mut self,
1612 input: std::option::Option<aws_smithy_types::Document>,
1613 ) -> Self {
1614 self.public_metadata = input;
1615 self
1616 }
1617 pub fn mutual_metadata(mut self, input: aws_smithy_types::Document) -> Self {
1619 self.mutual_metadata = Some(input);
1620 self
1621 }
1622 pub fn set_mutual_metadata(
1624 mut self,
1625 input: std::option::Option<aws_smithy_types::Document>,
1626 ) -> Self {
1627 self.mutual_metadata = input;
1628 self
1629 }
1630 pub fn build(self) -> crate::model::IdentityGameActivity {
1632 crate::model::IdentityGameActivity {
1633 game: self.game,
1634 message: self.message,
1635 public_metadata: self.public_metadata,
1636 mutual_metadata: self.mutual_metadata,
1637 }
1638 }
1639 }
1640}
1641impl IdentityGameActivity {
1642 pub fn builder() -> crate::model::identity_game_activity::Builder {
1644 crate::model::identity_game_activity::Builder::default()
1645 }
1646}
1647
1648#[non_exhaustive]
1651#[derive(
1652 std::clone::Clone,
1653 std::cmp::Eq,
1654 std::cmp::Ord,
1655 std::cmp::PartialEq,
1656 std::cmp::PartialOrd,
1657 std::fmt::Debug,
1658 std::hash::Hash,
1659)]
1660pub enum IdentityStatus {
1661 #[allow(missing_docs)] Away,
1663 #[allow(missing_docs)] Offline,
1665 #[allow(missing_docs)] Online,
1667 Unknown(String),
1669}
1670impl std::convert::From<&str> for IdentityStatus {
1671 fn from(s: &str) -> Self {
1672 match s {
1673 "away" => IdentityStatus::Away,
1674 "offline" => IdentityStatus::Offline,
1675 "online" => IdentityStatus::Online,
1676 other => IdentityStatus::Unknown(other.to_owned()),
1677 }
1678 }
1679}
1680impl std::str::FromStr for IdentityStatus {
1681 type Err = std::convert::Infallible;
1682
1683 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
1684 Ok(IdentityStatus::from(s))
1685 }
1686}
1687impl IdentityStatus {
1688 pub fn as_str(&self) -> &str {
1690 match self {
1691 IdentityStatus::Away => "away",
1692 IdentityStatus::Offline => "offline",
1693 IdentityStatus::Online => "online",
1694 IdentityStatus::Unknown(s) => s.as_ref(),
1695 }
1696 }
1697 pub fn values() -> &'static [&'static str] {
1699 &["away", "offline", "online"]
1700 }
1701}
1702impl AsRef<str> for IdentityStatus {
1703 fn as_ref(&self) -> &str {
1704 self.as_str()
1705 }
1706}
1707
1708#[allow(missing_docs)] #[non_exhaustive]
1710#[derive(std::clone::Clone, std::cmp::PartialEq)]
1711pub struct PartyPublicity {
1712 #[allow(missing_docs)] pub public: std::option::Option<crate::model::PartyPublicityLevel>,
1714 #[allow(missing_docs)] pub mutual_followers: std::option::Option<crate::model::PartyPublicityLevel>,
1716 #[allow(missing_docs)] pub groups: std::option::Option<crate::model::PartyPublicityLevel>,
1718}
1719impl PartyPublicity {
1720 #[allow(missing_docs)] pub fn public(&self) -> std::option::Option<&crate::model::PartyPublicityLevel> {
1722 self.public.as_ref()
1723 }
1724 #[allow(missing_docs)] pub fn mutual_followers(&self) -> std::option::Option<&crate::model::PartyPublicityLevel> {
1726 self.mutual_followers.as_ref()
1727 }
1728 #[allow(missing_docs)] pub fn groups(&self) -> std::option::Option<&crate::model::PartyPublicityLevel> {
1730 self.groups.as_ref()
1731 }
1732}
1733impl std::fmt::Debug for PartyPublicity {
1734 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1735 let mut formatter = f.debug_struct("PartyPublicity");
1736 formatter.field("public", &self.public);
1737 formatter.field("mutual_followers", &self.mutual_followers);
1738 formatter.field("groups", &self.groups);
1739 formatter.finish()
1740 }
1741}
1742pub mod party_publicity {
1744 #[non_exhaustive]
1746 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1747 pub struct Builder {
1748 pub(crate) public: std::option::Option<crate::model::PartyPublicityLevel>,
1749 pub(crate) mutual_followers: std::option::Option<crate::model::PartyPublicityLevel>,
1750 pub(crate) groups: std::option::Option<crate::model::PartyPublicityLevel>,
1751 }
1752 impl Builder {
1753 #[allow(missing_docs)] pub fn public(mut self, input: crate::model::PartyPublicityLevel) -> Self {
1755 self.public = Some(input);
1756 self
1757 }
1758 #[allow(missing_docs)] pub fn set_public(
1760 mut self,
1761 input: std::option::Option<crate::model::PartyPublicityLevel>,
1762 ) -> Self {
1763 self.public = input;
1764 self
1765 }
1766 #[allow(missing_docs)] pub fn mutual_followers(mut self, input: crate::model::PartyPublicityLevel) -> Self {
1768 self.mutual_followers = Some(input);
1769 self
1770 }
1771 #[allow(missing_docs)] pub fn set_mutual_followers(
1773 mut self,
1774 input: std::option::Option<crate::model::PartyPublicityLevel>,
1775 ) -> Self {
1776 self.mutual_followers = input;
1777 self
1778 }
1779 #[allow(missing_docs)] pub fn groups(mut self, input: crate::model::PartyPublicityLevel) -> Self {
1781 self.groups = Some(input);
1782 self
1783 }
1784 #[allow(missing_docs)] pub fn set_groups(
1786 mut self,
1787 input: std::option::Option<crate::model::PartyPublicityLevel>,
1788 ) -> Self {
1789 self.groups = input;
1790 self
1791 }
1792 pub fn build(self) -> crate::model::PartyPublicity {
1794 crate::model::PartyPublicity {
1795 public: self.public,
1796 mutual_followers: self.mutual_followers,
1797 groups: self.groups,
1798 }
1799 }
1800 }
1801}
1802impl PartyPublicity {
1803 pub fn builder() -> crate::model::party_publicity::Builder {
1805 crate::model::party_publicity::Builder::default()
1806 }
1807}
1808
1809#[allow(missing_docs)] #[non_exhaustive]
1811#[derive(
1812 std::clone::Clone,
1813 std::cmp::Eq,
1814 std::cmp::Ord,
1815 std::cmp::PartialEq,
1816 std::cmp::PartialOrd,
1817 std::fmt::Debug,
1818 std::hash::Hash,
1819)]
1820pub enum PartyPublicityLevel {
1821 #[allow(missing_docs)] Join,
1823 #[allow(missing_docs)] None,
1825 #[allow(missing_docs)] View,
1827 Unknown(String),
1829}
1830impl std::convert::From<&str> for PartyPublicityLevel {
1831 fn from(s: &str) -> Self {
1832 match s {
1833 "join" => PartyPublicityLevel::Join,
1834 "none" => PartyPublicityLevel::None,
1835 "view" => PartyPublicityLevel::View,
1836 other => PartyPublicityLevel::Unknown(other.to_owned()),
1837 }
1838 }
1839}
1840impl std::str::FromStr for PartyPublicityLevel {
1841 type Err = std::convert::Infallible;
1842
1843 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
1844 Ok(PartyPublicityLevel::from(s))
1845 }
1846}
1847impl PartyPublicityLevel {
1848 pub fn as_str(&self) -> &str {
1850 match self {
1851 PartyPublicityLevel::Join => "join",
1852 PartyPublicityLevel::None => "none",
1853 PartyPublicityLevel::View => "view",
1854 PartyPublicityLevel::Unknown(s) => s.as_ref(),
1855 }
1856 }
1857 pub fn values() -> &'static [&'static str] {
1859 &["join", "none", "view"]
1860 }
1861}
1862impl AsRef<str> for PartyPublicityLevel {
1863 fn as_ref(&self) -> &str {
1864 self.as_str()
1865 }
1866}
1867
1868#[non_exhaustive]
1870#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1871pub enum JoinPartyInvite {
1872 Alias(std::string::String),
1874 PartyId(std::string::String),
1876 Token(std::string::String),
1878 #[non_exhaustive]
1886 Unknown,
1887}
1888impl JoinPartyInvite {
1889 pub fn as_alias(&self) -> std::result::Result<&std::string::String, &Self> {
1892 if let JoinPartyInvite::Alias(val) = &self {
1893 Ok(val)
1894 } else {
1895 Err(self)
1896 }
1897 }
1898 pub fn is_alias(&self) -> bool {
1900 self.as_alias().is_ok()
1901 }
1902 pub fn as_party_id(&self) -> std::result::Result<&std::string::String, &Self> {
1905 if let JoinPartyInvite::PartyId(val) = &self {
1906 Ok(val)
1907 } else {
1908 Err(self)
1909 }
1910 }
1911 pub fn is_party_id(&self) -> bool {
1913 self.as_party_id().is_ok()
1914 }
1915 pub fn as_token(&self) -> std::result::Result<&std::string::String, &Self> {
1918 if let JoinPartyInvite::Token(val) = &self {
1919 Ok(val)
1920 } else {
1921 Err(self)
1922 }
1923 }
1924 pub fn is_token(&self) -> bool {
1926 self.as_token().is_ok()
1927 }
1928 pub fn is_unknown(&self) -> bool {
1930 matches!(self, Self::Unknown)
1931 }
1932}
1933
1934#[non_exhaustive]
1936#[derive(std::clone::Clone, std::cmp::PartialEq)]
1937pub struct CreatedInvite {
1938 pub token: std::option::Option<std::string::String>,
1940}
1941impl CreatedInvite {
1942 pub fn token(&self) -> std::option::Option<&str> {
1944 self.token.as_deref()
1945 }
1946}
1947impl std::fmt::Debug for CreatedInvite {
1948 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1949 let mut formatter = f.debug_struct("CreatedInvite");
1950 formatter.field("token", &"*** Sensitive Data Redacted ***");
1951 formatter.finish()
1952 }
1953}
1954pub mod created_invite {
1956 #[non_exhaustive]
1958 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1959 pub struct Builder {
1960 pub(crate) token: std::option::Option<std::string::String>,
1961 }
1962 impl Builder {
1963 pub fn token(mut self, input: impl Into<std::string::String>) -> Self {
1965 self.token = Some(input.into());
1966 self
1967 }
1968 pub fn set_token(mut self, input: std::option::Option<std::string::String>) -> Self {
1970 self.token = input;
1971 self
1972 }
1973 pub fn build(self) -> crate::model::CreatedInvite {
1975 crate::model::CreatedInvite { token: self.token }
1976 }
1977 }
1978}
1979impl CreatedInvite {
1980 pub fn builder() -> crate::model::created_invite::Builder {
1982 crate::model::created_invite::Builder::default()
1983 }
1984}
1985
1986#[non_exhaustive]
1988#[derive(std::clone::Clone, std::cmp::PartialEq)]
1989pub struct CreatePartyInviteConfig {
1990 pub alias: std::option::Option<std::string::String>,
1992}
1993impl CreatePartyInviteConfig {
1994 pub fn alias(&self) -> std::option::Option<&str> {
1996 self.alias.as_deref()
1997 }
1998}
1999impl std::fmt::Debug for CreatePartyInviteConfig {
2000 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2001 let mut formatter = f.debug_struct("CreatePartyInviteConfig");
2002 formatter.field("alias", &self.alias);
2003 formatter.finish()
2004 }
2005}
2006pub mod create_party_invite_config {
2008 #[non_exhaustive]
2010 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
2011 pub struct Builder {
2012 pub(crate) alias: std::option::Option<std::string::String>,
2013 }
2014 impl Builder {
2015 pub fn alias(mut self, input: impl Into<std::string::String>) -> Self {
2017 self.alias = Some(input.into());
2018 self
2019 }
2020 pub fn set_alias(mut self, input: std::option::Option<std::string::String>) -> Self {
2022 self.alias = input;
2023 self
2024 }
2025 pub fn build(self) -> crate::model::CreatePartyInviteConfig {
2027 crate::model::CreatePartyInviteConfig { alias: self.alias }
2028 }
2029 }
2030}
2031impl CreatePartyInviteConfig {
2032 pub fn builder() -> crate::model::create_party_invite_config::Builder {
2034 crate::model::create_party_invite_config::Builder::default()
2035 }
2036}
2037
2038#[non_exhaustive]
2040#[derive(std::clone::Clone, std::cmp::PartialEq)]
2041pub struct CreatePartyPublicityConfig {
2042 pub public: std::option::Option<crate::model::PartyPublicityLevel>,
2044 pub mutual_followers: std::option::Option<crate::model::PartyPublicityLevel>,
2046 pub groups: std::option::Option<crate::model::PartyPublicityLevel>,
2048}
2049impl CreatePartyPublicityConfig {
2050 pub fn public(&self) -> std::option::Option<&crate::model::PartyPublicityLevel> {
2052 self.public.as_ref()
2053 }
2054 pub fn mutual_followers(&self) -> std::option::Option<&crate::model::PartyPublicityLevel> {
2056 self.mutual_followers.as_ref()
2057 }
2058 pub fn groups(&self) -> std::option::Option<&crate::model::PartyPublicityLevel> {
2060 self.groups.as_ref()
2061 }
2062}
2063impl std::fmt::Debug for CreatePartyPublicityConfig {
2064 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2065 let mut formatter = f.debug_struct("CreatePartyPublicityConfig");
2066 formatter.field("public", &self.public);
2067 formatter.field("mutual_followers", &self.mutual_followers);
2068 formatter.field("groups", &self.groups);
2069 formatter.finish()
2070 }
2071}
2072pub mod create_party_publicity_config {
2074 #[non_exhaustive]
2076 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
2077 pub struct Builder {
2078 pub(crate) public: std::option::Option<crate::model::PartyPublicityLevel>,
2079 pub(crate) mutual_followers: std::option::Option<crate::model::PartyPublicityLevel>,
2080 pub(crate) groups: std::option::Option<crate::model::PartyPublicityLevel>,
2081 }
2082 impl Builder {
2083 pub fn public(mut self, input: crate::model::PartyPublicityLevel) -> Self {
2085 self.public = Some(input);
2086 self
2087 }
2088 pub fn set_public(
2090 mut self,
2091 input: std::option::Option<crate::model::PartyPublicityLevel>,
2092 ) -> Self {
2093 self.public = input;
2094 self
2095 }
2096 pub fn mutual_followers(mut self, input: crate::model::PartyPublicityLevel) -> Self {
2098 self.mutual_followers = Some(input);
2099 self
2100 }
2101 pub fn set_mutual_followers(
2103 mut self,
2104 input: std::option::Option<crate::model::PartyPublicityLevel>,
2105 ) -> Self {
2106 self.mutual_followers = input;
2107 self
2108 }
2109 pub fn groups(mut self, input: crate::model::PartyPublicityLevel) -> Self {
2111 self.groups = Some(input);
2112 self
2113 }
2114 pub fn set_groups(
2116 mut self,
2117 input: std::option::Option<crate::model::PartyPublicityLevel>,
2118 ) -> Self {
2119 self.groups = input;
2120 self
2121 }
2122 pub fn build(self) -> crate::model::CreatePartyPublicityConfig {
2124 crate::model::CreatePartyPublicityConfig {
2125 public: self.public,
2126 mutual_followers: self.mutual_followers,
2127 groups: self.groups,
2128 }
2129 }
2130 }
2131}
2132impl CreatePartyPublicityConfig {
2133 pub fn builder() -> crate::model::create_party_publicity_config::Builder {
2135 crate::model::create_party_publicity_config::Builder::default()
2136 }
2137}
2138
2139#[non_exhaustive]
2141#[derive(std::clone::Clone, std::cmp::PartialEq)]
2142pub struct WatchResponse {
2143 pub index: std::option::Option<std::string::String>,
2145}
2146impl WatchResponse {
2147 pub fn index(&self) -> std::option::Option<&str> {
2149 self.index.as_deref()
2150 }
2151}
2152impl std::fmt::Debug for WatchResponse {
2153 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2154 let mut formatter = f.debug_struct("WatchResponse");
2155 formatter.field("index", &self.index);
2156 formatter.finish()
2157 }
2158}
2159pub mod watch_response {
2161 #[non_exhaustive]
2163 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
2164 pub struct Builder {
2165 pub(crate) index: std::option::Option<std::string::String>,
2166 }
2167 impl Builder {
2168 pub fn index(mut self, input: impl Into<std::string::String>) -> Self {
2170 self.index = Some(input.into());
2171 self
2172 }
2173 pub fn set_index(mut self, input: std::option::Option<std::string::String>) -> Self {
2175 self.index = input;
2176 self
2177 }
2178 pub fn build(self) -> crate::model::WatchResponse {
2180 crate::model::WatchResponse { index: self.index }
2181 }
2182 }
2183}
2184impl WatchResponse {
2185 pub fn builder() -> crate::model::watch_response::Builder {
2187 crate::model::watch_response::Builder::default()
2188 }
2189}
2190
2191#[allow(missing_docs)] #[non_exhaustive]
2193#[derive(std::clone::Clone, std::cmp::PartialEq)]
2194pub struct PartyProfile {
2195 pub party_id: std::option::Option<std::string::String>,
2197 pub create_ts: std::option::Option<aws_smithy_types::DateTime>,
2199 pub activity: std::option::Option<crate::model::PartyActivity>,
2201 pub external: std::option::Option<crate::model::PartyExternalLinks>,
2203 #[allow(missing_docs)] pub publicity: std::option::Option<crate::model::PartyPublicity>,
2205 pub party_size: std::option::Option<i32>,
2207 pub members: std::option::Option<std::vec::Vec<crate::model::PartyMemberSummary>>,
2209 pub thread_id: std::option::Option<std::string::String>,
2211 pub invites: std::option::Option<std::vec::Vec<crate::model::PartyInvite>>,
2213}
2214impl PartyProfile {
2215 pub fn party_id(&self) -> std::option::Option<&str> {
2217 self.party_id.as_deref()
2218 }
2219 pub fn create_ts(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
2221 self.create_ts.as_ref()
2222 }
2223 pub fn activity(&self) -> std::option::Option<&crate::model::PartyActivity> {
2225 self.activity.as_ref()
2226 }
2227 pub fn external(&self) -> std::option::Option<&crate::model::PartyExternalLinks> {
2229 self.external.as_ref()
2230 }
2231 #[allow(missing_docs)] pub fn publicity(&self) -> std::option::Option<&crate::model::PartyPublicity> {
2233 self.publicity.as_ref()
2234 }
2235 pub fn party_size(&self) -> std::option::Option<i32> {
2237 self.party_size
2238 }
2239 pub fn members(&self) -> std::option::Option<&[crate::model::PartyMemberSummary]> {
2241 self.members.as_deref()
2242 }
2243 pub fn thread_id(&self) -> std::option::Option<&str> {
2245 self.thread_id.as_deref()
2246 }
2247 pub fn invites(&self) -> std::option::Option<&[crate::model::PartyInvite]> {
2249 self.invites.as_deref()
2250 }
2251}
2252impl std::fmt::Debug for PartyProfile {
2253 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2254 let mut formatter = f.debug_struct("PartyProfile");
2255 formatter.field("party_id", &self.party_id);
2256 formatter.field("create_ts", &self.create_ts);
2257 formatter.field("activity", &self.activity);
2258 formatter.field("external", &self.external);
2259 formatter.field("publicity", &self.publicity);
2260 formatter.field("party_size", &self.party_size);
2261 formatter.field("members", &self.members);
2262 formatter.field("thread_id", &self.thread_id);
2263 formatter.field("invites", &self.invites);
2264 formatter.finish()
2265 }
2266}
2267pub mod party_profile {
2269 #[non_exhaustive]
2271 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
2272 pub struct Builder {
2273 pub(crate) party_id: std::option::Option<std::string::String>,
2274 pub(crate) create_ts: std::option::Option<aws_smithy_types::DateTime>,
2275 pub(crate) activity: std::option::Option<crate::model::PartyActivity>,
2276 pub(crate) external: std::option::Option<crate::model::PartyExternalLinks>,
2277 pub(crate) publicity: std::option::Option<crate::model::PartyPublicity>,
2278 pub(crate) party_size: std::option::Option<i32>,
2279 pub(crate) members: std::option::Option<std::vec::Vec<crate::model::PartyMemberSummary>>,
2280 pub(crate) thread_id: std::option::Option<std::string::String>,
2281 pub(crate) invites: std::option::Option<std::vec::Vec<crate::model::PartyInvite>>,
2282 }
2283 impl Builder {
2284 pub fn party_id(mut self, input: impl Into<std::string::String>) -> Self {
2286 self.party_id = Some(input.into());
2287 self
2288 }
2289 pub fn set_party_id(mut self, input: std::option::Option<std::string::String>) -> Self {
2291 self.party_id = input;
2292 self
2293 }
2294 pub fn create_ts(mut self, input: aws_smithy_types::DateTime) -> Self {
2296 self.create_ts = Some(input);
2297 self
2298 }
2299 pub fn set_create_ts(
2301 mut self,
2302 input: std::option::Option<aws_smithy_types::DateTime>,
2303 ) -> Self {
2304 self.create_ts = input;
2305 self
2306 }
2307 pub fn activity(mut self, input: crate::model::PartyActivity) -> Self {
2309 self.activity = Some(input);
2310 self
2311 }
2312 pub fn set_activity(
2314 mut self,
2315 input: std::option::Option<crate::model::PartyActivity>,
2316 ) -> Self {
2317 self.activity = input;
2318 self
2319 }
2320 pub fn external(mut self, input: crate::model::PartyExternalLinks) -> Self {
2322 self.external = Some(input);
2323 self
2324 }
2325 pub fn set_external(
2327 mut self,
2328 input: std::option::Option<crate::model::PartyExternalLinks>,
2329 ) -> Self {
2330 self.external = input;
2331 self
2332 }
2333 #[allow(missing_docs)] pub fn publicity(mut self, input: crate::model::PartyPublicity) -> Self {
2335 self.publicity = Some(input);
2336 self
2337 }
2338 #[allow(missing_docs)] pub fn set_publicity(
2340 mut self,
2341 input: std::option::Option<crate::model::PartyPublicity>,
2342 ) -> Self {
2343 self.publicity = input;
2344 self
2345 }
2346 pub fn party_size(mut self, input: i32) -> Self {
2348 self.party_size = Some(input);
2349 self
2350 }
2351 pub fn set_party_size(mut self, input: std::option::Option<i32>) -> Self {
2353 self.party_size = input;
2354 self
2355 }
2356 pub fn members(mut self, input: crate::model::PartyMemberSummary) -> Self {
2362 let mut v = self.members.unwrap_or_default();
2363 v.push(input);
2364 self.members = Some(v);
2365 self
2366 }
2367 pub fn set_members(
2369 mut self,
2370 input: std::option::Option<std::vec::Vec<crate::model::PartyMemberSummary>>,
2371 ) -> Self {
2372 self.members = input;
2373 self
2374 }
2375 pub fn thread_id(mut self, input: impl Into<std::string::String>) -> Self {
2377 self.thread_id = Some(input.into());
2378 self
2379 }
2380 pub fn set_thread_id(mut self, input: std::option::Option<std::string::String>) -> Self {
2382 self.thread_id = input;
2383 self
2384 }
2385 pub fn invites(mut self, input: crate::model::PartyInvite) -> Self {
2391 let mut v = self.invites.unwrap_or_default();
2392 v.push(input);
2393 self.invites = Some(v);
2394 self
2395 }
2396 pub fn set_invites(
2398 mut self,
2399 input: std::option::Option<std::vec::Vec<crate::model::PartyInvite>>,
2400 ) -> Self {
2401 self.invites = input;
2402 self
2403 }
2404 pub fn build(self) -> crate::model::PartyProfile {
2406 crate::model::PartyProfile {
2407 party_id: self.party_id,
2408 create_ts: self.create_ts,
2409 activity: self.activity,
2410 external: self.external,
2411 publicity: self.publicity,
2412 party_size: self.party_size,
2413 members: self.members,
2414 thread_id: self.thread_id,
2415 invites: self.invites,
2416 }
2417 }
2418 }
2419}
2420impl PartyProfile {
2421 pub fn builder() -> crate::model::party_profile::Builder {
2423 crate::model::party_profile::Builder::default()
2424 }
2425}
2426
2427#[non_exhaustive]
2429#[derive(std::clone::Clone, std::cmp::PartialEq)]
2430pub struct PartyInvite {
2431 pub invite_id: std::option::Option<std::string::String>,
2433 pub create_ts: std::option::Option<aws_smithy_types::DateTime>,
2435 pub token: std::option::Option<std::string::String>,
2437 pub alias: std::option::Option<crate::model::PartyInviteAlias>,
2439 pub external: std::option::Option<crate::model::PartyInviteExternalLinks>,
2441}
2442impl PartyInvite {
2443 pub fn invite_id(&self) -> std::option::Option<&str> {
2445 self.invite_id.as_deref()
2446 }
2447 pub fn create_ts(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
2449 self.create_ts.as_ref()
2450 }
2451 pub fn token(&self) -> std::option::Option<&str> {
2453 self.token.as_deref()
2454 }
2455 pub fn alias(&self) -> std::option::Option<&crate::model::PartyInviteAlias> {
2457 self.alias.as_ref()
2458 }
2459 pub fn external(&self) -> std::option::Option<&crate::model::PartyInviteExternalLinks> {
2461 self.external.as_ref()
2462 }
2463}
2464impl std::fmt::Debug for PartyInvite {
2465 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2466 let mut formatter = f.debug_struct("PartyInvite");
2467 formatter.field("invite_id", &self.invite_id);
2468 formatter.field("create_ts", &self.create_ts);
2469 formatter.field("token", &"*** Sensitive Data Redacted ***");
2470 formatter.field("alias", &self.alias);
2471 formatter.field("external", &self.external);
2472 formatter.finish()
2473 }
2474}
2475pub mod party_invite {
2477 #[non_exhaustive]
2479 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
2480 pub struct Builder {
2481 pub(crate) invite_id: std::option::Option<std::string::String>,
2482 pub(crate) create_ts: std::option::Option<aws_smithy_types::DateTime>,
2483 pub(crate) token: std::option::Option<std::string::String>,
2484 pub(crate) alias: std::option::Option<crate::model::PartyInviteAlias>,
2485 pub(crate) external: std::option::Option<crate::model::PartyInviteExternalLinks>,
2486 }
2487 impl Builder {
2488 pub fn invite_id(mut self, input: impl Into<std::string::String>) -> Self {
2490 self.invite_id = Some(input.into());
2491 self
2492 }
2493 pub fn set_invite_id(mut self, input: std::option::Option<std::string::String>) -> Self {
2495 self.invite_id = input;
2496 self
2497 }
2498 pub fn create_ts(mut self, input: aws_smithy_types::DateTime) -> Self {
2500 self.create_ts = Some(input);
2501 self
2502 }
2503 pub fn set_create_ts(
2505 mut self,
2506 input: std::option::Option<aws_smithy_types::DateTime>,
2507 ) -> Self {
2508 self.create_ts = input;
2509 self
2510 }
2511 pub fn token(mut self, input: impl Into<std::string::String>) -> Self {
2513 self.token = Some(input.into());
2514 self
2515 }
2516 pub fn set_token(mut self, input: std::option::Option<std::string::String>) -> Self {
2518 self.token = input;
2519 self
2520 }
2521 pub fn alias(mut self, input: crate::model::PartyInviteAlias) -> Self {
2523 self.alias = Some(input);
2524 self
2525 }
2526 pub fn set_alias(
2528 mut self,
2529 input: std::option::Option<crate::model::PartyInviteAlias>,
2530 ) -> Self {
2531 self.alias = input;
2532 self
2533 }
2534 pub fn external(mut self, input: crate::model::PartyInviteExternalLinks) -> Self {
2536 self.external = Some(input);
2537 self
2538 }
2539 pub fn set_external(
2541 mut self,
2542 input: std::option::Option<crate::model::PartyInviteExternalLinks>,
2543 ) -> Self {
2544 self.external = input;
2545 self
2546 }
2547 pub fn build(self) -> crate::model::PartyInvite {
2549 crate::model::PartyInvite {
2550 invite_id: self.invite_id,
2551 create_ts: self.create_ts,
2552 token: self.token,
2553 alias: self.alias,
2554 external: self.external,
2555 }
2556 }
2557 }
2558}
2559impl PartyInvite {
2560 pub fn builder() -> crate::model::party_invite::Builder {
2562 crate::model::party_invite::Builder::default()
2563 }
2564}
2565
2566#[non_exhaustive]
2568#[derive(std::clone::Clone, std::cmp::PartialEq)]
2569pub struct PartyInviteExternalLinks {
2570 pub invite: std::option::Option<std::string::String>,
2572}
2573impl PartyInviteExternalLinks {
2574 pub fn invite(&self) -> std::option::Option<&str> {
2576 self.invite.as_deref()
2577 }
2578}
2579impl std::fmt::Debug for PartyInviteExternalLinks {
2580 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2581 let mut formatter = f.debug_struct("PartyInviteExternalLinks");
2582 formatter.field("invite", &self.invite);
2583 formatter.finish()
2584 }
2585}
2586pub mod party_invite_external_links {
2588 #[non_exhaustive]
2590 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
2591 pub struct Builder {
2592 pub(crate) invite: std::option::Option<std::string::String>,
2593 }
2594 impl Builder {
2595 pub fn invite(mut self, input: impl Into<std::string::String>) -> Self {
2597 self.invite = Some(input.into());
2598 self
2599 }
2600 pub fn set_invite(mut self, input: std::option::Option<std::string::String>) -> Self {
2602 self.invite = input;
2603 self
2604 }
2605 pub fn build(self) -> crate::model::PartyInviteExternalLinks {
2607 crate::model::PartyInviteExternalLinks {
2608 invite: self.invite,
2609 }
2610 }
2611 }
2612}
2613impl PartyInviteExternalLinks {
2614 pub fn builder() -> crate::model::party_invite_external_links::Builder {
2616 crate::model::party_invite_external_links::Builder::default()
2617 }
2618}
2619
2620#[non_exhaustive]
2622#[derive(std::clone::Clone, std::cmp::PartialEq)]
2623pub struct PartyInviteAlias {
2624 pub namespace_id: std::option::Option<std::string::String>,
2626 pub alias: std::option::Option<std::string::String>,
2628}
2629impl PartyInviteAlias {
2630 pub fn namespace_id(&self) -> std::option::Option<&str> {
2632 self.namespace_id.as_deref()
2633 }
2634 pub fn alias(&self) -> std::option::Option<&str> {
2636 self.alias.as_deref()
2637 }
2638}
2639impl std::fmt::Debug for PartyInviteAlias {
2640 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2641 let mut formatter = f.debug_struct("PartyInviteAlias");
2642 formatter.field("namespace_id", &self.namespace_id);
2643 formatter.field("alias", &self.alias);
2644 formatter.finish()
2645 }
2646}
2647pub mod party_invite_alias {
2649 #[non_exhaustive]
2651 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
2652 pub struct Builder {
2653 pub(crate) namespace_id: std::option::Option<std::string::String>,
2654 pub(crate) alias: std::option::Option<std::string::String>,
2655 }
2656 impl Builder {
2657 pub fn namespace_id(mut self, input: impl Into<std::string::String>) -> Self {
2659 self.namespace_id = Some(input.into());
2660 self
2661 }
2662 pub fn set_namespace_id(mut self, input: std::option::Option<std::string::String>) -> Self {
2664 self.namespace_id = input;
2665 self
2666 }
2667 pub fn alias(mut self, input: impl Into<std::string::String>) -> Self {
2669 self.alias = Some(input.into());
2670 self
2671 }
2672 pub fn set_alias(mut self, input: std::option::Option<std::string::String>) -> Self {
2674 self.alias = input;
2675 self
2676 }
2677 pub fn build(self) -> crate::model::PartyInviteAlias {
2679 crate::model::PartyInviteAlias {
2680 namespace_id: self.namespace_id,
2681 alias: self.alias,
2682 }
2683 }
2684 }
2685}
2686impl PartyInviteAlias {
2687 pub fn builder() -> crate::model::party_invite_alias::Builder {
2689 crate::model::party_invite_alias::Builder::default()
2690 }
2691}