1#[non_exhaustive]
4#[derive(std::clone::Clone, std::cmp::PartialEq)]
5pub struct GroupHandle {
6 pub group_id: std::option::Option<std::string::String>,
8 pub display_name: std::option::Option<std::string::String>,
10 pub avatar_url: std::option::Option<std::string::String>,
12 pub external: std::option::Option<crate::model::GroupExternalLinks>,
14 pub is_developer: std::option::Option<bool>,
16}
17impl GroupHandle {
18 pub fn group_id(&self) -> std::option::Option<&str> {
20 self.group_id.as_deref()
21 }
22 pub fn display_name(&self) -> std::option::Option<&str> {
24 self.display_name.as_deref()
25 }
26 pub fn avatar_url(&self) -> std::option::Option<&str> {
28 self.avatar_url.as_deref()
29 }
30 pub fn external(&self) -> std::option::Option<&crate::model::GroupExternalLinks> {
32 self.external.as_ref()
33 }
34 pub fn is_developer(&self) -> std::option::Option<bool> {
36 self.is_developer
37 }
38}
39impl std::fmt::Debug for GroupHandle {
40 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
41 let mut formatter = f.debug_struct("GroupHandle");
42 formatter.field("group_id", &self.group_id);
43 formatter.field("display_name", &self.display_name);
44 formatter.field("avatar_url", &self.avatar_url);
45 formatter.field("external", &self.external);
46 formatter.field("is_developer", &self.is_developer);
47 formatter.finish()
48 }
49}
50pub mod group_handle {
52 #[non_exhaustive]
54 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
55 pub struct Builder {
56 pub(crate) group_id: std::option::Option<std::string::String>,
57 pub(crate) display_name: std::option::Option<std::string::String>,
58 pub(crate) avatar_url: std::option::Option<std::string::String>,
59 pub(crate) external: std::option::Option<crate::model::GroupExternalLinks>,
60 pub(crate) is_developer: std::option::Option<bool>,
61 }
62 impl Builder {
63 pub fn group_id(mut self, input: impl Into<std::string::String>) -> Self {
65 self.group_id = Some(input.into());
66 self
67 }
68 pub fn set_group_id(mut self, input: std::option::Option<std::string::String>) -> Self {
70 self.group_id = input;
71 self
72 }
73 pub fn display_name(mut self, input: impl Into<std::string::String>) -> Self {
75 self.display_name = Some(input.into());
76 self
77 }
78 pub fn set_display_name(mut self, input: std::option::Option<std::string::String>) -> Self {
80 self.display_name = input;
81 self
82 }
83 pub fn avatar_url(mut self, input: impl Into<std::string::String>) -> Self {
85 self.avatar_url = Some(input.into());
86 self
87 }
88 pub fn set_avatar_url(mut self, input: std::option::Option<std::string::String>) -> Self {
90 self.avatar_url = input;
91 self
92 }
93 pub fn external(mut self, input: crate::model::GroupExternalLinks) -> Self {
95 self.external = Some(input);
96 self
97 }
98 pub fn set_external(
100 mut self,
101 input: std::option::Option<crate::model::GroupExternalLinks>,
102 ) -> Self {
103 self.external = input;
104 self
105 }
106 pub fn is_developer(mut self, input: bool) -> Self {
108 self.is_developer = Some(input);
109 self
110 }
111 pub fn set_is_developer(mut self, input: std::option::Option<bool>) -> Self {
113 self.is_developer = input;
114 self
115 }
116 pub fn build(self) -> crate::model::GroupHandle {
118 crate::model::GroupHandle {
119 group_id: self.group_id,
120 display_name: self.display_name,
121 avatar_url: self.avatar_url,
122 external: self.external,
123 is_developer: self.is_developer,
124 }
125 }
126 }
127}
128impl GroupHandle {
129 pub fn builder() -> crate::model::group_handle::Builder {
131 crate::model::group_handle::Builder::default()
132 }
133}
134
135#[non_exhaustive]
137#[derive(std::clone::Clone, std::cmp::PartialEq)]
138pub struct GroupExternalLinks {
139 pub profile: std::option::Option<std::string::String>,
141 pub chat: std::option::Option<std::string::String>,
143}
144impl GroupExternalLinks {
145 pub fn profile(&self) -> std::option::Option<&str> {
147 self.profile.as_deref()
148 }
149 pub fn chat(&self) -> std::option::Option<&str> {
151 self.chat.as_deref()
152 }
153}
154impl std::fmt::Debug for GroupExternalLinks {
155 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
156 let mut formatter = f.debug_struct("GroupExternalLinks");
157 formatter.field("profile", &self.profile);
158 formatter.field("chat", &self.chat);
159 formatter.finish()
160 }
161}
162pub mod group_external_links {
164 #[non_exhaustive]
166 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
167 pub struct Builder {
168 pub(crate) profile: std::option::Option<std::string::String>,
169 pub(crate) chat: std::option::Option<std::string::String>,
170 }
171 impl Builder {
172 pub fn profile(mut self, input: impl Into<std::string::String>) -> Self {
174 self.profile = Some(input.into());
175 self
176 }
177 pub fn set_profile(mut self, input: std::option::Option<std::string::String>) -> Self {
179 self.profile = input;
180 self
181 }
182 pub fn chat(mut self, input: impl Into<std::string::String>) -> Self {
184 self.chat = Some(input.into());
185 self
186 }
187 pub fn set_chat(mut self, input: std::option::Option<std::string::String>) -> Self {
189 self.chat = input;
190 self
191 }
192 pub fn build(self) -> crate::model::GroupExternalLinks {
194 crate::model::GroupExternalLinks {
195 profile: self.profile,
196 chat: self.chat,
197 }
198 }
199 }
200}
201impl GroupExternalLinks {
202 pub fn builder() -> crate::model::group_external_links::Builder {
204 crate::model::group_external_links::Builder::default()
205 }
206}
207
208#[non_exhaustive]
210#[derive(std::clone::Clone, std::cmp::PartialEq)]
211pub struct UploadPresignedRequest {
212 pub path: std::option::Option<std::string::String>,
214 pub url: std::option::Option<std::string::String>,
216}
217impl UploadPresignedRequest {
218 pub fn path(&self) -> std::option::Option<&str> {
220 self.path.as_deref()
221 }
222 pub fn url(&self) -> std::option::Option<&str> {
224 self.url.as_deref()
225 }
226}
227impl std::fmt::Debug for UploadPresignedRequest {
228 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
229 let mut formatter = f.debug_struct("UploadPresignedRequest");
230 formatter.field("path", &self.path);
231 formatter.field("url", &self.url);
232 formatter.finish()
233 }
234}
235pub mod upload_presigned_request {
237 #[non_exhaustive]
239 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
240 pub struct Builder {
241 pub(crate) path: std::option::Option<std::string::String>,
242 pub(crate) url: std::option::Option<std::string::String>,
243 }
244 impl Builder {
245 pub fn path(mut self, input: impl Into<std::string::String>) -> Self {
247 self.path = Some(input.into());
248 self
249 }
250 pub fn set_path(mut self, input: std::option::Option<std::string::String>) -> Self {
252 self.path = input;
253 self
254 }
255 pub fn url(mut self, input: impl Into<std::string::String>) -> Self {
257 self.url = Some(input.into());
258 self
259 }
260 pub fn set_url(mut self, input: std::option::Option<std::string::String>) -> Self {
262 self.url = input;
263 self
264 }
265 pub fn build(self) -> crate::model::UploadPresignedRequest {
267 crate::model::UploadPresignedRequest {
268 path: self.path,
269 url: self.url,
270 }
271 }
272 }
273}
274impl UploadPresignedRequest {
275 pub fn builder() -> crate::model::upload_presigned_request::Builder {
277 crate::model::upload_presigned_request::Builder::default()
278 }
279}
280
281#[non_exhaustive]
283#[derive(std::clone::Clone, std::cmp::PartialEq)]
284pub struct ValidationError {
285 pub path: std::option::Option<std::vec::Vec<std::string::String>>,
287}
288impl ValidationError {
289 pub fn path(&self) -> std::option::Option<&[std::string::String]> {
291 self.path.as_deref()
292 }
293}
294impl std::fmt::Debug for ValidationError {
295 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
296 let mut formatter = f.debug_struct("ValidationError");
297 formatter.field("path", &self.path);
298 formatter.finish()
299 }
300}
301pub mod validation_error {
303 #[non_exhaustive]
305 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
306 pub struct Builder {
307 pub(crate) path: std::option::Option<std::vec::Vec<std::string::String>>,
308 }
309 impl Builder {
310 pub fn path(mut self, input: impl Into<std::string::String>) -> Self {
316 let mut v = self.path.unwrap_or_default();
317 v.push(input.into());
318 self.path = Some(v);
319 self
320 }
321 pub fn set_path(
323 mut self,
324 input: std::option::Option<std::vec::Vec<std::string::String>>,
325 ) -> Self {
326 self.path = input;
327 self
328 }
329 pub fn build(self) -> crate::model::ValidationError {
331 crate::model::ValidationError { path: self.path }
332 }
333 }
334}
335impl ValidationError {
336 pub fn builder() -> crate::model::validation_error::Builder {
338 crate::model::validation_error::Builder::default()
339 }
340}
341
342#[non_exhaustive]
344#[derive(
345 std::clone::Clone,
346 std::cmp::Eq,
347 std::cmp::Ord,
348 std::cmp::PartialEq,
349 std::cmp::PartialOrd,
350 std::fmt::Debug,
351 std::hash::Hash,
352)]
353pub enum GroupPublicity {
354 #[allow(missing_docs)] Closed,
356 #[allow(missing_docs)] Open,
358 Unknown(String),
360}
361impl std::convert::From<&str> for GroupPublicity {
362 fn from(s: &str) -> Self {
363 match s {
364 "closed" => GroupPublicity::Closed,
365 "open" => GroupPublicity::Open,
366 other => GroupPublicity::Unknown(other.to_owned()),
367 }
368 }
369}
370impl std::str::FromStr for GroupPublicity {
371 type Err = std::convert::Infallible;
372
373 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
374 Ok(GroupPublicity::from(s))
375 }
376}
377impl GroupPublicity {
378 pub fn as_str(&self) -> &str {
380 match self {
381 GroupPublicity::Closed => "closed",
382 GroupPublicity::Open => "open",
383 GroupPublicity::Unknown(s) => s.as_ref(),
384 }
385 }
386 pub fn values() -> &'static [&'static str] {
388 &["closed", "open"]
389 }
390}
391impl AsRef<str> for GroupPublicity {
392 fn as_ref(&self) -> &str {
393 self.as_str()
394 }
395}
396
397#[non_exhaustive]
399#[derive(std::clone::Clone, std::cmp::PartialEq)]
400pub struct GroupSummary {
401 pub group_id: std::option::Option<std::string::String>,
403 pub display_name: std::option::Option<std::string::String>,
405 pub avatar_url: std::option::Option<std::string::String>,
407 pub external: std::option::Option<crate::model::GroupExternalLinks>,
409 pub is_developer: std::option::Option<bool>,
411 pub bio: std::option::Option<std::string::String>,
413 pub is_current_identity_member: std::option::Option<bool>,
415 pub publicity: std::option::Option<crate::model::GroupPublicity>,
417 pub member_count: std::option::Option<i32>,
419}
420impl GroupSummary {
421 pub fn group_id(&self) -> std::option::Option<&str> {
423 self.group_id.as_deref()
424 }
425 pub fn display_name(&self) -> std::option::Option<&str> {
427 self.display_name.as_deref()
428 }
429 pub fn avatar_url(&self) -> std::option::Option<&str> {
431 self.avatar_url.as_deref()
432 }
433 pub fn external(&self) -> std::option::Option<&crate::model::GroupExternalLinks> {
435 self.external.as_ref()
436 }
437 pub fn is_developer(&self) -> std::option::Option<bool> {
439 self.is_developer
440 }
441 pub fn bio(&self) -> std::option::Option<&str> {
443 self.bio.as_deref()
444 }
445 pub fn is_current_identity_member(&self) -> std::option::Option<bool> {
447 self.is_current_identity_member
448 }
449 pub fn publicity(&self) -> std::option::Option<&crate::model::GroupPublicity> {
451 self.publicity.as_ref()
452 }
453 pub fn member_count(&self) -> std::option::Option<i32> {
455 self.member_count
456 }
457}
458impl std::fmt::Debug for GroupSummary {
459 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
460 let mut formatter = f.debug_struct("GroupSummary");
461 formatter.field("group_id", &self.group_id);
462 formatter.field("display_name", &self.display_name);
463 formatter.field("avatar_url", &self.avatar_url);
464 formatter.field("external", &self.external);
465 formatter.field("is_developer", &self.is_developer);
466 formatter.field("bio", &self.bio);
467 formatter.field(
468 "is_current_identity_member",
469 &self.is_current_identity_member,
470 );
471 formatter.field("publicity", &self.publicity);
472 formatter.field("member_count", &self.member_count);
473 formatter.finish()
474 }
475}
476pub mod group_summary {
478 #[non_exhaustive]
480 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
481 pub struct Builder {
482 pub(crate) group_id: std::option::Option<std::string::String>,
483 pub(crate) display_name: std::option::Option<std::string::String>,
484 pub(crate) avatar_url: std::option::Option<std::string::String>,
485 pub(crate) external: std::option::Option<crate::model::GroupExternalLinks>,
486 pub(crate) is_developer: std::option::Option<bool>,
487 pub(crate) bio: std::option::Option<std::string::String>,
488 pub(crate) is_current_identity_member: std::option::Option<bool>,
489 pub(crate) publicity: std::option::Option<crate::model::GroupPublicity>,
490 pub(crate) member_count: std::option::Option<i32>,
491 }
492 impl Builder {
493 pub fn group_id(mut self, input: impl Into<std::string::String>) -> Self {
495 self.group_id = Some(input.into());
496 self
497 }
498 pub fn set_group_id(mut self, input: std::option::Option<std::string::String>) -> Self {
500 self.group_id = input;
501 self
502 }
503 pub fn display_name(mut self, input: impl Into<std::string::String>) -> Self {
505 self.display_name = Some(input.into());
506 self
507 }
508 pub fn set_display_name(mut self, input: std::option::Option<std::string::String>) -> Self {
510 self.display_name = input;
511 self
512 }
513 pub fn avatar_url(mut self, input: impl Into<std::string::String>) -> Self {
515 self.avatar_url = Some(input.into());
516 self
517 }
518 pub fn set_avatar_url(mut self, input: std::option::Option<std::string::String>) -> Self {
520 self.avatar_url = input;
521 self
522 }
523 pub fn external(mut self, input: crate::model::GroupExternalLinks) -> Self {
525 self.external = Some(input);
526 self
527 }
528 pub fn set_external(
530 mut self,
531 input: std::option::Option<crate::model::GroupExternalLinks>,
532 ) -> Self {
533 self.external = input;
534 self
535 }
536 pub fn is_developer(mut self, input: bool) -> Self {
538 self.is_developer = Some(input);
539 self
540 }
541 pub fn set_is_developer(mut self, input: std::option::Option<bool>) -> Self {
543 self.is_developer = input;
544 self
545 }
546 pub fn bio(mut self, input: impl Into<std::string::String>) -> Self {
548 self.bio = Some(input.into());
549 self
550 }
551 pub fn set_bio(mut self, input: std::option::Option<std::string::String>) -> Self {
553 self.bio = input;
554 self
555 }
556 pub fn is_current_identity_member(mut self, input: bool) -> Self {
558 self.is_current_identity_member = Some(input);
559 self
560 }
561 pub fn set_is_current_identity_member(mut self, input: std::option::Option<bool>) -> Self {
563 self.is_current_identity_member = input;
564 self
565 }
566 pub fn publicity(mut self, input: crate::model::GroupPublicity) -> Self {
568 self.publicity = Some(input);
569 self
570 }
571 pub fn set_publicity(
573 mut self,
574 input: std::option::Option<crate::model::GroupPublicity>,
575 ) -> Self {
576 self.publicity = input;
577 self
578 }
579 pub fn member_count(mut self, input: i32) -> Self {
581 self.member_count = Some(input);
582 self
583 }
584 pub fn set_member_count(mut self, input: std::option::Option<i32>) -> Self {
586 self.member_count = input;
587 self
588 }
589 pub fn build(self) -> crate::model::GroupSummary {
591 crate::model::GroupSummary {
592 group_id: self.group_id,
593 display_name: self.display_name,
594 avatar_url: self.avatar_url,
595 external: self.external,
596 is_developer: self.is_developer,
597 bio: self.bio,
598 is_current_identity_member: self.is_current_identity_member,
599 publicity: self.publicity,
600 member_count: self.member_count,
601 }
602 }
603 }
604}
605impl GroupSummary {
606 pub fn builder() -> crate::model::group_summary::Builder {
608 crate::model::group_summary::Builder::default()
609 }
610}
611
612#[non_exhaustive]
614#[derive(std::clone::Clone, std::cmp::PartialEq)]
615pub struct WatchResponse {
616 pub index: std::option::Option<std::string::String>,
618}
619impl WatchResponse {
620 pub fn index(&self) -> std::option::Option<&str> {
622 self.index.as_deref()
623 }
624}
625impl std::fmt::Debug for WatchResponse {
626 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
627 let mut formatter = f.debug_struct("WatchResponse");
628 formatter.field("index", &self.index);
629 formatter.finish()
630 }
631}
632pub mod watch_response {
634 #[non_exhaustive]
636 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
637 pub struct Builder {
638 pub(crate) index: std::option::Option<std::string::String>,
639 }
640 impl Builder {
641 pub fn index(mut self, input: impl Into<std::string::String>) -> Self {
643 self.index = Some(input.into());
644 self
645 }
646 pub fn set_index(mut self, input: std::option::Option<std::string::String>) -> Self {
648 self.index = input;
649 self
650 }
651 pub fn build(self) -> crate::model::WatchResponse {
653 crate::model::WatchResponse { index: self.index }
654 }
655 }
656}
657impl WatchResponse {
658 pub fn builder() -> crate::model::watch_response::Builder {
660 crate::model::watch_response::Builder::default()
661 }
662}
663
664#[non_exhaustive]
666#[derive(std::clone::Clone, std::cmp::PartialEq)]
667pub struct GroupProfile {
668 pub group_id: std::option::Option<std::string::String>,
670 pub display_name: std::option::Option<std::string::String>,
672 pub avatar_url: std::option::Option<std::string::String>,
674 pub external: std::option::Option<crate::model::GroupExternalLinks>,
676 pub is_developer: std::option::Option<bool>,
678 pub bio: std::option::Option<std::string::String>,
680 pub is_current_identity_member: std::option::Option<bool>,
682 pub publicity: std::option::Option<crate::model::GroupPublicity>,
684 pub member_count: std::option::Option<i32>,
686 pub members: std::option::Option<std::vec::Vec<crate::model::GroupMember>>,
688 pub join_requests: std::option::Option<std::vec::Vec<crate::model::GroupJoinRequest>>,
690 pub is_current_identity_requesting_join: std::option::Option<bool>,
692 pub owner_identity_id: std::option::Option<std::string::String>,
694 pub thread_id: std::option::Option<std::string::String>,
696}
697impl GroupProfile {
698 pub fn group_id(&self) -> std::option::Option<&str> {
700 self.group_id.as_deref()
701 }
702 pub fn display_name(&self) -> std::option::Option<&str> {
704 self.display_name.as_deref()
705 }
706 pub fn avatar_url(&self) -> std::option::Option<&str> {
708 self.avatar_url.as_deref()
709 }
710 pub fn external(&self) -> std::option::Option<&crate::model::GroupExternalLinks> {
712 self.external.as_ref()
713 }
714 pub fn is_developer(&self) -> std::option::Option<bool> {
716 self.is_developer
717 }
718 pub fn bio(&self) -> std::option::Option<&str> {
720 self.bio.as_deref()
721 }
722 pub fn is_current_identity_member(&self) -> std::option::Option<bool> {
724 self.is_current_identity_member
725 }
726 pub fn publicity(&self) -> std::option::Option<&crate::model::GroupPublicity> {
728 self.publicity.as_ref()
729 }
730 pub fn member_count(&self) -> std::option::Option<i32> {
732 self.member_count
733 }
734 pub fn members(&self) -> std::option::Option<&[crate::model::GroupMember]> {
736 self.members.as_deref()
737 }
738 pub fn join_requests(&self) -> std::option::Option<&[crate::model::GroupJoinRequest]> {
740 self.join_requests.as_deref()
741 }
742 pub fn is_current_identity_requesting_join(&self) -> std::option::Option<bool> {
744 self.is_current_identity_requesting_join
745 }
746 pub fn owner_identity_id(&self) -> std::option::Option<&str> {
748 self.owner_identity_id.as_deref()
749 }
750 pub fn thread_id(&self) -> std::option::Option<&str> {
752 self.thread_id.as_deref()
753 }
754}
755impl std::fmt::Debug for GroupProfile {
756 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
757 let mut formatter = f.debug_struct("GroupProfile");
758 formatter.field("group_id", &self.group_id);
759 formatter.field("display_name", &self.display_name);
760 formatter.field("avatar_url", &self.avatar_url);
761 formatter.field("external", &self.external);
762 formatter.field("is_developer", &self.is_developer);
763 formatter.field("bio", &self.bio);
764 formatter.field(
765 "is_current_identity_member",
766 &self.is_current_identity_member,
767 );
768 formatter.field("publicity", &self.publicity);
769 formatter.field("member_count", &self.member_count);
770 formatter.field("members", &self.members);
771 formatter.field("join_requests", &self.join_requests);
772 formatter.field(
773 "is_current_identity_requesting_join",
774 &self.is_current_identity_requesting_join,
775 );
776 formatter.field("owner_identity_id", &self.owner_identity_id);
777 formatter.field("thread_id", &self.thread_id);
778 formatter.finish()
779 }
780}
781pub mod group_profile {
783 #[non_exhaustive]
785 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
786 pub struct Builder {
787 pub(crate) group_id: std::option::Option<std::string::String>,
788 pub(crate) display_name: std::option::Option<std::string::String>,
789 pub(crate) avatar_url: std::option::Option<std::string::String>,
790 pub(crate) external: std::option::Option<crate::model::GroupExternalLinks>,
791 pub(crate) is_developer: std::option::Option<bool>,
792 pub(crate) bio: std::option::Option<std::string::String>,
793 pub(crate) is_current_identity_member: std::option::Option<bool>,
794 pub(crate) publicity: std::option::Option<crate::model::GroupPublicity>,
795 pub(crate) member_count: std::option::Option<i32>,
796 pub(crate) members: std::option::Option<std::vec::Vec<crate::model::GroupMember>>,
797 pub(crate) join_requests:
798 std::option::Option<std::vec::Vec<crate::model::GroupJoinRequest>>,
799 pub(crate) is_current_identity_requesting_join: std::option::Option<bool>,
800 pub(crate) owner_identity_id: std::option::Option<std::string::String>,
801 pub(crate) thread_id: std::option::Option<std::string::String>,
802 }
803 impl Builder {
804 pub fn group_id(mut self, input: impl Into<std::string::String>) -> Self {
806 self.group_id = Some(input.into());
807 self
808 }
809 pub fn set_group_id(mut self, input: std::option::Option<std::string::String>) -> Self {
811 self.group_id = input;
812 self
813 }
814 pub fn display_name(mut self, input: impl Into<std::string::String>) -> Self {
816 self.display_name = Some(input.into());
817 self
818 }
819 pub fn set_display_name(mut self, input: std::option::Option<std::string::String>) -> Self {
821 self.display_name = input;
822 self
823 }
824 pub fn avatar_url(mut self, input: impl Into<std::string::String>) -> Self {
826 self.avatar_url = Some(input.into());
827 self
828 }
829 pub fn set_avatar_url(mut self, input: std::option::Option<std::string::String>) -> Self {
831 self.avatar_url = input;
832 self
833 }
834 pub fn external(mut self, input: crate::model::GroupExternalLinks) -> Self {
836 self.external = Some(input);
837 self
838 }
839 pub fn set_external(
841 mut self,
842 input: std::option::Option<crate::model::GroupExternalLinks>,
843 ) -> Self {
844 self.external = input;
845 self
846 }
847 pub fn is_developer(mut self, input: bool) -> Self {
849 self.is_developer = Some(input);
850 self
851 }
852 pub fn set_is_developer(mut self, input: std::option::Option<bool>) -> Self {
854 self.is_developer = input;
855 self
856 }
857 pub fn bio(mut self, input: impl Into<std::string::String>) -> Self {
859 self.bio = Some(input.into());
860 self
861 }
862 pub fn set_bio(mut self, input: std::option::Option<std::string::String>) -> Self {
864 self.bio = input;
865 self
866 }
867 pub fn is_current_identity_member(mut self, input: bool) -> Self {
869 self.is_current_identity_member = Some(input);
870 self
871 }
872 pub fn set_is_current_identity_member(mut self, input: std::option::Option<bool>) -> Self {
874 self.is_current_identity_member = input;
875 self
876 }
877 pub fn publicity(mut self, input: crate::model::GroupPublicity) -> Self {
879 self.publicity = Some(input);
880 self
881 }
882 pub fn set_publicity(
884 mut self,
885 input: std::option::Option<crate::model::GroupPublicity>,
886 ) -> Self {
887 self.publicity = input;
888 self
889 }
890 pub fn member_count(mut self, input: i32) -> Self {
892 self.member_count = Some(input);
893 self
894 }
895 pub fn set_member_count(mut self, input: std::option::Option<i32>) -> Self {
897 self.member_count = input;
898 self
899 }
900 pub fn members(mut self, input: crate::model::GroupMember) -> Self {
906 let mut v = self.members.unwrap_or_default();
907 v.push(input);
908 self.members = Some(v);
909 self
910 }
911 pub fn set_members(
913 mut self,
914 input: std::option::Option<std::vec::Vec<crate::model::GroupMember>>,
915 ) -> Self {
916 self.members = input;
917 self
918 }
919 pub fn join_requests(mut self, input: crate::model::GroupJoinRequest) -> Self {
925 let mut v = self.join_requests.unwrap_or_default();
926 v.push(input);
927 self.join_requests = Some(v);
928 self
929 }
930 pub fn set_join_requests(
932 mut self,
933 input: std::option::Option<std::vec::Vec<crate::model::GroupJoinRequest>>,
934 ) -> Self {
935 self.join_requests = input;
936 self
937 }
938 pub fn is_current_identity_requesting_join(mut self, input: bool) -> Self {
940 self.is_current_identity_requesting_join = Some(input);
941 self
942 }
943 pub fn set_is_current_identity_requesting_join(
945 mut self,
946 input: std::option::Option<bool>,
947 ) -> Self {
948 self.is_current_identity_requesting_join = input;
949 self
950 }
951 pub fn owner_identity_id(mut self, input: impl Into<std::string::String>) -> Self {
953 self.owner_identity_id = Some(input.into());
954 self
955 }
956 pub fn set_owner_identity_id(
958 mut self,
959 input: std::option::Option<std::string::String>,
960 ) -> Self {
961 self.owner_identity_id = input;
962 self
963 }
964 pub fn thread_id(mut self, input: impl Into<std::string::String>) -> Self {
966 self.thread_id = Some(input.into());
967 self
968 }
969 pub fn set_thread_id(mut self, input: std::option::Option<std::string::String>) -> Self {
971 self.thread_id = input;
972 self
973 }
974 pub fn build(self) -> crate::model::GroupProfile {
976 crate::model::GroupProfile {
977 group_id: self.group_id,
978 display_name: self.display_name,
979 avatar_url: self.avatar_url,
980 external: self.external,
981 is_developer: self.is_developer,
982 bio: self.bio,
983 is_current_identity_member: self.is_current_identity_member,
984 publicity: self.publicity,
985 member_count: self.member_count,
986 members: self.members,
987 join_requests: self.join_requests,
988 is_current_identity_requesting_join: self.is_current_identity_requesting_join,
989 owner_identity_id: self.owner_identity_id,
990 thread_id: self.thread_id,
991 }
992 }
993 }
994}
995impl GroupProfile {
996 pub fn builder() -> crate::model::group_profile::Builder {
998 crate::model::group_profile::Builder::default()
999 }
1000}
1001
1002#[non_exhaustive]
1004#[derive(std::clone::Clone, std::cmp::PartialEq)]
1005pub struct GroupJoinRequest {
1006 pub identity: std::option::Option<crate::model::IdentityHandle>,
1008 pub ts: std::option::Option<aws_smithy_types::DateTime>,
1010}
1011impl GroupJoinRequest {
1012 pub fn identity(&self) -> std::option::Option<&crate::model::IdentityHandle> {
1014 self.identity.as_ref()
1015 }
1016 pub fn ts(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
1018 self.ts.as_ref()
1019 }
1020}
1021impl std::fmt::Debug for GroupJoinRequest {
1022 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1023 let mut formatter = f.debug_struct("GroupJoinRequest");
1024 formatter.field("identity", &self.identity);
1025 formatter.field("ts", &self.ts);
1026 formatter.finish()
1027 }
1028}
1029pub mod group_join_request {
1031 #[non_exhaustive]
1033 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1034 pub struct Builder {
1035 pub(crate) identity: std::option::Option<crate::model::IdentityHandle>,
1036 pub(crate) ts: std::option::Option<aws_smithy_types::DateTime>,
1037 }
1038 impl Builder {
1039 pub fn identity(mut self, input: crate::model::IdentityHandle) -> Self {
1041 self.identity = Some(input);
1042 self
1043 }
1044 pub fn set_identity(
1046 mut self,
1047 input: std::option::Option<crate::model::IdentityHandle>,
1048 ) -> Self {
1049 self.identity = input;
1050 self
1051 }
1052 pub fn ts(mut self, input: aws_smithy_types::DateTime) -> Self {
1054 self.ts = Some(input);
1055 self
1056 }
1057 pub fn set_ts(mut self, input: std::option::Option<aws_smithy_types::DateTime>) -> Self {
1059 self.ts = input;
1060 self
1061 }
1062 pub fn build(self) -> crate::model::GroupJoinRequest {
1064 crate::model::GroupJoinRequest {
1065 identity: self.identity,
1066 ts: self.ts,
1067 }
1068 }
1069 }
1070}
1071impl GroupJoinRequest {
1072 pub fn builder() -> crate::model::group_join_request::Builder {
1074 crate::model::group_join_request::Builder::default()
1075 }
1076}
1077
1078#[non_exhaustive]
1080#[derive(std::clone::Clone, std::cmp::PartialEq)]
1081pub struct IdentityHandle {
1082 pub identity_id: std::option::Option<std::string::String>,
1084 pub display_name: std::option::Option<std::string::String>,
1086 pub account_number: std::option::Option<i32>,
1088 pub avatar_url: std::option::Option<std::string::String>,
1090 pub presence: std::option::Option<crate::model::IdentityPresence>,
1092 pub party: std::option::Option<crate::model::PartyHandle>,
1094 pub is_registered: std::option::Option<bool>,
1096 pub external: std::option::Option<crate::model::IdentityExternalLinks>,
1098}
1099impl IdentityHandle {
1100 pub fn identity_id(&self) -> std::option::Option<&str> {
1102 self.identity_id.as_deref()
1103 }
1104 pub fn display_name(&self) -> std::option::Option<&str> {
1106 self.display_name.as_deref()
1107 }
1108 pub fn account_number(&self) -> std::option::Option<i32> {
1110 self.account_number
1111 }
1112 pub fn avatar_url(&self) -> std::option::Option<&str> {
1114 self.avatar_url.as_deref()
1115 }
1116 pub fn presence(&self) -> std::option::Option<&crate::model::IdentityPresence> {
1118 self.presence.as_ref()
1119 }
1120 pub fn party(&self) -> std::option::Option<&crate::model::PartyHandle> {
1122 self.party.as_ref()
1123 }
1124 pub fn is_registered(&self) -> std::option::Option<bool> {
1126 self.is_registered
1127 }
1128 pub fn external(&self) -> std::option::Option<&crate::model::IdentityExternalLinks> {
1130 self.external.as_ref()
1131 }
1132}
1133impl std::fmt::Debug for IdentityHandle {
1134 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1135 let mut formatter = f.debug_struct("IdentityHandle");
1136 formatter.field("identity_id", &self.identity_id);
1137 formatter.field("display_name", &self.display_name);
1138 formatter.field("account_number", &self.account_number);
1139 formatter.field("avatar_url", &self.avatar_url);
1140 formatter.field("presence", &self.presence);
1141 formatter.field("party", &self.party);
1142 formatter.field("is_registered", &self.is_registered);
1143 formatter.field("external", &self.external);
1144 formatter.finish()
1145 }
1146}
1147pub mod identity_handle {
1149 #[non_exhaustive]
1151 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1152 pub struct Builder {
1153 pub(crate) identity_id: std::option::Option<std::string::String>,
1154 pub(crate) display_name: std::option::Option<std::string::String>,
1155 pub(crate) account_number: std::option::Option<i32>,
1156 pub(crate) avatar_url: std::option::Option<std::string::String>,
1157 pub(crate) presence: std::option::Option<crate::model::IdentityPresence>,
1158 pub(crate) party: std::option::Option<crate::model::PartyHandle>,
1159 pub(crate) is_registered: std::option::Option<bool>,
1160 pub(crate) external: std::option::Option<crate::model::IdentityExternalLinks>,
1161 }
1162 impl Builder {
1163 pub fn identity_id(mut self, input: impl Into<std::string::String>) -> Self {
1165 self.identity_id = Some(input.into());
1166 self
1167 }
1168 pub fn set_identity_id(mut self, input: std::option::Option<std::string::String>) -> Self {
1170 self.identity_id = input;
1171 self
1172 }
1173 pub fn display_name(mut self, input: impl Into<std::string::String>) -> Self {
1175 self.display_name = Some(input.into());
1176 self
1177 }
1178 pub fn set_display_name(mut self, input: std::option::Option<std::string::String>) -> Self {
1180 self.display_name = input;
1181 self
1182 }
1183 pub fn account_number(mut self, input: i32) -> Self {
1185 self.account_number = Some(input);
1186 self
1187 }
1188 pub fn set_account_number(mut self, input: std::option::Option<i32>) -> Self {
1190 self.account_number = input;
1191 self
1192 }
1193 pub fn avatar_url(mut self, input: impl Into<std::string::String>) -> Self {
1195 self.avatar_url = Some(input.into());
1196 self
1197 }
1198 pub fn set_avatar_url(mut self, input: std::option::Option<std::string::String>) -> Self {
1200 self.avatar_url = input;
1201 self
1202 }
1203 pub fn presence(mut self, input: crate::model::IdentityPresence) -> Self {
1205 self.presence = Some(input);
1206 self
1207 }
1208 pub fn set_presence(
1210 mut self,
1211 input: std::option::Option<crate::model::IdentityPresence>,
1212 ) -> Self {
1213 self.presence = input;
1214 self
1215 }
1216 pub fn party(mut self, input: crate::model::PartyHandle) -> Self {
1218 self.party = Some(input);
1219 self
1220 }
1221 pub fn set_party(mut self, input: std::option::Option<crate::model::PartyHandle>) -> Self {
1223 self.party = input;
1224 self
1225 }
1226 pub fn is_registered(mut self, input: bool) -> Self {
1228 self.is_registered = Some(input);
1229 self
1230 }
1231 pub fn set_is_registered(mut self, input: std::option::Option<bool>) -> Self {
1233 self.is_registered = input;
1234 self
1235 }
1236 pub fn external(mut self, input: crate::model::IdentityExternalLinks) -> Self {
1238 self.external = Some(input);
1239 self
1240 }
1241 pub fn set_external(
1243 mut self,
1244 input: std::option::Option<crate::model::IdentityExternalLinks>,
1245 ) -> Self {
1246 self.external = input;
1247 self
1248 }
1249 pub fn build(self) -> crate::model::IdentityHandle {
1251 crate::model::IdentityHandle {
1252 identity_id: self.identity_id,
1253 display_name: self.display_name,
1254 account_number: self.account_number,
1255 avatar_url: self.avatar_url,
1256 presence: self.presence,
1257 party: self.party,
1258 is_registered: self.is_registered,
1259 external: self.external,
1260 }
1261 }
1262 }
1263}
1264impl IdentityHandle {
1265 pub fn builder() -> crate::model::identity_handle::Builder {
1267 crate::model::identity_handle::Builder::default()
1268 }
1269}
1270
1271#[non_exhaustive]
1273#[derive(std::clone::Clone, std::cmp::PartialEq)]
1274pub struct IdentityExternalLinks {
1275 pub profile: std::option::Option<std::string::String>,
1277 pub settings: std::option::Option<std::string::String>,
1279 pub chat: std::option::Option<std::string::String>,
1281}
1282impl IdentityExternalLinks {
1283 pub fn profile(&self) -> std::option::Option<&str> {
1285 self.profile.as_deref()
1286 }
1287 pub fn settings(&self) -> std::option::Option<&str> {
1289 self.settings.as_deref()
1290 }
1291 pub fn chat(&self) -> std::option::Option<&str> {
1293 self.chat.as_deref()
1294 }
1295}
1296impl std::fmt::Debug for IdentityExternalLinks {
1297 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1298 let mut formatter = f.debug_struct("IdentityExternalLinks");
1299 formatter.field("profile", &self.profile);
1300 formatter.field("settings", &self.settings);
1301 formatter.field("chat", &self.chat);
1302 formatter.finish()
1303 }
1304}
1305pub mod identity_external_links {
1307 #[non_exhaustive]
1309 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1310 pub struct Builder {
1311 pub(crate) profile: std::option::Option<std::string::String>,
1312 pub(crate) settings: std::option::Option<std::string::String>,
1313 pub(crate) chat: std::option::Option<std::string::String>,
1314 }
1315 impl Builder {
1316 pub fn profile(mut self, input: impl Into<std::string::String>) -> Self {
1318 self.profile = Some(input.into());
1319 self
1320 }
1321 pub fn set_profile(mut self, input: std::option::Option<std::string::String>) -> Self {
1323 self.profile = input;
1324 self
1325 }
1326 pub fn settings(mut self, input: impl Into<std::string::String>) -> Self {
1328 self.settings = Some(input.into());
1329 self
1330 }
1331 pub fn set_settings(mut self, input: std::option::Option<std::string::String>) -> Self {
1333 self.settings = input;
1334 self
1335 }
1336 pub fn chat(mut self, input: impl Into<std::string::String>) -> Self {
1338 self.chat = Some(input.into());
1339 self
1340 }
1341 pub fn set_chat(mut self, input: std::option::Option<std::string::String>) -> Self {
1343 self.chat = input;
1344 self
1345 }
1346 pub fn build(self) -> crate::model::IdentityExternalLinks {
1348 crate::model::IdentityExternalLinks {
1349 profile: self.profile,
1350 settings: self.settings,
1351 chat: self.chat,
1352 }
1353 }
1354 }
1355}
1356impl IdentityExternalLinks {
1357 pub fn builder() -> crate::model::identity_external_links::Builder {
1359 crate::model::identity_external_links::Builder::default()
1360 }
1361}
1362
1363#[non_exhaustive]
1365#[derive(std::clone::Clone, std::cmp::PartialEq)]
1366pub struct PartyHandle {
1367 pub party_id: std::option::Option<std::string::String>,
1369 pub create_ts: std::option::Option<aws_smithy_types::DateTime>,
1371 pub activity: std::option::Option<crate::model::PartyActivity>,
1373 pub external: std::option::Option<crate::model::PartyExternalLinks>,
1375}
1376impl PartyHandle {
1377 pub fn party_id(&self) -> std::option::Option<&str> {
1379 self.party_id.as_deref()
1380 }
1381 pub fn create_ts(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
1383 self.create_ts.as_ref()
1384 }
1385 pub fn activity(&self) -> std::option::Option<&crate::model::PartyActivity> {
1387 self.activity.as_ref()
1388 }
1389 pub fn external(&self) -> std::option::Option<&crate::model::PartyExternalLinks> {
1391 self.external.as_ref()
1392 }
1393}
1394impl std::fmt::Debug for PartyHandle {
1395 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1396 let mut formatter = f.debug_struct("PartyHandle");
1397 formatter.field("party_id", &self.party_id);
1398 formatter.field("create_ts", &self.create_ts);
1399 formatter.field("activity", &self.activity);
1400 formatter.field("external", &self.external);
1401 formatter.finish()
1402 }
1403}
1404pub mod party_handle {
1406 #[non_exhaustive]
1408 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1409 pub struct Builder {
1410 pub(crate) party_id: std::option::Option<std::string::String>,
1411 pub(crate) create_ts: std::option::Option<aws_smithy_types::DateTime>,
1412 pub(crate) activity: std::option::Option<crate::model::PartyActivity>,
1413 pub(crate) external: std::option::Option<crate::model::PartyExternalLinks>,
1414 }
1415 impl Builder {
1416 pub fn party_id(mut self, input: impl Into<std::string::String>) -> Self {
1418 self.party_id = Some(input.into());
1419 self
1420 }
1421 pub fn set_party_id(mut self, input: std::option::Option<std::string::String>) -> Self {
1423 self.party_id = input;
1424 self
1425 }
1426 pub fn create_ts(mut self, input: aws_smithy_types::DateTime) -> Self {
1428 self.create_ts = Some(input);
1429 self
1430 }
1431 pub fn set_create_ts(
1433 mut self,
1434 input: std::option::Option<aws_smithy_types::DateTime>,
1435 ) -> Self {
1436 self.create_ts = input;
1437 self
1438 }
1439 pub fn activity(mut self, input: crate::model::PartyActivity) -> Self {
1441 self.activity = Some(input);
1442 self
1443 }
1444 pub fn set_activity(
1446 mut self,
1447 input: std::option::Option<crate::model::PartyActivity>,
1448 ) -> Self {
1449 self.activity = input;
1450 self
1451 }
1452 pub fn external(mut self, input: crate::model::PartyExternalLinks) -> Self {
1454 self.external = Some(input);
1455 self
1456 }
1457 pub fn set_external(
1459 mut self,
1460 input: std::option::Option<crate::model::PartyExternalLinks>,
1461 ) -> Self {
1462 self.external = input;
1463 self
1464 }
1465 pub fn build(self) -> crate::model::PartyHandle {
1467 crate::model::PartyHandle {
1468 party_id: self.party_id,
1469 create_ts: self.create_ts,
1470 activity: self.activity,
1471 external: self.external,
1472 }
1473 }
1474 }
1475}
1476impl PartyHandle {
1477 pub fn builder() -> crate::model::party_handle::Builder {
1479 crate::model::party_handle::Builder::default()
1480 }
1481}
1482
1483#[non_exhaustive]
1485#[derive(std::clone::Clone, std::cmp::PartialEq)]
1486pub struct PartyExternalLinks {
1487 pub chat: std::option::Option<std::string::String>,
1489}
1490impl PartyExternalLinks {
1491 pub fn chat(&self) -> std::option::Option<&str> {
1493 self.chat.as_deref()
1494 }
1495}
1496impl std::fmt::Debug for PartyExternalLinks {
1497 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1498 let mut formatter = f.debug_struct("PartyExternalLinks");
1499 formatter.field("chat", &self.chat);
1500 formatter.finish()
1501 }
1502}
1503pub mod party_external_links {
1505 #[non_exhaustive]
1507 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1508 pub struct Builder {
1509 pub(crate) chat: std::option::Option<std::string::String>,
1510 }
1511 impl Builder {
1512 pub fn chat(mut self, input: impl Into<std::string::String>) -> Self {
1514 self.chat = Some(input.into());
1515 self
1516 }
1517 pub fn set_chat(mut self, input: std::option::Option<std::string::String>) -> Self {
1519 self.chat = input;
1520 self
1521 }
1522 pub fn build(self) -> crate::model::PartyExternalLinks {
1524 crate::model::PartyExternalLinks { chat: self.chat }
1525 }
1526 }
1527}
1528impl PartyExternalLinks {
1529 pub fn builder() -> crate::model::party_external_links::Builder {
1531 crate::model::party_external_links::Builder::default()
1532 }
1533}
1534
1535#[non_exhaustive]
1537#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1538pub enum PartyActivity {
1539 Idle(crate::model::PartyActivityIdle),
1541 MatchmakerFindingLobby(crate::model::PartyActivityMatchmakerFindingLobby),
1543 MatchmakerLobby(crate::model::PartyActivityMatchmakerLobby),
1545 #[non_exhaustive]
1553 Unknown,
1554}
1555impl PartyActivity {
1556 pub fn as_idle(&self) -> std::result::Result<&crate::model::PartyActivityIdle, &Self> {
1559 if let PartyActivity::Idle(val) = &self {
1560 Ok(val)
1561 } else {
1562 Err(self)
1563 }
1564 }
1565 pub fn is_idle(&self) -> bool {
1567 self.as_idle().is_ok()
1568 }
1569 pub fn as_matchmaker_finding_lobby(
1572 &self,
1573 ) -> std::result::Result<&crate::model::PartyActivityMatchmakerFindingLobby, &Self> {
1574 if let PartyActivity::MatchmakerFindingLobby(val) = &self {
1575 Ok(val)
1576 } else {
1577 Err(self)
1578 }
1579 }
1580 pub fn is_matchmaker_finding_lobby(&self) -> bool {
1582 self.as_matchmaker_finding_lobby().is_ok()
1583 }
1584 pub fn as_matchmaker_lobby(
1587 &self,
1588 ) -> std::result::Result<&crate::model::PartyActivityMatchmakerLobby, &Self> {
1589 if let PartyActivity::MatchmakerLobby(val) = &self {
1590 Ok(val)
1591 } else {
1592 Err(self)
1593 }
1594 }
1595 pub fn is_matchmaker_lobby(&self) -> bool {
1597 self.as_matchmaker_lobby().is_ok()
1598 }
1599 pub fn is_unknown(&self) -> bool {
1601 matches!(self, Self::Unknown)
1602 }
1603}
1604
1605#[non_exhaustive]
1607#[derive(std::clone::Clone, std::cmp::PartialEq)]
1608pub struct PartyActivityMatchmakerLobby {
1609 pub lobby: std::option::Option<crate::model::PartyMatchmakerLobby>,
1611 pub game: std::option::Option<crate::model::GameHandle>,
1613}
1614impl PartyActivityMatchmakerLobby {
1615 pub fn lobby(&self) -> std::option::Option<&crate::model::PartyMatchmakerLobby> {
1617 self.lobby.as_ref()
1618 }
1619 pub fn game(&self) -> std::option::Option<&crate::model::GameHandle> {
1621 self.game.as_ref()
1622 }
1623}
1624impl std::fmt::Debug for PartyActivityMatchmakerLobby {
1625 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1626 let mut formatter = f.debug_struct("PartyActivityMatchmakerLobby");
1627 formatter.field("lobby", &self.lobby);
1628 formatter.field("game", &self.game);
1629 formatter.finish()
1630 }
1631}
1632pub mod party_activity_matchmaker_lobby {
1634 #[non_exhaustive]
1636 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1637 pub struct Builder {
1638 pub(crate) lobby: std::option::Option<crate::model::PartyMatchmakerLobby>,
1639 pub(crate) game: std::option::Option<crate::model::GameHandle>,
1640 }
1641 impl Builder {
1642 pub fn lobby(mut self, input: crate::model::PartyMatchmakerLobby) -> Self {
1644 self.lobby = Some(input);
1645 self
1646 }
1647 pub fn set_lobby(
1649 mut self,
1650 input: std::option::Option<crate::model::PartyMatchmakerLobby>,
1651 ) -> Self {
1652 self.lobby = input;
1653 self
1654 }
1655 pub fn game(mut self, input: crate::model::GameHandle) -> Self {
1657 self.game = Some(input);
1658 self
1659 }
1660 pub fn set_game(mut self, input: std::option::Option<crate::model::GameHandle>) -> Self {
1662 self.game = input;
1663 self
1664 }
1665 pub fn build(self) -> crate::model::PartyActivityMatchmakerLobby {
1667 crate::model::PartyActivityMatchmakerLobby {
1668 lobby: self.lobby,
1669 game: self.game,
1670 }
1671 }
1672 }
1673}
1674impl PartyActivityMatchmakerLobby {
1675 pub fn builder() -> crate::model::party_activity_matchmaker_lobby::Builder {
1677 crate::model::party_activity_matchmaker_lobby::Builder::default()
1678 }
1679}
1680
1681#[non_exhaustive]
1683#[derive(std::clone::Clone, std::cmp::PartialEq)]
1684pub struct GameHandle {
1685 pub game_id: std::option::Option<std::string::String>,
1687 pub name_id: std::option::Option<std::string::String>,
1689 pub display_name: std::option::Option<std::string::String>,
1691 pub logo_url: std::option::Option<std::string::String>,
1693 pub banner_url: std::option::Option<std::string::String>,
1695}
1696impl GameHandle {
1697 pub fn game_id(&self) -> std::option::Option<&str> {
1699 self.game_id.as_deref()
1700 }
1701 pub fn name_id(&self) -> std::option::Option<&str> {
1703 self.name_id.as_deref()
1704 }
1705 pub fn display_name(&self) -> std::option::Option<&str> {
1707 self.display_name.as_deref()
1708 }
1709 pub fn logo_url(&self) -> std::option::Option<&str> {
1711 self.logo_url.as_deref()
1712 }
1713 pub fn banner_url(&self) -> std::option::Option<&str> {
1715 self.banner_url.as_deref()
1716 }
1717}
1718impl std::fmt::Debug for GameHandle {
1719 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1720 let mut formatter = f.debug_struct("GameHandle");
1721 formatter.field("game_id", &self.game_id);
1722 formatter.field("name_id", &self.name_id);
1723 formatter.field("display_name", &self.display_name);
1724 formatter.field("logo_url", &self.logo_url);
1725 formatter.field("banner_url", &self.banner_url);
1726 formatter.finish()
1727 }
1728}
1729pub mod game_handle {
1731 #[non_exhaustive]
1733 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1734 pub struct Builder {
1735 pub(crate) game_id: std::option::Option<std::string::String>,
1736 pub(crate) name_id: std::option::Option<std::string::String>,
1737 pub(crate) display_name: std::option::Option<std::string::String>,
1738 pub(crate) logo_url: std::option::Option<std::string::String>,
1739 pub(crate) banner_url: std::option::Option<std::string::String>,
1740 }
1741 impl Builder {
1742 pub fn game_id(mut self, input: impl Into<std::string::String>) -> Self {
1744 self.game_id = Some(input.into());
1745 self
1746 }
1747 pub fn set_game_id(mut self, input: std::option::Option<std::string::String>) -> Self {
1749 self.game_id = input;
1750 self
1751 }
1752 pub fn name_id(mut self, input: impl Into<std::string::String>) -> Self {
1754 self.name_id = Some(input.into());
1755 self
1756 }
1757 pub fn set_name_id(mut self, input: std::option::Option<std::string::String>) -> Self {
1759 self.name_id = input;
1760 self
1761 }
1762 pub fn display_name(mut self, input: impl Into<std::string::String>) -> Self {
1764 self.display_name = Some(input.into());
1765 self
1766 }
1767 pub fn set_display_name(mut self, input: std::option::Option<std::string::String>) -> Self {
1769 self.display_name = input;
1770 self
1771 }
1772 pub fn logo_url(mut self, input: impl Into<std::string::String>) -> Self {
1774 self.logo_url = Some(input.into());
1775 self
1776 }
1777 pub fn set_logo_url(mut self, input: std::option::Option<std::string::String>) -> Self {
1779 self.logo_url = input;
1780 self
1781 }
1782 pub fn banner_url(mut self, input: impl Into<std::string::String>) -> Self {
1784 self.banner_url = Some(input.into());
1785 self
1786 }
1787 pub fn set_banner_url(mut self, input: std::option::Option<std::string::String>) -> Self {
1789 self.banner_url = input;
1790 self
1791 }
1792 pub fn build(self) -> crate::model::GameHandle {
1794 crate::model::GameHandle {
1795 game_id: self.game_id,
1796 name_id: self.name_id,
1797 display_name: self.display_name,
1798 logo_url: self.logo_url,
1799 banner_url: self.banner_url,
1800 }
1801 }
1802 }
1803}
1804impl GameHandle {
1805 pub fn builder() -> crate::model::game_handle::Builder {
1807 crate::model::game_handle::Builder::default()
1808 }
1809}
1810
1811#[non_exhaustive]
1813#[derive(std::clone::Clone, std::cmp::PartialEq)]
1814pub struct PartyMatchmakerLobby {
1815 pub lobby_id: std::option::Option<std::string::String>,
1817}
1818impl PartyMatchmakerLobby {
1819 pub fn lobby_id(&self) -> std::option::Option<&str> {
1821 self.lobby_id.as_deref()
1822 }
1823}
1824impl std::fmt::Debug for PartyMatchmakerLobby {
1825 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1826 let mut formatter = f.debug_struct("PartyMatchmakerLobby");
1827 formatter.field("lobby_id", &self.lobby_id);
1828 formatter.finish()
1829 }
1830}
1831pub mod party_matchmaker_lobby {
1833 #[non_exhaustive]
1835 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1836 pub struct Builder {
1837 pub(crate) lobby_id: std::option::Option<std::string::String>,
1838 }
1839 impl Builder {
1840 pub fn lobby_id(mut self, input: impl Into<std::string::String>) -> Self {
1842 self.lobby_id = Some(input.into());
1843 self
1844 }
1845 pub fn set_lobby_id(mut self, input: std::option::Option<std::string::String>) -> Self {
1847 self.lobby_id = input;
1848 self
1849 }
1850 pub fn build(self) -> crate::model::PartyMatchmakerLobby {
1852 crate::model::PartyMatchmakerLobby {
1853 lobby_id: self.lobby_id,
1854 }
1855 }
1856 }
1857}
1858impl PartyMatchmakerLobby {
1859 pub fn builder() -> crate::model::party_matchmaker_lobby::Builder {
1861 crate::model::party_matchmaker_lobby::Builder::default()
1862 }
1863}
1864
1865#[non_exhaustive]
1867#[derive(std::clone::Clone, std::cmp::PartialEq)]
1868pub struct PartyActivityMatchmakerFindingLobby {
1869 pub game: std::option::Option<crate::model::GameHandle>,
1871}
1872impl PartyActivityMatchmakerFindingLobby {
1873 pub fn game(&self) -> std::option::Option<&crate::model::GameHandle> {
1875 self.game.as_ref()
1876 }
1877}
1878impl std::fmt::Debug for PartyActivityMatchmakerFindingLobby {
1879 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1880 let mut formatter = f.debug_struct("PartyActivityMatchmakerFindingLobby");
1881 formatter.field("game", &self.game);
1882 formatter.finish()
1883 }
1884}
1885pub mod party_activity_matchmaker_finding_lobby {
1887 #[non_exhaustive]
1889 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1890 pub struct Builder {
1891 pub(crate) game: std::option::Option<crate::model::GameHandle>,
1892 }
1893 impl Builder {
1894 pub fn game(mut self, input: crate::model::GameHandle) -> Self {
1896 self.game = Some(input);
1897 self
1898 }
1899 pub fn set_game(mut self, input: std::option::Option<crate::model::GameHandle>) -> Self {
1901 self.game = input;
1902 self
1903 }
1904 pub fn build(self) -> crate::model::PartyActivityMatchmakerFindingLobby {
1906 crate::model::PartyActivityMatchmakerFindingLobby { game: self.game }
1907 }
1908 }
1909}
1910impl PartyActivityMatchmakerFindingLobby {
1911 pub fn builder() -> crate::model::party_activity_matchmaker_finding_lobby::Builder {
1913 crate::model::party_activity_matchmaker_finding_lobby::Builder::default()
1914 }
1915}
1916
1917#[non_exhaustive]
1919#[derive(std::clone::Clone, std::cmp::PartialEq)]
1920pub struct PartyActivityIdle {}
1921impl std::fmt::Debug for PartyActivityIdle {
1922 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1923 let mut formatter = f.debug_struct("PartyActivityIdle");
1924 formatter.finish()
1925 }
1926}
1927pub mod party_activity_idle {
1929 #[non_exhaustive]
1931 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1932 pub struct Builder {}
1933 impl Builder {
1934 pub fn build(self) -> crate::model::PartyActivityIdle {
1936 crate::model::PartyActivityIdle {}
1937 }
1938 }
1939}
1940impl PartyActivityIdle {
1941 pub fn builder() -> crate::model::party_activity_idle::Builder {
1943 crate::model::party_activity_idle::Builder::default()
1944 }
1945}
1946
1947#[non_exhaustive]
1949#[derive(std::clone::Clone, std::cmp::PartialEq)]
1950pub struct IdentityPresence {
1951 pub update_ts: std::option::Option<aws_smithy_types::DateTime>,
1953 pub status: std::option::Option<crate::model::IdentityStatus>,
1955 pub game_activity: std::option::Option<crate::model::IdentityGameActivity>,
1957}
1958impl IdentityPresence {
1959 pub fn update_ts(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
1961 self.update_ts.as_ref()
1962 }
1963 pub fn status(&self) -> std::option::Option<&crate::model::IdentityStatus> {
1965 self.status.as_ref()
1966 }
1967 pub fn game_activity(&self) -> std::option::Option<&crate::model::IdentityGameActivity> {
1969 self.game_activity.as_ref()
1970 }
1971}
1972impl std::fmt::Debug for IdentityPresence {
1973 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1974 let mut formatter = f.debug_struct("IdentityPresence");
1975 formatter.field("update_ts", &self.update_ts);
1976 formatter.field("status", &self.status);
1977 formatter.field("game_activity", &self.game_activity);
1978 formatter.finish()
1979 }
1980}
1981pub mod identity_presence {
1983 #[non_exhaustive]
1985 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1986 pub struct Builder {
1987 pub(crate) update_ts: std::option::Option<aws_smithy_types::DateTime>,
1988 pub(crate) status: std::option::Option<crate::model::IdentityStatus>,
1989 pub(crate) game_activity: std::option::Option<crate::model::IdentityGameActivity>,
1990 }
1991 impl Builder {
1992 pub fn update_ts(mut self, input: aws_smithy_types::DateTime) -> Self {
1994 self.update_ts = Some(input);
1995 self
1996 }
1997 pub fn set_update_ts(
1999 mut self,
2000 input: std::option::Option<aws_smithy_types::DateTime>,
2001 ) -> Self {
2002 self.update_ts = input;
2003 self
2004 }
2005 pub fn status(mut self, input: crate::model::IdentityStatus) -> Self {
2007 self.status = Some(input);
2008 self
2009 }
2010 pub fn set_status(
2012 mut self,
2013 input: std::option::Option<crate::model::IdentityStatus>,
2014 ) -> Self {
2015 self.status = input;
2016 self
2017 }
2018 pub fn game_activity(mut self, input: crate::model::IdentityGameActivity) -> Self {
2020 self.game_activity = Some(input);
2021 self
2022 }
2023 pub fn set_game_activity(
2025 mut self,
2026 input: std::option::Option<crate::model::IdentityGameActivity>,
2027 ) -> Self {
2028 self.game_activity = input;
2029 self
2030 }
2031 pub fn build(self) -> crate::model::IdentityPresence {
2033 crate::model::IdentityPresence {
2034 update_ts: self.update_ts,
2035 status: self.status,
2036 game_activity: self.game_activity,
2037 }
2038 }
2039 }
2040}
2041impl IdentityPresence {
2042 pub fn builder() -> crate::model::identity_presence::Builder {
2044 crate::model::identity_presence::Builder::default()
2045 }
2046}
2047
2048#[non_exhaustive]
2050#[derive(std::clone::Clone, std::cmp::PartialEq)]
2051pub struct IdentityGameActivity {
2052 pub game: std::option::Option<crate::model::GameHandle>,
2054 pub message: std::option::Option<std::string::String>,
2056 pub public_metadata: std::option::Option<aws_smithy_types::Document>,
2058 pub mutual_metadata: std::option::Option<aws_smithy_types::Document>,
2060}
2061impl IdentityGameActivity {
2062 pub fn game(&self) -> std::option::Option<&crate::model::GameHandle> {
2064 self.game.as_ref()
2065 }
2066 pub fn message(&self) -> std::option::Option<&str> {
2068 self.message.as_deref()
2069 }
2070 pub fn public_metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
2072 self.public_metadata.as_ref()
2073 }
2074 pub fn mutual_metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
2076 self.mutual_metadata.as_ref()
2077 }
2078}
2079impl std::fmt::Debug for IdentityGameActivity {
2080 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2081 let mut formatter = f.debug_struct("IdentityGameActivity");
2082 formatter.field("game", &self.game);
2083 formatter.field("message", &self.message);
2084 formatter.field("public_metadata", &self.public_metadata);
2085 formatter.field("mutual_metadata", &self.mutual_metadata);
2086 formatter.finish()
2087 }
2088}
2089pub mod identity_game_activity {
2091 #[non_exhaustive]
2093 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
2094 pub struct Builder {
2095 pub(crate) game: std::option::Option<crate::model::GameHandle>,
2096 pub(crate) message: std::option::Option<std::string::String>,
2097 pub(crate) public_metadata: std::option::Option<aws_smithy_types::Document>,
2098 pub(crate) mutual_metadata: std::option::Option<aws_smithy_types::Document>,
2099 }
2100 impl Builder {
2101 pub fn game(mut self, input: crate::model::GameHandle) -> Self {
2103 self.game = Some(input);
2104 self
2105 }
2106 pub fn set_game(mut self, input: std::option::Option<crate::model::GameHandle>) -> Self {
2108 self.game = input;
2109 self
2110 }
2111 pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
2113 self.message = Some(input.into());
2114 self
2115 }
2116 pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
2118 self.message = input;
2119 self
2120 }
2121 pub fn public_metadata(mut self, input: aws_smithy_types::Document) -> Self {
2123 self.public_metadata = Some(input);
2124 self
2125 }
2126 pub fn set_public_metadata(
2128 mut self,
2129 input: std::option::Option<aws_smithy_types::Document>,
2130 ) -> Self {
2131 self.public_metadata = input;
2132 self
2133 }
2134 pub fn mutual_metadata(mut self, input: aws_smithy_types::Document) -> Self {
2136 self.mutual_metadata = Some(input);
2137 self
2138 }
2139 pub fn set_mutual_metadata(
2141 mut self,
2142 input: std::option::Option<aws_smithy_types::Document>,
2143 ) -> Self {
2144 self.mutual_metadata = input;
2145 self
2146 }
2147 pub fn build(self) -> crate::model::IdentityGameActivity {
2149 crate::model::IdentityGameActivity {
2150 game: self.game,
2151 message: self.message,
2152 public_metadata: self.public_metadata,
2153 mutual_metadata: self.mutual_metadata,
2154 }
2155 }
2156 }
2157}
2158impl IdentityGameActivity {
2159 pub fn builder() -> crate::model::identity_game_activity::Builder {
2161 crate::model::identity_game_activity::Builder::default()
2162 }
2163}
2164
2165#[non_exhaustive]
2168#[derive(
2169 std::clone::Clone,
2170 std::cmp::Eq,
2171 std::cmp::Ord,
2172 std::cmp::PartialEq,
2173 std::cmp::PartialOrd,
2174 std::fmt::Debug,
2175 std::hash::Hash,
2176)]
2177pub enum IdentityStatus {
2178 #[allow(missing_docs)] Away,
2180 #[allow(missing_docs)] Offline,
2182 #[allow(missing_docs)] Online,
2184 Unknown(String),
2186}
2187impl std::convert::From<&str> for IdentityStatus {
2188 fn from(s: &str) -> Self {
2189 match s {
2190 "away" => IdentityStatus::Away,
2191 "offline" => IdentityStatus::Offline,
2192 "online" => IdentityStatus::Online,
2193 other => IdentityStatus::Unknown(other.to_owned()),
2194 }
2195 }
2196}
2197impl std::str::FromStr for IdentityStatus {
2198 type Err = std::convert::Infallible;
2199
2200 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
2201 Ok(IdentityStatus::from(s))
2202 }
2203}
2204impl IdentityStatus {
2205 pub fn as_str(&self) -> &str {
2207 match self {
2208 IdentityStatus::Away => "away",
2209 IdentityStatus::Offline => "offline",
2210 IdentityStatus::Online => "online",
2211 IdentityStatus::Unknown(s) => s.as_ref(),
2212 }
2213 }
2214 pub fn values() -> &'static [&'static str] {
2216 &["away", "offline", "online"]
2217 }
2218}
2219impl AsRef<str> for IdentityStatus {
2220 fn as_ref(&self) -> &str {
2221 self.as_str()
2222 }
2223}
2224
2225#[non_exhaustive]
2227#[derive(std::clone::Clone, std::cmp::PartialEq)]
2228pub struct GroupMember {
2229 pub identity: std::option::Option<crate::model::IdentityHandle>,
2231}
2232impl GroupMember {
2233 pub fn identity(&self) -> std::option::Option<&crate::model::IdentityHandle> {
2235 self.identity.as_ref()
2236 }
2237}
2238impl std::fmt::Debug for GroupMember {
2239 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2240 let mut formatter = f.debug_struct("GroupMember");
2241 formatter.field("identity", &self.identity);
2242 formatter.finish()
2243 }
2244}
2245pub mod group_member {
2247 #[non_exhaustive]
2249 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
2250 pub struct Builder {
2251 pub(crate) identity: std::option::Option<crate::model::IdentityHandle>,
2252 }
2253 impl Builder {
2254 pub fn identity(mut self, input: crate::model::IdentityHandle) -> Self {
2256 self.identity = Some(input);
2257 self
2258 }
2259 pub fn set_identity(
2261 mut self,
2262 input: std::option::Option<crate::model::IdentityHandle>,
2263 ) -> Self {
2264 self.identity = input;
2265 self
2266 }
2267 pub fn build(self) -> crate::model::GroupMember {
2269 crate::model::GroupMember {
2270 identity: self.identity,
2271 }
2272 }
2273 }
2274}
2275impl GroupMember {
2276 pub fn builder() -> crate::model::group_member::Builder {
2278 crate::model::group_member::Builder::default()
2279 }
2280}