1use crate::*;
2
3#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4#[serde(tag = "type")]
5pub enum ApiCreateMyAddressResponse {
6 #[serde(rename = "userContactLinkCreated")]
8 UserContactLinkCreated(Arc<UserContactLinkCreatedResponse>),
9}
10
11impl ApiCreateMyAddressResponse {
12 pub fn into_inner(self) -> Arc<UserContactLinkCreatedResponse> {
13 match self {
14 Self::UserContactLinkCreated(inner) => inner,
15 }
16 }
17}
18
19#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
20#[serde(tag = "type")]
21pub enum ApiDeleteMyAddressResponse {
22 #[serde(rename = "userContactLinkDeleted")]
24 UserContactLinkDeleted(Arc<UserContactLinkDeletedResponse>),
25}
26
27impl ApiDeleteMyAddressResponse {
28 pub fn into_inner(self) -> Arc<UserContactLinkDeletedResponse> {
29 match self {
30 Self::UserContactLinkDeleted(inner) => inner,
31 }
32 }
33}
34
35#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
36#[serde(tag = "type")]
37pub enum ApiShowMyAddressResponse {
38 #[serde(rename = "userContactLink")]
40 UserContactLink(Arc<UserContactLinkResponse>),
41}
42
43impl ApiShowMyAddressResponse {
44 pub fn into_inner(self) -> Arc<UserContactLinkResponse> {
45 match self {
46 Self::UserContactLink(inner) => inner,
47 }
48 }
49}
50
51#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
52#[serde(tag = "type")]
53pub enum ApiSetProfileAddressResponse {
54 #[serde(rename = "userProfileUpdated")]
56 UserProfileUpdated(Arc<UserProfileUpdatedResponse>),
57}
58
59impl ApiSetProfileAddressResponse {
60 pub fn into_inner(self) -> Arc<UserProfileUpdatedResponse> {
61 match self {
62 Self::UserProfileUpdated(inner) => inner,
63 }
64 }
65}
66
67#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
68#[serde(tag = "type")]
69pub enum ApiSetAddressSettingsResponse {
70 #[serde(rename = "userContactLinkUpdated")]
72 UserContactLinkUpdated(Arc<UserContactLinkUpdatedResponse>),
73}
74
75impl ApiSetAddressSettingsResponse {
76 pub fn into_inner(self) -> Arc<UserContactLinkUpdatedResponse> {
77 match self {
78 Self::UserContactLinkUpdated(inner) => inner,
79 }
80 }
81}
82
83#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
84#[serde(tag = "type")]
85pub enum ApiSendMessagesResponse {
86 #[serde(rename = "newChatItems")]
88 NewChatItems(Arc<NewChatItemsResponse>),
89}
90
91impl ApiSendMessagesResponse {
92 pub fn into_inner(self) -> Arc<NewChatItemsResponse> {
93 match self {
94 Self::NewChatItems(inner) => inner,
95 }
96 }
97}
98
99#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
100#[serde(tag = "type")]
101pub enum ApiUpdateChatItemResponse {
102 #[serde(rename = "chatItemUpdated")]
104 ChatItemUpdated(Arc<ChatItemUpdatedResponse>),
105 #[serde(rename = "chatItemNotChanged")]
107 ChatItemNotChanged(Arc<ChatItemNotChangedResponse>),
108}
109
110impl ApiUpdateChatItemResponse {
111 pub fn chat_item_updated(&self) -> Option<&ChatItemUpdatedResponse> {
112 if let Self::ChatItemUpdated(ret) = self {
113 Some(ret)
114 } else {
115 None
116 }
117 }
118
119 pub fn chat_item_not_changed(&self) -> Option<&ChatItemNotChangedResponse> {
120 if let Self::ChatItemNotChanged(ret) = self {
121 Some(ret)
122 } else {
123 None
124 }
125 }
126}
127
128#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
129#[serde(tag = "type")]
130pub enum ApiDeleteChatItemResponse {
131 #[serde(rename = "chatItemsDeleted")]
133 ChatItemsDeleted(Arc<ChatItemsDeletedResponse>),
134}
135
136impl ApiDeleteChatItemResponse {
137 pub fn into_inner(self) -> Arc<ChatItemsDeletedResponse> {
138 match self {
139 Self::ChatItemsDeleted(inner) => inner,
140 }
141 }
142}
143
144#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
145#[serde(tag = "type")]
146pub enum ApiDeleteMemberChatItemResponse {
147 #[serde(rename = "chatItemsDeleted")]
149 ChatItemsDeleted(Arc<ChatItemsDeletedResponse>),
150}
151
152impl ApiDeleteMemberChatItemResponse {
153 pub fn into_inner(self) -> Arc<ChatItemsDeletedResponse> {
154 match self {
155 Self::ChatItemsDeleted(inner) => inner,
156 }
157 }
158}
159
160#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
161#[serde(tag = "type")]
162pub enum ApiChatItemReactionResponse {
163 #[serde(rename = "chatItemReaction")]
165 ChatItemReaction(Arc<ChatItemReactionResponse>),
166}
167
168impl ApiChatItemReactionResponse {
169 pub fn into_inner(self) -> Arc<ChatItemReactionResponse> {
170 match self {
171 Self::ChatItemReaction(inner) => inner,
172 }
173 }
174}
175
176#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
177#[serde(tag = "type")]
178pub enum ReceiveFileResponse {
179 #[serde(rename = "rcvFileAccepted")]
181 RcvFileAccepted(Arc<RcvFileAcceptedResponse>),
182 #[serde(rename = "rcvFileAcceptedSndCancelled")]
184 RcvFileAcceptedSndCancelled(Arc<RcvFileAcceptedSndCancelledResponse>),
185}
186
187impl ReceiveFileResponse {
188 pub fn rcv_file_accepted(&self) -> Option<&RcvFileAcceptedResponse> {
189 if let Self::RcvFileAccepted(ret) = self {
190 Some(ret)
191 } else {
192 None
193 }
194 }
195
196 pub fn rcv_file_accepted_snd_cancelled(&self) -> Option<&RcvFileAcceptedSndCancelledResponse> {
197 if let Self::RcvFileAcceptedSndCancelled(ret) = self {
198 Some(ret)
199 } else {
200 None
201 }
202 }
203}
204
205#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
206#[serde(tag = "type")]
207pub enum CancelFileResponse {
208 #[serde(rename = "sndFileCancelled")]
210 SndFileCancelled(Arc<SndFileCancelledResponse>),
211 #[serde(rename = "rcvFileCancelled")]
213 RcvFileCancelled(Arc<RcvFileCancelledResponse>),
214}
215
216impl CancelFileResponse {
217 pub fn snd_file_cancelled(&self) -> Option<&SndFileCancelledResponse> {
218 if let Self::SndFileCancelled(ret) = self {
219 Some(ret)
220 } else {
221 None
222 }
223 }
224
225 pub fn rcv_file_cancelled(&self) -> Option<&RcvFileCancelledResponse> {
226 if let Self::RcvFileCancelled(ret) = self {
227 Some(ret)
228 } else {
229 None
230 }
231 }
232}
233
234#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
235#[serde(tag = "type")]
236pub enum ApiAddMemberResponse {
237 #[serde(rename = "sentGroupInvitation")]
239 SentGroupInvitation(Arc<SentGroupInvitationResponse>),
240}
241
242impl ApiAddMemberResponse {
243 pub fn into_inner(self) -> Arc<SentGroupInvitationResponse> {
244 match self {
245 Self::SentGroupInvitation(inner) => inner,
246 }
247 }
248}
249
250#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
251#[serde(tag = "type")]
252pub enum ApiJoinGroupResponse {
253 #[serde(rename = "userAcceptedGroupSent")]
255 UserAcceptedGroupSent(Arc<UserAcceptedGroupSentResponse>),
256}
257
258impl ApiJoinGroupResponse {
259 pub fn into_inner(self) -> Arc<UserAcceptedGroupSentResponse> {
260 match self {
261 Self::UserAcceptedGroupSent(inner) => inner,
262 }
263 }
264}
265
266#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
267#[serde(tag = "type")]
268pub enum ApiAcceptMemberResponse {
269 #[serde(rename = "memberAccepted")]
271 MemberAccepted(Arc<MemberAcceptedResponse>),
272}
273
274impl ApiAcceptMemberResponse {
275 pub fn into_inner(self) -> Arc<MemberAcceptedResponse> {
276 match self {
277 Self::MemberAccepted(inner) => inner,
278 }
279 }
280}
281
282#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
283#[serde(tag = "type")]
284pub enum ApiMembersRoleResponse {
285 #[serde(rename = "membersRoleUser")]
287 MembersRoleUser(Arc<MembersRoleUserResponse>),
288}
289
290impl ApiMembersRoleResponse {
291 pub fn into_inner(self) -> Arc<MembersRoleUserResponse> {
292 match self {
293 Self::MembersRoleUser(inner) => inner,
294 }
295 }
296}
297
298#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
299#[serde(tag = "type")]
300pub enum ApiBlockMembersForAllResponse {
301 #[serde(rename = "membersBlockedForAllUser")]
303 MembersBlockedForAllUser(Arc<MembersBlockedForAllUserResponse>),
304}
305
306impl ApiBlockMembersForAllResponse {
307 pub fn into_inner(self) -> Arc<MembersBlockedForAllUserResponse> {
308 match self {
309 Self::MembersBlockedForAllUser(inner) => inner,
310 }
311 }
312}
313
314#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
315#[serde(tag = "type")]
316pub enum ApiRemoveMembersResponse {
317 #[serde(rename = "userDeletedMembers")]
319 UserDeletedMembers(Arc<UserDeletedMembersResponse>),
320}
321
322impl ApiRemoveMembersResponse {
323 pub fn into_inner(self) -> Arc<UserDeletedMembersResponse> {
324 match self {
325 Self::UserDeletedMembers(inner) => inner,
326 }
327 }
328}
329
330#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
331#[serde(tag = "type")]
332pub enum ApiLeaveGroupResponse {
333 #[serde(rename = "leftMemberUser")]
335 LeftMemberUser(Arc<LeftMemberUserResponse>),
336}
337
338impl ApiLeaveGroupResponse {
339 pub fn into_inner(self) -> Arc<LeftMemberUserResponse> {
340 match self {
341 Self::LeftMemberUser(inner) => inner,
342 }
343 }
344}
345
346#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
347#[serde(tag = "type")]
348pub enum ApiListMembersResponse {
349 #[serde(rename = "groupMembers")]
351 GroupMembers(Arc<GroupMembersResponse>),
352}
353
354impl ApiListMembersResponse {
355 pub fn into_inner(self) -> Arc<GroupMembersResponse> {
356 match self {
357 Self::GroupMembers(inner) => inner,
358 }
359 }
360}
361
362#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
363#[serde(tag = "type")]
364pub enum ApiNewGroupResponse {
365 #[serde(rename = "groupCreated")]
367 GroupCreated(Arc<GroupCreatedResponse>),
368}
369
370impl ApiNewGroupResponse {
371 pub fn into_inner(self) -> Arc<GroupCreatedResponse> {
372 match self {
373 Self::GroupCreated(inner) => inner,
374 }
375 }
376}
377
378#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
379#[serde(tag = "type")]
380pub enum ApiNewPublicGroupResponse {
381 #[serde(rename = "publicGroupCreated")]
383 PublicGroupCreated(Arc<PublicGroupCreatedResponse>),
384 #[serde(rename = "publicGroupCreationFailed")]
386 PublicGroupCreationFailed(Arc<PublicGroupCreationFailedResponse>),
387}
388
389impl ApiNewPublicGroupResponse {
390 pub fn public_group_created(&self) -> Option<&PublicGroupCreatedResponse> {
391 if let Self::PublicGroupCreated(ret) = self {
392 Some(ret)
393 } else {
394 None
395 }
396 }
397
398 pub fn public_group_creation_failed(&self) -> Option<&PublicGroupCreationFailedResponse> {
399 if let Self::PublicGroupCreationFailed(ret) = self {
400 Some(ret)
401 } else {
402 None
403 }
404 }
405}
406
407#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
408#[serde(tag = "type")]
409pub enum ApiGetGroupRelaysResponse {
410 #[serde(rename = "groupRelays")]
412 GroupRelays(Arc<GroupRelaysResponse>),
413}
414
415impl ApiGetGroupRelaysResponse {
416 pub fn into_inner(self) -> Arc<GroupRelaysResponse> {
417 match self {
418 Self::GroupRelays(inner) => inner,
419 }
420 }
421}
422
423#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
424#[serde(tag = "type")]
425pub enum ApiAddGroupRelaysResponse {
426 #[serde(rename = "groupRelaysAdded")]
428 GroupRelaysAdded(Arc<GroupRelaysAddedResponse>),
429 #[serde(rename = "groupRelaysAddFailed")]
431 GroupRelaysAddFailed(Arc<GroupRelaysAddFailedResponse>),
432}
433
434impl ApiAddGroupRelaysResponse {
435 pub fn group_relays_added(&self) -> Option<&GroupRelaysAddedResponse> {
436 if let Self::GroupRelaysAdded(ret) = self {
437 Some(ret)
438 } else {
439 None
440 }
441 }
442
443 pub fn group_relays_add_failed(&self) -> Option<&GroupRelaysAddFailedResponse> {
444 if let Self::GroupRelaysAddFailed(ret) = self {
445 Some(ret)
446 } else {
447 None
448 }
449 }
450}
451
452#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
453#[serde(tag = "type")]
454pub enum ApiAllowRelayGroupResponse {
455 #[serde(rename = "relayGroupAllowed")]
457 RelayGroupAllowed(Arc<RelayGroupAllowedResponse>),
458}
459
460impl ApiAllowRelayGroupResponse {
461 pub fn into_inner(self) -> Arc<RelayGroupAllowedResponse> {
462 match self {
463 Self::RelayGroupAllowed(inner) => inner,
464 }
465 }
466}
467
468#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
469#[serde(tag = "type")]
470pub enum ApiUpdateGroupProfileResponse {
471 #[serde(rename = "groupUpdated")]
473 GroupUpdated(Arc<GroupUpdatedResponse>),
474}
475
476impl ApiUpdateGroupProfileResponse {
477 pub fn into_inner(self) -> Arc<GroupUpdatedResponse> {
478 match self {
479 Self::GroupUpdated(inner) => inner,
480 }
481 }
482}
483
484#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
485#[serde(tag = "type")]
486pub enum ApiCreateGroupLinkResponse {
487 #[serde(rename = "groupLinkCreated")]
489 GroupLinkCreated(Arc<GroupLinkCreatedResponse>),
490}
491
492impl ApiCreateGroupLinkResponse {
493 pub fn into_inner(self) -> Arc<GroupLinkCreatedResponse> {
494 match self {
495 Self::GroupLinkCreated(inner) => inner,
496 }
497 }
498}
499
500#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
501#[serde(tag = "type")]
502pub enum ApiGroupLinkMemberRoleResponse {
503 #[serde(rename = "groupLink")]
505 GroupLink(Arc<GroupLinkResponse>),
506}
507
508impl ApiGroupLinkMemberRoleResponse {
509 pub fn into_inner(self) -> Arc<GroupLinkResponse> {
510 match self {
511 Self::GroupLink(inner) => inner,
512 }
513 }
514}
515
516#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
517#[serde(tag = "type")]
518pub enum ApiDeleteGroupLinkResponse {
519 #[serde(rename = "groupLinkDeleted")]
521 GroupLinkDeleted(Arc<GroupLinkDeletedResponse>),
522}
523
524impl ApiDeleteGroupLinkResponse {
525 pub fn into_inner(self) -> Arc<GroupLinkDeletedResponse> {
526 match self {
527 Self::GroupLinkDeleted(inner) => inner,
528 }
529 }
530}
531
532#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
533#[serde(tag = "type")]
534pub enum ApiGetGroupLinkResponse {
535 #[serde(rename = "groupLink")]
537 GroupLink(Arc<GroupLinkResponse>),
538}
539
540impl ApiGetGroupLinkResponse {
541 pub fn into_inner(self) -> Arc<GroupLinkResponse> {
542 match self {
543 Self::GroupLink(inner) => inner,
544 }
545 }
546}
547
548#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
549#[serde(tag = "type")]
550pub enum ApiAddContactResponse {
551 #[serde(rename = "invitation")]
553 Invitation(Arc<InvitationResponse>),
554}
555
556impl ApiAddContactResponse {
557 pub fn into_inner(self) -> Arc<InvitationResponse> {
558 match self {
559 Self::Invitation(inner) => inner,
560 }
561 }
562}
563
564#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
565#[serde(tag = "type")]
566pub enum ApiConnectPlanResponse {
567 #[serde(rename = "connectionPlan")]
569 ConnectionPlan(Arc<ConnectionPlanResponse>),
570}
571
572impl ApiConnectPlanResponse {
573 pub fn into_inner(self) -> Arc<ConnectionPlanResponse> {
574 match self {
575 Self::ConnectionPlan(inner) => inner,
576 }
577 }
578}
579
580#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
581#[serde(tag = "type")]
582pub enum ApiConnectResponse {
583 #[serde(rename = "sentConfirmation")]
585 SentConfirmation(Arc<SentConfirmationResponse>),
586 #[serde(rename = "contactAlreadyExists")]
588 ContactAlreadyExists(Arc<ContactAlreadyExistsResponse>),
589 #[serde(rename = "sentInvitation")]
591 SentInvitation(Arc<SentInvitationResponse>),
592}
593
594impl ApiConnectResponse {
595 pub fn sent_confirmation(&self) -> Option<&SentConfirmationResponse> {
596 if let Self::SentConfirmation(ret) = self {
597 Some(ret)
598 } else {
599 None
600 }
601 }
602
603 pub fn contact_already_exists(&self) -> Option<&ContactAlreadyExistsResponse> {
604 if let Self::ContactAlreadyExists(ret) = self {
605 Some(ret)
606 } else {
607 None
608 }
609 }
610
611 pub fn sent_invitation(&self) -> Option<&SentInvitationResponse> {
612 if let Self::SentInvitation(ret) = self {
613 Some(ret)
614 } else {
615 None
616 }
617 }
618}
619
620#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
621#[serde(tag = "type")]
622pub enum ConnectResponse {
623 #[serde(rename = "sentConfirmation")]
625 SentConfirmation(Arc<SentConfirmationResponse>),
626 #[serde(rename = "contactAlreadyExists")]
628 ContactAlreadyExists(Arc<ContactAlreadyExistsResponse>),
629 #[serde(rename = "sentInvitation")]
631 SentInvitation(Arc<SentInvitationResponse>),
632}
633
634impl ConnectResponse {
635 pub fn sent_confirmation(&self) -> Option<&SentConfirmationResponse> {
636 if let Self::SentConfirmation(ret) = self {
637 Some(ret)
638 } else {
639 None
640 }
641 }
642
643 pub fn contact_already_exists(&self) -> Option<&ContactAlreadyExistsResponse> {
644 if let Self::ContactAlreadyExists(ret) = self {
645 Some(ret)
646 } else {
647 None
648 }
649 }
650
651 pub fn sent_invitation(&self) -> Option<&SentInvitationResponse> {
652 if let Self::SentInvitation(ret) = self {
653 Some(ret)
654 } else {
655 None
656 }
657 }
658}
659
660#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
661#[serde(tag = "type")]
662pub enum ApiAcceptContactResponse {
663 #[serde(rename = "acceptingContactRequest")]
665 AcceptingContactRequest(Arc<AcceptingContactRequestResponse>),
666}
667
668impl ApiAcceptContactResponse {
669 pub fn into_inner(self) -> Arc<AcceptingContactRequestResponse> {
670 match self {
671 Self::AcceptingContactRequest(inner) => inner,
672 }
673 }
674}
675
676#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
677#[serde(tag = "type")]
678pub enum ApiRejectContactResponse {
679 #[serde(rename = "contactRequestRejected")]
681 ContactRequestRejected(Arc<ContactRequestRejectedResponse>),
682}
683
684impl ApiRejectContactResponse {
685 pub fn into_inner(self) -> Arc<ContactRequestRejectedResponse> {
686 match self {
687 Self::ContactRequestRejected(inner) => inner,
688 }
689 }
690}
691
692#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
693#[serde(tag = "type")]
694pub enum ApiListContactsResponse {
695 #[serde(rename = "contactsList")]
697 ContactsList(Arc<ContactsListResponse>),
698}
699
700impl ApiListContactsResponse {
701 pub fn into_inner(self) -> Arc<ContactsListResponse> {
702 match self {
703 Self::ContactsList(inner) => inner,
704 }
705 }
706}
707
708#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
709#[serde(tag = "type")]
710pub enum ApiListGroupsResponse {
711 #[serde(rename = "groupsList")]
713 GroupsList(Arc<GroupsListResponse>),
714}
715
716impl ApiListGroupsResponse {
717 pub fn into_inner(self) -> Arc<GroupsListResponse> {
718 match self {
719 Self::GroupsList(inner) => inner,
720 }
721 }
722}
723
724#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
725#[serde(tag = "type")]
726pub enum ApiGetChatsResponse {
727 #[serde(rename = "apiChats")]
729 ApiChats(Arc<ApiChatsResponse>),
730}
731
732impl ApiGetChatsResponse {
733 pub fn into_inner(self) -> Arc<ApiChatsResponse> {
734 match self {
735 Self::ApiChats(inner) => inner,
736 }
737 }
738}
739
740#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
741#[serde(tag = "type")]
742pub enum ApiDeleteChatResponse {
743 #[serde(rename = "contactDeleted")]
745 ContactDeleted(Arc<ContactDeletedResponse>),
746 #[serde(rename = "contactConnectionDeleted")]
748 ContactConnectionDeleted(Arc<ContactConnectionDeletedResponse>),
749 #[serde(rename = "groupDeletedUser")]
751 GroupDeletedUser(Arc<GroupDeletedUserResponse>),
752}
753
754impl ApiDeleteChatResponse {
755 pub fn contact_deleted(&self) -> Option<&ContactDeletedResponse> {
756 if let Self::ContactDeleted(ret) = self {
757 Some(ret)
758 } else {
759 None
760 }
761 }
762
763 pub fn contact_connection_deleted(&self) -> Option<&ContactConnectionDeletedResponse> {
764 if let Self::ContactConnectionDeleted(ret) = self {
765 Some(ret)
766 } else {
767 None
768 }
769 }
770
771 pub fn group_deleted_user(&self) -> Option<&GroupDeletedUserResponse> {
772 if let Self::GroupDeletedUser(ret) = self {
773 Some(ret)
774 } else {
775 None
776 }
777 }
778}
779
780#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
781#[serde(tag = "type")]
782pub enum ApiSetGroupCustomDataResponse {
783 #[serde(rename = "cmdOk")]
785 CmdOk(Arc<CmdOkResponse>),
786}
787
788impl ApiSetGroupCustomDataResponse {
789 pub fn into_inner(self) -> Arc<CmdOkResponse> {
790 match self {
791 Self::CmdOk(inner) => inner,
792 }
793 }
794}
795
796#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
797#[serde(tag = "type")]
798pub enum ApiSetContactCustomDataResponse {
799 #[serde(rename = "cmdOk")]
801 CmdOk(Arc<CmdOkResponse>),
802}
803
804impl ApiSetContactCustomDataResponse {
805 pub fn into_inner(self) -> Arc<CmdOkResponse> {
806 match self {
807 Self::CmdOk(inner) => inner,
808 }
809 }
810}
811
812#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
813#[serde(tag = "type")]
814pub enum ApiSetUserAutoAcceptMemberContactsResponse {
815 #[serde(rename = "cmdOk")]
817 CmdOk(Arc<CmdOkResponse>),
818}
819
820impl ApiSetUserAutoAcceptMemberContactsResponse {
821 pub fn into_inner(self) -> Arc<CmdOkResponse> {
822 match self {
823 Self::CmdOk(inner) => inner,
824 }
825 }
826}
827
828#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
829#[serde(tag = "type")]
830pub enum ShowActiveUserResponse {
831 #[serde(rename = "activeUser")]
833 ActiveUser(Arc<ActiveUserResponse>),
834}
835
836impl ShowActiveUserResponse {
837 pub fn into_inner(self) -> Arc<ActiveUserResponse> {
838 match self {
839 Self::ActiveUser(inner) => inner,
840 }
841 }
842}
843
844#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
845#[serde(tag = "type")]
846pub enum CreateActiveUserResponse {
847 #[serde(rename = "activeUser")]
849 ActiveUser(Arc<ActiveUserResponse>),
850}
851
852impl CreateActiveUserResponse {
853 pub fn into_inner(self) -> Arc<ActiveUserResponse> {
854 match self {
855 Self::ActiveUser(inner) => inner,
856 }
857 }
858}
859
860#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
861#[serde(tag = "type")]
862pub enum ListUsersResponse {
863 #[serde(rename = "usersList")]
865 UsersList(Arc<UsersListResponse>),
866}
867
868impl ListUsersResponse {
869 pub fn into_inner(self) -> Arc<UsersListResponse> {
870 match self {
871 Self::UsersList(inner) => inner,
872 }
873 }
874}
875
876#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
877#[serde(tag = "type")]
878pub enum ApiSetActiveUserResponse {
879 #[serde(rename = "activeUser")]
881 ActiveUser(Arc<ActiveUserResponse>),
882}
883
884impl ApiSetActiveUserResponse {
885 pub fn into_inner(self) -> Arc<ActiveUserResponse> {
886 match self {
887 Self::ActiveUser(inner) => inner,
888 }
889 }
890}
891
892#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
893#[serde(tag = "type")]
894pub enum ApiDeleteUserResponse {
895 #[serde(rename = "cmdOk")]
897 CmdOk(Arc<CmdOkResponse>),
898}
899
900impl ApiDeleteUserResponse {
901 pub fn into_inner(self) -> Arc<CmdOkResponse> {
902 match self {
903 Self::CmdOk(inner) => inner,
904 }
905 }
906}
907
908#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
909#[serde(tag = "type")]
910pub enum ApiUpdateProfileResponse {
911 #[serde(rename = "userProfileUpdated")]
913 UserProfileUpdated(Arc<UserProfileUpdatedResponse>),
914 #[serde(rename = "userProfileNoChange")]
916 UserProfileNoChange(Arc<UserProfileNoChangeResponse>),
917}
918
919impl ApiUpdateProfileResponse {
920 pub fn user_profile_updated(&self) -> Option<&UserProfileUpdatedResponse> {
921 if let Self::UserProfileUpdated(ret) = self {
922 Some(ret)
923 } else {
924 None
925 }
926 }
927
928 pub fn user_profile_no_change(&self) -> Option<&UserProfileNoChangeResponse> {
929 if let Self::UserProfileNoChange(ret) = self {
930 Some(ret)
931 } else {
932 None
933 }
934 }
935}
936
937#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
938#[serde(tag = "type")]
939pub enum ApiSetContactPrefsResponse {
940 #[serde(rename = "contactPrefsUpdated")]
942 ContactPrefsUpdated(Arc<ContactPrefsUpdatedResponse>),
943}
944
945impl ApiSetContactPrefsResponse {
946 pub fn into_inner(self) -> Arc<ContactPrefsUpdatedResponse> {
947 match self {
948 Self::ContactPrefsUpdated(inner) => inner,
949 }
950 }
951}
952
953#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
954#[serde(tag = "type")]
955pub enum StartChatResponse {
956 #[serde(rename = "chatStarted")]
958 ChatStarted(Arc<ChatStartedResponse>),
959 #[serde(rename = "chatRunning")]
961 ChatRunning(Arc<ChatRunningResponse>),
962}
963
964impl StartChatResponse {
965 pub fn chat_started(&self) -> Option<&ChatStartedResponse> {
966 if let Self::ChatStarted(ret) = self {
967 Some(ret)
968 } else {
969 None
970 }
971 }
972
973 pub fn chat_running(&self) -> Option<&ChatRunningResponse> {
974 if let Self::ChatRunning(ret) = self {
975 Some(ret)
976 } else {
977 None
978 }
979 }
980}
981
982#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
983#[serde(tag = "type")]
984pub enum ApiStopChatResponse {
985 #[serde(rename = "chatStopped")]
987 ChatStopped(Arc<ChatStoppedResponse>),
988}
989
990impl ApiStopChatResponse {
991 pub fn into_inner(self) -> Arc<ChatStoppedResponse> {
992 match self {
993 Self::ChatStopped(inner) => inner,
994 }
995 }
996}
997
998#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
999#[serde(tag = "type")]
1000pub enum ChatCmdError {
1001 #[serde(rename = "chatCmdError")]
1002 ChatCmdErrorResponse(Arc<ChatCmdErrorResponse>),
1003}
1004
1005impl ChatCmdError {
1006 pub fn into_inner(self) -> Arc<ChatCmdErrorResponse> {
1007 match self {
1008 Self::ChatCmdErrorResponse(inner) => inner,
1009 }
1010 }
1011}
1012
1013#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1014#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1015#[cfg_attr(feature = "bon", builder(on(String, into)))]
1016pub struct ChatCmdErrorResponse {
1017 #[serde(rename = "chatError")]
1018 pub chat_error: Arc<errors::ChatError>,
1019
1020 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1021 #[cfg_attr(feature = "bon", builder(default))]
1022 pub undocumented: JsonObject,
1023}
1024
1025#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1026#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1027#[cfg_attr(feature = "bon", builder(on(String, into)))]
1028pub struct AcceptingContactRequestResponse {
1029 #[serde(rename = "user")]
1030 pub user: User,
1031
1032 #[serde(rename = "contact")]
1033 pub contact: Contact,
1034
1035 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1036 #[cfg_attr(feature = "bon", builder(default))]
1037 pub undocumented: JsonObject,
1038}
1039
1040#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1041#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1042#[cfg_attr(feature = "bon", builder(on(String, into)))]
1043pub struct ActiveUserResponse {
1044 #[serde(rename = "user")]
1045 pub user: User,
1046
1047 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1048 #[cfg_attr(feature = "bon", builder(default))]
1049 pub undocumented: JsonObject,
1050}
1051
1052#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1053#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1054#[cfg_attr(feature = "bon", builder(on(String, into)))]
1055pub struct ApiChatsResponse {
1056 #[serde(rename = "user")]
1057 pub user: User,
1058
1059 #[serde(rename = "chats")]
1060 pub chats: Vec<AChat>,
1061
1062 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1063 #[cfg_attr(feature = "bon", builder(default))]
1064 pub undocumented: JsonObject,
1065}
1066
1067#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1068#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1069#[cfg_attr(feature = "bon", builder(on(String, into)))]
1070pub struct ChatItemNotChangedResponse {
1071 #[serde(rename = "user")]
1072 pub user: User,
1073
1074 #[serde(rename = "chatItem")]
1075 pub chat_item: AChatItem,
1076
1077 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1078 #[cfg_attr(feature = "bon", builder(default))]
1079 pub undocumented: JsonObject,
1080}
1081
1082#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1083#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1084#[cfg_attr(feature = "bon", builder(on(String, into)))]
1085pub struct ChatItemReactionResponse {
1086 #[serde(rename = "user")]
1087 pub user: User,
1088
1089 #[serde(rename = "added", default)]
1090 pub added: bool,
1091
1092 #[serde(rename = "reaction")]
1093 pub reaction: ACIReaction,
1094
1095 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1096 #[cfg_attr(feature = "bon", builder(default))]
1097 pub undocumented: JsonObject,
1098}
1099
1100#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1101#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1102#[cfg_attr(feature = "bon", builder(on(String, into)))]
1103pub struct ChatItemUpdatedResponse {
1104 #[serde(rename = "user")]
1105 pub user: User,
1106
1107 #[serde(rename = "chatItem")]
1108 pub chat_item: AChatItem,
1109
1110 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1111 #[cfg_attr(feature = "bon", builder(default))]
1112 pub undocumented: JsonObject,
1113}
1114
1115#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1116#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1117#[cfg_attr(feature = "bon", builder(on(String, into)))]
1118pub struct ChatItemsDeletedResponse {
1119 #[serde(rename = "user")]
1120 pub user: User,
1121
1122 #[serde(rename = "chatItemDeletions")]
1123 pub chat_item_deletions: Vec<ChatItemDeletion>,
1124
1125 #[serde(rename = "byUser", default)]
1126 pub by_user: bool,
1127
1128 #[serde(rename = "timed", default)]
1129 pub timed: bool,
1130
1131 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1132 #[cfg_attr(feature = "bon", builder(default))]
1133 pub undocumented: JsonObject,
1134}
1135
1136#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1137#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1138#[cfg_attr(feature = "bon", builder(on(String, into)))]
1139pub struct ChatRunningResponse {
1140 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1141 #[cfg_attr(feature = "bon", builder(default))]
1142 pub undocumented: JsonObject,
1143}
1144
1145#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1146#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1147#[cfg_attr(feature = "bon", builder(on(String, into)))]
1148pub struct ChatStartedResponse {
1149 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1150 #[cfg_attr(feature = "bon", builder(default))]
1151 pub undocumented: JsonObject,
1152}
1153
1154#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1155#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1156#[cfg_attr(feature = "bon", builder(on(String, into)))]
1157pub struct ChatStoppedResponse {
1158 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1159 #[cfg_attr(feature = "bon", builder(default))]
1160 pub undocumented: JsonObject,
1161}
1162
1163#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1164#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1165#[cfg_attr(feature = "bon", builder(on(String, into)))]
1166pub struct CmdOkResponse {
1167 #[serde(rename = "user_", skip_serializing_if = "Option::is_none")]
1168 pub user: Option<User>,
1169
1170 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1171 #[cfg_attr(feature = "bon", builder(default))]
1172 pub undocumented: JsonObject,
1173}
1174
1175#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1176#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1177#[cfg_attr(feature = "bon", builder(on(String, into)))]
1178pub struct ConnectionPlanResponse {
1179 #[serde(rename = "user")]
1180 pub user: User,
1181
1182 #[serde(rename = "connLink")]
1183 pub conn_link: CreatedConnLink,
1184
1185 #[serde(rename = "connectionPlan")]
1186 pub connection_plan: ConnectionPlan,
1187
1188 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1189 #[cfg_attr(feature = "bon", builder(default))]
1190 pub undocumented: JsonObject,
1191}
1192
1193#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1194#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1195#[cfg_attr(feature = "bon", builder(on(String, into)))]
1196pub struct ContactAlreadyExistsResponse {
1197 #[serde(rename = "user")]
1198 pub user: User,
1199
1200 #[serde(rename = "contact")]
1201 pub contact: Contact,
1202
1203 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1204 #[cfg_attr(feature = "bon", builder(default))]
1205 pub undocumented: JsonObject,
1206}
1207
1208#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1209#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1210#[cfg_attr(feature = "bon", builder(on(String, into)))]
1211pub struct ContactConnectionDeletedResponse {
1212 #[serde(rename = "user")]
1213 pub user: User,
1214
1215 #[serde(rename = "connection")]
1216 pub connection: PendingContactConnection,
1217
1218 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1219 #[cfg_attr(feature = "bon", builder(default))]
1220 pub undocumented: JsonObject,
1221}
1222
1223#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1224#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1225#[cfg_attr(feature = "bon", builder(on(String, into)))]
1226pub struct ContactDeletedResponse {
1227 #[serde(rename = "user")]
1228 pub user: User,
1229
1230 #[serde(rename = "contact")]
1231 pub contact: Contact,
1232
1233 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1234 #[cfg_attr(feature = "bon", builder(default))]
1235 pub undocumented: JsonObject,
1236}
1237
1238#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1239#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1240#[cfg_attr(feature = "bon", builder(on(String, into)))]
1241pub struct ContactPrefsUpdatedResponse {
1242 #[serde(rename = "user")]
1243 pub user: User,
1244
1245 #[serde(rename = "fromContact")]
1246 pub from_contact: Contact,
1247
1248 #[serde(rename = "toContact")]
1249 pub to_contact: Contact,
1250
1251 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1252 #[cfg_attr(feature = "bon", builder(default))]
1253 pub undocumented: JsonObject,
1254}
1255
1256#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1257#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1258#[cfg_attr(feature = "bon", builder(on(String, into)))]
1259pub struct ContactRequestRejectedResponse {
1260 #[serde(rename = "user")]
1261 pub user: User,
1262
1263 #[serde(rename = "contactRequest")]
1264 pub contact_request: UserContactRequest,
1265
1266 #[serde(rename = "contact_", skip_serializing_if = "Option::is_none")]
1267 pub contact: Option<Contact>,
1268
1269 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1270 #[cfg_attr(feature = "bon", builder(default))]
1271 pub undocumented: JsonObject,
1272}
1273
1274#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1275#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1276#[cfg_attr(feature = "bon", builder(on(String, into)))]
1277pub struct ContactsListResponse {
1278 #[serde(rename = "user")]
1279 pub user: User,
1280
1281 #[serde(rename = "contacts")]
1282 pub contacts: Vec<Contact>,
1283
1284 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1285 #[cfg_attr(feature = "bon", builder(default))]
1286 pub undocumented: JsonObject,
1287}
1288
1289#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1290#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1291#[cfg_attr(feature = "bon", builder(on(String, into)))]
1292pub struct GroupCreatedResponse {
1293 #[serde(rename = "user")]
1294 pub user: User,
1295
1296 #[serde(rename = "groupInfo")]
1297 pub group_info: GroupInfo,
1298
1299 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1300 #[cfg_attr(feature = "bon", builder(default))]
1301 pub undocumented: JsonObject,
1302}
1303
1304#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1305#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1306#[cfg_attr(feature = "bon", builder(on(String, into)))]
1307pub struct GroupDeletedUserResponse {
1308 #[serde(rename = "user")]
1309 pub user: User,
1310
1311 #[serde(rename = "groupInfo")]
1312 pub group_info: GroupInfo,
1313
1314 #[serde(rename = "msgSigned", default)]
1315 pub msg_signed: bool,
1316
1317 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1318 #[cfg_attr(feature = "bon", builder(default))]
1319 pub undocumented: JsonObject,
1320}
1321
1322#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1323#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1324#[cfg_attr(feature = "bon", builder(on(String, into)))]
1325pub struct GroupLinkCreatedResponse {
1326 #[serde(rename = "user")]
1327 pub user: User,
1328
1329 #[serde(rename = "groupInfo")]
1330 pub group_info: GroupInfo,
1331
1332 #[serde(rename = "groupLink")]
1333 pub group_link: GroupLink,
1334
1335 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1336 #[cfg_attr(feature = "bon", builder(default))]
1337 pub undocumented: JsonObject,
1338}
1339
1340#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1341#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1342#[cfg_attr(feature = "bon", builder(on(String, into)))]
1343pub struct GroupLinkDeletedResponse {
1344 #[serde(rename = "user")]
1345 pub user: User,
1346
1347 #[serde(rename = "groupInfo")]
1348 pub group_info: GroupInfo,
1349
1350 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1351 #[cfg_attr(feature = "bon", builder(default))]
1352 pub undocumented: JsonObject,
1353}
1354
1355#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1356#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1357#[cfg_attr(feature = "bon", builder(on(String, into)))]
1358pub struct GroupLinkResponse {
1359 #[serde(rename = "user")]
1360 pub user: User,
1361
1362 #[serde(rename = "groupInfo")]
1363 pub group_info: GroupInfo,
1364
1365 #[serde(rename = "groupLink")]
1366 pub group_link: GroupLink,
1367
1368 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1369 #[cfg_attr(feature = "bon", builder(default))]
1370 pub undocumented: JsonObject,
1371}
1372
1373#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1374#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1375#[cfg_attr(feature = "bon", builder(on(String, into)))]
1376pub struct GroupMembersResponse {
1377 #[serde(rename = "user")]
1378 pub user: User,
1379
1380 #[serde(rename = "group")]
1381 pub group: Group,
1382
1383 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1384 #[cfg_attr(feature = "bon", builder(default))]
1385 pub undocumented: JsonObject,
1386}
1387
1388#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1389#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1390#[cfg_attr(feature = "bon", builder(on(String, into)))]
1391pub struct GroupRelaysAddFailedResponse {
1392 #[serde(rename = "user")]
1393 pub user: User,
1394
1395 #[serde(rename = "addRelayResults")]
1396 pub add_relay_results: Vec<AddRelayResult>,
1397
1398 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1399 #[cfg_attr(feature = "bon", builder(default))]
1400 pub undocumented: JsonObject,
1401}
1402
1403#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1404#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1405#[cfg_attr(feature = "bon", builder(on(String, into)))]
1406pub struct GroupRelaysAddedResponse {
1407 #[serde(rename = "user")]
1408 pub user: User,
1409
1410 #[serde(rename = "groupInfo")]
1411 pub group_info: GroupInfo,
1412
1413 #[serde(rename = "groupLink")]
1414 pub group_link: GroupLink,
1415
1416 #[serde(rename = "groupRelays")]
1417 pub group_relays: Vec<GroupRelay>,
1418
1419 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1420 #[cfg_attr(feature = "bon", builder(default))]
1421 pub undocumented: JsonObject,
1422}
1423
1424#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1425#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1426#[cfg_attr(feature = "bon", builder(on(String, into)))]
1427pub struct GroupRelaysResponse {
1428 #[serde(rename = "user")]
1429 pub user: User,
1430
1431 #[serde(rename = "groupInfo")]
1432 pub group_info: GroupInfo,
1433
1434 #[serde(rename = "groupRelays")]
1435 pub group_relays: Vec<GroupRelay>,
1436
1437 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1438 #[cfg_attr(feature = "bon", builder(default))]
1439 pub undocumented: JsonObject,
1440}
1441
1442#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1443#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1444#[cfg_attr(feature = "bon", builder(on(String, into)))]
1445pub struct GroupUpdatedResponse {
1446 #[serde(rename = "user")]
1447 pub user: User,
1448
1449 #[serde(rename = "fromGroup")]
1450 pub from_group: GroupInfo,
1451
1452 #[serde(rename = "toGroup")]
1453 pub to_group: GroupInfo,
1454
1455 #[serde(rename = "member_", skip_serializing_if = "Option::is_none")]
1456 pub member: Option<GroupMember>,
1457
1458 #[serde(rename = "msgSigned", default)]
1459 pub msg_signed: bool,
1460
1461 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1462 #[cfg_attr(feature = "bon", builder(default))]
1463 pub undocumented: JsonObject,
1464}
1465
1466#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1467#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1468#[cfg_attr(feature = "bon", builder(on(String, into)))]
1469pub struct GroupsListResponse {
1470 #[serde(rename = "user")]
1471 pub user: User,
1472
1473 #[serde(rename = "groups")]
1474 pub groups: Vec<GroupInfo>,
1475
1476 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1477 #[cfg_attr(feature = "bon", builder(default))]
1478 pub undocumented: JsonObject,
1479}
1480
1481#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1482#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1483#[cfg_attr(feature = "bon", builder(on(String, into)))]
1484pub struct InvitationResponse {
1485 #[serde(rename = "user")]
1486 pub user: User,
1487
1488 #[serde(rename = "connLinkInvitation")]
1489 pub conn_link_invitation: CreatedConnLink,
1490
1491 #[serde(rename = "connection")]
1492 pub connection: PendingContactConnection,
1493
1494 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1495 #[cfg_attr(feature = "bon", builder(default))]
1496 pub undocumented: JsonObject,
1497}
1498
1499#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1500#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1501#[cfg_attr(feature = "bon", builder(on(String, into)))]
1502pub struct LeftMemberUserResponse {
1503 #[serde(rename = "user")]
1504 pub user: User,
1505
1506 #[serde(rename = "groupInfo")]
1507 pub group_info: GroupInfo,
1508
1509 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1510 #[cfg_attr(feature = "bon", builder(default))]
1511 pub undocumented: JsonObject,
1512}
1513
1514#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1515#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1516#[cfg_attr(feature = "bon", builder(on(String, into)))]
1517pub struct MemberAcceptedResponse {
1518 #[serde(rename = "user")]
1519 pub user: User,
1520
1521 #[serde(rename = "groupInfo")]
1522 pub group_info: GroupInfo,
1523
1524 #[serde(rename = "member")]
1525 pub member: GroupMember,
1526
1527 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1528 #[cfg_attr(feature = "bon", builder(default))]
1529 pub undocumented: JsonObject,
1530}
1531
1532#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1533#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1534#[cfg_attr(feature = "bon", builder(on(String, into)))]
1535pub struct MembersBlockedForAllUserResponse {
1536 #[serde(rename = "user")]
1537 pub user: User,
1538
1539 #[serde(rename = "groupInfo")]
1540 pub group_info: GroupInfo,
1541
1542 #[serde(rename = "members")]
1543 pub members: Vec<GroupMember>,
1544
1545 #[serde(rename = "blocked", default)]
1546 pub blocked: bool,
1547
1548 #[serde(rename = "msgSigned", default)]
1549 pub msg_signed: bool,
1550
1551 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1552 #[cfg_attr(feature = "bon", builder(default))]
1553 pub undocumented: JsonObject,
1554}
1555
1556#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1557#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1558#[cfg_attr(feature = "bon", builder(on(String, into)))]
1559pub struct MembersRoleUserResponse {
1560 #[serde(rename = "user")]
1561 pub user: User,
1562
1563 #[serde(rename = "groupInfo")]
1564 pub group_info: GroupInfo,
1565
1566 #[serde(rename = "members")]
1567 pub members: Vec<GroupMember>,
1568
1569 #[serde(rename = "toRole")]
1570 pub to_role: GroupMemberRole,
1571
1572 #[serde(rename = "msgSigned", default)]
1573 pub msg_signed: bool,
1574
1575 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1576 #[cfg_attr(feature = "bon", builder(default))]
1577 pub undocumented: JsonObject,
1578}
1579
1580#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1581#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1582#[cfg_attr(feature = "bon", builder(on(String, into)))]
1583pub struct NewChatItemsResponse {
1584 #[serde(rename = "user")]
1585 pub user: User,
1586
1587 #[serde(rename = "chatItems")]
1588 pub chat_items: Vec<AChatItem>,
1589
1590 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1591 #[cfg_attr(feature = "bon", builder(default))]
1592 pub undocumented: JsonObject,
1593}
1594
1595#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1596#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1597#[cfg_attr(feature = "bon", builder(on(String, into)))]
1598pub struct PublicGroupCreatedResponse {
1599 #[serde(rename = "user")]
1600 pub user: User,
1601
1602 #[serde(rename = "groupInfo")]
1603 pub group_info: GroupInfo,
1604
1605 #[serde(rename = "groupLink")]
1606 pub group_link: GroupLink,
1607
1608 #[serde(rename = "groupRelays")]
1609 pub group_relays: Vec<GroupRelay>,
1610
1611 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1612 #[cfg_attr(feature = "bon", builder(default))]
1613 pub undocumented: JsonObject,
1614}
1615
1616#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1617#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1618#[cfg_attr(feature = "bon", builder(on(String, into)))]
1619pub struct PublicGroupCreationFailedResponse {
1620 #[serde(rename = "user")]
1621 pub user: User,
1622
1623 #[serde(rename = "addRelayResults")]
1624 pub add_relay_results: Vec<AddRelayResult>,
1625
1626 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1627 #[cfg_attr(feature = "bon", builder(default))]
1628 pub undocumented: JsonObject,
1629}
1630
1631#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1632#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1633#[cfg_attr(feature = "bon", builder(on(String, into)))]
1634pub struct RcvFileAcceptedResponse {
1635 #[serde(rename = "user")]
1636 pub user: User,
1637
1638 #[serde(rename = "chatItem")]
1639 pub chat_item: AChatItem,
1640
1641 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1642 #[cfg_attr(feature = "bon", builder(default))]
1643 pub undocumented: JsonObject,
1644}
1645
1646#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1647#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1648#[cfg_attr(feature = "bon", builder(on(String, into)))]
1649pub struct RcvFileAcceptedSndCancelledResponse {
1650 #[serde(rename = "user")]
1651 pub user: User,
1652
1653 #[serde(rename = "rcvFileTransfer")]
1654 pub rcv_file_transfer: RcvFileTransfer,
1655
1656 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1657 #[cfg_attr(feature = "bon", builder(default))]
1658 pub undocumented: JsonObject,
1659}
1660
1661#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1662#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1663#[cfg_attr(feature = "bon", builder(on(String, into)))]
1664pub struct RcvFileCancelledResponse {
1665 #[serde(rename = "user")]
1666 pub user: User,
1667
1668 #[serde(rename = "chatItem_", skip_serializing_if = "Option::is_none")]
1669 pub chat_item: Option<AChatItem>,
1670
1671 #[serde(rename = "rcvFileTransfer")]
1672 pub rcv_file_transfer: RcvFileTransfer,
1673
1674 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1675 #[cfg_attr(feature = "bon", builder(default))]
1676 pub undocumented: JsonObject,
1677}
1678
1679#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1680#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1681#[cfg_attr(feature = "bon", builder(on(String, into)))]
1682pub struct RelayGroupAllowedResponse {
1683 #[serde(rename = "user")]
1684 pub user: User,
1685
1686 #[serde(rename = "groupInfo")]
1687 pub group_info: GroupInfo,
1688
1689 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1690 #[cfg_attr(feature = "bon", builder(default))]
1691 pub undocumented: JsonObject,
1692}
1693
1694#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1695#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1696#[cfg_attr(feature = "bon", builder(on(String, into)))]
1697pub struct SentConfirmationResponse {
1698 #[serde(rename = "user")]
1699 pub user: User,
1700
1701 #[serde(rename = "connection")]
1702 pub connection: PendingContactConnection,
1703
1704 #[serde(rename = "customUserProfile", skip_serializing_if = "Option::is_none")]
1705 pub custom_user_profile: Option<Profile>,
1706
1707 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1708 #[cfg_attr(feature = "bon", builder(default))]
1709 pub undocumented: JsonObject,
1710}
1711
1712#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1713#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1714#[cfg_attr(feature = "bon", builder(on(String, into)))]
1715pub struct SentGroupInvitationResponse {
1716 #[serde(rename = "user")]
1717 pub user: User,
1718
1719 #[serde(rename = "groupInfo")]
1720 pub group_info: GroupInfo,
1721
1722 #[serde(rename = "contact")]
1723 pub contact: Contact,
1724
1725 #[serde(rename = "member")]
1726 pub member: GroupMember,
1727
1728 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1729 #[cfg_attr(feature = "bon", builder(default))]
1730 pub undocumented: JsonObject,
1731}
1732
1733#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1734#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1735#[cfg_attr(feature = "bon", builder(on(String, into)))]
1736pub struct SentInvitationResponse {
1737 #[serde(rename = "user")]
1738 pub user: User,
1739
1740 #[serde(rename = "connection")]
1741 pub connection: PendingContactConnection,
1742
1743 #[serde(rename = "customUserProfile", skip_serializing_if = "Option::is_none")]
1744 pub custom_user_profile: Option<Profile>,
1745
1746 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1747 #[cfg_attr(feature = "bon", builder(default))]
1748 pub undocumented: JsonObject,
1749}
1750
1751#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1752#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1753#[cfg_attr(feature = "bon", builder(on(String, into)))]
1754pub struct SndFileCancelledResponse {
1755 #[serde(rename = "user")]
1756 pub user: User,
1757
1758 #[serde(rename = "chatItem_", skip_serializing_if = "Option::is_none")]
1759 pub chat_item: Option<AChatItem>,
1760
1761 #[serde(rename = "fileTransferMeta")]
1762 pub file_transfer_meta: FileTransferMeta,
1763
1764 #[serde(rename = "sndFileTransfers")]
1765 pub snd_file_transfers: Vec<SndFileTransfer>,
1766
1767 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1768 #[cfg_attr(feature = "bon", builder(default))]
1769 pub undocumented: JsonObject,
1770}
1771
1772#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1773#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1774#[cfg_attr(feature = "bon", builder(on(String, into)))]
1775pub struct UserAcceptedGroupSentResponse {
1776 #[serde(rename = "user")]
1777 pub user: User,
1778
1779 #[serde(rename = "groupInfo")]
1780 pub group_info: GroupInfo,
1781
1782 #[serde(rename = "hostContact", skip_serializing_if = "Option::is_none")]
1783 pub host_contact: Option<Contact>,
1784
1785 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1786 #[cfg_attr(feature = "bon", builder(default))]
1787 pub undocumented: JsonObject,
1788}
1789
1790#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1791#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1792#[cfg_attr(feature = "bon", builder(on(String, into)))]
1793pub struct UserContactLinkCreatedResponse {
1794 #[serde(rename = "user")]
1795 pub user: User,
1796
1797 #[serde(rename = "connLinkContact")]
1798 pub conn_link_contact: CreatedConnLink,
1799
1800 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1801 #[cfg_attr(feature = "bon", builder(default))]
1802 pub undocumented: JsonObject,
1803}
1804
1805#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1806#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1807#[cfg_attr(feature = "bon", builder(on(String, into)))]
1808pub struct UserContactLinkDeletedResponse {
1809 #[serde(rename = "user")]
1810 pub user: User,
1811
1812 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1813 #[cfg_attr(feature = "bon", builder(default))]
1814 pub undocumented: JsonObject,
1815}
1816
1817#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1818#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1819#[cfg_attr(feature = "bon", builder(on(String, into)))]
1820pub struct UserContactLinkResponse {
1821 #[serde(rename = "user")]
1822 pub user: User,
1823
1824 #[serde(rename = "contactLink")]
1825 pub contact_link: UserContactLink,
1826
1827 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1828 #[cfg_attr(feature = "bon", builder(default))]
1829 pub undocumented: JsonObject,
1830}
1831
1832#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1833#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1834#[cfg_attr(feature = "bon", builder(on(String, into)))]
1835pub struct UserContactLinkUpdatedResponse {
1836 #[serde(rename = "user")]
1837 pub user: User,
1838
1839 #[serde(rename = "contactLink")]
1840 pub contact_link: UserContactLink,
1841
1842 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1843 #[cfg_attr(feature = "bon", builder(default))]
1844 pub undocumented: JsonObject,
1845}
1846
1847#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1848#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1849#[cfg_attr(feature = "bon", builder(on(String, into)))]
1850pub struct UserDeletedMembersResponse {
1851 #[serde(rename = "user")]
1852 pub user: User,
1853
1854 #[serde(rename = "groupInfo")]
1855 pub group_info: GroupInfo,
1856
1857 #[serde(rename = "members")]
1858 pub members: Vec<GroupMember>,
1859
1860 #[serde(rename = "withMessages", default)]
1861 pub with_messages: bool,
1862
1863 #[serde(rename = "msgSigned", default)]
1864 pub msg_signed: bool,
1865
1866 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1867 #[cfg_attr(feature = "bon", builder(default))]
1868 pub undocumented: JsonObject,
1869}
1870
1871#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1872#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1873#[cfg_attr(feature = "bon", builder(on(String, into)))]
1874pub struct UserProfileNoChangeResponse {
1875 #[serde(rename = "user")]
1876 pub user: User,
1877
1878 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1879 #[cfg_attr(feature = "bon", builder(default))]
1880 pub undocumented: JsonObject,
1881}
1882
1883#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1884#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1885#[cfg_attr(feature = "bon", builder(on(String, into)))]
1886pub struct UserProfileUpdatedResponse {
1887 #[serde(rename = "user")]
1888 pub user: User,
1889
1890 #[serde(rename = "fromProfile")]
1891 pub from_profile: Profile,
1892
1893 #[serde(rename = "toProfile")]
1894 pub to_profile: Profile,
1895
1896 #[serde(rename = "updateSummary")]
1897 pub update_summary: UserProfileUpdateSummary,
1898
1899 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1900 #[cfg_attr(feature = "bon", builder(default))]
1901 pub undocumented: JsonObject,
1902}
1903
1904#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1905#[cfg_attr(feature = "bon", derive(::bon::Builder))]
1906#[cfg_attr(feature = "bon", builder(on(String, into)))]
1907pub struct UsersListResponse {
1908 #[serde(rename = "users")]
1909 pub users: Vec<UserInfo>,
1910
1911 #[serde(flatten, skip_serializing_if = "JsonObject::is_null")]
1912 #[cfg_attr(feature = "bon", builder(default))]
1913 pub undocumented: JsonObject,
1914}