1
2use crate::types::*;
3use crate::errors::*;
4use uuid::Uuid;
5
6
7
8
9#[derive(Debug, Clone, Default, Serialize, Deserialize)]
11pub struct AcceptCall {
12 #[doc(hidden)]
13 #[serde(rename(serialize = "@type", deserialize = "@type"))]
14 td_name: String,
15 #[doc(hidden)]
16 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
17 extra: Option<String>,
18 call_id: i64,
20 protocol: CallProtocol,
22
23}
24
25impl RObject for AcceptCall {
26 #[doc(hidden)] fn td_name(&self) -> &'static str { "acceptCall" }
27 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
28 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
29}
30
31
32
33
34impl RFunction for AcceptCall {}
35
36impl AcceptCall {
37 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
38 pub fn builder() -> RTDAcceptCallBuilder {
39 let mut inner = AcceptCall::default();
40 inner.td_name = "acceptCall".to_string();
41 inner.extra = Some(Uuid::new_v4().to_string());
42 RTDAcceptCallBuilder { inner }
43 }
44
45 pub fn call_id(&self) -> i64 { self.call_id }
46
47 pub fn protocol(&self) -> &CallProtocol { &self.protocol }
48
49}
50
51#[doc(hidden)]
52pub struct RTDAcceptCallBuilder {
53 inner: AcceptCall
54}
55
56impl RTDAcceptCallBuilder {
57 pub fn build(&self) -> AcceptCall { self.inner.clone() }
58
59
60 pub fn call_id(&mut self, call_id: i64) -> &mut Self {
61 self.inner.call_id = call_id;
62 self
63 }
64
65
66 pub fn protocol<T: AsRef<CallProtocol>>(&mut self, protocol: T) -> &mut Self {
67 self.inner.protocol = protocol.as_ref().clone();
68 self
69 }
70
71}
72
73impl AsRef<AcceptCall> for AcceptCall {
74 fn as_ref(&self) -> &AcceptCall { self }
75}
76
77impl AsRef<AcceptCall> for RTDAcceptCallBuilder {
78 fn as_ref(&self) -> &AcceptCall { &self.inner }
79}
80
81
82
83
84
85
86
87#[derive(Debug, Clone, Default, Serialize, Deserialize)]
89pub struct AcceptTermsOfService {
90 #[doc(hidden)]
91 #[serde(rename(serialize = "@type", deserialize = "@type"))]
92 td_name: String,
93 #[doc(hidden)]
94 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
95 extra: Option<String>,
96 terms_of_service_id: String,
98
99}
100
101impl RObject for AcceptTermsOfService {
102 #[doc(hidden)] fn td_name(&self) -> &'static str { "acceptTermsOfService" }
103 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
104 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
105}
106
107
108
109
110impl RFunction for AcceptTermsOfService {}
111
112impl AcceptTermsOfService {
113 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
114 pub fn builder() -> RTDAcceptTermsOfServiceBuilder {
115 let mut inner = AcceptTermsOfService::default();
116 inner.td_name = "acceptTermsOfService".to_string();
117 inner.extra = Some(Uuid::new_v4().to_string());
118 RTDAcceptTermsOfServiceBuilder { inner }
119 }
120
121 pub fn terms_of_service_id(&self) -> &String { &self.terms_of_service_id }
122
123}
124
125#[doc(hidden)]
126pub struct RTDAcceptTermsOfServiceBuilder {
127 inner: AcceptTermsOfService
128}
129
130impl RTDAcceptTermsOfServiceBuilder {
131 pub fn build(&self) -> AcceptTermsOfService { self.inner.clone() }
132
133
134 pub fn terms_of_service_id<T: AsRef<str>>(&mut self, terms_of_service_id: T) -> &mut Self {
135 self.inner.terms_of_service_id = terms_of_service_id.as_ref().to_string();
136 self
137 }
138
139}
140
141impl AsRef<AcceptTermsOfService> for AcceptTermsOfService {
142 fn as_ref(&self) -> &AcceptTermsOfService { self }
143}
144
145impl AsRef<AcceptTermsOfService> for RTDAcceptTermsOfServiceBuilder {
146 fn as_ref(&self) -> &AcceptTermsOfService { &self.inner }
147}
148
149
150
151
152
153
154
155#[derive(Debug, Clone, Default, Serialize, Deserialize)]
157pub struct AddChatMember {
158 #[doc(hidden)]
159 #[serde(rename(serialize = "@type", deserialize = "@type"))]
160 td_name: String,
161 #[doc(hidden)]
162 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
163 extra: Option<String>,
164 chat_id: i64,
166 user_id: i64,
168 forward_limit: i64,
170
171}
172
173impl RObject for AddChatMember {
174 #[doc(hidden)] fn td_name(&self) -> &'static str { "addChatMember" }
175 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
176 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
177}
178
179
180
181
182impl RFunction for AddChatMember {}
183
184impl AddChatMember {
185 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
186 pub fn builder() -> RTDAddChatMemberBuilder {
187 let mut inner = AddChatMember::default();
188 inner.td_name = "addChatMember".to_string();
189 inner.extra = Some(Uuid::new_v4().to_string());
190 RTDAddChatMemberBuilder { inner }
191 }
192
193 pub fn chat_id(&self) -> i64 { self.chat_id }
194
195 pub fn user_id(&self) -> i64 { self.user_id }
196
197 pub fn forward_limit(&self) -> i64 { self.forward_limit }
198
199}
200
201#[doc(hidden)]
202pub struct RTDAddChatMemberBuilder {
203 inner: AddChatMember
204}
205
206impl RTDAddChatMemberBuilder {
207 pub fn build(&self) -> AddChatMember { self.inner.clone() }
208
209
210 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
211 self.inner.chat_id = chat_id;
212 self
213 }
214
215
216 pub fn user_id(&mut self, user_id: i64) -> &mut Self {
217 self.inner.user_id = user_id;
218 self
219 }
220
221
222 pub fn forward_limit(&mut self, forward_limit: i64) -> &mut Self {
223 self.inner.forward_limit = forward_limit;
224 self
225 }
226
227}
228
229impl AsRef<AddChatMember> for AddChatMember {
230 fn as_ref(&self) -> &AddChatMember { self }
231}
232
233impl AsRef<AddChatMember> for RTDAddChatMemberBuilder {
234 fn as_ref(&self) -> &AddChatMember { &self.inner }
235}
236
237
238
239
240
241
242
243#[derive(Debug, Clone, Default, Serialize, Deserialize)]
245pub struct AddChatMembers {
246 #[doc(hidden)]
247 #[serde(rename(serialize = "@type", deserialize = "@type"))]
248 td_name: String,
249 #[doc(hidden)]
250 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
251 extra: Option<String>,
252 chat_id: i64,
254 user_ids: Vec<i64>,
256
257}
258
259impl RObject for AddChatMembers {
260 #[doc(hidden)] fn td_name(&self) -> &'static str { "addChatMembers" }
261 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
262 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
263}
264
265
266
267
268impl RFunction for AddChatMembers {}
269
270impl AddChatMembers {
271 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
272 pub fn builder() -> RTDAddChatMembersBuilder {
273 let mut inner = AddChatMembers::default();
274 inner.td_name = "addChatMembers".to_string();
275 inner.extra = Some(Uuid::new_v4().to_string());
276 RTDAddChatMembersBuilder { inner }
277 }
278
279 pub fn chat_id(&self) -> i64 { self.chat_id }
280
281 pub fn user_ids(&self) -> &Vec<i64> { &self.user_ids }
282
283}
284
285#[doc(hidden)]
286pub struct RTDAddChatMembersBuilder {
287 inner: AddChatMembers
288}
289
290impl RTDAddChatMembersBuilder {
291 pub fn build(&self) -> AddChatMembers { self.inner.clone() }
292
293
294 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
295 self.inner.chat_id = chat_id;
296 self
297 }
298
299
300 pub fn user_ids(&mut self, user_ids: Vec<i64>) -> &mut Self {
301 self.inner.user_ids = user_ids;
302 self
303 }
304
305}
306
307impl AsRef<AddChatMembers> for AddChatMembers {
308 fn as_ref(&self) -> &AddChatMembers { self }
309}
310
311impl AsRef<AddChatMembers> for RTDAddChatMembersBuilder {
312 fn as_ref(&self) -> &AddChatMembers { &self.inner }
313}
314
315
316
317
318
319
320
321#[derive(Debug, Clone, Default, Serialize, Deserialize)]
323pub struct AddChatToList {
324 #[doc(hidden)]
325 #[serde(rename(serialize = "@type", deserialize = "@type"))]
326 td_name: String,
327 #[doc(hidden)]
328 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
329 extra: Option<String>,
330 chat_id: i64,
332 chat_list: ChatList,
334
335}
336
337impl RObject for AddChatToList {
338 #[doc(hidden)] fn td_name(&self) -> &'static str { "addChatToList" }
339 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
340 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
341}
342
343
344
345
346impl RFunction for AddChatToList {}
347
348impl AddChatToList {
349 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
350 pub fn builder() -> RTDAddChatToListBuilder {
351 let mut inner = AddChatToList::default();
352 inner.td_name = "addChatToList".to_string();
353 inner.extra = Some(Uuid::new_v4().to_string());
354 RTDAddChatToListBuilder { inner }
355 }
356
357 pub fn chat_id(&self) -> i64 { self.chat_id }
358
359 pub fn chat_list(&self) -> &ChatList { &self.chat_list }
360
361}
362
363#[doc(hidden)]
364pub struct RTDAddChatToListBuilder {
365 inner: AddChatToList
366}
367
368impl RTDAddChatToListBuilder {
369 pub fn build(&self) -> AddChatToList { self.inner.clone() }
370
371
372 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
373 self.inner.chat_id = chat_id;
374 self
375 }
376
377
378 pub fn chat_list<T: AsRef<ChatList>>(&mut self, chat_list: T) -> &mut Self {
379 self.inner.chat_list = chat_list.as_ref().clone();
380 self
381 }
382
383}
384
385impl AsRef<AddChatToList> for AddChatToList {
386 fn as_ref(&self) -> &AddChatToList { self }
387}
388
389impl AsRef<AddChatToList> for RTDAddChatToListBuilder {
390 fn as_ref(&self) -> &AddChatToList { &self.inner }
391}
392
393
394
395
396
397
398
399#[derive(Debug, Clone, Default, Serialize, Deserialize)]
401pub struct AddContact {
402 #[doc(hidden)]
403 #[serde(rename(serialize = "@type", deserialize = "@type"))]
404 td_name: String,
405 #[doc(hidden)]
406 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
407 extra: Option<String>,
408 contact: Contact,
410 share_phone_number: bool,
412
413}
414
415impl RObject for AddContact {
416 #[doc(hidden)] fn td_name(&self) -> &'static str { "addContact" }
417 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
418 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
419}
420
421
422
423
424impl RFunction for AddContact {}
425
426impl AddContact {
427 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
428 pub fn builder() -> RTDAddContactBuilder {
429 let mut inner = AddContact::default();
430 inner.td_name = "addContact".to_string();
431 inner.extra = Some(Uuid::new_v4().to_string());
432 RTDAddContactBuilder { inner }
433 }
434
435 pub fn contact(&self) -> &Contact { &self.contact }
436
437 pub fn share_phone_number(&self) -> bool { self.share_phone_number }
438
439}
440
441#[doc(hidden)]
442pub struct RTDAddContactBuilder {
443 inner: AddContact
444}
445
446impl RTDAddContactBuilder {
447 pub fn build(&self) -> AddContact { self.inner.clone() }
448
449
450 pub fn contact<T: AsRef<Contact>>(&mut self, contact: T) -> &mut Self {
451 self.inner.contact = contact.as_ref().clone();
452 self
453 }
454
455
456 pub fn share_phone_number(&mut self, share_phone_number: bool) -> &mut Self {
457 self.inner.share_phone_number = share_phone_number;
458 self
459 }
460
461}
462
463impl AsRef<AddContact> for AddContact {
464 fn as_ref(&self) -> &AddContact { self }
465}
466
467impl AsRef<AddContact> for RTDAddContactBuilder {
468 fn as_ref(&self) -> &AddContact { &self.inner }
469}
470
471
472
473
474
475
476
477#[derive(Debug, Clone, Default, Serialize, Deserialize)]
479pub struct AddCustomServerLanguagePack {
480 #[doc(hidden)]
481 #[serde(rename(serialize = "@type", deserialize = "@type"))]
482 td_name: String,
483 #[doc(hidden)]
484 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
485 extra: Option<String>,
486 language_pack_id: String,
488
489}
490
491impl RObject for AddCustomServerLanguagePack {
492 #[doc(hidden)] fn td_name(&self) -> &'static str { "addCustomServerLanguagePack" }
493 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
494 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
495}
496
497
498
499
500impl RFunction for AddCustomServerLanguagePack {}
501
502impl AddCustomServerLanguagePack {
503 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
504 pub fn builder() -> RTDAddCustomServerLanguagePackBuilder {
505 let mut inner = AddCustomServerLanguagePack::default();
506 inner.td_name = "addCustomServerLanguagePack".to_string();
507 inner.extra = Some(Uuid::new_v4().to_string());
508 RTDAddCustomServerLanguagePackBuilder { inner }
509 }
510
511 pub fn language_pack_id(&self) -> &String { &self.language_pack_id }
512
513}
514
515#[doc(hidden)]
516pub struct RTDAddCustomServerLanguagePackBuilder {
517 inner: AddCustomServerLanguagePack
518}
519
520impl RTDAddCustomServerLanguagePackBuilder {
521 pub fn build(&self) -> AddCustomServerLanguagePack { self.inner.clone() }
522
523
524 pub fn language_pack_id<T: AsRef<str>>(&mut self, language_pack_id: T) -> &mut Self {
525 self.inner.language_pack_id = language_pack_id.as_ref().to_string();
526 self
527 }
528
529}
530
531impl AsRef<AddCustomServerLanguagePack> for AddCustomServerLanguagePack {
532 fn as_ref(&self) -> &AddCustomServerLanguagePack { self }
533}
534
535impl AsRef<AddCustomServerLanguagePack> for RTDAddCustomServerLanguagePackBuilder {
536 fn as_ref(&self) -> &AddCustomServerLanguagePack { &self.inner }
537}
538
539
540
541
542
543
544
545#[derive(Debug, Clone, Default, Serialize, Deserialize)]
547pub struct AddFavoriteSticker {
548 #[doc(hidden)]
549 #[serde(rename(serialize = "@type", deserialize = "@type"))]
550 td_name: String,
551 #[doc(hidden)]
552 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
553 extra: Option<String>,
554 sticker: InputFile,
556
557}
558
559impl RObject for AddFavoriteSticker {
560 #[doc(hidden)] fn td_name(&self) -> &'static str { "addFavoriteSticker" }
561 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
562 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
563}
564
565
566
567
568impl RFunction for AddFavoriteSticker {}
569
570impl AddFavoriteSticker {
571 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
572 pub fn builder() -> RTDAddFavoriteStickerBuilder {
573 let mut inner = AddFavoriteSticker::default();
574 inner.td_name = "addFavoriteSticker".to_string();
575 inner.extra = Some(Uuid::new_v4().to_string());
576 RTDAddFavoriteStickerBuilder { inner }
577 }
578
579 pub fn sticker(&self) -> &InputFile { &self.sticker }
580
581}
582
583#[doc(hidden)]
584pub struct RTDAddFavoriteStickerBuilder {
585 inner: AddFavoriteSticker
586}
587
588impl RTDAddFavoriteStickerBuilder {
589 pub fn build(&self) -> AddFavoriteSticker { self.inner.clone() }
590
591
592 pub fn sticker<T: AsRef<InputFile>>(&mut self, sticker: T) -> &mut Self {
593 self.inner.sticker = sticker.as_ref().clone();
594 self
595 }
596
597}
598
599impl AsRef<AddFavoriteSticker> for AddFavoriteSticker {
600 fn as_ref(&self) -> &AddFavoriteSticker { self }
601}
602
603impl AsRef<AddFavoriteSticker> for RTDAddFavoriteStickerBuilder {
604 fn as_ref(&self) -> &AddFavoriteSticker { &self.inner }
605}
606
607
608
609
610
611
612
613#[derive(Debug, Clone, Default, Serialize, Deserialize)]
615pub struct AddLocalMessage {
616 #[doc(hidden)]
617 #[serde(rename(serialize = "@type", deserialize = "@type"))]
618 td_name: String,
619 #[doc(hidden)]
620 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
621 extra: Option<String>,
622 chat_id: i64,
624 sender_id: MessageSender,
626 reply_to_message_id: i64,
628 disable_notification: bool,
630 input_message_content: InputMessageContent,
632
633}
634
635impl RObject for AddLocalMessage {
636 #[doc(hidden)] fn td_name(&self) -> &'static str { "addLocalMessage" }
637 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
638 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
639}
640
641
642
643
644impl RFunction for AddLocalMessage {}
645
646impl AddLocalMessage {
647 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
648 pub fn builder() -> RTDAddLocalMessageBuilder {
649 let mut inner = AddLocalMessage::default();
650 inner.td_name = "addLocalMessage".to_string();
651 inner.extra = Some(Uuid::new_v4().to_string());
652 RTDAddLocalMessageBuilder { inner }
653 }
654
655 pub fn chat_id(&self) -> i64 { self.chat_id }
656
657 pub fn sender_id(&self) -> &MessageSender { &self.sender_id }
658
659 pub fn reply_to_message_id(&self) -> i64 { self.reply_to_message_id }
660
661 pub fn disable_notification(&self) -> bool { self.disable_notification }
662
663 pub fn input_message_content(&self) -> &InputMessageContent { &self.input_message_content }
664
665}
666
667#[doc(hidden)]
668pub struct RTDAddLocalMessageBuilder {
669 inner: AddLocalMessage
670}
671
672impl RTDAddLocalMessageBuilder {
673 pub fn build(&self) -> AddLocalMessage { self.inner.clone() }
674
675
676 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
677 self.inner.chat_id = chat_id;
678 self
679 }
680
681
682 pub fn sender_id<T: AsRef<MessageSender>>(&mut self, sender_id: T) -> &mut Self {
683 self.inner.sender_id = sender_id.as_ref().clone();
684 self
685 }
686
687
688 pub fn reply_to_message_id(&mut self, reply_to_message_id: i64) -> &mut Self {
689 self.inner.reply_to_message_id = reply_to_message_id;
690 self
691 }
692
693
694 pub fn disable_notification(&mut self, disable_notification: bool) -> &mut Self {
695 self.inner.disable_notification = disable_notification;
696 self
697 }
698
699
700 pub fn input_message_content<T: AsRef<InputMessageContent>>(&mut self, input_message_content: T) -> &mut Self {
701 self.inner.input_message_content = input_message_content.as_ref().clone();
702 self
703 }
704
705}
706
707impl AsRef<AddLocalMessage> for AddLocalMessage {
708 fn as_ref(&self) -> &AddLocalMessage { self }
709}
710
711impl AsRef<AddLocalMessage> for RTDAddLocalMessageBuilder {
712 fn as_ref(&self) -> &AddLocalMessage { &self.inner }
713}
714
715
716
717
718
719
720
721#[derive(Debug, Clone, Default, Serialize, Deserialize)]
723pub struct AddLogMessage {
724 #[doc(hidden)]
725 #[serde(rename(serialize = "@type", deserialize = "@type"))]
726 td_name: String,
727 #[doc(hidden)]
728 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
729 extra: Option<String>,
730 verbosity_level: i64,
732 text: String,
734
735}
736
737impl RObject for AddLogMessage {
738 #[doc(hidden)] fn td_name(&self) -> &'static str { "addLogMessage" }
739 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
740 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
741}
742
743
744
745
746impl RFunction for AddLogMessage {}
747
748impl AddLogMessage {
749 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
750 pub fn builder() -> RTDAddLogMessageBuilder {
751 let mut inner = AddLogMessage::default();
752 inner.td_name = "addLogMessage".to_string();
753 inner.extra = Some(Uuid::new_v4().to_string());
754 RTDAddLogMessageBuilder { inner }
755 }
756
757 pub fn verbosity_level(&self) -> i64 { self.verbosity_level }
758
759 pub fn text(&self) -> &String { &self.text }
760
761}
762
763#[doc(hidden)]
764pub struct RTDAddLogMessageBuilder {
765 inner: AddLogMessage
766}
767
768impl RTDAddLogMessageBuilder {
769 pub fn build(&self) -> AddLogMessage { self.inner.clone() }
770
771
772 pub fn verbosity_level(&mut self, verbosity_level: i64) -> &mut Self {
773 self.inner.verbosity_level = verbosity_level;
774 self
775 }
776
777
778 pub fn text<T: AsRef<str>>(&mut self, text: T) -> &mut Self {
779 self.inner.text = text.as_ref().to_string();
780 self
781 }
782
783}
784
785impl AsRef<AddLogMessage> for AddLogMessage {
786 fn as_ref(&self) -> &AddLogMessage { self }
787}
788
789impl AsRef<AddLogMessage> for RTDAddLogMessageBuilder {
790 fn as_ref(&self) -> &AddLogMessage { &self.inner }
791}
792
793
794
795
796
797
798
799#[derive(Debug, Clone, Default, Serialize, Deserialize)]
801pub struct AddNetworkStatistics {
802 #[doc(hidden)]
803 #[serde(rename(serialize = "@type", deserialize = "@type"))]
804 td_name: String,
805 #[doc(hidden)]
806 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
807 extra: Option<String>,
808 entry: NetworkStatisticsEntry,
810
811}
812
813impl RObject for AddNetworkStatistics {
814 #[doc(hidden)] fn td_name(&self) -> &'static str { "addNetworkStatistics" }
815 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
816 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
817}
818
819
820
821
822impl RFunction for AddNetworkStatistics {}
823
824impl AddNetworkStatistics {
825 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
826 pub fn builder() -> RTDAddNetworkStatisticsBuilder {
827 let mut inner = AddNetworkStatistics::default();
828 inner.td_name = "addNetworkStatistics".to_string();
829 inner.extra = Some(Uuid::new_v4().to_string());
830 RTDAddNetworkStatisticsBuilder { inner }
831 }
832
833 pub fn entry(&self) -> &NetworkStatisticsEntry { &self.entry }
834
835}
836
837#[doc(hidden)]
838pub struct RTDAddNetworkStatisticsBuilder {
839 inner: AddNetworkStatistics
840}
841
842impl RTDAddNetworkStatisticsBuilder {
843 pub fn build(&self) -> AddNetworkStatistics { self.inner.clone() }
844
845
846 pub fn entry<T: AsRef<NetworkStatisticsEntry>>(&mut self, entry: T) -> &mut Self {
847 self.inner.entry = entry.as_ref().clone();
848 self
849 }
850
851}
852
853impl AsRef<AddNetworkStatistics> for AddNetworkStatistics {
854 fn as_ref(&self) -> &AddNetworkStatistics { self }
855}
856
857impl AsRef<AddNetworkStatistics> for RTDAddNetworkStatisticsBuilder {
858 fn as_ref(&self) -> &AddNetworkStatistics { &self.inner }
859}
860
861
862
863
864
865
866
867#[derive(Debug, Clone, Default, Serialize, Deserialize)]
869pub struct AddProxy {
870 #[doc(hidden)]
871 #[serde(rename(serialize = "@type", deserialize = "@type"))]
872 td_name: String,
873 #[doc(hidden)]
874 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
875 extra: Option<String>,
876 server: String,
878 port: i64,
880 enable: bool,
882 #[serde(rename(serialize = "type", deserialize = "type"))] type_: ProxyType,
884
885}
886
887impl RObject for AddProxy {
888 #[doc(hidden)] fn td_name(&self) -> &'static str { "addProxy" }
889 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
890 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
891}
892
893
894
895
896impl RFunction for AddProxy {}
897
898impl AddProxy {
899 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
900 pub fn builder() -> RTDAddProxyBuilder {
901 let mut inner = AddProxy::default();
902 inner.td_name = "addProxy".to_string();
903 inner.extra = Some(Uuid::new_v4().to_string());
904 RTDAddProxyBuilder { inner }
905 }
906
907 pub fn server(&self) -> &String { &self.server }
908
909 pub fn port(&self) -> i64 { self.port }
910
911 pub fn enable(&self) -> bool { self.enable }
912
913 pub fn type_(&self) -> &ProxyType { &self.type_ }
914
915}
916
917#[doc(hidden)]
918pub struct RTDAddProxyBuilder {
919 inner: AddProxy
920}
921
922impl RTDAddProxyBuilder {
923 pub fn build(&self) -> AddProxy { self.inner.clone() }
924
925
926 pub fn server<T: AsRef<str>>(&mut self, server: T) -> &mut Self {
927 self.inner.server = server.as_ref().to_string();
928 self
929 }
930
931
932 pub fn port(&mut self, port: i64) -> &mut Self {
933 self.inner.port = port;
934 self
935 }
936
937
938 pub fn enable(&mut self, enable: bool) -> &mut Self {
939 self.inner.enable = enable;
940 self
941 }
942
943
944 pub fn type_<T: AsRef<ProxyType>>(&mut self, type_: T) -> &mut Self {
945 self.inner.type_ = type_.as_ref().clone();
946 self
947 }
948
949}
950
951impl AsRef<AddProxy> for AddProxy {
952 fn as_ref(&self) -> &AddProxy { self }
953}
954
955impl AsRef<AddProxy> for RTDAddProxyBuilder {
956 fn as_ref(&self) -> &AddProxy { &self.inner }
957}
958
959
960
961
962
963
964
965#[derive(Debug, Clone, Default, Serialize, Deserialize)]
967pub struct AddRecentSticker {
968 #[doc(hidden)]
969 #[serde(rename(serialize = "@type", deserialize = "@type"))]
970 td_name: String,
971 #[doc(hidden)]
972 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
973 extra: Option<String>,
974 is_attached: bool,
976 sticker: InputFile,
978
979}
980
981impl RObject for AddRecentSticker {
982 #[doc(hidden)] fn td_name(&self) -> &'static str { "addRecentSticker" }
983 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
984 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
985}
986
987
988
989
990impl RFunction for AddRecentSticker {}
991
992impl AddRecentSticker {
993 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
994 pub fn builder() -> RTDAddRecentStickerBuilder {
995 let mut inner = AddRecentSticker::default();
996 inner.td_name = "addRecentSticker".to_string();
997 inner.extra = Some(Uuid::new_v4().to_string());
998 RTDAddRecentStickerBuilder { inner }
999 }
1000
1001 pub fn is_attached(&self) -> bool { self.is_attached }
1002
1003 pub fn sticker(&self) -> &InputFile { &self.sticker }
1004
1005}
1006
1007#[doc(hidden)]
1008pub struct RTDAddRecentStickerBuilder {
1009 inner: AddRecentSticker
1010}
1011
1012impl RTDAddRecentStickerBuilder {
1013 pub fn build(&self) -> AddRecentSticker { self.inner.clone() }
1014
1015
1016 pub fn is_attached(&mut self, is_attached: bool) -> &mut Self {
1017 self.inner.is_attached = is_attached;
1018 self
1019 }
1020
1021
1022 pub fn sticker<T: AsRef<InputFile>>(&mut self, sticker: T) -> &mut Self {
1023 self.inner.sticker = sticker.as_ref().clone();
1024 self
1025 }
1026
1027}
1028
1029impl AsRef<AddRecentSticker> for AddRecentSticker {
1030 fn as_ref(&self) -> &AddRecentSticker { self }
1031}
1032
1033impl AsRef<AddRecentSticker> for RTDAddRecentStickerBuilder {
1034 fn as_ref(&self) -> &AddRecentSticker { &self.inner }
1035}
1036
1037
1038
1039
1040
1041
1042
1043#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1045pub struct AddRecentlyFoundChat {
1046 #[doc(hidden)]
1047 #[serde(rename(serialize = "@type", deserialize = "@type"))]
1048 td_name: String,
1049 #[doc(hidden)]
1050 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
1051 extra: Option<String>,
1052 chat_id: i64,
1054
1055}
1056
1057impl RObject for AddRecentlyFoundChat {
1058 #[doc(hidden)] fn td_name(&self) -> &'static str { "addRecentlyFoundChat" }
1059 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
1060 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
1061}
1062
1063
1064
1065
1066impl RFunction for AddRecentlyFoundChat {}
1067
1068impl AddRecentlyFoundChat {
1069 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
1070 pub fn builder() -> RTDAddRecentlyFoundChatBuilder {
1071 let mut inner = AddRecentlyFoundChat::default();
1072 inner.td_name = "addRecentlyFoundChat".to_string();
1073 inner.extra = Some(Uuid::new_v4().to_string());
1074 RTDAddRecentlyFoundChatBuilder { inner }
1075 }
1076
1077 pub fn chat_id(&self) -> i64 { self.chat_id }
1078
1079}
1080
1081#[doc(hidden)]
1082pub struct RTDAddRecentlyFoundChatBuilder {
1083 inner: AddRecentlyFoundChat
1084}
1085
1086impl RTDAddRecentlyFoundChatBuilder {
1087 pub fn build(&self) -> AddRecentlyFoundChat { self.inner.clone() }
1088
1089
1090 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
1091 self.inner.chat_id = chat_id;
1092 self
1093 }
1094
1095}
1096
1097impl AsRef<AddRecentlyFoundChat> for AddRecentlyFoundChat {
1098 fn as_ref(&self) -> &AddRecentlyFoundChat { self }
1099}
1100
1101impl AsRef<AddRecentlyFoundChat> for RTDAddRecentlyFoundChatBuilder {
1102 fn as_ref(&self) -> &AddRecentlyFoundChat { &self.inner }
1103}
1104
1105
1106
1107
1108
1109
1110
1111#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1113pub struct AddSavedAnimation {
1114 #[doc(hidden)]
1115 #[serde(rename(serialize = "@type", deserialize = "@type"))]
1116 td_name: String,
1117 #[doc(hidden)]
1118 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
1119 extra: Option<String>,
1120 animation: InputFile,
1122
1123}
1124
1125impl RObject for AddSavedAnimation {
1126 #[doc(hidden)] fn td_name(&self) -> &'static str { "addSavedAnimation" }
1127 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
1128 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
1129}
1130
1131
1132
1133
1134impl RFunction for AddSavedAnimation {}
1135
1136impl AddSavedAnimation {
1137 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
1138 pub fn builder() -> RTDAddSavedAnimationBuilder {
1139 let mut inner = AddSavedAnimation::default();
1140 inner.td_name = "addSavedAnimation".to_string();
1141 inner.extra = Some(Uuid::new_v4().to_string());
1142 RTDAddSavedAnimationBuilder { inner }
1143 }
1144
1145 pub fn animation(&self) -> &InputFile { &self.animation }
1146
1147}
1148
1149#[doc(hidden)]
1150pub struct RTDAddSavedAnimationBuilder {
1151 inner: AddSavedAnimation
1152}
1153
1154impl RTDAddSavedAnimationBuilder {
1155 pub fn build(&self) -> AddSavedAnimation { self.inner.clone() }
1156
1157
1158 pub fn animation<T: AsRef<InputFile>>(&mut self, animation: T) -> &mut Self {
1159 self.inner.animation = animation.as_ref().clone();
1160 self
1161 }
1162
1163}
1164
1165impl AsRef<AddSavedAnimation> for AddSavedAnimation {
1166 fn as_ref(&self) -> &AddSavedAnimation { self }
1167}
1168
1169impl AsRef<AddSavedAnimation> for RTDAddSavedAnimationBuilder {
1170 fn as_ref(&self) -> &AddSavedAnimation { &self.inner }
1171}
1172
1173
1174
1175
1176
1177
1178
1179#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1181pub struct AddStickerToSet {
1182 #[doc(hidden)]
1183 #[serde(rename(serialize = "@type", deserialize = "@type"))]
1184 td_name: String,
1185 #[doc(hidden)]
1186 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
1187 extra: Option<String>,
1188 user_id: i64,
1190 name: String,
1192 sticker: InputSticker,
1194
1195}
1196
1197impl RObject for AddStickerToSet {
1198 #[doc(hidden)] fn td_name(&self) -> &'static str { "addStickerToSet" }
1199 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
1200 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
1201}
1202
1203
1204
1205
1206impl RFunction for AddStickerToSet {}
1207
1208impl AddStickerToSet {
1209 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
1210 pub fn builder() -> RTDAddStickerToSetBuilder {
1211 let mut inner = AddStickerToSet::default();
1212 inner.td_name = "addStickerToSet".to_string();
1213 inner.extra = Some(Uuid::new_v4().to_string());
1214 RTDAddStickerToSetBuilder { inner }
1215 }
1216
1217 pub fn user_id(&self) -> i64 { self.user_id }
1218
1219 pub fn name(&self) -> &String { &self.name }
1220
1221 pub fn sticker(&self) -> &InputSticker { &self.sticker }
1222
1223}
1224
1225#[doc(hidden)]
1226pub struct RTDAddStickerToSetBuilder {
1227 inner: AddStickerToSet
1228}
1229
1230impl RTDAddStickerToSetBuilder {
1231 pub fn build(&self) -> AddStickerToSet { self.inner.clone() }
1232
1233
1234 pub fn user_id(&mut self, user_id: i64) -> &mut Self {
1235 self.inner.user_id = user_id;
1236 self
1237 }
1238
1239
1240 pub fn name<T: AsRef<str>>(&mut self, name: T) -> &mut Self {
1241 self.inner.name = name.as_ref().to_string();
1242 self
1243 }
1244
1245
1246 pub fn sticker<T: AsRef<InputSticker>>(&mut self, sticker: T) -> &mut Self {
1247 self.inner.sticker = sticker.as_ref().clone();
1248 self
1249 }
1250
1251}
1252
1253impl AsRef<AddStickerToSet> for AddStickerToSet {
1254 fn as_ref(&self) -> &AddStickerToSet { self }
1255}
1256
1257impl AsRef<AddStickerToSet> for RTDAddStickerToSetBuilder {
1258 fn as_ref(&self) -> &AddStickerToSet { &self.inner }
1259}
1260
1261
1262
1263
1264
1265
1266
1267#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1269pub struct AnswerCallbackQuery {
1270 #[doc(hidden)]
1271 #[serde(rename(serialize = "@type", deserialize = "@type"))]
1272 td_name: String,
1273 #[doc(hidden)]
1274 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
1275 extra: Option<String>,
1276 callback_query_id: isize,
1278 text: String,
1280 show_alert: bool,
1282 url: String,
1284 cache_time: i64,
1286
1287}
1288
1289impl RObject for AnswerCallbackQuery {
1290 #[doc(hidden)] fn td_name(&self) -> &'static str { "answerCallbackQuery" }
1291 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
1292 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
1293}
1294
1295
1296
1297
1298impl RFunction for AnswerCallbackQuery {}
1299
1300impl AnswerCallbackQuery {
1301 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
1302 pub fn builder() -> RTDAnswerCallbackQueryBuilder {
1303 let mut inner = AnswerCallbackQuery::default();
1304 inner.td_name = "answerCallbackQuery".to_string();
1305 inner.extra = Some(Uuid::new_v4().to_string());
1306 RTDAnswerCallbackQueryBuilder { inner }
1307 }
1308
1309 pub fn callback_query_id(&self) -> isize { self.callback_query_id }
1310
1311 pub fn text(&self) -> &String { &self.text }
1312
1313 pub fn show_alert(&self) -> bool { self.show_alert }
1314
1315 pub fn url(&self) -> &String { &self.url }
1316
1317 pub fn cache_time(&self) -> i64 { self.cache_time }
1318
1319}
1320
1321#[doc(hidden)]
1322pub struct RTDAnswerCallbackQueryBuilder {
1323 inner: AnswerCallbackQuery
1324}
1325
1326impl RTDAnswerCallbackQueryBuilder {
1327 pub fn build(&self) -> AnswerCallbackQuery { self.inner.clone() }
1328
1329
1330 pub fn callback_query_id(&mut self, callback_query_id: isize) -> &mut Self {
1331 self.inner.callback_query_id = callback_query_id;
1332 self
1333 }
1334
1335
1336 pub fn text<T: AsRef<str>>(&mut self, text: T) -> &mut Self {
1337 self.inner.text = text.as_ref().to_string();
1338 self
1339 }
1340
1341
1342 pub fn show_alert(&mut self, show_alert: bool) -> &mut Self {
1343 self.inner.show_alert = show_alert;
1344 self
1345 }
1346
1347
1348 pub fn url<T: AsRef<str>>(&mut self, url: T) -> &mut Self {
1349 self.inner.url = url.as_ref().to_string();
1350 self
1351 }
1352
1353
1354 pub fn cache_time(&mut self, cache_time: i64) -> &mut Self {
1355 self.inner.cache_time = cache_time;
1356 self
1357 }
1358
1359}
1360
1361impl AsRef<AnswerCallbackQuery> for AnswerCallbackQuery {
1362 fn as_ref(&self) -> &AnswerCallbackQuery { self }
1363}
1364
1365impl AsRef<AnswerCallbackQuery> for RTDAnswerCallbackQueryBuilder {
1366 fn as_ref(&self) -> &AnswerCallbackQuery { &self.inner }
1367}
1368
1369
1370
1371
1372
1373
1374
1375#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1377pub struct AnswerCustomQuery {
1378 #[doc(hidden)]
1379 #[serde(rename(serialize = "@type", deserialize = "@type"))]
1380 td_name: String,
1381 #[doc(hidden)]
1382 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
1383 extra: Option<String>,
1384 custom_query_id: isize,
1386 data: String,
1388
1389}
1390
1391impl RObject for AnswerCustomQuery {
1392 #[doc(hidden)] fn td_name(&self) -> &'static str { "answerCustomQuery" }
1393 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
1394 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
1395}
1396
1397
1398
1399
1400impl RFunction for AnswerCustomQuery {}
1401
1402impl AnswerCustomQuery {
1403 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
1404 pub fn builder() -> RTDAnswerCustomQueryBuilder {
1405 let mut inner = AnswerCustomQuery::default();
1406 inner.td_name = "answerCustomQuery".to_string();
1407 inner.extra = Some(Uuid::new_v4().to_string());
1408 RTDAnswerCustomQueryBuilder { inner }
1409 }
1410
1411 pub fn custom_query_id(&self) -> isize { self.custom_query_id }
1412
1413 pub fn data(&self) -> &String { &self.data }
1414
1415}
1416
1417#[doc(hidden)]
1418pub struct RTDAnswerCustomQueryBuilder {
1419 inner: AnswerCustomQuery
1420}
1421
1422impl RTDAnswerCustomQueryBuilder {
1423 pub fn build(&self) -> AnswerCustomQuery { self.inner.clone() }
1424
1425
1426 pub fn custom_query_id(&mut self, custom_query_id: isize) -> &mut Self {
1427 self.inner.custom_query_id = custom_query_id;
1428 self
1429 }
1430
1431
1432 pub fn data<T: AsRef<str>>(&mut self, data: T) -> &mut Self {
1433 self.inner.data = data.as_ref().to_string();
1434 self
1435 }
1436
1437}
1438
1439impl AsRef<AnswerCustomQuery> for AnswerCustomQuery {
1440 fn as_ref(&self) -> &AnswerCustomQuery { self }
1441}
1442
1443impl AsRef<AnswerCustomQuery> for RTDAnswerCustomQueryBuilder {
1444 fn as_ref(&self) -> &AnswerCustomQuery { &self.inner }
1445}
1446
1447
1448
1449
1450
1451
1452
1453#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1455pub struct AnswerInlineQuery {
1456 #[doc(hidden)]
1457 #[serde(rename(serialize = "@type", deserialize = "@type"))]
1458 td_name: String,
1459 #[doc(hidden)]
1460 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
1461 extra: Option<String>,
1462 inline_query_id: isize,
1464 is_personal: bool,
1466 results: Vec<InputInlineQueryResult>,
1468 cache_time: i64,
1470 next_offset: String,
1472 switch_pm_text: String,
1474 switch_pm_parameter: String,
1476
1477}
1478
1479impl RObject for AnswerInlineQuery {
1480 #[doc(hidden)] fn td_name(&self) -> &'static str { "answerInlineQuery" }
1481 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
1482 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
1483}
1484
1485
1486
1487
1488impl RFunction for AnswerInlineQuery {}
1489
1490impl AnswerInlineQuery {
1491 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
1492 pub fn builder() -> RTDAnswerInlineQueryBuilder {
1493 let mut inner = AnswerInlineQuery::default();
1494 inner.td_name = "answerInlineQuery".to_string();
1495 inner.extra = Some(Uuid::new_v4().to_string());
1496 RTDAnswerInlineQueryBuilder { inner }
1497 }
1498
1499 pub fn inline_query_id(&self) -> isize { self.inline_query_id }
1500
1501 pub fn is_personal(&self) -> bool { self.is_personal }
1502
1503 pub fn results(&self) -> &Vec<InputInlineQueryResult> { &self.results }
1504
1505 pub fn cache_time(&self) -> i64 { self.cache_time }
1506
1507 pub fn next_offset(&self) -> &String { &self.next_offset }
1508
1509 pub fn switch_pm_text(&self) -> &String { &self.switch_pm_text }
1510
1511 pub fn switch_pm_parameter(&self) -> &String { &self.switch_pm_parameter }
1512
1513}
1514
1515#[doc(hidden)]
1516pub struct RTDAnswerInlineQueryBuilder {
1517 inner: AnswerInlineQuery
1518}
1519
1520impl RTDAnswerInlineQueryBuilder {
1521 pub fn build(&self) -> AnswerInlineQuery { self.inner.clone() }
1522
1523
1524 pub fn inline_query_id(&mut self, inline_query_id: isize) -> &mut Self {
1525 self.inner.inline_query_id = inline_query_id;
1526 self
1527 }
1528
1529
1530 pub fn is_personal(&mut self, is_personal: bool) -> &mut Self {
1531 self.inner.is_personal = is_personal;
1532 self
1533 }
1534
1535
1536 pub fn results(&mut self, results: Vec<InputInlineQueryResult>) -> &mut Self {
1537 self.inner.results = results;
1538 self
1539 }
1540
1541
1542 pub fn cache_time(&mut self, cache_time: i64) -> &mut Self {
1543 self.inner.cache_time = cache_time;
1544 self
1545 }
1546
1547
1548 pub fn next_offset<T: AsRef<str>>(&mut self, next_offset: T) -> &mut Self {
1549 self.inner.next_offset = next_offset.as_ref().to_string();
1550 self
1551 }
1552
1553
1554 pub fn switch_pm_text<T: AsRef<str>>(&mut self, switch_pm_text: T) -> &mut Self {
1555 self.inner.switch_pm_text = switch_pm_text.as_ref().to_string();
1556 self
1557 }
1558
1559
1560 pub fn switch_pm_parameter<T: AsRef<str>>(&mut self, switch_pm_parameter: T) -> &mut Self {
1561 self.inner.switch_pm_parameter = switch_pm_parameter.as_ref().to_string();
1562 self
1563 }
1564
1565}
1566
1567impl AsRef<AnswerInlineQuery> for AnswerInlineQuery {
1568 fn as_ref(&self) -> &AnswerInlineQuery { self }
1569}
1570
1571impl AsRef<AnswerInlineQuery> for RTDAnswerInlineQueryBuilder {
1572 fn as_ref(&self) -> &AnswerInlineQuery { &self.inner }
1573}
1574
1575
1576
1577
1578
1579
1580
1581#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1583pub struct AnswerPreCheckoutQuery {
1584 #[doc(hidden)]
1585 #[serde(rename(serialize = "@type", deserialize = "@type"))]
1586 td_name: String,
1587 #[doc(hidden)]
1588 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
1589 extra: Option<String>,
1590 pre_checkout_query_id: isize,
1592 error_message: String,
1594
1595}
1596
1597impl RObject for AnswerPreCheckoutQuery {
1598 #[doc(hidden)] fn td_name(&self) -> &'static str { "answerPreCheckoutQuery" }
1599 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
1600 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
1601}
1602
1603
1604
1605
1606impl RFunction for AnswerPreCheckoutQuery {}
1607
1608impl AnswerPreCheckoutQuery {
1609 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
1610 pub fn builder() -> RTDAnswerPreCheckoutQueryBuilder {
1611 let mut inner = AnswerPreCheckoutQuery::default();
1612 inner.td_name = "answerPreCheckoutQuery".to_string();
1613 inner.extra = Some(Uuid::new_v4().to_string());
1614 RTDAnswerPreCheckoutQueryBuilder { inner }
1615 }
1616
1617 pub fn pre_checkout_query_id(&self) -> isize { self.pre_checkout_query_id }
1618
1619 pub fn error_message(&self) -> &String { &self.error_message }
1620
1621}
1622
1623#[doc(hidden)]
1624pub struct RTDAnswerPreCheckoutQueryBuilder {
1625 inner: AnswerPreCheckoutQuery
1626}
1627
1628impl RTDAnswerPreCheckoutQueryBuilder {
1629 pub fn build(&self) -> AnswerPreCheckoutQuery { self.inner.clone() }
1630
1631
1632 pub fn pre_checkout_query_id(&mut self, pre_checkout_query_id: isize) -> &mut Self {
1633 self.inner.pre_checkout_query_id = pre_checkout_query_id;
1634 self
1635 }
1636
1637
1638 pub fn error_message<T: AsRef<str>>(&mut self, error_message: T) -> &mut Self {
1639 self.inner.error_message = error_message.as_ref().to_string();
1640 self
1641 }
1642
1643}
1644
1645impl AsRef<AnswerPreCheckoutQuery> for AnswerPreCheckoutQuery {
1646 fn as_ref(&self) -> &AnswerPreCheckoutQuery { self }
1647}
1648
1649impl AsRef<AnswerPreCheckoutQuery> for RTDAnswerPreCheckoutQueryBuilder {
1650 fn as_ref(&self) -> &AnswerPreCheckoutQuery { &self.inner }
1651}
1652
1653
1654
1655
1656
1657
1658
1659#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1661pub struct AnswerShippingQuery {
1662 #[doc(hidden)]
1663 #[serde(rename(serialize = "@type", deserialize = "@type"))]
1664 td_name: String,
1665 #[doc(hidden)]
1666 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
1667 extra: Option<String>,
1668 shipping_query_id: isize,
1670 shipping_options: Vec<ShippingOption>,
1672 error_message: String,
1674
1675}
1676
1677impl RObject for AnswerShippingQuery {
1678 #[doc(hidden)] fn td_name(&self) -> &'static str { "answerShippingQuery" }
1679 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
1680 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
1681}
1682
1683
1684
1685
1686impl RFunction for AnswerShippingQuery {}
1687
1688impl AnswerShippingQuery {
1689 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
1690 pub fn builder() -> RTDAnswerShippingQueryBuilder {
1691 let mut inner = AnswerShippingQuery::default();
1692 inner.td_name = "answerShippingQuery".to_string();
1693 inner.extra = Some(Uuid::new_v4().to_string());
1694 RTDAnswerShippingQueryBuilder { inner }
1695 }
1696
1697 pub fn shipping_query_id(&self) -> isize { self.shipping_query_id }
1698
1699 pub fn shipping_options(&self) -> &Vec<ShippingOption> { &self.shipping_options }
1700
1701 pub fn error_message(&self) -> &String { &self.error_message }
1702
1703}
1704
1705#[doc(hidden)]
1706pub struct RTDAnswerShippingQueryBuilder {
1707 inner: AnswerShippingQuery
1708}
1709
1710impl RTDAnswerShippingQueryBuilder {
1711 pub fn build(&self) -> AnswerShippingQuery { self.inner.clone() }
1712
1713
1714 pub fn shipping_query_id(&mut self, shipping_query_id: isize) -> &mut Self {
1715 self.inner.shipping_query_id = shipping_query_id;
1716 self
1717 }
1718
1719
1720 pub fn shipping_options(&mut self, shipping_options: Vec<ShippingOption>) -> &mut Self {
1721 self.inner.shipping_options = shipping_options;
1722 self
1723 }
1724
1725
1726 pub fn error_message<T: AsRef<str>>(&mut self, error_message: T) -> &mut Self {
1727 self.inner.error_message = error_message.as_ref().to_string();
1728 self
1729 }
1730
1731}
1732
1733impl AsRef<AnswerShippingQuery> for AnswerShippingQuery {
1734 fn as_ref(&self) -> &AnswerShippingQuery { self }
1735}
1736
1737impl AsRef<AnswerShippingQuery> for RTDAnswerShippingQueryBuilder {
1738 fn as_ref(&self) -> &AnswerShippingQuery { &self.inner }
1739}
1740
1741
1742
1743
1744
1745
1746
1747#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1749pub struct BanChatMember {
1750 #[doc(hidden)]
1751 #[serde(rename(serialize = "@type", deserialize = "@type"))]
1752 td_name: String,
1753 #[doc(hidden)]
1754 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
1755 extra: Option<String>,
1756 chat_id: i64,
1758 member_id: MessageSender,
1760 banned_until_date: i64,
1762 revoke_messages: bool,
1764
1765}
1766
1767impl RObject for BanChatMember {
1768 #[doc(hidden)] fn td_name(&self) -> &'static str { "banChatMember" }
1769 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
1770 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
1771}
1772
1773
1774
1775
1776impl RFunction for BanChatMember {}
1777
1778impl BanChatMember {
1779 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
1780 pub fn builder() -> RTDBanChatMemberBuilder {
1781 let mut inner = BanChatMember::default();
1782 inner.td_name = "banChatMember".to_string();
1783 inner.extra = Some(Uuid::new_v4().to_string());
1784 RTDBanChatMemberBuilder { inner }
1785 }
1786
1787 pub fn chat_id(&self) -> i64 { self.chat_id }
1788
1789 pub fn member_id(&self) -> &MessageSender { &self.member_id }
1790
1791 pub fn banned_until_date(&self) -> i64 { self.banned_until_date }
1792
1793 pub fn revoke_messages(&self) -> bool { self.revoke_messages }
1794
1795}
1796
1797#[doc(hidden)]
1798pub struct RTDBanChatMemberBuilder {
1799 inner: BanChatMember
1800}
1801
1802impl RTDBanChatMemberBuilder {
1803 pub fn build(&self) -> BanChatMember { self.inner.clone() }
1804
1805
1806 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
1807 self.inner.chat_id = chat_id;
1808 self
1809 }
1810
1811
1812 pub fn member_id<T: AsRef<MessageSender>>(&mut self, member_id: T) -> &mut Self {
1813 self.inner.member_id = member_id.as_ref().clone();
1814 self
1815 }
1816
1817
1818 pub fn banned_until_date(&mut self, banned_until_date: i64) -> &mut Self {
1819 self.inner.banned_until_date = banned_until_date;
1820 self
1821 }
1822
1823
1824 pub fn revoke_messages(&mut self, revoke_messages: bool) -> &mut Self {
1825 self.inner.revoke_messages = revoke_messages;
1826 self
1827 }
1828
1829}
1830
1831impl AsRef<BanChatMember> for BanChatMember {
1832 fn as_ref(&self) -> &BanChatMember { self }
1833}
1834
1835impl AsRef<BanChatMember> for RTDBanChatMemberBuilder {
1836 fn as_ref(&self) -> &BanChatMember { &self.inner }
1837}
1838
1839
1840
1841
1842
1843
1844
1845#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1847pub struct BlockMessageSenderFromReplies {
1848 #[doc(hidden)]
1849 #[serde(rename(serialize = "@type", deserialize = "@type"))]
1850 td_name: String,
1851 #[doc(hidden)]
1852 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
1853 extra: Option<String>,
1854 message_id: i64,
1856 delete_message: bool,
1858 delete_all_messages: bool,
1860 report_spam: bool,
1862
1863}
1864
1865impl RObject for BlockMessageSenderFromReplies {
1866 #[doc(hidden)] fn td_name(&self) -> &'static str { "blockMessageSenderFromReplies" }
1867 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
1868 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
1869}
1870
1871
1872
1873
1874impl RFunction for BlockMessageSenderFromReplies {}
1875
1876impl BlockMessageSenderFromReplies {
1877 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
1878 pub fn builder() -> RTDBlockMessageSenderFromRepliesBuilder {
1879 let mut inner = BlockMessageSenderFromReplies::default();
1880 inner.td_name = "blockMessageSenderFromReplies".to_string();
1881 inner.extra = Some(Uuid::new_v4().to_string());
1882 RTDBlockMessageSenderFromRepliesBuilder { inner }
1883 }
1884
1885 pub fn message_id(&self) -> i64 { self.message_id }
1886
1887 pub fn delete_message(&self) -> bool { self.delete_message }
1888
1889 pub fn delete_all_messages(&self) -> bool { self.delete_all_messages }
1890
1891 pub fn report_spam(&self) -> bool { self.report_spam }
1892
1893}
1894
1895#[doc(hidden)]
1896pub struct RTDBlockMessageSenderFromRepliesBuilder {
1897 inner: BlockMessageSenderFromReplies
1898}
1899
1900impl RTDBlockMessageSenderFromRepliesBuilder {
1901 pub fn build(&self) -> BlockMessageSenderFromReplies { self.inner.clone() }
1902
1903
1904 pub fn message_id(&mut self, message_id: i64) -> &mut Self {
1905 self.inner.message_id = message_id;
1906 self
1907 }
1908
1909
1910 pub fn delete_message(&mut self, delete_message: bool) -> &mut Self {
1911 self.inner.delete_message = delete_message;
1912 self
1913 }
1914
1915
1916 pub fn delete_all_messages(&mut self, delete_all_messages: bool) -> &mut Self {
1917 self.inner.delete_all_messages = delete_all_messages;
1918 self
1919 }
1920
1921
1922 pub fn report_spam(&mut self, report_spam: bool) -> &mut Self {
1923 self.inner.report_spam = report_spam;
1924 self
1925 }
1926
1927}
1928
1929impl AsRef<BlockMessageSenderFromReplies> for BlockMessageSenderFromReplies {
1930 fn as_ref(&self) -> &BlockMessageSenderFromReplies { self }
1931}
1932
1933impl AsRef<BlockMessageSenderFromReplies> for RTDBlockMessageSenderFromRepliesBuilder {
1934 fn as_ref(&self) -> &BlockMessageSenderFromReplies { &self.inner }
1935}
1936
1937
1938
1939
1940
1941
1942
1943#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1945pub struct CanTransferOwnership {
1946 #[doc(hidden)]
1947 #[serde(rename(serialize = "@type", deserialize = "@type"))]
1948 td_name: String,
1949 #[doc(hidden)]
1950 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
1951 extra: Option<String>,
1952
1953}
1954
1955impl RObject for CanTransferOwnership {
1956 #[doc(hidden)] fn td_name(&self) -> &'static str { "canTransferOwnership" }
1957 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
1958 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
1959}
1960
1961
1962impl TDCanTransferOwnershipResult for CanTransferOwnership {}
1963
1964impl RFunction for CanTransferOwnership {}
1965
1966impl CanTransferOwnership {
1967 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
1968 pub fn builder() -> RTDCanTransferOwnershipBuilder {
1969 let mut inner = CanTransferOwnership::default();
1970 inner.td_name = "canTransferOwnership".to_string();
1971 inner.extra = Some(Uuid::new_v4().to_string());
1972 RTDCanTransferOwnershipBuilder { inner }
1973 }
1974
1975}
1976
1977#[doc(hidden)]
1978pub struct RTDCanTransferOwnershipBuilder {
1979 inner: CanTransferOwnership
1980}
1981
1982impl RTDCanTransferOwnershipBuilder {
1983 pub fn build(&self) -> CanTransferOwnership { self.inner.clone() }
1984
1985}
1986
1987impl AsRef<CanTransferOwnership> for CanTransferOwnership {
1988 fn as_ref(&self) -> &CanTransferOwnership { self }
1989}
1990
1991impl AsRef<CanTransferOwnership> for RTDCanTransferOwnershipBuilder {
1992 fn as_ref(&self) -> &CanTransferOwnership { &self.inner }
1993}
1994
1995
1996
1997
1998
1999
2000
2001#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2003pub struct CancelDownloadFile {
2004 #[doc(hidden)]
2005 #[serde(rename(serialize = "@type", deserialize = "@type"))]
2006 td_name: String,
2007 #[doc(hidden)]
2008 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
2009 extra: Option<String>,
2010 file_id: i64,
2012 only_if_pending: bool,
2014
2015}
2016
2017impl RObject for CancelDownloadFile {
2018 #[doc(hidden)] fn td_name(&self) -> &'static str { "cancelDownloadFile" }
2019 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
2020 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
2021}
2022
2023
2024
2025
2026impl RFunction for CancelDownloadFile {}
2027
2028impl CancelDownloadFile {
2029 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
2030 pub fn builder() -> RTDCancelDownloadFileBuilder {
2031 let mut inner = CancelDownloadFile::default();
2032 inner.td_name = "cancelDownloadFile".to_string();
2033 inner.extra = Some(Uuid::new_v4().to_string());
2034 RTDCancelDownloadFileBuilder { inner }
2035 }
2036
2037 pub fn file_id(&self) -> i64 { self.file_id }
2038
2039 pub fn only_if_pending(&self) -> bool { self.only_if_pending }
2040
2041}
2042
2043#[doc(hidden)]
2044pub struct RTDCancelDownloadFileBuilder {
2045 inner: CancelDownloadFile
2046}
2047
2048impl RTDCancelDownloadFileBuilder {
2049 pub fn build(&self) -> CancelDownloadFile { self.inner.clone() }
2050
2051
2052 pub fn file_id(&mut self, file_id: i64) -> &mut Self {
2053 self.inner.file_id = file_id;
2054 self
2055 }
2056
2057
2058 pub fn only_if_pending(&mut self, only_if_pending: bool) -> &mut Self {
2059 self.inner.only_if_pending = only_if_pending;
2060 self
2061 }
2062
2063}
2064
2065impl AsRef<CancelDownloadFile> for CancelDownloadFile {
2066 fn as_ref(&self) -> &CancelDownloadFile { self }
2067}
2068
2069impl AsRef<CancelDownloadFile> for RTDCancelDownloadFileBuilder {
2070 fn as_ref(&self) -> &CancelDownloadFile { &self.inner }
2071}
2072
2073
2074
2075
2076
2077
2078
2079#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2081pub struct CancelPasswordReset {
2082 #[doc(hidden)]
2083 #[serde(rename(serialize = "@type", deserialize = "@type"))]
2084 td_name: String,
2085 #[doc(hidden)]
2086 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
2087 extra: Option<String>,
2088
2089}
2090
2091impl RObject for CancelPasswordReset {
2092 #[doc(hidden)] fn td_name(&self) -> &'static str { "cancelPasswordReset" }
2093 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
2094 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
2095}
2096
2097
2098
2099
2100impl RFunction for CancelPasswordReset {}
2101
2102impl CancelPasswordReset {
2103 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
2104 pub fn builder() -> RTDCancelPasswordResetBuilder {
2105 let mut inner = CancelPasswordReset::default();
2106 inner.td_name = "cancelPasswordReset".to_string();
2107 inner.extra = Some(Uuid::new_v4().to_string());
2108 RTDCancelPasswordResetBuilder { inner }
2109 }
2110
2111}
2112
2113#[doc(hidden)]
2114pub struct RTDCancelPasswordResetBuilder {
2115 inner: CancelPasswordReset
2116}
2117
2118impl RTDCancelPasswordResetBuilder {
2119 pub fn build(&self) -> CancelPasswordReset { self.inner.clone() }
2120
2121}
2122
2123impl AsRef<CancelPasswordReset> for CancelPasswordReset {
2124 fn as_ref(&self) -> &CancelPasswordReset { self }
2125}
2126
2127impl AsRef<CancelPasswordReset> for RTDCancelPasswordResetBuilder {
2128 fn as_ref(&self) -> &CancelPasswordReset { &self.inner }
2129}
2130
2131
2132
2133
2134
2135
2136
2137#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2139pub struct CancelUploadFile {
2140 #[doc(hidden)]
2141 #[serde(rename(serialize = "@type", deserialize = "@type"))]
2142 td_name: String,
2143 #[doc(hidden)]
2144 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
2145 extra: Option<String>,
2146 file_id: i64,
2148
2149}
2150
2151impl RObject for CancelUploadFile {
2152 #[doc(hidden)] fn td_name(&self) -> &'static str { "cancelUploadFile" }
2153 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
2154 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
2155}
2156
2157
2158
2159
2160impl RFunction for CancelUploadFile {}
2161
2162impl CancelUploadFile {
2163 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
2164 pub fn builder() -> RTDCancelUploadFileBuilder {
2165 let mut inner = CancelUploadFile::default();
2166 inner.td_name = "cancelUploadFile".to_string();
2167 inner.extra = Some(Uuid::new_v4().to_string());
2168 RTDCancelUploadFileBuilder { inner }
2169 }
2170
2171 pub fn file_id(&self) -> i64 { self.file_id }
2172
2173}
2174
2175#[doc(hidden)]
2176pub struct RTDCancelUploadFileBuilder {
2177 inner: CancelUploadFile
2178}
2179
2180impl RTDCancelUploadFileBuilder {
2181 pub fn build(&self) -> CancelUploadFile { self.inner.clone() }
2182
2183
2184 pub fn file_id(&mut self, file_id: i64) -> &mut Self {
2185 self.inner.file_id = file_id;
2186 self
2187 }
2188
2189}
2190
2191impl AsRef<CancelUploadFile> for CancelUploadFile {
2192 fn as_ref(&self) -> &CancelUploadFile { self }
2193}
2194
2195impl AsRef<CancelUploadFile> for RTDCancelUploadFileBuilder {
2196 fn as_ref(&self) -> &CancelUploadFile { &self.inner }
2197}
2198
2199
2200
2201
2202
2203
2204
2205#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2207pub struct ChangeImportedContacts {
2208 #[doc(hidden)]
2209 #[serde(rename(serialize = "@type", deserialize = "@type"))]
2210 td_name: String,
2211 #[doc(hidden)]
2212 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
2213 extra: Option<String>,
2214 contacts: Vec<Contact>,
2216
2217}
2218
2219impl RObject for ChangeImportedContacts {
2220 #[doc(hidden)] fn td_name(&self) -> &'static str { "changeImportedContacts" }
2221 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
2222 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
2223}
2224
2225
2226
2227
2228impl RFunction for ChangeImportedContacts {}
2229
2230impl ChangeImportedContacts {
2231 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
2232 pub fn builder() -> RTDChangeImportedContactsBuilder {
2233 let mut inner = ChangeImportedContacts::default();
2234 inner.td_name = "changeImportedContacts".to_string();
2235 inner.extra = Some(Uuid::new_v4().to_string());
2236 RTDChangeImportedContactsBuilder { inner }
2237 }
2238
2239 pub fn contacts(&self) -> &Vec<Contact> { &self.contacts }
2240
2241}
2242
2243#[doc(hidden)]
2244pub struct RTDChangeImportedContactsBuilder {
2245 inner: ChangeImportedContacts
2246}
2247
2248impl RTDChangeImportedContactsBuilder {
2249 pub fn build(&self) -> ChangeImportedContacts { self.inner.clone() }
2250
2251
2252 pub fn contacts(&mut self, contacts: Vec<Contact>) -> &mut Self {
2253 self.inner.contacts = contacts;
2254 self
2255 }
2256
2257}
2258
2259impl AsRef<ChangeImportedContacts> for ChangeImportedContacts {
2260 fn as_ref(&self) -> &ChangeImportedContacts { self }
2261}
2262
2263impl AsRef<ChangeImportedContacts> for RTDChangeImportedContactsBuilder {
2264 fn as_ref(&self) -> &ChangeImportedContacts { &self.inner }
2265}
2266
2267
2268
2269
2270
2271
2272
2273#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2275pub struct ChangePhoneNumber {
2276 #[doc(hidden)]
2277 #[serde(rename(serialize = "@type", deserialize = "@type"))]
2278 td_name: String,
2279 #[doc(hidden)]
2280 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
2281 extra: Option<String>,
2282 phone_number: String,
2284 settings: PhoneNumberAuthenticationSettings,
2286
2287}
2288
2289impl RObject for ChangePhoneNumber {
2290 #[doc(hidden)] fn td_name(&self) -> &'static str { "changePhoneNumber" }
2291 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
2292 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
2293}
2294
2295
2296
2297
2298impl RFunction for ChangePhoneNumber {}
2299
2300impl ChangePhoneNumber {
2301 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
2302 pub fn builder() -> RTDChangePhoneNumberBuilder {
2303 let mut inner = ChangePhoneNumber::default();
2304 inner.td_name = "changePhoneNumber".to_string();
2305 inner.extra = Some(Uuid::new_v4().to_string());
2306 RTDChangePhoneNumberBuilder { inner }
2307 }
2308
2309 pub fn phone_number(&self) -> &String { &self.phone_number }
2310
2311 pub fn settings(&self) -> &PhoneNumberAuthenticationSettings { &self.settings }
2312
2313}
2314
2315#[doc(hidden)]
2316pub struct RTDChangePhoneNumberBuilder {
2317 inner: ChangePhoneNumber
2318}
2319
2320impl RTDChangePhoneNumberBuilder {
2321 pub fn build(&self) -> ChangePhoneNumber { self.inner.clone() }
2322
2323
2324 pub fn phone_number<T: AsRef<str>>(&mut self, phone_number: T) -> &mut Self {
2325 self.inner.phone_number = phone_number.as_ref().to_string();
2326 self
2327 }
2328
2329
2330 pub fn settings<T: AsRef<PhoneNumberAuthenticationSettings>>(&mut self, settings: T) -> &mut Self {
2331 self.inner.settings = settings.as_ref().clone();
2332 self
2333 }
2334
2335}
2336
2337impl AsRef<ChangePhoneNumber> for ChangePhoneNumber {
2338 fn as_ref(&self) -> &ChangePhoneNumber { self }
2339}
2340
2341impl AsRef<ChangePhoneNumber> for RTDChangePhoneNumberBuilder {
2342 fn as_ref(&self) -> &ChangePhoneNumber { &self.inner }
2343}
2344
2345
2346
2347
2348
2349
2350
2351#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2353pub struct ChangeStickerSet {
2354 #[doc(hidden)]
2355 #[serde(rename(serialize = "@type", deserialize = "@type"))]
2356 td_name: String,
2357 #[doc(hidden)]
2358 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
2359 extra: Option<String>,
2360 set_id: isize,
2362 is_installed: bool,
2364 is_archived: bool,
2366
2367}
2368
2369impl RObject for ChangeStickerSet {
2370 #[doc(hidden)] fn td_name(&self) -> &'static str { "changeStickerSet" }
2371 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
2372 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
2373}
2374
2375
2376
2377
2378impl RFunction for ChangeStickerSet {}
2379
2380impl ChangeStickerSet {
2381 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
2382 pub fn builder() -> RTDChangeStickerSetBuilder {
2383 let mut inner = ChangeStickerSet::default();
2384 inner.td_name = "changeStickerSet".to_string();
2385 inner.extra = Some(Uuid::new_v4().to_string());
2386 RTDChangeStickerSetBuilder { inner }
2387 }
2388
2389 pub fn set_id(&self) -> isize { self.set_id }
2390
2391 pub fn is_installed(&self) -> bool { self.is_installed }
2392
2393 pub fn is_archived(&self) -> bool { self.is_archived }
2394
2395}
2396
2397#[doc(hidden)]
2398pub struct RTDChangeStickerSetBuilder {
2399 inner: ChangeStickerSet
2400}
2401
2402impl RTDChangeStickerSetBuilder {
2403 pub fn build(&self) -> ChangeStickerSet { self.inner.clone() }
2404
2405
2406 pub fn set_id(&mut self, set_id: isize) -> &mut Self {
2407 self.inner.set_id = set_id;
2408 self
2409 }
2410
2411
2412 pub fn is_installed(&mut self, is_installed: bool) -> &mut Self {
2413 self.inner.is_installed = is_installed;
2414 self
2415 }
2416
2417
2418 pub fn is_archived(&mut self, is_archived: bool) -> &mut Self {
2419 self.inner.is_archived = is_archived;
2420 self
2421 }
2422
2423}
2424
2425impl AsRef<ChangeStickerSet> for ChangeStickerSet {
2426 fn as_ref(&self) -> &ChangeStickerSet { self }
2427}
2428
2429impl AsRef<ChangeStickerSet> for RTDChangeStickerSetBuilder {
2430 fn as_ref(&self) -> &ChangeStickerSet { &self.inner }
2431}
2432
2433
2434
2435
2436
2437
2438
2439#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2441pub struct CheckAuthenticationBotToken {
2442 #[doc(hidden)]
2443 #[serde(rename(serialize = "@type", deserialize = "@type"))]
2444 td_name: String,
2445 #[doc(hidden)]
2446 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
2447 extra: Option<String>,
2448 token: String,
2450
2451}
2452
2453impl RObject for CheckAuthenticationBotToken {
2454 #[doc(hidden)] fn td_name(&self) -> &'static str { "checkAuthenticationBotToken" }
2455 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
2456 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
2457}
2458
2459
2460
2461
2462impl RFunction for CheckAuthenticationBotToken {}
2463
2464impl CheckAuthenticationBotToken {
2465 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
2466 pub fn builder() -> RTDCheckAuthenticationBotTokenBuilder {
2467 let mut inner = CheckAuthenticationBotToken::default();
2468 inner.td_name = "checkAuthenticationBotToken".to_string();
2469 inner.extra = Some(Uuid::new_v4().to_string());
2470 RTDCheckAuthenticationBotTokenBuilder { inner }
2471 }
2472
2473 pub fn token(&self) -> &String { &self.token }
2474
2475}
2476
2477#[doc(hidden)]
2478pub struct RTDCheckAuthenticationBotTokenBuilder {
2479 inner: CheckAuthenticationBotToken
2480}
2481
2482impl RTDCheckAuthenticationBotTokenBuilder {
2483 pub fn build(&self) -> CheckAuthenticationBotToken { self.inner.clone() }
2484
2485
2486 pub fn token<T: AsRef<str>>(&mut self, token: T) -> &mut Self {
2487 self.inner.token = token.as_ref().to_string();
2488 self
2489 }
2490
2491}
2492
2493impl AsRef<CheckAuthenticationBotToken> for CheckAuthenticationBotToken {
2494 fn as_ref(&self) -> &CheckAuthenticationBotToken { self }
2495}
2496
2497impl AsRef<CheckAuthenticationBotToken> for RTDCheckAuthenticationBotTokenBuilder {
2498 fn as_ref(&self) -> &CheckAuthenticationBotToken { &self.inner }
2499}
2500
2501
2502
2503
2504
2505
2506
2507#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2509pub struct CheckAuthenticationCode {
2510 #[doc(hidden)]
2511 #[serde(rename(serialize = "@type", deserialize = "@type"))]
2512 td_name: String,
2513 #[doc(hidden)]
2514 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
2515 extra: Option<String>,
2516 code: String,
2518
2519}
2520
2521impl RObject for CheckAuthenticationCode {
2522 #[doc(hidden)] fn td_name(&self) -> &'static str { "checkAuthenticationCode" }
2523 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
2524 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
2525}
2526
2527
2528
2529
2530impl RFunction for CheckAuthenticationCode {}
2531
2532impl CheckAuthenticationCode {
2533 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
2534 pub fn builder() -> RTDCheckAuthenticationCodeBuilder {
2535 let mut inner = CheckAuthenticationCode::default();
2536 inner.td_name = "checkAuthenticationCode".to_string();
2537 inner.extra = Some(Uuid::new_v4().to_string());
2538 RTDCheckAuthenticationCodeBuilder { inner }
2539 }
2540
2541 pub fn code(&self) -> &String { &self.code }
2542
2543}
2544
2545#[doc(hidden)]
2546pub struct RTDCheckAuthenticationCodeBuilder {
2547 inner: CheckAuthenticationCode
2548}
2549
2550impl RTDCheckAuthenticationCodeBuilder {
2551 pub fn build(&self) -> CheckAuthenticationCode { self.inner.clone() }
2552
2553
2554 pub fn code<T: AsRef<str>>(&mut self, code: T) -> &mut Self {
2555 self.inner.code = code.as_ref().to_string();
2556 self
2557 }
2558
2559}
2560
2561impl AsRef<CheckAuthenticationCode> for CheckAuthenticationCode {
2562 fn as_ref(&self) -> &CheckAuthenticationCode { self }
2563}
2564
2565impl AsRef<CheckAuthenticationCode> for RTDCheckAuthenticationCodeBuilder {
2566 fn as_ref(&self) -> &CheckAuthenticationCode { &self.inner }
2567}
2568
2569
2570
2571
2572
2573
2574
2575#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2577pub struct CheckAuthenticationPassword {
2578 #[doc(hidden)]
2579 #[serde(rename(serialize = "@type", deserialize = "@type"))]
2580 td_name: String,
2581 #[doc(hidden)]
2582 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
2583 extra: Option<String>,
2584 password: String,
2586
2587}
2588
2589impl RObject for CheckAuthenticationPassword {
2590 #[doc(hidden)] fn td_name(&self) -> &'static str { "checkAuthenticationPassword" }
2591 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
2592 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
2593}
2594
2595
2596
2597
2598impl RFunction for CheckAuthenticationPassword {}
2599
2600impl CheckAuthenticationPassword {
2601 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
2602 pub fn builder() -> RTDCheckAuthenticationPasswordBuilder {
2603 let mut inner = CheckAuthenticationPassword::default();
2604 inner.td_name = "checkAuthenticationPassword".to_string();
2605 inner.extra = Some(Uuid::new_v4().to_string());
2606 RTDCheckAuthenticationPasswordBuilder { inner }
2607 }
2608
2609 pub fn password(&self) -> &String { &self.password }
2610
2611}
2612
2613#[doc(hidden)]
2614pub struct RTDCheckAuthenticationPasswordBuilder {
2615 inner: CheckAuthenticationPassword
2616}
2617
2618impl RTDCheckAuthenticationPasswordBuilder {
2619 pub fn build(&self) -> CheckAuthenticationPassword { self.inner.clone() }
2620
2621
2622 pub fn password<T: AsRef<str>>(&mut self, password: T) -> &mut Self {
2623 self.inner.password = password.as_ref().to_string();
2624 self
2625 }
2626
2627}
2628
2629impl AsRef<CheckAuthenticationPassword> for CheckAuthenticationPassword {
2630 fn as_ref(&self) -> &CheckAuthenticationPassword { self }
2631}
2632
2633impl AsRef<CheckAuthenticationPassword> for RTDCheckAuthenticationPasswordBuilder {
2634 fn as_ref(&self) -> &CheckAuthenticationPassword { &self.inner }
2635}
2636
2637
2638
2639
2640
2641
2642
2643#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2645pub struct CheckAuthenticationPasswordRecoveryCode {
2646 #[doc(hidden)]
2647 #[serde(rename(serialize = "@type", deserialize = "@type"))]
2648 td_name: String,
2649 #[doc(hidden)]
2650 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
2651 extra: Option<String>,
2652 recovery_code: String,
2654
2655}
2656
2657impl RObject for CheckAuthenticationPasswordRecoveryCode {
2658 #[doc(hidden)] fn td_name(&self) -> &'static str { "checkAuthenticationPasswordRecoveryCode" }
2659 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
2660 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
2661}
2662
2663
2664
2665
2666impl RFunction for CheckAuthenticationPasswordRecoveryCode {}
2667
2668impl CheckAuthenticationPasswordRecoveryCode {
2669 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
2670 pub fn builder() -> RTDCheckAuthenticationPasswordRecoveryCodeBuilder {
2671 let mut inner = CheckAuthenticationPasswordRecoveryCode::default();
2672 inner.td_name = "checkAuthenticationPasswordRecoveryCode".to_string();
2673 inner.extra = Some(Uuid::new_v4().to_string());
2674 RTDCheckAuthenticationPasswordRecoveryCodeBuilder { inner }
2675 }
2676
2677 pub fn recovery_code(&self) -> &String { &self.recovery_code }
2678
2679}
2680
2681#[doc(hidden)]
2682pub struct RTDCheckAuthenticationPasswordRecoveryCodeBuilder {
2683 inner: CheckAuthenticationPasswordRecoveryCode
2684}
2685
2686impl RTDCheckAuthenticationPasswordRecoveryCodeBuilder {
2687 pub fn build(&self) -> CheckAuthenticationPasswordRecoveryCode { self.inner.clone() }
2688
2689
2690 pub fn recovery_code<T: AsRef<str>>(&mut self, recovery_code: T) -> &mut Self {
2691 self.inner.recovery_code = recovery_code.as_ref().to_string();
2692 self
2693 }
2694
2695}
2696
2697impl AsRef<CheckAuthenticationPasswordRecoveryCode> for CheckAuthenticationPasswordRecoveryCode {
2698 fn as_ref(&self) -> &CheckAuthenticationPasswordRecoveryCode { self }
2699}
2700
2701impl AsRef<CheckAuthenticationPasswordRecoveryCode> for RTDCheckAuthenticationPasswordRecoveryCodeBuilder {
2702 fn as_ref(&self) -> &CheckAuthenticationPasswordRecoveryCode { &self.inner }
2703}
2704
2705
2706
2707
2708
2709
2710
2711#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2713pub struct CheckChangePhoneNumberCode {
2714 #[doc(hidden)]
2715 #[serde(rename(serialize = "@type", deserialize = "@type"))]
2716 td_name: String,
2717 #[doc(hidden)]
2718 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
2719 extra: Option<String>,
2720 code: String,
2722
2723}
2724
2725impl RObject for CheckChangePhoneNumberCode {
2726 #[doc(hidden)] fn td_name(&self) -> &'static str { "checkChangePhoneNumberCode" }
2727 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
2728 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
2729}
2730
2731
2732
2733
2734impl RFunction for CheckChangePhoneNumberCode {}
2735
2736impl CheckChangePhoneNumberCode {
2737 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
2738 pub fn builder() -> RTDCheckChangePhoneNumberCodeBuilder {
2739 let mut inner = CheckChangePhoneNumberCode::default();
2740 inner.td_name = "checkChangePhoneNumberCode".to_string();
2741 inner.extra = Some(Uuid::new_v4().to_string());
2742 RTDCheckChangePhoneNumberCodeBuilder { inner }
2743 }
2744
2745 pub fn code(&self) -> &String { &self.code }
2746
2747}
2748
2749#[doc(hidden)]
2750pub struct RTDCheckChangePhoneNumberCodeBuilder {
2751 inner: CheckChangePhoneNumberCode
2752}
2753
2754impl RTDCheckChangePhoneNumberCodeBuilder {
2755 pub fn build(&self) -> CheckChangePhoneNumberCode { self.inner.clone() }
2756
2757
2758 pub fn code<T: AsRef<str>>(&mut self, code: T) -> &mut Self {
2759 self.inner.code = code.as_ref().to_string();
2760 self
2761 }
2762
2763}
2764
2765impl AsRef<CheckChangePhoneNumberCode> for CheckChangePhoneNumberCode {
2766 fn as_ref(&self) -> &CheckChangePhoneNumberCode { self }
2767}
2768
2769impl AsRef<CheckChangePhoneNumberCode> for RTDCheckChangePhoneNumberCodeBuilder {
2770 fn as_ref(&self) -> &CheckChangePhoneNumberCode { &self.inner }
2771}
2772
2773
2774
2775
2776
2777
2778
2779#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2781pub struct CheckChatInviteLink {
2782 #[doc(hidden)]
2783 #[serde(rename(serialize = "@type", deserialize = "@type"))]
2784 td_name: String,
2785 #[doc(hidden)]
2786 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
2787 extra: Option<String>,
2788 invite_link: String,
2790
2791}
2792
2793impl RObject for CheckChatInviteLink {
2794 #[doc(hidden)] fn td_name(&self) -> &'static str { "checkChatInviteLink" }
2795 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
2796 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
2797}
2798
2799
2800
2801
2802impl RFunction for CheckChatInviteLink {}
2803
2804impl CheckChatInviteLink {
2805 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
2806 pub fn builder() -> RTDCheckChatInviteLinkBuilder {
2807 let mut inner = CheckChatInviteLink::default();
2808 inner.td_name = "checkChatInviteLink".to_string();
2809 inner.extra = Some(Uuid::new_v4().to_string());
2810 RTDCheckChatInviteLinkBuilder { inner }
2811 }
2812
2813 pub fn invite_link(&self) -> &String { &self.invite_link }
2814
2815}
2816
2817#[doc(hidden)]
2818pub struct RTDCheckChatInviteLinkBuilder {
2819 inner: CheckChatInviteLink
2820}
2821
2822impl RTDCheckChatInviteLinkBuilder {
2823 pub fn build(&self) -> CheckChatInviteLink { self.inner.clone() }
2824
2825
2826 pub fn invite_link<T: AsRef<str>>(&mut self, invite_link: T) -> &mut Self {
2827 self.inner.invite_link = invite_link.as_ref().to_string();
2828 self
2829 }
2830
2831}
2832
2833impl AsRef<CheckChatInviteLink> for CheckChatInviteLink {
2834 fn as_ref(&self) -> &CheckChatInviteLink { self }
2835}
2836
2837impl AsRef<CheckChatInviteLink> for RTDCheckChatInviteLinkBuilder {
2838 fn as_ref(&self) -> &CheckChatInviteLink { &self.inner }
2839}
2840
2841
2842
2843
2844
2845
2846
2847#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2849pub struct CheckChatUsername {
2850 #[doc(hidden)]
2851 #[serde(rename(serialize = "@type", deserialize = "@type"))]
2852 td_name: String,
2853 #[doc(hidden)]
2854 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
2855 extra: Option<String>,
2856 chat_id: i64,
2858 username: String,
2860
2861}
2862
2863impl RObject for CheckChatUsername {
2864 #[doc(hidden)] fn td_name(&self) -> &'static str { "checkChatUsername" }
2865 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
2866 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
2867}
2868
2869
2870impl TDCheckChatUsernameResult for CheckChatUsername {}
2871
2872impl RFunction for CheckChatUsername {}
2873
2874impl CheckChatUsername {
2875 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
2876 pub fn builder() -> RTDCheckChatUsernameBuilder {
2877 let mut inner = CheckChatUsername::default();
2878 inner.td_name = "checkChatUsername".to_string();
2879 inner.extra = Some(Uuid::new_v4().to_string());
2880 RTDCheckChatUsernameBuilder { inner }
2881 }
2882
2883 pub fn chat_id(&self) -> i64 { self.chat_id }
2884
2885 pub fn username(&self) -> &String { &self.username }
2886
2887}
2888
2889#[doc(hidden)]
2890pub struct RTDCheckChatUsernameBuilder {
2891 inner: CheckChatUsername
2892}
2893
2894impl RTDCheckChatUsernameBuilder {
2895 pub fn build(&self) -> CheckChatUsername { self.inner.clone() }
2896
2897
2898 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
2899 self.inner.chat_id = chat_id;
2900 self
2901 }
2902
2903
2904 pub fn username<T: AsRef<str>>(&mut self, username: T) -> &mut Self {
2905 self.inner.username = username.as_ref().to_string();
2906 self
2907 }
2908
2909}
2910
2911impl AsRef<CheckChatUsername> for CheckChatUsername {
2912 fn as_ref(&self) -> &CheckChatUsername { self }
2913}
2914
2915impl AsRef<CheckChatUsername> for RTDCheckChatUsernameBuilder {
2916 fn as_ref(&self) -> &CheckChatUsername { &self.inner }
2917}
2918
2919
2920
2921
2922
2923
2924
2925#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2927pub struct CheckCreatedPublicChatsLimit {
2928 #[doc(hidden)]
2929 #[serde(rename(serialize = "@type", deserialize = "@type"))]
2930 td_name: String,
2931 #[doc(hidden)]
2932 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
2933 extra: Option<String>,
2934 #[serde(rename(serialize = "type", deserialize = "type"))] type_: PublicChatType,
2936
2937}
2938
2939impl RObject for CheckCreatedPublicChatsLimit {
2940 #[doc(hidden)] fn td_name(&self) -> &'static str { "checkCreatedPublicChatsLimit" }
2941 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
2942 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
2943}
2944
2945
2946
2947
2948impl RFunction for CheckCreatedPublicChatsLimit {}
2949
2950impl CheckCreatedPublicChatsLimit {
2951 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
2952 pub fn builder() -> RTDCheckCreatedPublicChatsLimitBuilder {
2953 let mut inner = CheckCreatedPublicChatsLimit::default();
2954 inner.td_name = "checkCreatedPublicChatsLimit".to_string();
2955 inner.extra = Some(Uuid::new_v4().to_string());
2956 RTDCheckCreatedPublicChatsLimitBuilder { inner }
2957 }
2958
2959 pub fn type_(&self) -> &PublicChatType { &self.type_ }
2960
2961}
2962
2963#[doc(hidden)]
2964pub struct RTDCheckCreatedPublicChatsLimitBuilder {
2965 inner: CheckCreatedPublicChatsLimit
2966}
2967
2968impl RTDCheckCreatedPublicChatsLimitBuilder {
2969 pub fn build(&self) -> CheckCreatedPublicChatsLimit { self.inner.clone() }
2970
2971
2972 pub fn type_<T: AsRef<PublicChatType>>(&mut self, type_: T) -> &mut Self {
2973 self.inner.type_ = type_.as_ref().clone();
2974 self
2975 }
2976
2977}
2978
2979impl AsRef<CheckCreatedPublicChatsLimit> for CheckCreatedPublicChatsLimit {
2980 fn as_ref(&self) -> &CheckCreatedPublicChatsLimit { self }
2981}
2982
2983impl AsRef<CheckCreatedPublicChatsLimit> for RTDCheckCreatedPublicChatsLimitBuilder {
2984 fn as_ref(&self) -> &CheckCreatedPublicChatsLimit { &self.inner }
2985}
2986
2987
2988
2989
2990
2991
2992
2993#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2995pub struct CheckDatabaseEncryptionKey {
2996 #[doc(hidden)]
2997 #[serde(rename(serialize = "@type", deserialize = "@type"))]
2998 td_name: String,
2999 #[doc(hidden)]
3000 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
3001 extra: Option<String>,
3002 encryption_key: String,
3004
3005}
3006
3007impl RObject for CheckDatabaseEncryptionKey {
3008 #[doc(hidden)] fn td_name(&self) -> &'static str { "checkDatabaseEncryptionKey" }
3009 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
3010 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
3011}
3012
3013
3014
3015
3016impl RFunction for CheckDatabaseEncryptionKey {}
3017
3018impl CheckDatabaseEncryptionKey {
3019 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
3020 pub fn builder() -> RTDCheckDatabaseEncryptionKeyBuilder {
3021 let mut inner = CheckDatabaseEncryptionKey::default();
3022 inner.td_name = "checkDatabaseEncryptionKey".to_string();
3023 inner.extra = Some(Uuid::new_v4().to_string());
3024 RTDCheckDatabaseEncryptionKeyBuilder { inner }
3025 }
3026
3027 pub fn encryption_key(&self) -> &String { &self.encryption_key }
3028
3029}
3030
3031#[doc(hidden)]
3032pub struct RTDCheckDatabaseEncryptionKeyBuilder {
3033 inner: CheckDatabaseEncryptionKey
3034}
3035
3036impl RTDCheckDatabaseEncryptionKeyBuilder {
3037 pub fn build(&self) -> CheckDatabaseEncryptionKey { self.inner.clone() }
3038
3039
3040 pub fn encryption_key<T: AsRef<str>>(&mut self, encryption_key: T) -> &mut Self {
3041 self.inner.encryption_key = encryption_key.as_ref().to_string();
3042 self
3043 }
3044
3045}
3046
3047impl AsRef<CheckDatabaseEncryptionKey> for CheckDatabaseEncryptionKey {
3048 fn as_ref(&self) -> &CheckDatabaseEncryptionKey { self }
3049}
3050
3051impl AsRef<CheckDatabaseEncryptionKey> for RTDCheckDatabaseEncryptionKeyBuilder {
3052 fn as_ref(&self) -> &CheckDatabaseEncryptionKey { &self.inner }
3053}
3054
3055
3056
3057
3058
3059
3060
3061#[derive(Debug, Clone, Default, Serialize, Deserialize)]
3063pub struct CheckEmailAddressVerificationCode {
3064 #[doc(hidden)]
3065 #[serde(rename(serialize = "@type", deserialize = "@type"))]
3066 td_name: String,
3067 #[doc(hidden)]
3068 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
3069 extra: Option<String>,
3070 code: String,
3072
3073}
3074
3075impl RObject for CheckEmailAddressVerificationCode {
3076 #[doc(hidden)] fn td_name(&self) -> &'static str { "checkEmailAddressVerificationCode" }
3077 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
3078 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
3079}
3080
3081
3082
3083
3084impl RFunction for CheckEmailAddressVerificationCode {}
3085
3086impl CheckEmailAddressVerificationCode {
3087 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
3088 pub fn builder() -> RTDCheckEmailAddressVerificationCodeBuilder {
3089 let mut inner = CheckEmailAddressVerificationCode::default();
3090 inner.td_name = "checkEmailAddressVerificationCode".to_string();
3091 inner.extra = Some(Uuid::new_v4().to_string());
3092 RTDCheckEmailAddressVerificationCodeBuilder { inner }
3093 }
3094
3095 pub fn code(&self) -> &String { &self.code }
3096
3097}
3098
3099#[doc(hidden)]
3100pub struct RTDCheckEmailAddressVerificationCodeBuilder {
3101 inner: CheckEmailAddressVerificationCode
3102}
3103
3104impl RTDCheckEmailAddressVerificationCodeBuilder {
3105 pub fn build(&self) -> CheckEmailAddressVerificationCode { self.inner.clone() }
3106
3107
3108 pub fn code<T: AsRef<str>>(&mut self, code: T) -> &mut Self {
3109 self.inner.code = code.as_ref().to_string();
3110 self
3111 }
3112
3113}
3114
3115impl AsRef<CheckEmailAddressVerificationCode> for CheckEmailAddressVerificationCode {
3116 fn as_ref(&self) -> &CheckEmailAddressVerificationCode { self }
3117}
3118
3119impl AsRef<CheckEmailAddressVerificationCode> for RTDCheckEmailAddressVerificationCodeBuilder {
3120 fn as_ref(&self) -> &CheckEmailAddressVerificationCode { &self.inner }
3121}
3122
3123
3124
3125
3126
3127
3128
3129#[derive(Debug, Clone, Default, Serialize, Deserialize)]
3131pub struct CheckPasswordRecoveryCode {
3132 #[doc(hidden)]
3133 #[serde(rename(serialize = "@type", deserialize = "@type"))]
3134 td_name: String,
3135 #[doc(hidden)]
3136 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
3137 extra: Option<String>,
3138 recovery_code: String,
3140
3141}
3142
3143impl RObject for CheckPasswordRecoveryCode {
3144 #[doc(hidden)] fn td_name(&self) -> &'static str { "checkPasswordRecoveryCode" }
3145 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
3146 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
3147}
3148
3149
3150
3151
3152impl RFunction for CheckPasswordRecoveryCode {}
3153
3154impl CheckPasswordRecoveryCode {
3155 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
3156 pub fn builder() -> RTDCheckPasswordRecoveryCodeBuilder {
3157 let mut inner = CheckPasswordRecoveryCode::default();
3158 inner.td_name = "checkPasswordRecoveryCode".to_string();
3159 inner.extra = Some(Uuid::new_v4().to_string());
3160 RTDCheckPasswordRecoveryCodeBuilder { inner }
3161 }
3162
3163 pub fn recovery_code(&self) -> &String { &self.recovery_code }
3164
3165}
3166
3167#[doc(hidden)]
3168pub struct RTDCheckPasswordRecoveryCodeBuilder {
3169 inner: CheckPasswordRecoveryCode
3170}
3171
3172impl RTDCheckPasswordRecoveryCodeBuilder {
3173 pub fn build(&self) -> CheckPasswordRecoveryCode { self.inner.clone() }
3174
3175
3176 pub fn recovery_code<T: AsRef<str>>(&mut self, recovery_code: T) -> &mut Self {
3177 self.inner.recovery_code = recovery_code.as_ref().to_string();
3178 self
3179 }
3180
3181}
3182
3183impl AsRef<CheckPasswordRecoveryCode> for CheckPasswordRecoveryCode {
3184 fn as_ref(&self) -> &CheckPasswordRecoveryCode { self }
3185}
3186
3187impl AsRef<CheckPasswordRecoveryCode> for RTDCheckPasswordRecoveryCodeBuilder {
3188 fn as_ref(&self) -> &CheckPasswordRecoveryCode { &self.inner }
3189}
3190
3191
3192
3193
3194
3195
3196
3197#[derive(Debug, Clone, Default, Serialize, Deserialize)]
3199pub struct CheckPhoneNumberConfirmationCode {
3200 #[doc(hidden)]
3201 #[serde(rename(serialize = "@type", deserialize = "@type"))]
3202 td_name: String,
3203 #[doc(hidden)]
3204 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
3205 extra: Option<String>,
3206 code: String,
3208
3209}
3210
3211impl RObject for CheckPhoneNumberConfirmationCode {
3212 #[doc(hidden)] fn td_name(&self) -> &'static str { "checkPhoneNumberConfirmationCode" }
3213 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
3214 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
3215}
3216
3217
3218
3219
3220impl RFunction for CheckPhoneNumberConfirmationCode {}
3221
3222impl CheckPhoneNumberConfirmationCode {
3223 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
3224 pub fn builder() -> RTDCheckPhoneNumberConfirmationCodeBuilder {
3225 let mut inner = CheckPhoneNumberConfirmationCode::default();
3226 inner.td_name = "checkPhoneNumberConfirmationCode".to_string();
3227 inner.extra = Some(Uuid::new_v4().to_string());
3228 RTDCheckPhoneNumberConfirmationCodeBuilder { inner }
3229 }
3230
3231 pub fn code(&self) -> &String { &self.code }
3232
3233}
3234
3235#[doc(hidden)]
3236pub struct RTDCheckPhoneNumberConfirmationCodeBuilder {
3237 inner: CheckPhoneNumberConfirmationCode
3238}
3239
3240impl RTDCheckPhoneNumberConfirmationCodeBuilder {
3241 pub fn build(&self) -> CheckPhoneNumberConfirmationCode { self.inner.clone() }
3242
3243
3244 pub fn code<T: AsRef<str>>(&mut self, code: T) -> &mut Self {
3245 self.inner.code = code.as_ref().to_string();
3246 self
3247 }
3248
3249}
3250
3251impl AsRef<CheckPhoneNumberConfirmationCode> for CheckPhoneNumberConfirmationCode {
3252 fn as_ref(&self) -> &CheckPhoneNumberConfirmationCode { self }
3253}
3254
3255impl AsRef<CheckPhoneNumberConfirmationCode> for RTDCheckPhoneNumberConfirmationCodeBuilder {
3256 fn as_ref(&self) -> &CheckPhoneNumberConfirmationCode { &self.inner }
3257}
3258
3259
3260
3261
3262
3263
3264
3265#[derive(Debug, Clone, Default, Serialize, Deserialize)]
3267pub struct CheckPhoneNumberVerificationCode {
3268 #[doc(hidden)]
3269 #[serde(rename(serialize = "@type", deserialize = "@type"))]
3270 td_name: String,
3271 #[doc(hidden)]
3272 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
3273 extra: Option<String>,
3274 code: String,
3276
3277}
3278
3279impl RObject for CheckPhoneNumberVerificationCode {
3280 #[doc(hidden)] fn td_name(&self) -> &'static str { "checkPhoneNumberVerificationCode" }
3281 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
3282 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
3283}
3284
3285
3286
3287
3288impl RFunction for CheckPhoneNumberVerificationCode {}
3289
3290impl CheckPhoneNumberVerificationCode {
3291 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
3292 pub fn builder() -> RTDCheckPhoneNumberVerificationCodeBuilder {
3293 let mut inner = CheckPhoneNumberVerificationCode::default();
3294 inner.td_name = "checkPhoneNumberVerificationCode".to_string();
3295 inner.extra = Some(Uuid::new_v4().to_string());
3296 RTDCheckPhoneNumberVerificationCodeBuilder { inner }
3297 }
3298
3299 pub fn code(&self) -> &String { &self.code }
3300
3301}
3302
3303#[doc(hidden)]
3304pub struct RTDCheckPhoneNumberVerificationCodeBuilder {
3305 inner: CheckPhoneNumberVerificationCode
3306}
3307
3308impl RTDCheckPhoneNumberVerificationCodeBuilder {
3309 pub fn build(&self) -> CheckPhoneNumberVerificationCode { self.inner.clone() }
3310
3311
3312 pub fn code<T: AsRef<str>>(&mut self, code: T) -> &mut Self {
3313 self.inner.code = code.as_ref().to_string();
3314 self
3315 }
3316
3317}
3318
3319impl AsRef<CheckPhoneNumberVerificationCode> for CheckPhoneNumberVerificationCode {
3320 fn as_ref(&self) -> &CheckPhoneNumberVerificationCode { self }
3321}
3322
3323impl AsRef<CheckPhoneNumberVerificationCode> for RTDCheckPhoneNumberVerificationCodeBuilder {
3324 fn as_ref(&self) -> &CheckPhoneNumberVerificationCode { &self.inner }
3325}
3326
3327
3328
3329
3330
3331
3332
3333#[derive(Debug, Clone, Default, Serialize, Deserialize)]
3335pub struct CheckRecoveryEmailAddressCode {
3336 #[doc(hidden)]
3337 #[serde(rename(serialize = "@type", deserialize = "@type"))]
3338 td_name: String,
3339 #[doc(hidden)]
3340 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
3341 extra: Option<String>,
3342 code: String,
3344
3345}
3346
3347impl RObject for CheckRecoveryEmailAddressCode {
3348 #[doc(hidden)] fn td_name(&self) -> &'static str { "checkRecoveryEmailAddressCode" }
3349 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
3350 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
3351}
3352
3353
3354
3355
3356impl RFunction for CheckRecoveryEmailAddressCode {}
3357
3358impl CheckRecoveryEmailAddressCode {
3359 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
3360 pub fn builder() -> RTDCheckRecoveryEmailAddressCodeBuilder {
3361 let mut inner = CheckRecoveryEmailAddressCode::default();
3362 inner.td_name = "checkRecoveryEmailAddressCode".to_string();
3363 inner.extra = Some(Uuid::new_v4().to_string());
3364 RTDCheckRecoveryEmailAddressCodeBuilder { inner }
3365 }
3366
3367 pub fn code(&self) -> &String { &self.code }
3368
3369}
3370
3371#[doc(hidden)]
3372pub struct RTDCheckRecoveryEmailAddressCodeBuilder {
3373 inner: CheckRecoveryEmailAddressCode
3374}
3375
3376impl RTDCheckRecoveryEmailAddressCodeBuilder {
3377 pub fn build(&self) -> CheckRecoveryEmailAddressCode { self.inner.clone() }
3378
3379
3380 pub fn code<T: AsRef<str>>(&mut self, code: T) -> &mut Self {
3381 self.inner.code = code.as_ref().to_string();
3382 self
3383 }
3384
3385}
3386
3387impl AsRef<CheckRecoveryEmailAddressCode> for CheckRecoveryEmailAddressCode {
3388 fn as_ref(&self) -> &CheckRecoveryEmailAddressCode { self }
3389}
3390
3391impl AsRef<CheckRecoveryEmailAddressCode> for RTDCheckRecoveryEmailAddressCodeBuilder {
3392 fn as_ref(&self) -> &CheckRecoveryEmailAddressCode { &self.inner }
3393}
3394
3395
3396
3397
3398
3399
3400
3401#[derive(Debug, Clone, Default, Serialize, Deserialize)]
3403pub struct CheckStickerSetName {
3404 #[doc(hidden)]
3405 #[serde(rename(serialize = "@type", deserialize = "@type"))]
3406 td_name: String,
3407 #[doc(hidden)]
3408 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
3409 extra: Option<String>,
3410 name: String,
3412
3413}
3414
3415impl RObject for CheckStickerSetName {
3416 #[doc(hidden)] fn td_name(&self) -> &'static str { "checkStickerSetName" }
3417 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
3418 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
3419}
3420
3421
3422impl TDCheckStickerSetNameResult for CheckStickerSetName {}
3423
3424impl RFunction for CheckStickerSetName {}
3425
3426impl CheckStickerSetName {
3427 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
3428 pub fn builder() -> RTDCheckStickerSetNameBuilder {
3429 let mut inner = CheckStickerSetName::default();
3430 inner.td_name = "checkStickerSetName".to_string();
3431 inner.extra = Some(Uuid::new_v4().to_string());
3432 RTDCheckStickerSetNameBuilder { inner }
3433 }
3434
3435 pub fn name(&self) -> &String { &self.name }
3436
3437}
3438
3439#[doc(hidden)]
3440pub struct RTDCheckStickerSetNameBuilder {
3441 inner: CheckStickerSetName
3442}
3443
3444impl RTDCheckStickerSetNameBuilder {
3445 pub fn build(&self) -> CheckStickerSetName { self.inner.clone() }
3446
3447
3448 pub fn name<T: AsRef<str>>(&mut self, name: T) -> &mut Self {
3449 self.inner.name = name.as_ref().to_string();
3450 self
3451 }
3452
3453}
3454
3455impl AsRef<CheckStickerSetName> for CheckStickerSetName {
3456 fn as_ref(&self) -> &CheckStickerSetName { self }
3457}
3458
3459impl AsRef<CheckStickerSetName> for RTDCheckStickerSetNameBuilder {
3460 fn as_ref(&self) -> &CheckStickerSetName { &self.inner }
3461}
3462
3463
3464
3465
3466
3467
3468
3469#[derive(Debug, Clone, Default, Serialize, Deserialize)]
3471pub struct CleanFileName {
3472 #[doc(hidden)]
3473 #[serde(rename(serialize = "@type", deserialize = "@type"))]
3474 td_name: String,
3475 #[doc(hidden)]
3476 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
3477 extra: Option<String>,
3478 file_name: String,
3480
3481}
3482
3483impl RObject for CleanFileName {
3484 #[doc(hidden)] fn td_name(&self) -> &'static str { "cleanFileName" }
3485 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
3486 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
3487}
3488
3489
3490
3491
3492impl RFunction for CleanFileName {}
3493
3494impl CleanFileName {
3495 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
3496 pub fn builder() -> RTDCleanFileNameBuilder {
3497 let mut inner = CleanFileName::default();
3498 inner.td_name = "cleanFileName".to_string();
3499 inner.extra = Some(Uuid::new_v4().to_string());
3500 RTDCleanFileNameBuilder { inner }
3501 }
3502
3503 pub fn file_name(&self) -> &String { &self.file_name }
3504
3505}
3506
3507#[doc(hidden)]
3508pub struct RTDCleanFileNameBuilder {
3509 inner: CleanFileName
3510}
3511
3512impl RTDCleanFileNameBuilder {
3513 pub fn build(&self) -> CleanFileName { self.inner.clone() }
3514
3515
3516 pub fn file_name<T: AsRef<str>>(&mut self, file_name: T) -> &mut Self {
3517 self.inner.file_name = file_name.as_ref().to_string();
3518 self
3519 }
3520
3521}
3522
3523impl AsRef<CleanFileName> for CleanFileName {
3524 fn as_ref(&self) -> &CleanFileName { self }
3525}
3526
3527impl AsRef<CleanFileName> for RTDCleanFileNameBuilder {
3528 fn as_ref(&self) -> &CleanFileName { &self.inner }
3529}
3530
3531
3532
3533
3534
3535
3536
3537#[derive(Debug, Clone, Default, Serialize, Deserialize)]
3539pub struct ClearAllDraftMessages {
3540 #[doc(hidden)]
3541 #[serde(rename(serialize = "@type", deserialize = "@type"))]
3542 td_name: String,
3543 #[doc(hidden)]
3544 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
3545 extra: Option<String>,
3546 exclude_secret_chats: bool,
3548
3549}
3550
3551impl RObject for ClearAllDraftMessages {
3552 #[doc(hidden)] fn td_name(&self) -> &'static str { "clearAllDraftMessages" }
3553 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
3554 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
3555}
3556
3557
3558
3559
3560impl RFunction for ClearAllDraftMessages {}
3561
3562impl ClearAllDraftMessages {
3563 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
3564 pub fn builder() -> RTDClearAllDraftMessagesBuilder {
3565 let mut inner = ClearAllDraftMessages::default();
3566 inner.td_name = "clearAllDraftMessages".to_string();
3567 inner.extra = Some(Uuid::new_v4().to_string());
3568 RTDClearAllDraftMessagesBuilder { inner }
3569 }
3570
3571 pub fn exclude_secret_chats(&self) -> bool { self.exclude_secret_chats }
3572
3573}
3574
3575#[doc(hidden)]
3576pub struct RTDClearAllDraftMessagesBuilder {
3577 inner: ClearAllDraftMessages
3578}
3579
3580impl RTDClearAllDraftMessagesBuilder {
3581 pub fn build(&self) -> ClearAllDraftMessages { self.inner.clone() }
3582
3583
3584 pub fn exclude_secret_chats(&mut self, exclude_secret_chats: bool) -> &mut Self {
3585 self.inner.exclude_secret_chats = exclude_secret_chats;
3586 self
3587 }
3588
3589}
3590
3591impl AsRef<ClearAllDraftMessages> for ClearAllDraftMessages {
3592 fn as_ref(&self) -> &ClearAllDraftMessages { self }
3593}
3594
3595impl AsRef<ClearAllDraftMessages> for RTDClearAllDraftMessagesBuilder {
3596 fn as_ref(&self) -> &ClearAllDraftMessages { &self.inner }
3597}
3598
3599
3600
3601
3602
3603
3604
3605#[derive(Debug, Clone, Default, Serialize, Deserialize)]
3607pub struct ClearImportedContacts {
3608 #[doc(hidden)]
3609 #[serde(rename(serialize = "@type", deserialize = "@type"))]
3610 td_name: String,
3611 #[doc(hidden)]
3612 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
3613 extra: Option<String>,
3614
3615}
3616
3617impl RObject for ClearImportedContacts {
3618 #[doc(hidden)] fn td_name(&self) -> &'static str { "clearImportedContacts" }
3619 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
3620 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
3621}
3622
3623
3624
3625
3626impl RFunction for ClearImportedContacts {}
3627
3628impl ClearImportedContacts {
3629 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
3630 pub fn builder() -> RTDClearImportedContactsBuilder {
3631 let mut inner = ClearImportedContacts::default();
3632 inner.td_name = "clearImportedContacts".to_string();
3633 inner.extra = Some(Uuid::new_v4().to_string());
3634 RTDClearImportedContactsBuilder { inner }
3635 }
3636
3637}
3638
3639#[doc(hidden)]
3640pub struct RTDClearImportedContactsBuilder {
3641 inner: ClearImportedContacts
3642}
3643
3644impl RTDClearImportedContactsBuilder {
3645 pub fn build(&self) -> ClearImportedContacts { self.inner.clone() }
3646
3647}
3648
3649impl AsRef<ClearImportedContacts> for ClearImportedContacts {
3650 fn as_ref(&self) -> &ClearImportedContacts { self }
3651}
3652
3653impl AsRef<ClearImportedContacts> for RTDClearImportedContactsBuilder {
3654 fn as_ref(&self) -> &ClearImportedContacts { &self.inner }
3655}
3656
3657
3658
3659
3660
3661
3662
3663#[derive(Debug, Clone, Default, Serialize, Deserialize)]
3665pub struct ClearRecentStickers {
3666 #[doc(hidden)]
3667 #[serde(rename(serialize = "@type", deserialize = "@type"))]
3668 td_name: String,
3669 #[doc(hidden)]
3670 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
3671 extra: Option<String>,
3672 is_attached: bool,
3674
3675}
3676
3677impl RObject for ClearRecentStickers {
3678 #[doc(hidden)] fn td_name(&self) -> &'static str { "clearRecentStickers" }
3679 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
3680 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
3681}
3682
3683
3684
3685
3686impl RFunction for ClearRecentStickers {}
3687
3688impl ClearRecentStickers {
3689 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
3690 pub fn builder() -> RTDClearRecentStickersBuilder {
3691 let mut inner = ClearRecentStickers::default();
3692 inner.td_name = "clearRecentStickers".to_string();
3693 inner.extra = Some(Uuid::new_v4().to_string());
3694 RTDClearRecentStickersBuilder { inner }
3695 }
3696
3697 pub fn is_attached(&self) -> bool { self.is_attached }
3698
3699}
3700
3701#[doc(hidden)]
3702pub struct RTDClearRecentStickersBuilder {
3703 inner: ClearRecentStickers
3704}
3705
3706impl RTDClearRecentStickersBuilder {
3707 pub fn build(&self) -> ClearRecentStickers { self.inner.clone() }
3708
3709
3710 pub fn is_attached(&mut self, is_attached: bool) -> &mut Self {
3711 self.inner.is_attached = is_attached;
3712 self
3713 }
3714
3715}
3716
3717impl AsRef<ClearRecentStickers> for ClearRecentStickers {
3718 fn as_ref(&self) -> &ClearRecentStickers { self }
3719}
3720
3721impl AsRef<ClearRecentStickers> for RTDClearRecentStickersBuilder {
3722 fn as_ref(&self) -> &ClearRecentStickers { &self.inner }
3723}
3724
3725
3726
3727
3728
3729
3730
3731#[derive(Debug, Clone, Default, Serialize, Deserialize)]
3733pub struct ClearRecentlyFoundChats {
3734 #[doc(hidden)]
3735 #[serde(rename(serialize = "@type", deserialize = "@type"))]
3736 td_name: String,
3737 #[doc(hidden)]
3738 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
3739 extra: Option<String>,
3740
3741}
3742
3743impl RObject for ClearRecentlyFoundChats {
3744 #[doc(hidden)] fn td_name(&self) -> &'static str { "clearRecentlyFoundChats" }
3745 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
3746 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
3747}
3748
3749
3750
3751
3752impl RFunction for ClearRecentlyFoundChats {}
3753
3754impl ClearRecentlyFoundChats {
3755 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
3756 pub fn builder() -> RTDClearRecentlyFoundChatsBuilder {
3757 let mut inner = ClearRecentlyFoundChats::default();
3758 inner.td_name = "clearRecentlyFoundChats".to_string();
3759 inner.extra = Some(Uuid::new_v4().to_string());
3760 RTDClearRecentlyFoundChatsBuilder { inner }
3761 }
3762
3763}
3764
3765#[doc(hidden)]
3766pub struct RTDClearRecentlyFoundChatsBuilder {
3767 inner: ClearRecentlyFoundChats
3768}
3769
3770impl RTDClearRecentlyFoundChatsBuilder {
3771 pub fn build(&self) -> ClearRecentlyFoundChats { self.inner.clone() }
3772
3773}
3774
3775impl AsRef<ClearRecentlyFoundChats> for ClearRecentlyFoundChats {
3776 fn as_ref(&self) -> &ClearRecentlyFoundChats { self }
3777}
3778
3779impl AsRef<ClearRecentlyFoundChats> for RTDClearRecentlyFoundChatsBuilder {
3780 fn as_ref(&self) -> &ClearRecentlyFoundChats { &self.inner }
3781}
3782
3783
3784
3785
3786
3787
3788
3789#[derive(Debug, Clone, Default, Serialize, Deserialize)]
3791pub struct ClickAnimatedEmojiMessage {
3792 #[doc(hidden)]
3793 #[serde(rename(serialize = "@type", deserialize = "@type"))]
3794 td_name: String,
3795 #[doc(hidden)]
3796 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
3797 extra: Option<String>,
3798 chat_id: i64,
3800 message_id: i64,
3802
3803}
3804
3805impl RObject for ClickAnimatedEmojiMessage {
3806 #[doc(hidden)] fn td_name(&self) -> &'static str { "clickAnimatedEmojiMessage" }
3807 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
3808 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
3809}
3810
3811
3812
3813
3814impl RFunction for ClickAnimatedEmojiMessage {}
3815
3816impl ClickAnimatedEmojiMessage {
3817 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
3818 pub fn builder() -> RTDClickAnimatedEmojiMessageBuilder {
3819 let mut inner = ClickAnimatedEmojiMessage::default();
3820 inner.td_name = "clickAnimatedEmojiMessage".to_string();
3821 inner.extra = Some(Uuid::new_v4().to_string());
3822 RTDClickAnimatedEmojiMessageBuilder { inner }
3823 }
3824
3825 pub fn chat_id(&self) -> i64 { self.chat_id }
3826
3827 pub fn message_id(&self) -> i64 { self.message_id }
3828
3829}
3830
3831#[doc(hidden)]
3832pub struct RTDClickAnimatedEmojiMessageBuilder {
3833 inner: ClickAnimatedEmojiMessage
3834}
3835
3836impl RTDClickAnimatedEmojiMessageBuilder {
3837 pub fn build(&self) -> ClickAnimatedEmojiMessage { self.inner.clone() }
3838
3839
3840 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
3841 self.inner.chat_id = chat_id;
3842 self
3843 }
3844
3845
3846 pub fn message_id(&mut self, message_id: i64) -> &mut Self {
3847 self.inner.message_id = message_id;
3848 self
3849 }
3850
3851}
3852
3853impl AsRef<ClickAnimatedEmojiMessage> for ClickAnimatedEmojiMessage {
3854 fn as_ref(&self) -> &ClickAnimatedEmojiMessage { self }
3855}
3856
3857impl AsRef<ClickAnimatedEmojiMessage> for RTDClickAnimatedEmojiMessageBuilder {
3858 fn as_ref(&self) -> &ClickAnimatedEmojiMessage { &self.inner }
3859}
3860
3861
3862
3863
3864
3865
3866
3867#[derive(Debug, Clone, Default, Serialize, Deserialize)]
3869pub struct Close {
3870 #[doc(hidden)]
3871 #[serde(rename(serialize = "@type", deserialize = "@type"))]
3872 td_name: String,
3873 #[doc(hidden)]
3874 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
3875 extra: Option<String>,
3876
3877}
3878
3879impl RObject for Close {
3880 #[doc(hidden)] fn td_name(&self) -> &'static str { "close" }
3881 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
3882 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
3883}
3884
3885
3886
3887
3888impl RFunction for Close {}
3889
3890impl Close {
3891 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
3892 pub fn builder() -> RTDCloseBuilder {
3893 let mut inner = Close::default();
3894 inner.td_name = "close".to_string();
3895 inner.extra = Some(Uuid::new_v4().to_string());
3896 RTDCloseBuilder { inner }
3897 }
3898
3899}
3900
3901#[doc(hidden)]
3902pub struct RTDCloseBuilder {
3903 inner: Close
3904}
3905
3906impl RTDCloseBuilder {
3907 pub fn build(&self) -> Close { self.inner.clone() }
3908
3909}
3910
3911impl AsRef<Close> for Close {
3912 fn as_ref(&self) -> &Close { self }
3913}
3914
3915impl AsRef<Close> for RTDCloseBuilder {
3916 fn as_ref(&self) -> &Close { &self.inner }
3917}
3918
3919
3920
3921
3922
3923
3924
3925#[derive(Debug, Clone, Default, Serialize, Deserialize)]
3927pub struct CloseChat {
3928 #[doc(hidden)]
3929 #[serde(rename(serialize = "@type", deserialize = "@type"))]
3930 td_name: String,
3931 #[doc(hidden)]
3932 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
3933 extra: Option<String>,
3934 chat_id: i64,
3936
3937}
3938
3939impl RObject for CloseChat {
3940 #[doc(hidden)] fn td_name(&self) -> &'static str { "closeChat" }
3941 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
3942 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
3943}
3944
3945
3946
3947
3948impl RFunction for CloseChat {}
3949
3950impl CloseChat {
3951 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
3952 pub fn builder() -> RTDCloseChatBuilder {
3953 let mut inner = CloseChat::default();
3954 inner.td_name = "closeChat".to_string();
3955 inner.extra = Some(Uuid::new_v4().to_string());
3956 RTDCloseChatBuilder { inner }
3957 }
3958
3959 pub fn chat_id(&self) -> i64 { self.chat_id }
3960
3961}
3962
3963#[doc(hidden)]
3964pub struct RTDCloseChatBuilder {
3965 inner: CloseChat
3966}
3967
3968impl RTDCloseChatBuilder {
3969 pub fn build(&self) -> CloseChat { self.inner.clone() }
3970
3971
3972 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
3973 self.inner.chat_id = chat_id;
3974 self
3975 }
3976
3977}
3978
3979impl AsRef<CloseChat> for CloseChat {
3980 fn as_ref(&self) -> &CloseChat { self }
3981}
3982
3983impl AsRef<CloseChat> for RTDCloseChatBuilder {
3984 fn as_ref(&self) -> &CloseChat { &self.inner }
3985}
3986
3987
3988
3989
3990
3991
3992
3993#[derive(Debug, Clone, Default, Serialize, Deserialize)]
3995pub struct CloseSecretChat {
3996 #[doc(hidden)]
3997 #[serde(rename(serialize = "@type", deserialize = "@type"))]
3998 td_name: String,
3999 #[doc(hidden)]
4000 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
4001 extra: Option<String>,
4002 secret_chat_id: i64,
4004
4005}
4006
4007impl RObject for CloseSecretChat {
4008 #[doc(hidden)] fn td_name(&self) -> &'static str { "closeSecretChat" }
4009 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
4010 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
4011}
4012
4013
4014
4015
4016impl RFunction for CloseSecretChat {}
4017
4018impl CloseSecretChat {
4019 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
4020 pub fn builder() -> RTDCloseSecretChatBuilder {
4021 let mut inner = CloseSecretChat::default();
4022 inner.td_name = "closeSecretChat".to_string();
4023 inner.extra = Some(Uuid::new_v4().to_string());
4024 RTDCloseSecretChatBuilder { inner }
4025 }
4026
4027 pub fn secret_chat_id(&self) -> i64 { self.secret_chat_id }
4028
4029}
4030
4031#[doc(hidden)]
4032pub struct RTDCloseSecretChatBuilder {
4033 inner: CloseSecretChat
4034}
4035
4036impl RTDCloseSecretChatBuilder {
4037 pub fn build(&self) -> CloseSecretChat { self.inner.clone() }
4038
4039
4040 pub fn secret_chat_id(&mut self, secret_chat_id: i64) -> &mut Self {
4041 self.inner.secret_chat_id = secret_chat_id;
4042 self
4043 }
4044
4045}
4046
4047impl AsRef<CloseSecretChat> for CloseSecretChat {
4048 fn as_ref(&self) -> &CloseSecretChat { self }
4049}
4050
4051impl AsRef<CloseSecretChat> for RTDCloseSecretChatBuilder {
4052 fn as_ref(&self) -> &CloseSecretChat { &self.inner }
4053}
4054
4055
4056
4057
4058
4059
4060
4061#[derive(Debug, Clone, Default, Serialize, Deserialize)]
4063pub struct ConfirmQrCodeAuthentication {
4064 #[doc(hidden)]
4065 #[serde(rename(serialize = "@type", deserialize = "@type"))]
4066 td_name: String,
4067 #[doc(hidden)]
4068 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
4069 extra: Option<String>,
4070 link: String,
4072
4073}
4074
4075impl RObject for ConfirmQrCodeAuthentication {
4076 #[doc(hidden)] fn td_name(&self) -> &'static str { "confirmQrCodeAuthentication" }
4077 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
4078 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
4079}
4080
4081
4082
4083
4084impl RFunction for ConfirmQrCodeAuthentication {}
4085
4086impl ConfirmQrCodeAuthentication {
4087 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
4088 pub fn builder() -> RTDConfirmQrCodeAuthenticationBuilder {
4089 let mut inner = ConfirmQrCodeAuthentication::default();
4090 inner.td_name = "confirmQrCodeAuthentication".to_string();
4091 inner.extra = Some(Uuid::new_v4().to_string());
4092 RTDConfirmQrCodeAuthenticationBuilder { inner }
4093 }
4094
4095 pub fn link(&self) -> &String { &self.link }
4096
4097}
4098
4099#[doc(hidden)]
4100pub struct RTDConfirmQrCodeAuthenticationBuilder {
4101 inner: ConfirmQrCodeAuthentication
4102}
4103
4104impl RTDConfirmQrCodeAuthenticationBuilder {
4105 pub fn build(&self) -> ConfirmQrCodeAuthentication { self.inner.clone() }
4106
4107
4108 pub fn link<T: AsRef<str>>(&mut self, link: T) -> &mut Self {
4109 self.inner.link = link.as_ref().to_string();
4110 self
4111 }
4112
4113}
4114
4115impl AsRef<ConfirmQrCodeAuthentication> for ConfirmQrCodeAuthentication {
4116 fn as_ref(&self) -> &ConfirmQrCodeAuthentication { self }
4117}
4118
4119impl AsRef<ConfirmQrCodeAuthentication> for RTDConfirmQrCodeAuthenticationBuilder {
4120 fn as_ref(&self) -> &ConfirmQrCodeAuthentication { &self.inner }
4121}
4122
4123
4124
4125
4126
4127
4128
4129#[derive(Debug, Clone, Default, Serialize, Deserialize)]
4131pub struct CreateBasicGroupChat {
4132 #[doc(hidden)]
4133 #[serde(rename(serialize = "@type", deserialize = "@type"))]
4134 td_name: String,
4135 #[doc(hidden)]
4136 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
4137 extra: Option<String>,
4138 basic_group_id: i64,
4140 force: bool,
4142
4143}
4144
4145impl RObject for CreateBasicGroupChat {
4146 #[doc(hidden)] fn td_name(&self) -> &'static str { "createBasicGroupChat" }
4147 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
4148 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
4149}
4150
4151
4152
4153
4154impl RFunction for CreateBasicGroupChat {}
4155
4156impl CreateBasicGroupChat {
4157 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
4158 pub fn builder() -> RTDCreateBasicGroupChatBuilder {
4159 let mut inner = CreateBasicGroupChat::default();
4160 inner.td_name = "createBasicGroupChat".to_string();
4161 inner.extra = Some(Uuid::new_v4().to_string());
4162 RTDCreateBasicGroupChatBuilder { inner }
4163 }
4164
4165 pub fn basic_group_id(&self) -> i64 { self.basic_group_id }
4166
4167 pub fn force(&self) -> bool { self.force }
4168
4169}
4170
4171#[doc(hidden)]
4172pub struct RTDCreateBasicGroupChatBuilder {
4173 inner: CreateBasicGroupChat
4174}
4175
4176impl RTDCreateBasicGroupChatBuilder {
4177 pub fn build(&self) -> CreateBasicGroupChat { self.inner.clone() }
4178
4179
4180 pub fn basic_group_id(&mut self, basic_group_id: i64) -> &mut Self {
4181 self.inner.basic_group_id = basic_group_id;
4182 self
4183 }
4184
4185
4186 pub fn force(&mut self, force: bool) -> &mut Self {
4187 self.inner.force = force;
4188 self
4189 }
4190
4191}
4192
4193impl AsRef<CreateBasicGroupChat> for CreateBasicGroupChat {
4194 fn as_ref(&self) -> &CreateBasicGroupChat { self }
4195}
4196
4197impl AsRef<CreateBasicGroupChat> for RTDCreateBasicGroupChatBuilder {
4198 fn as_ref(&self) -> &CreateBasicGroupChat { &self.inner }
4199}
4200
4201
4202
4203
4204
4205
4206
4207#[derive(Debug, Clone, Default, Serialize, Deserialize)]
4209pub struct CreateCall {
4210 #[doc(hidden)]
4211 #[serde(rename(serialize = "@type", deserialize = "@type"))]
4212 td_name: String,
4213 #[doc(hidden)]
4214 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
4215 extra: Option<String>,
4216 user_id: i64,
4218 protocol: CallProtocol,
4220 is_video: bool,
4222
4223}
4224
4225impl RObject for CreateCall {
4226 #[doc(hidden)] fn td_name(&self) -> &'static str { "createCall" }
4227 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
4228 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
4229}
4230
4231
4232
4233
4234impl RFunction for CreateCall {}
4235
4236impl CreateCall {
4237 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
4238 pub fn builder() -> RTDCreateCallBuilder {
4239 let mut inner = CreateCall::default();
4240 inner.td_name = "createCall".to_string();
4241 inner.extra = Some(Uuid::new_v4().to_string());
4242 RTDCreateCallBuilder { inner }
4243 }
4244
4245 pub fn user_id(&self) -> i64 { self.user_id }
4246
4247 pub fn protocol(&self) -> &CallProtocol { &self.protocol }
4248
4249 pub fn is_video(&self) -> bool { self.is_video }
4250
4251}
4252
4253#[doc(hidden)]
4254pub struct RTDCreateCallBuilder {
4255 inner: CreateCall
4256}
4257
4258impl RTDCreateCallBuilder {
4259 pub fn build(&self) -> CreateCall { self.inner.clone() }
4260
4261
4262 pub fn user_id(&mut self, user_id: i64) -> &mut Self {
4263 self.inner.user_id = user_id;
4264 self
4265 }
4266
4267
4268 pub fn protocol<T: AsRef<CallProtocol>>(&mut self, protocol: T) -> &mut Self {
4269 self.inner.protocol = protocol.as_ref().clone();
4270 self
4271 }
4272
4273
4274 pub fn is_video(&mut self, is_video: bool) -> &mut Self {
4275 self.inner.is_video = is_video;
4276 self
4277 }
4278
4279}
4280
4281impl AsRef<CreateCall> for CreateCall {
4282 fn as_ref(&self) -> &CreateCall { self }
4283}
4284
4285impl AsRef<CreateCall> for RTDCreateCallBuilder {
4286 fn as_ref(&self) -> &CreateCall { &self.inner }
4287}
4288
4289
4290
4291
4292
4293
4294
4295#[derive(Debug, Clone, Default, Serialize, Deserialize)]
4297pub struct CreateChatFilter {
4298 #[doc(hidden)]
4299 #[serde(rename(serialize = "@type", deserialize = "@type"))]
4300 td_name: String,
4301 #[doc(hidden)]
4302 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
4303 extra: Option<String>,
4304 filter: ChatFilter,
4306
4307}
4308
4309impl RObject for CreateChatFilter {
4310 #[doc(hidden)] fn td_name(&self) -> &'static str { "createChatFilter" }
4311 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
4312 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
4313}
4314
4315
4316
4317
4318impl RFunction for CreateChatFilter {}
4319
4320impl CreateChatFilter {
4321 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
4322 pub fn builder() -> RTDCreateChatFilterBuilder {
4323 let mut inner = CreateChatFilter::default();
4324 inner.td_name = "createChatFilter".to_string();
4325 inner.extra = Some(Uuid::new_v4().to_string());
4326 RTDCreateChatFilterBuilder { inner }
4327 }
4328
4329 pub fn filter(&self) -> &ChatFilter { &self.filter }
4330
4331}
4332
4333#[doc(hidden)]
4334pub struct RTDCreateChatFilterBuilder {
4335 inner: CreateChatFilter
4336}
4337
4338impl RTDCreateChatFilterBuilder {
4339 pub fn build(&self) -> CreateChatFilter { self.inner.clone() }
4340
4341
4342 pub fn filter<T: AsRef<ChatFilter>>(&mut self, filter: T) -> &mut Self {
4343 self.inner.filter = filter.as_ref().clone();
4344 self
4345 }
4346
4347}
4348
4349impl AsRef<CreateChatFilter> for CreateChatFilter {
4350 fn as_ref(&self) -> &CreateChatFilter { self }
4351}
4352
4353impl AsRef<CreateChatFilter> for RTDCreateChatFilterBuilder {
4354 fn as_ref(&self) -> &CreateChatFilter { &self.inner }
4355}
4356
4357
4358
4359
4360
4361
4362
4363#[derive(Debug, Clone, Default, Serialize, Deserialize)]
4365pub struct CreateChatInviteLink {
4366 #[doc(hidden)]
4367 #[serde(rename(serialize = "@type", deserialize = "@type"))]
4368 td_name: String,
4369 #[doc(hidden)]
4370 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
4371 extra: Option<String>,
4372 chat_id: i64,
4374 name: String,
4376 expiration_date: i64,
4378 member_limit: i64,
4380 creates_join_request: bool,
4382
4383}
4384
4385impl RObject for CreateChatInviteLink {
4386 #[doc(hidden)] fn td_name(&self) -> &'static str { "createChatInviteLink" }
4387 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
4388 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
4389}
4390
4391
4392
4393
4394impl RFunction for CreateChatInviteLink {}
4395
4396impl CreateChatInviteLink {
4397 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
4398 pub fn builder() -> RTDCreateChatInviteLinkBuilder {
4399 let mut inner = CreateChatInviteLink::default();
4400 inner.td_name = "createChatInviteLink".to_string();
4401 inner.extra = Some(Uuid::new_v4().to_string());
4402 RTDCreateChatInviteLinkBuilder { inner }
4403 }
4404
4405 pub fn chat_id(&self) -> i64 { self.chat_id }
4406
4407 pub fn name(&self) -> &String { &self.name }
4408
4409 pub fn expiration_date(&self) -> i64 { self.expiration_date }
4410
4411 pub fn member_limit(&self) -> i64 { self.member_limit }
4412
4413 pub fn creates_join_request(&self) -> bool { self.creates_join_request }
4414
4415}
4416
4417#[doc(hidden)]
4418pub struct RTDCreateChatInviteLinkBuilder {
4419 inner: CreateChatInviteLink
4420}
4421
4422impl RTDCreateChatInviteLinkBuilder {
4423 pub fn build(&self) -> CreateChatInviteLink { self.inner.clone() }
4424
4425
4426 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
4427 self.inner.chat_id = chat_id;
4428 self
4429 }
4430
4431
4432 pub fn name<T: AsRef<str>>(&mut self, name: T) -> &mut Self {
4433 self.inner.name = name.as_ref().to_string();
4434 self
4435 }
4436
4437
4438 pub fn expiration_date(&mut self, expiration_date: i64) -> &mut Self {
4439 self.inner.expiration_date = expiration_date;
4440 self
4441 }
4442
4443
4444 pub fn member_limit(&mut self, member_limit: i64) -> &mut Self {
4445 self.inner.member_limit = member_limit;
4446 self
4447 }
4448
4449
4450 pub fn creates_join_request(&mut self, creates_join_request: bool) -> &mut Self {
4451 self.inner.creates_join_request = creates_join_request;
4452 self
4453 }
4454
4455}
4456
4457impl AsRef<CreateChatInviteLink> for CreateChatInviteLink {
4458 fn as_ref(&self) -> &CreateChatInviteLink { self }
4459}
4460
4461impl AsRef<CreateChatInviteLink> for RTDCreateChatInviteLinkBuilder {
4462 fn as_ref(&self) -> &CreateChatInviteLink { &self.inner }
4463}
4464
4465
4466
4467
4468
4469
4470
4471#[derive(Debug, Clone, Default, Serialize, Deserialize)]
4473pub struct CreateNewBasicGroupChat {
4474 #[doc(hidden)]
4475 #[serde(rename(serialize = "@type", deserialize = "@type"))]
4476 td_name: String,
4477 #[doc(hidden)]
4478 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
4479 extra: Option<String>,
4480 user_ids: Vec<i64>,
4482 title: String,
4484
4485}
4486
4487impl RObject for CreateNewBasicGroupChat {
4488 #[doc(hidden)] fn td_name(&self) -> &'static str { "createNewBasicGroupChat" }
4489 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
4490 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
4491}
4492
4493
4494
4495
4496impl RFunction for CreateNewBasicGroupChat {}
4497
4498impl CreateNewBasicGroupChat {
4499 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
4500 pub fn builder() -> RTDCreateNewBasicGroupChatBuilder {
4501 let mut inner = CreateNewBasicGroupChat::default();
4502 inner.td_name = "createNewBasicGroupChat".to_string();
4503 inner.extra = Some(Uuid::new_v4().to_string());
4504 RTDCreateNewBasicGroupChatBuilder { inner }
4505 }
4506
4507 pub fn user_ids(&self) -> &Vec<i64> { &self.user_ids }
4508
4509 pub fn title(&self) -> &String { &self.title }
4510
4511}
4512
4513#[doc(hidden)]
4514pub struct RTDCreateNewBasicGroupChatBuilder {
4515 inner: CreateNewBasicGroupChat
4516}
4517
4518impl RTDCreateNewBasicGroupChatBuilder {
4519 pub fn build(&self) -> CreateNewBasicGroupChat { self.inner.clone() }
4520
4521
4522 pub fn user_ids(&mut self, user_ids: Vec<i64>) -> &mut Self {
4523 self.inner.user_ids = user_ids;
4524 self
4525 }
4526
4527
4528 pub fn title<T: AsRef<str>>(&mut self, title: T) -> &mut Self {
4529 self.inner.title = title.as_ref().to_string();
4530 self
4531 }
4532
4533}
4534
4535impl AsRef<CreateNewBasicGroupChat> for CreateNewBasicGroupChat {
4536 fn as_ref(&self) -> &CreateNewBasicGroupChat { self }
4537}
4538
4539impl AsRef<CreateNewBasicGroupChat> for RTDCreateNewBasicGroupChatBuilder {
4540 fn as_ref(&self) -> &CreateNewBasicGroupChat { &self.inner }
4541}
4542
4543
4544
4545
4546
4547
4548
4549#[derive(Debug, Clone, Default, Serialize, Deserialize)]
4551pub struct CreateNewSecretChat {
4552 #[doc(hidden)]
4553 #[serde(rename(serialize = "@type", deserialize = "@type"))]
4554 td_name: String,
4555 #[doc(hidden)]
4556 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
4557 extra: Option<String>,
4558 user_id: i64,
4560
4561}
4562
4563impl RObject for CreateNewSecretChat {
4564 #[doc(hidden)] fn td_name(&self) -> &'static str { "createNewSecretChat" }
4565 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
4566 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
4567}
4568
4569
4570
4571
4572impl RFunction for CreateNewSecretChat {}
4573
4574impl CreateNewSecretChat {
4575 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
4576 pub fn builder() -> RTDCreateNewSecretChatBuilder {
4577 let mut inner = CreateNewSecretChat::default();
4578 inner.td_name = "createNewSecretChat".to_string();
4579 inner.extra = Some(Uuid::new_v4().to_string());
4580 RTDCreateNewSecretChatBuilder { inner }
4581 }
4582
4583 pub fn user_id(&self) -> i64 { self.user_id }
4584
4585}
4586
4587#[doc(hidden)]
4588pub struct RTDCreateNewSecretChatBuilder {
4589 inner: CreateNewSecretChat
4590}
4591
4592impl RTDCreateNewSecretChatBuilder {
4593 pub fn build(&self) -> CreateNewSecretChat { self.inner.clone() }
4594
4595
4596 pub fn user_id(&mut self, user_id: i64) -> &mut Self {
4597 self.inner.user_id = user_id;
4598 self
4599 }
4600
4601}
4602
4603impl AsRef<CreateNewSecretChat> for CreateNewSecretChat {
4604 fn as_ref(&self) -> &CreateNewSecretChat { self }
4605}
4606
4607impl AsRef<CreateNewSecretChat> for RTDCreateNewSecretChatBuilder {
4608 fn as_ref(&self) -> &CreateNewSecretChat { &self.inner }
4609}
4610
4611
4612
4613
4614
4615
4616
4617#[derive(Debug, Clone, Default, Serialize, Deserialize)]
4619pub struct CreateNewStickerSet {
4620 #[doc(hidden)]
4621 #[serde(rename(serialize = "@type", deserialize = "@type"))]
4622 td_name: String,
4623 #[doc(hidden)]
4624 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
4625 extra: Option<String>,
4626 user_id: i64,
4628 title: String,
4630 name: String,
4632 is_masks: bool,
4634 stickers: Vec<InputSticker>,
4636 source: String,
4638
4639}
4640
4641impl RObject for CreateNewStickerSet {
4642 #[doc(hidden)] fn td_name(&self) -> &'static str { "createNewStickerSet" }
4643 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
4644 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
4645}
4646
4647
4648
4649
4650impl RFunction for CreateNewStickerSet {}
4651
4652impl CreateNewStickerSet {
4653 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
4654 pub fn builder() -> RTDCreateNewStickerSetBuilder {
4655 let mut inner = CreateNewStickerSet::default();
4656 inner.td_name = "createNewStickerSet".to_string();
4657 inner.extra = Some(Uuid::new_v4().to_string());
4658 RTDCreateNewStickerSetBuilder { inner }
4659 }
4660
4661 pub fn user_id(&self) -> i64 { self.user_id }
4662
4663 pub fn title(&self) -> &String { &self.title }
4664
4665 pub fn name(&self) -> &String { &self.name }
4666
4667 pub fn is_masks(&self) -> bool { self.is_masks }
4668
4669 pub fn stickers(&self) -> &Vec<InputSticker> { &self.stickers }
4670
4671 pub fn source(&self) -> &String { &self.source }
4672
4673}
4674
4675#[doc(hidden)]
4676pub struct RTDCreateNewStickerSetBuilder {
4677 inner: CreateNewStickerSet
4678}
4679
4680impl RTDCreateNewStickerSetBuilder {
4681 pub fn build(&self) -> CreateNewStickerSet { self.inner.clone() }
4682
4683
4684 pub fn user_id(&mut self, user_id: i64) -> &mut Self {
4685 self.inner.user_id = user_id;
4686 self
4687 }
4688
4689
4690 pub fn title<T: AsRef<str>>(&mut self, title: T) -> &mut Self {
4691 self.inner.title = title.as_ref().to_string();
4692 self
4693 }
4694
4695
4696 pub fn name<T: AsRef<str>>(&mut self, name: T) -> &mut Self {
4697 self.inner.name = name.as_ref().to_string();
4698 self
4699 }
4700
4701
4702 pub fn is_masks(&mut self, is_masks: bool) -> &mut Self {
4703 self.inner.is_masks = is_masks;
4704 self
4705 }
4706
4707
4708 pub fn stickers(&mut self, stickers: Vec<InputSticker>) -> &mut Self {
4709 self.inner.stickers = stickers;
4710 self
4711 }
4712
4713
4714 pub fn source<T: AsRef<str>>(&mut self, source: T) -> &mut Self {
4715 self.inner.source = source.as_ref().to_string();
4716 self
4717 }
4718
4719}
4720
4721impl AsRef<CreateNewStickerSet> for CreateNewStickerSet {
4722 fn as_ref(&self) -> &CreateNewStickerSet { self }
4723}
4724
4725impl AsRef<CreateNewStickerSet> for RTDCreateNewStickerSetBuilder {
4726 fn as_ref(&self) -> &CreateNewStickerSet { &self.inner }
4727}
4728
4729
4730
4731
4732
4733
4734
4735#[derive(Debug, Clone, Default, Serialize, Deserialize)]
4737pub struct CreateNewSupergroupChat {
4738 #[doc(hidden)]
4739 #[serde(rename(serialize = "@type", deserialize = "@type"))]
4740 td_name: String,
4741 #[doc(hidden)]
4742 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
4743 extra: Option<String>,
4744 title: String,
4746 is_channel: bool,
4748 description: String,
4750 location: ChatLocation,
4752 for_import: bool,
4754
4755}
4756
4757impl RObject for CreateNewSupergroupChat {
4758 #[doc(hidden)] fn td_name(&self) -> &'static str { "createNewSupergroupChat" }
4759 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
4760 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
4761}
4762
4763
4764
4765
4766impl RFunction for CreateNewSupergroupChat {}
4767
4768impl CreateNewSupergroupChat {
4769 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
4770 pub fn builder() -> RTDCreateNewSupergroupChatBuilder {
4771 let mut inner = CreateNewSupergroupChat::default();
4772 inner.td_name = "createNewSupergroupChat".to_string();
4773 inner.extra = Some(Uuid::new_v4().to_string());
4774 RTDCreateNewSupergroupChatBuilder { inner }
4775 }
4776
4777 pub fn title(&self) -> &String { &self.title }
4778
4779 pub fn is_channel(&self) -> bool { self.is_channel }
4780
4781 pub fn description(&self) -> &String { &self.description }
4782
4783 pub fn location(&self) -> &ChatLocation { &self.location }
4784
4785 pub fn for_import(&self) -> bool { self.for_import }
4786
4787}
4788
4789#[doc(hidden)]
4790pub struct RTDCreateNewSupergroupChatBuilder {
4791 inner: CreateNewSupergroupChat
4792}
4793
4794impl RTDCreateNewSupergroupChatBuilder {
4795 pub fn build(&self) -> CreateNewSupergroupChat { self.inner.clone() }
4796
4797
4798 pub fn title<T: AsRef<str>>(&mut self, title: T) -> &mut Self {
4799 self.inner.title = title.as_ref().to_string();
4800 self
4801 }
4802
4803
4804 pub fn is_channel(&mut self, is_channel: bool) -> &mut Self {
4805 self.inner.is_channel = is_channel;
4806 self
4807 }
4808
4809
4810 pub fn description<T: AsRef<str>>(&mut self, description: T) -> &mut Self {
4811 self.inner.description = description.as_ref().to_string();
4812 self
4813 }
4814
4815
4816 pub fn location<T: AsRef<ChatLocation>>(&mut self, location: T) -> &mut Self {
4817 self.inner.location = location.as_ref().clone();
4818 self
4819 }
4820
4821
4822 pub fn for_import(&mut self, for_import: bool) -> &mut Self {
4823 self.inner.for_import = for_import;
4824 self
4825 }
4826
4827}
4828
4829impl AsRef<CreateNewSupergroupChat> for CreateNewSupergroupChat {
4830 fn as_ref(&self) -> &CreateNewSupergroupChat { self }
4831}
4832
4833impl AsRef<CreateNewSupergroupChat> for RTDCreateNewSupergroupChatBuilder {
4834 fn as_ref(&self) -> &CreateNewSupergroupChat { &self.inner }
4835}
4836
4837
4838
4839
4840
4841
4842
4843#[derive(Debug, Clone, Default, Serialize, Deserialize)]
4845pub struct CreatePrivateChat {
4846 #[doc(hidden)]
4847 #[serde(rename(serialize = "@type", deserialize = "@type"))]
4848 td_name: String,
4849 #[doc(hidden)]
4850 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
4851 extra: Option<String>,
4852 user_id: i64,
4854 force: bool,
4856
4857}
4858
4859impl RObject for CreatePrivateChat {
4860 #[doc(hidden)] fn td_name(&self) -> &'static str { "createPrivateChat" }
4861 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
4862 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
4863}
4864
4865
4866
4867
4868impl RFunction for CreatePrivateChat {}
4869
4870impl CreatePrivateChat {
4871 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
4872 pub fn builder() -> RTDCreatePrivateChatBuilder {
4873 let mut inner = CreatePrivateChat::default();
4874 inner.td_name = "createPrivateChat".to_string();
4875 inner.extra = Some(Uuid::new_v4().to_string());
4876 RTDCreatePrivateChatBuilder { inner }
4877 }
4878
4879 pub fn user_id(&self) -> i64 { self.user_id }
4880
4881 pub fn force(&self) -> bool { self.force }
4882
4883}
4884
4885#[doc(hidden)]
4886pub struct RTDCreatePrivateChatBuilder {
4887 inner: CreatePrivateChat
4888}
4889
4890impl RTDCreatePrivateChatBuilder {
4891 pub fn build(&self) -> CreatePrivateChat { self.inner.clone() }
4892
4893
4894 pub fn user_id(&mut self, user_id: i64) -> &mut Self {
4895 self.inner.user_id = user_id;
4896 self
4897 }
4898
4899
4900 pub fn force(&mut self, force: bool) -> &mut Self {
4901 self.inner.force = force;
4902 self
4903 }
4904
4905}
4906
4907impl AsRef<CreatePrivateChat> for CreatePrivateChat {
4908 fn as_ref(&self) -> &CreatePrivateChat { self }
4909}
4910
4911impl AsRef<CreatePrivateChat> for RTDCreatePrivateChatBuilder {
4912 fn as_ref(&self) -> &CreatePrivateChat { &self.inner }
4913}
4914
4915
4916
4917
4918
4919
4920
4921#[derive(Debug, Clone, Default, Serialize, Deserialize)]
4923pub struct CreateSecretChat {
4924 #[doc(hidden)]
4925 #[serde(rename(serialize = "@type", deserialize = "@type"))]
4926 td_name: String,
4927 #[doc(hidden)]
4928 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
4929 extra: Option<String>,
4930 secret_chat_id: i64,
4932
4933}
4934
4935impl RObject for CreateSecretChat {
4936 #[doc(hidden)] fn td_name(&self) -> &'static str { "createSecretChat" }
4937 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
4938 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
4939}
4940
4941
4942
4943
4944impl RFunction for CreateSecretChat {}
4945
4946impl CreateSecretChat {
4947 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
4948 pub fn builder() -> RTDCreateSecretChatBuilder {
4949 let mut inner = CreateSecretChat::default();
4950 inner.td_name = "createSecretChat".to_string();
4951 inner.extra = Some(Uuid::new_v4().to_string());
4952 RTDCreateSecretChatBuilder { inner }
4953 }
4954
4955 pub fn secret_chat_id(&self) -> i64 { self.secret_chat_id }
4956
4957}
4958
4959#[doc(hidden)]
4960pub struct RTDCreateSecretChatBuilder {
4961 inner: CreateSecretChat
4962}
4963
4964impl RTDCreateSecretChatBuilder {
4965 pub fn build(&self) -> CreateSecretChat { self.inner.clone() }
4966
4967
4968 pub fn secret_chat_id(&mut self, secret_chat_id: i64) -> &mut Self {
4969 self.inner.secret_chat_id = secret_chat_id;
4970 self
4971 }
4972
4973}
4974
4975impl AsRef<CreateSecretChat> for CreateSecretChat {
4976 fn as_ref(&self) -> &CreateSecretChat { self }
4977}
4978
4979impl AsRef<CreateSecretChat> for RTDCreateSecretChatBuilder {
4980 fn as_ref(&self) -> &CreateSecretChat { &self.inner }
4981}
4982
4983
4984
4985
4986
4987
4988
4989#[derive(Debug, Clone, Default, Serialize, Deserialize)]
4991pub struct CreateSupergroupChat {
4992 #[doc(hidden)]
4993 #[serde(rename(serialize = "@type", deserialize = "@type"))]
4994 td_name: String,
4995 #[doc(hidden)]
4996 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
4997 extra: Option<String>,
4998 supergroup_id: i64,
5000 force: bool,
5002
5003}
5004
5005impl RObject for CreateSupergroupChat {
5006 #[doc(hidden)] fn td_name(&self) -> &'static str { "createSupergroupChat" }
5007 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
5008 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
5009}
5010
5011
5012
5013
5014impl RFunction for CreateSupergroupChat {}
5015
5016impl CreateSupergroupChat {
5017 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
5018 pub fn builder() -> RTDCreateSupergroupChatBuilder {
5019 let mut inner = CreateSupergroupChat::default();
5020 inner.td_name = "createSupergroupChat".to_string();
5021 inner.extra = Some(Uuid::new_v4().to_string());
5022 RTDCreateSupergroupChatBuilder { inner }
5023 }
5024
5025 pub fn supergroup_id(&self) -> i64 { self.supergroup_id }
5026
5027 pub fn force(&self) -> bool { self.force }
5028
5029}
5030
5031#[doc(hidden)]
5032pub struct RTDCreateSupergroupChatBuilder {
5033 inner: CreateSupergroupChat
5034}
5035
5036impl RTDCreateSupergroupChatBuilder {
5037 pub fn build(&self) -> CreateSupergroupChat { self.inner.clone() }
5038
5039
5040 pub fn supergroup_id(&mut self, supergroup_id: i64) -> &mut Self {
5041 self.inner.supergroup_id = supergroup_id;
5042 self
5043 }
5044
5045
5046 pub fn force(&mut self, force: bool) -> &mut Self {
5047 self.inner.force = force;
5048 self
5049 }
5050
5051}
5052
5053impl AsRef<CreateSupergroupChat> for CreateSupergroupChat {
5054 fn as_ref(&self) -> &CreateSupergroupChat { self }
5055}
5056
5057impl AsRef<CreateSupergroupChat> for RTDCreateSupergroupChatBuilder {
5058 fn as_ref(&self) -> &CreateSupergroupChat { &self.inner }
5059}
5060
5061
5062
5063
5064
5065
5066
5067#[derive(Debug, Clone, Default, Serialize, Deserialize)]
5069pub struct CreateTemporaryPassword {
5070 #[doc(hidden)]
5071 #[serde(rename(serialize = "@type", deserialize = "@type"))]
5072 td_name: String,
5073 #[doc(hidden)]
5074 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
5075 extra: Option<String>,
5076 password: String,
5078 valid_for: i64,
5080
5081}
5082
5083impl RObject for CreateTemporaryPassword {
5084 #[doc(hidden)] fn td_name(&self) -> &'static str { "createTemporaryPassword" }
5085 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
5086 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
5087}
5088
5089
5090
5091
5092impl RFunction for CreateTemporaryPassword {}
5093
5094impl CreateTemporaryPassword {
5095 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
5096 pub fn builder() -> RTDCreateTemporaryPasswordBuilder {
5097 let mut inner = CreateTemporaryPassword::default();
5098 inner.td_name = "createTemporaryPassword".to_string();
5099 inner.extra = Some(Uuid::new_v4().to_string());
5100 RTDCreateTemporaryPasswordBuilder { inner }
5101 }
5102
5103 pub fn password(&self) -> &String { &self.password }
5104
5105 pub fn valid_for(&self) -> i64 { self.valid_for }
5106
5107}
5108
5109#[doc(hidden)]
5110pub struct RTDCreateTemporaryPasswordBuilder {
5111 inner: CreateTemporaryPassword
5112}
5113
5114impl RTDCreateTemporaryPasswordBuilder {
5115 pub fn build(&self) -> CreateTemporaryPassword { self.inner.clone() }
5116
5117
5118 pub fn password<T: AsRef<str>>(&mut self, password: T) -> &mut Self {
5119 self.inner.password = password.as_ref().to_string();
5120 self
5121 }
5122
5123
5124 pub fn valid_for(&mut self, valid_for: i64) -> &mut Self {
5125 self.inner.valid_for = valid_for;
5126 self
5127 }
5128
5129}
5130
5131impl AsRef<CreateTemporaryPassword> for CreateTemporaryPassword {
5132 fn as_ref(&self) -> &CreateTemporaryPassword { self }
5133}
5134
5135impl AsRef<CreateTemporaryPassword> for RTDCreateTemporaryPasswordBuilder {
5136 fn as_ref(&self) -> &CreateTemporaryPassword { &self.inner }
5137}
5138
5139
5140
5141
5142
5143
5144
5145#[derive(Debug, Clone, Default, Serialize, Deserialize)]
5147pub struct CreateVideoChat {
5148 #[doc(hidden)]
5149 #[serde(rename(serialize = "@type", deserialize = "@type"))]
5150 td_name: String,
5151 #[doc(hidden)]
5152 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
5153 extra: Option<String>,
5154 chat_id: i64,
5156 title: String,
5158 start_date: i64,
5160
5161}
5162
5163impl RObject for CreateVideoChat {
5164 #[doc(hidden)] fn td_name(&self) -> &'static str { "createVideoChat" }
5165 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
5166 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
5167}
5168
5169
5170
5171
5172impl RFunction for CreateVideoChat {}
5173
5174impl CreateVideoChat {
5175 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
5176 pub fn builder() -> RTDCreateVideoChatBuilder {
5177 let mut inner = CreateVideoChat::default();
5178 inner.td_name = "createVideoChat".to_string();
5179 inner.extra = Some(Uuid::new_v4().to_string());
5180 RTDCreateVideoChatBuilder { inner }
5181 }
5182
5183 pub fn chat_id(&self) -> i64 { self.chat_id }
5184
5185 pub fn title(&self) -> &String { &self.title }
5186
5187 pub fn start_date(&self) -> i64 { self.start_date }
5188
5189}
5190
5191#[doc(hidden)]
5192pub struct RTDCreateVideoChatBuilder {
5193 inner: CreateVideoChat
5194}
5195
5196impl RTDCreateVideoChatBuilder {
5197 pub fn build(&self) -> CreateVideoChat { self.inner.clone() }
5198
5199
5200 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
5201 self.inner.chat_id = chat_id;
5202 self
5203 }
5204
5205
5206 pub fn title<T: AsRef<str>>(&mut self, title: T) -> &mut Self {
5207 self.inner.title = title.as_ref().to_string();
5208 self
5209 }
5210
5211
5212 pub fn start_date(&mut self, start_date: i64) -> &mut Self {
5213 self.inner.start_date = start_date;
5214 self
5215 }
5216
5217}
5218
5219impl AsRef<CreateVideoChat> for CreateVideoChat {
5220 fn as_ref(&self) -> &CreateVideoChat { self }
5221}
5222
5223impl AsRef<CreateVideoChat> for RTDCreateVideoChatBuilder {
5224 fn as_ref(&self) -> &CreateVideoChat { &self.inner }
5225}
5226
5227
5228
5229
5230
5231
5232
5233#[derive(Debug, Clone, Default, Serialize, Deserialize)]
5235pub struct DeleteAccount {
5236 #[doc(hidden)]
5237 #[serde(rename(serialize = "@type", deserialize = "@type"))]
5238 td_name: String,
5239 #[doc(hidden)]
5240 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
5241 extra: Option<String>,
5242 reason: String,
5244
5245}
5246
5247impl RObject for DeleteAccount {
5248 #[doc(hidden)] fn td_name(&self) -> &'static str { "deleteAccount" }
5249 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
5250 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
5251}
5252
5253
5254
5255
5256impl RFunction for DeleteAccount {}
5257
5258impl DeleteAccount {
5259 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
5260 pub fn builder() -> RTDDeleteAccountBuilder {
5261 let mut inner = DeleteAccount::default();
5262 inner.td_name = "deleteAccount".to_string();
5263 inner.extra = Some(Uuid::new_v4().to_string());
5264 RTDDeleteAccountBuilder { inner }
5265 }
5266
5267 pub fn reason(&self) -> &String { &self.reason }
5268
5269}
5270
5271#[doc(hidden)]
5272pub struct RTDDeleteAccountBuilder {
5273 inner: DeleteAccount
5274}
5275
5276impl RTDDeleteAccountBuilder {
5277 pub fn build(&self) -> DeleteAccount { self.inner.clone() }
5278
5279
5280 pub fn reason<T: AsRef<str>>(&mut self, reason: T) -> &mut Self {
5281 self.inner.reason = reason.as_ref().to_string();
5282 self
5283 }
5284
5285}
5286
5287impl AsRef<DeleteAccount> for DeleteAccount {
5288 fn as_ref(&self) -> &DeleteAccount { self }
5289}
5290
5291impl AsRef<DeleteAccount> for RTDDeleteAccountBuilder {
5292 fn as_ref(&self) -> &DeleteAccount { &self.inner }
5293}
5294
5295
5296
5297
5298
5299
5300
5301#[derive(Debug, Clone, Default, Serialize, Deserialize)]
5303pub struct DeleteAllCallMessages {
5304 #[doc(hidden)]
5305 #[serde(rename(serialize = "@type", deserialize = "@type"))]
5306 td_name: String,
5307 #[doc(hidden)]
5308 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
5309 extra: Option<String>,
5310 revoke: bool,
5312
5313}
5314
5315impl RObject for DeleteAllCallMessages {
5316 #[doc(hidden)] fn td_name(&self) -> &'static str { "deleteAllCallMessages" }
5317 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
5318 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
5319}
5320
5321
5322
5323
5324impl RFunction for DeleteAllCallMessages {}
5325
5326impl DeleteAllCallMessages {
5327 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
5328 pub fn builder() -> RTDDeleteAllCallMessagesBuilder {
5329 let mut inner = DeleteAllCallMessages::default();
5330 inner.td_name = "deleteAllCallMessages".to_string();
5331 inner.extra = Some(Uuid::new_v4().to_string());
5332 RTDDeleteAllCallMessagesBuilder { inner }
5333 }
5334
5335 pub fn revoke(&self) -> bool { self.revoke }
5336
5337}
5338
5339#[doc(hidden)]
5340pub struct RTDDeleteAllCallMessagesBuilder {
5341 inner: DeleteAllCallMessages
5342}
5343
5344impl RTDDeleteAllCallMessagesBuilder {
5345 pub fn build(&self) -> DeleteAllCallMessages { self.inner.clone() }
5346
5347
5348 pub fn revoke(&mut self, revoke: bool) -> &mut Self {
5349 self.inner.revoke = revoke;
5350 self
5351 }
5352
5353}
5354
5355impl AsRef<DeleteAllCallMessages> for DeleteAllCallMessages {
5356 fn as_ref(&self) -> &DeleteAllCallMessages { self }
5357}
5358
5359impl AsRef<DeleteAllCallMessages> for RTDDeleteAllCallMessagesBuilder {
5360 fn as_ref(&self) -> &DeleteAllCallMessages { &self.inner }
5361}
5362
5363
5364
5365
5366
5367
5368
5369#[derive(Debug, Clone, Default, Serialize, Deserialize)]
5371pub struct DeleteAllRevokedChatInviteLinks {
5372 #[doc(hidden)]
5373 #[serde(rename(serialize = "@type", deserialize = "@type"))]
5374 td_name: String,
5375 #[doc(hidden)]
5376 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
5377 extra: Option<String>,
5378 chat_id: i64,
5380 creator_user_id: i64,
5382
5383}
5384
5385impl RObject for DeleteAllRevokedChatInviteLinks {
5386 #[doc(hidden)] fn td_name(&self) -> &'static str { "deleteAllRevokedChatInviteLinks" }
5387 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
5388 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
5389}
5390
5391
5392
5393
5394impl RFunction for DeleteAllRevokedChatInviteLinks {}
5395
5396impl DeleteAllRevokedChatInviteLinks {
5397 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
5398 pub fn builder() -> RTDDeleteAllRevokedChatInviteLinksBuilder {
5399 let mut inner = DeleteAllRevokedChatInviteLinks::default();
5400 inner.td_name = "deleteAllRevokedChatInviteLinks".to_string();
5401 inner.extra = Some(Uuid::new_v4().to_string());
5402 RTDDeleteAllRevokedChatInviteLinksBuilder { inner }
5403 }
5404
5405 pub fn chat_id(&self) -> i64 { self.chat_id }
5406
5407 pub fn creator_user_id(&self) -> i64 { self.creator_user_id }
5408
5409}
5410
5411#[doc(hidden)]
5412pub struct RTDDeleteAllRevokedChatInviteLinksBuilder {
5413 inner: DeleteAllRevokedChatInviteLinks
5414}
5415
5416impl RTDDeleteAllRevokedChatInviteLinksBuilder {
5417 pub fn build(&self) -> DeleteAllRevokedChatInviteLinks { self.inner.clone() }
5418
5419
5420 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
5421 self.inner.chat_id = chat_id;
5422 self
5423 }
5424
5425
5426 pub fn creator_user_id(&mut self, creator_user_id: i64) -> &mut Self {
5427 self.inner.creator_user_id = creator_user_id;
5428 self
5429 }
5430
5431}
5432
5433impl AsRef<DeleteAllRevokedChatInviteLinks> for DeleteAllRevokedChatInviteLinks {
5434 fn as_ref(&self) -> &DeleteAllRevokedChatInviteLinks { self }
5435}
5436
5437impl AsRef<DeleteAllRevokedChatInviteLinks> for RTDDeleteAllRevokedChatInviteLinksBuilder {
5438 fn as_ref(&self) -> &DeleteAllRevokedChatInviteLinks { &self.inner }
5439}
5440
5441
5442
5443
5444
5445
5446
5447#[derive(Debug, Clone, Default, Serialize, Deserialize)]
5449pub struct DeleteChat {
5450 #[doc(hidden)]
5451 #[serde(rename(serialize = "@type", deserialize = "@type"))]
5452 td_name: String,
5453 #[doc(hidden)]
5454 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
5455 extra: Option<String>,
5456 chat_id: i64,
5458
5459}
5460
5461impl RObject for DeleteChat {
5462 #[doc(hidden)] fn td_name(&self) -> &'static str { "deleteChat" }
5463 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
5464 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
5465}
5466
5467
5468
5469
5470impl RFunction for DeleteChat {}
5471
5472impl DeleteChat {
5473 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
5474 pub fn builder() -> RTDDeleteChatBuilder {
5475 let mut inner = DeleteChat::default();
5476 inner.td_name = "deleteChat".to_string();
5477 inner.extra = Some(Uuid::new_v4().to_string());
5478 RTDDeleteChatBuilder { inner }
5479 }
5480
5481 pub fn chat_id(&self) -> i64 { self.chat_id }
5482
5483}
5484
5485#[doc(hidden)]
5486pub struct RTDDeleteChatBuilder {
5487 inner: DeleteChat
5488}
5489
5490impl RTDDeleteChatBuilder {
5491 pub fn build(&self) -> DeleteChat { self.inner.clone() }
5492
5493
5494 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
5495 self.inner.chat_id = chat_id;
5496 self
5497 }
5498
5499}
5500
5501impl AsRef<DeleteChat> for DeleteChat {
5502 fn as_ref(&self) -> &DeleteChat { self }
5503}
5504
5505impl AsRef<DeleteChat> for RTDDeleteChatBuilder {
5506 fn as_ref(&self) -> &DeleteChat { &self.inner }
5507}
5508
5509
5510
5511
5512
5513
5514
5515#[derive(Debug, Clone, Default, Serialize, Deserialize)]
5517pub struct DeleteChatFilter {
5518 #[doc(hidden)]
5519 #[serde(rename(serialize = "@type", deserialize = "@type"))]
5520 td_name: String,
5521 #[doc(hidden)]
5522 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
5523 extra: Option<String>,
5524 chat_filter_id: i64,
5526
5527}
5528
5529impl RObject for DeleteChatFilter {
5530 #[doc(hidden)] fn td_name(&self) -> &'static str { "deleteChatFilter" }
5531 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
5532 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
5533}
5534
5535
5536
5537
5538impl RFunction for DeleteChatFilter {}
5539
5540impl DeleteChatFilter {
5541 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
5542 pub fn builder() -> RTDDeleteChatFilterBuilder {
5543 let mut inner = DeleteChatFilter::default();
5544 inner.td_name = "deleteChatFilter".to_string();
5545 inner.extra = Some(Uuid::new_v4().to_string());
5546 RTDDeleteChatFilterBuilder { inner }
5547 }
5548
5549 pub fn chat_filter_id(&self) -> i64 { self.chat_filter_id }
5550
5551}
5552
5553#[doc(hidden)]
5554pub struct RTDDeleteChatFilterBuilder {
5555 inner: DeleteChatFilter
5556}
5557
5558impl RTDDeleteChatFilterBuilder {
5559 pub fn build(&self) -> DeleteChatFilter { self.inner.clone() }
5560
5561
5562 pub fn chat_filter_id(&mut self, chat_filter_id: i64) -> &mut Self {
5563 self.inner.chat_filter_id = chat_filter_id;
5564 self
5565 }
5566
5567}
5568
5569impl AsRef<DeleteChatFilter> for DeleteChatFilter {
5570 fn as_ref(&self) -> &DeleteChatFilter { self }
5571}
5572
5573impl AsRef<DeleteChatFilter> for RTDDeleteChatFilterBuilder {
5574 fn as_ref(&self) -> &DeleteChatFilter { &self.inner }
5575}
5576
5577
5578
5579
5580
5581
5582
5583#[derive(Debug, Clone, Default, Serialize, Deserialize)]
5585pub struct DeleteChatHistory {
5586 #[doc(hidden)]
5587 #[serde(rename(serialize = "@type", deserialize = "@type"))]
5588 td_name: String,
5589 #[doc(hidden)]
5590 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
5591 extra: Option<String>,
5592 chat_id: i64,
5594 remove_from_chat_list: bool,
5596 revoke: bool,
5598
5599}
5600
5601impl RObject for DeleteChatHistory {
5602 #[doc(hidden)] fn td_name(&self) -> &'static str { "deleteChatHistory" }
5603 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
5604 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
5605}
5606
5607
5608
5609
5610impl RFunction for DeleteChatHistory {}
5611
5612impl DeleteChatHistory {
5613 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
5614 pub fn builder() -> RTDDeleteChatHistoryBuilder {
5615 let mut inner = DeleteChatHistory::default();
5616 inner.td_name = "deleteChatHistory".to_string();
5617 inner.extra = Some(Uuid::new_v4().to_string());
5618 RTDDeleteChatHistoryBuilder { inner }
5619 }
5620
5621 pub fn chat_id(&self) -> i64 { self.chat_id }
5622
5623 pub fn remove_from_chat_list(&self) -> bool { self.remove_from_chat_list }
5624
5625 pub fn revoke(&self) -> bool { self.revoke }
5626
5627}
5628
5629#[doc(hidden)]
5630pub struct RTDDeleteChatHistoryBuilder {
5631 inner: DeleteChatHistory
5632}
5633
5634impl RTDDeleteChatHistoryBuilder {
5635 pub fn build(&self) -> DeleteChatHistory { self.inner.clone() }
5636
5637
5638 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
5639 self.inner.chat_id = chat_id;
5640 self
5641 }
5642
5643
5644 pub fn remove_from_chat_list(&mut self, remove_from_chat_list: bool) -> &mut Self {
5645 self.inner.remove_from_chat_list = remove_from_chat_list;
5646 self
5647 }
5648
5649
5650 pub fn revoke(&mut self, revoke: bool) -> &mut Self {
5651 self.inner.revoke = revoke;
5652 self
5653 }
5654
5655}
5656
5657impl AsRef<DeleteChatHistory> for DeleteChatHistory {
5658 fn as_ref(&self) -> &DeleteChatHistory { self }
5659}
5660
5661impl AsRef<DeleteChatHistory> for RTDDeleteChatHistoryBuilder {
5662 fn as_ref(&self) -> &DeleteChatHistory { &self.inner }
5663}
5664
5665
5666
5667
5668
5669
5670
5671#[derive(Debug, Clone, Default, Serialize, Deserialize)]
5673pub struct DeleteChatMessagesByDate {
5674 #[doc(hidden)]
5675 #[serde(rename(serialize = "@type", deserialize = "@type"))]
5676 td_name: String,
5677 #[doc(hidden)]
5678 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
5679 extra: Option<String>,
5680 chat_id: i64,
5682 min_date: i64,
5684 max_date: i64,
5686 revoke: bool,
5688
5689}
5690
5691impl RObject for DeleteChatMessagesByDate {
5692 #[doc(hidden)] fn td_name(&self) -> &'static str { "deleteChatMessagesByDate" }
5693 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
5694 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
5695}
5696
5697
5698
5699
5700impl RFunction for DeleteChatMessagesByDate {}
5701
5702impl DeleteChatMessagesByDate {
5703 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
5704 pub fn builder() -> RTDDeleteChatMessagesByDateBuilder {
5705 let mut inner = DeleteChatMessagesByDate::default();
5706 inner.td_name = "deleteChatMessagesByDate".to_string();
5707 inner.extra = Some(Uuid::new_v4().to_string());
5708 RTDDeleteChatMessagesByDateBuilder { inner }
5709 }
5710
5711 pub fn chat_id(&self) -> i64 { self.chat_id }
5712
5713 pub fn min_date(&self) -> i64 { self.min_date }
5714
5715 pub fn max_date(&self) -> i64 { self.max_date }
5716
5717 pub fn revoke(&self) -> bool { self.revoke }
5718
5719}
5720
5721#[doc(hidden)]
5722pub struct RTDDeleteChatMessagesByDateBuilder {
5723 inner: DeleteChatMessagesByDate
5724}
5725
5726impl RTDDeleteChatMessagesByDateBuilder {
5727 pub fn build(&self) -> DeleteChatMessagesByDate { self.inner.clone() }
5728
5729
5730 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
5731 self.inner.chat_id = chat_id;
5732 self
5733 }
5734
5735
5736 pub fn min_date(&mut self, min_date: i64) -> &mut Self {
5737 self.inner.min_date = min_date;
5738 self
5739 }
5740
5741
5742 pub fn max_date(&mut self, max_date: i64) -> &mut Self {
5743 self.inner.max_date = max_date;
5744 self
5745 }
5746
5747
5748 pub fn revoke(&mut self, revoke: bool) -> &mut Self {
5749 self.inner.revoke = revoke;
5750 self
5751 }
5752
5753}
5754
5755impl AsRef<DeleteChatMessagesByDate> for DeleteChatMessagesByDate {
5756 fn as_ref(&self) -> &DeleteChatMessagesByDate { self }
5757}
5758
5759impl AsRef<DeleteChatMessagesByDate> for RTDDeleteChatMessagesByDateBuilder {
5760 fn as_ref(&self) -> &DeleteChatMessagesByDate { &self.inner }
5761}
5762
5763
5764
5765
5766
5767
5768
5769#[derive(Debug, Clone, Default, Serialize, Deserialize)]
5771pub struct DeleteChatMessagesBySender {
5772 #[doc(hidden)]
5773 #[serde(rename(serialize = "@type", deserialize = "@type"))]
5774 td_name: String,
5775 #[doc(hidden)]
5776 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
5777 extra: Option<String>,
5778 chat_id: i64,
5780 sender_id: MessageSender,
5782
5783}
5784
5785impl RObject for DeleteChatMessagesBySender {
5786 #[doc(hidden)] fn td_name(&self) -> &'static str { "deleteChatMessagesBySender" }
5787 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
5788 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
5789}
5790
5791
5792
5793
5794impl RFunction for DeleteChatMessagesBySender {}
5795
5796impl DeleteChatMessagesBySender {
5797 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
5798 pub fn builder() -> RTDDeleteChatMessagesBySenderBuilder {
5799 let mut inner = DeleteChatMessagesBySender::default();
5800 inner.td_name = "deleteChatMessagesBySender".to_string();
5801 inner.extra = Some(Uuid::new_v4().to_string());
5802 RTDDeleteChatMessagesBySenderBuilder { inner }
5803 }
5804
5805 pub fn chat_id(&self) -> i64 { self.chat_id }
5806
5807 pub fn sender_id(&self) -> &MessageSender { &self.sender_id }
5808
5809}
5810
5811#[doc(hidden)]
5812pub struct RTDDeleteChatMessagesBySenderBuilder {
5813 inner: DeleteChatMessagesBySender
5814}
5815
5816impl RTDDeleteChatMessagesBySenderBuilder {
5817 pub fn build(&self) -> DeleteChatMessagesBySender { self.inner.clone() }
5818
5819
5820 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
5821 self.inner.chat_id = chat_id;
5822 self
5823 }
5824
5825
5826 pub fn sender_id<T: AsRef<MessageSender>>(&mut self, sender_id: T) -> &mut Self {
5827 self.inner.sender_id = sender_id.as_ref().clone();
5828 self
5829 }
5830
5831}
5832
5833impl AsRef<DeleteChatMessagesBySender> for DeleteChatMessagesBySender {
5834 fn as_ref(&self) -> &DeleteChatMessagesBySender { self }
5835}
5836
5837impl AsRef<DeleteChatMessagesBySender> for RTDDeleteChatMessagesBySenderBuilder {
5838 fn as_ref(&self) -> &DeleteChatMessagesBySender { &self.inner }
5839}
5840
5841
5842
5843
5844
5845
5846
5847#[derive(Debug, Clone, Default, Serialize, Deserialize)]
5849pub struct DeleteChatReplyMarkup {
5850 #[doc(hidden)]
5851 #[serde(rename(serialize = "@type", deserialize = "@type"))]
5852 td_name: String,
5853 #[doc(hidden)]
5854 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
5855 extra: Option<String>,
5856 chat_id: i64,
5858 message_id: i64,
5860
5861}
5862
5863impl RObject for DeleteChatReplyMarkup {
5864 #[doc(hidden)] fn td_name(&self) -> &'static str { "deleteChatReplyMarkup" }
5865 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
5866 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
5867}
5868
5869
5870
5871
5872impl RFunction for DeleteChatReplyMarkup {}
5873
5874impl DeleteChatReplyMarkup {
5875 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
5876 pub fn builder() -> RTDDeleteChatReplyMarkupBuilder {
5877 let mut inner = DeleteChatReplyMarkup::default();
5878 inner.td_name = "deleteChatReplyMarkup".to_string();
5879 inner.extra = Some(Uuid::new_v4().to_string());
5880 RTDDeleteChatReplyMarkupBuilder { inner }
5881 }
5882
5883 pub fn chat_id(&self) -> i64 { self.chat_id }
5884
5885 pub fn message_id(&self) -> i64 { self.message_id }
5886
5887}
5888
5889#[doc(hidden)]
5890pub struct RTDDeleteChatReplyMarkupBuilder {
5891 inner: DeleteChatReplyMarkup
5892}
5893
5894impl RTDDeleteChatReplyMarkupBuilder {
5895 pub fn build(&self) -> DeleteChatReplyMarkup { self.inner.clone() }
5896
5897
5898 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
5899 self.inner.chat_id = chat_id;
5900 self
5901 }
5902
5903
5904 pub fn message_id(&mut self, message_id: i64) -> &mut Self {
5905 self.inner.message_id = message_id;
5906 self
5907 }
5908
5909}
5910
5911impl AsRef<DeleteChatReplyMarkup> for DeleteChatReplyMarkup {
5912 fn as_ref(&self) -> &DeleteChatReplyMarkup { self }
5913}
5914
5915impl AsRef<DeleteChatReplyMarkup> for RTDDeleteChatReplyMarkupBuilder {
5916 fn as_ref(&self) -> &DeleteChatReplyMarkup { &self.inner }
5917}
5918
5919
5920
5921
5922
5923
5924
5925#[derive(Debug, Clone, Default, Serialize, Deserialize)]
5927pub struct DeleteCommands {
5928 #[doc(hidden)]
5929 #[serde(rename(serialize = "@type", deserialize = "@type"))]
5930 td_name: String,
5931 #[doc(hidden)]
5932 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
5933 extra: Option<String>,
5934 scope: BotCommandScope,
5936 language_code: String,
5938
5939}
5940
5941impl RObject for DeleteCommands {
5942 #[doc(hidden)] fn td_name(&self) -> &'static str { "deleteCommands" }
5943 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
5944 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
5945}
5946
5947
5948
5949
5950impl RFunction for DeleteCommands {}
5951
5952impl DeleteCommands {
5953 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
5954 pub fn builder() -> RTDDeleteCommandsBuilder {
5955 let mut inner = DeleteCommands::default();
5956 inner.td_name = "deleteCommands".to_string();
5957 inner.extra = Some(Uuid::new_v4().to_string());
5958 RTDDeleteCommandsBuilder { inner }
5959 }
5960
5961 pub fn scope(&self) -> &BotCommandScope { &self.scope }
5962
5963 pub fn language_code(&self) -> &String { &self.language_code }
5964
5965}
5966
5967#[doc(hidden)]
5968pub struct RTDDeleteCommandsBuilder {
5969 inner: DeleteCommands
5970}
5971
5972impl RTDDeleteCommandsBuilder {
5973 pub fn build(&self) -> DeleteCommands { self.inner.clone() }
5974
5975
5976 pub fn scope<T: AsRef<BotCommandScope>>(&mut self, scope: T) -> &mut Self {
5977 self.inner.scope = scope.as_ref().clone();
5978 self
5979 }
5980
5981
5982 pub fn language_code<T: AsRef<str>>(&mut self, language_code: T) -> &mut Self {
5983 self.inner.language_code = language_code.as_ref().to_string();
5984 self
5985 }
5986
5987}
5988
5989impl AsRef<DeleteCommands> for DeleteCommands {
5990 fn as_ref(&self) -> &DeleteCommands { self }
5991}
5992
5993impl AsRef<DeleteCommands> for RTDDeleteCommandsBuilder {
5994 fn as_ref(&self) -> &DeleteCommands { &self.inner }
5995}
5996
5997
5998
5999
6000
6001
6002
6003#[derive(Debug, Clone, Default, Serialize, Deserialize)]
6005pub struct DeleteFile {
6006 #[doc(hidden)]
6007 #[serde(rename(serialize = "@type", deserialize = "@type"))]
6008 td_name: String,
6009 #[doc(hidden)]
6010 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
6011 extra: Option<String>,
6012 file_id: i64,
6014
6015}
6016
6017impl RObject for DeleteFile {
6018 #[doc(hidden)] fn td_name(&self) -> &'static str { "deleteFile" }
6019 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
6020 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
6021}
6022
6023
6024
6025
6026impl RFunction for DeleteFile {}
6027
6028impl DeleteFile {
6029 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
6030 pub fn builder() -> RTDDeleteFileBuilder {
6031 let mut inner = DeleteFile::default();
6032 inner.td_name = "deleteFile".to_string();
6033 inner.extra = Some(Uuid::new_v4().to_string());
6034 RTDDeleteFileBuilder { inner }
6035 }
6036
6037 pub fn file_id(&self) -> i64 { self.file_id }
6038
6039}
6040
6041#[doc(hidden)]
6042pub struct RTDDeleteFileBuilder {
6043 inner: DeleteFile
6044}
6045
6046impl RTDDeleteFileBuilder {
6047 pub fn build(&self) -> DeleteFile { self.inner.clone() }
6048
6049
6050 pub fn file_id(&mut self, file_id: i64) -> &mut Self {
6051 self.inner.file_id = file_id;
6052 self
6053 }
6054
6055}
6056
6057impl AsRef<DeleteFile> for DeleteFile {
6058 fn as_ref(&self) -> &DeleteFile { self }
6059}
6060
6061impl AsRef<DeleteFile> for RTDDeleteFileBuilder {
6062 fn as_ref(&self) -> &DeleteFile { &self.inner }
6063}
6064
6065
6066
6067
6068
6069
6070
6071#[derive(Debug, Clone, Default, Serialize, Deserialize)]
6073pub struct DeleteLanguagePack {
6074 #[doc(hidden)]
6075 #[serde(rename(serialize = "@type", deserialize = "@type"))]
6076 td_name: String,
6077 #[doc(hidden)]
6078 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
6079 extra: Option<String>,
6080 language_pack_id: String,
6082
6083}
6084
6085impl RObject for DeleteLanguagePack {
6086 #[doc(hidden)] fn td_name(&self) -> &'static str { "deleteLanguagePack" }
6087 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
6088 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
6089}
6090
6091
6092
6093
6094impl RFunction for DeleteLanguagePack {}
6095
6096impl DeleteLanguagePack {
6097 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
6098 pub fn builder() -> RTDDeleteLanguagePackBuilder {
6099 let mut inner = DeleteLanguagePack::default();
6100 inner.td_name = "deleteLanguagePack".to_string();
6101 inner.extra = Some(Uuid::new_v4().to_string());
6102 RTDDeleteLanguagePackBuilder { inner }
6103 }
6104
6105 pub fn language_pack_id(&self) -> &String { &self.language_pack_id }
6106
6107}
6108
6109#[doc(hidden)]
6110pub struct RTDDeleteLanguagePackBuilder {
6111 inner: DeleteLanguagePack
6112}
6113
6114impl RTDDeleteLanguagePackBuilder {
6115 pub fn build(&self) -> DeleteLanguagePack { self.inner.clone() }
6116
6117
6118 pub fn language_pack_id<T: AsRef<str>>(&mut self, language_pack_id: T) -> &mut Self {
6119 self.inner.language_pack_id = language_pack_id.as_ref().to_string();
6120 self
6121 }
6122
6123}
6124
6125impl AsRef<DeleteLanguagePack> for DeleteLanguagePack {
6126 fn as_ref(&self) -> &DeleteLanguagePack { self }
6127}
6128
6129impl AsRef<DeleteLanguagePack> for RTDDeleteLanguagePackBuilder {
6130 fn as_ref(&self) -> &DeleteLanguagePack { &self.inner }
6131}
6132
6133
6134
6135
6136
6137
6138
6139#[derive(Debug, Clone, Default, Serialize, Deserialize)]
6141pub struct DeleteMessages {
6142 #[doc(hidden)]
6143 #[serde(rename(serialize = "@type", deserialize = "@type"))]
6144 td_name: String,
6145 #[doc(hidden)]
6146 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
6147 extra: Option<String>,
6148 chat_id: i64,
6150 message_ids: Vec<i64>,
6152 revoke: bool,
6154
6155}
6156
6157impl RObject for DeleteMessages {
6158 #[doc(hidden)] fn td_name(&self) -> &'static str { "deleteMessages" }
6159 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
6160 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
6161}
6162
6163
6164
6165
6166impl RFunction for DeleteMessages {}
6167
6168impl DeleteMessages {
6169 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
6170 pub fn builder() -> RTDDeleteMessagesBuilder {
6171 let mut inner = DeleteMessages::default();
6172 inner.td_name = "deleteMessages".to_string();
6173 inner.extra = Some(Uuid::new_v4().to_string());
6174 RTDDeleteMessagesBuilder { inner }
6175 }
6176
6177 pub fn chat_id(&self) -> i64 { self.chat_id }
6178
6179 pub fn message_ids(&self) -> &Vec<i64> { &self.message_ids }
6180
6181 pub fn revoke(&self) -> bool { self.revoke }
6182
6183}
6184
6185#[doc(hidden)]
6186pub struct RTDDeleteMessagesBuilder {
6187 inner: DeleteMessages
6188}
6189
6190impl RTDDeleteMessagesBuilder {
6191 pub fn build(&self) -> DeleteMessages { self.inner.clone() }
6192
6193
6194 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
6195 self.inner.chat_id = chat_id;
6196 self
6197 }
6198
6199
6200 pub fn message_ids(&mut self, message_ids: Vec<i64>) -> &mut Self {
6201 self.inner.message_ids = message_ids;
6202 self
6203 }
6204
6205
6206 pub fn revoke(&mut self, revoke: bool) -> &mut Self {
6207 self.inner.revoke = revoke;
6208 self
6209 }
6210
6211}
6212
6213impl AsRef<DeleteMessages> for DeleteMessages {
6214 fn as_ref(&self) -> &DeleteMessages { self }
6215}
6216
6217impl AsRef<DeleteMessages> for RTDDeleteMessagesBuilder {
6218 fn as_ref(&self) -> &DeleteMessages { &self.inner }
6219}
6220
6221
6222
6223
6224
6225
6226
6227#[derive(Debug, Clone, Default, Serialize, Deserialize)]
6229pub struct DeletePassportElement {
6230 #[doc(hidden)]
6231 #[serde(rename(serialize = "@type", deserialize = "@type"))]
6232 td_name: String,
6233 #[doc(hidden)]
6234 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
6235 extra: Option<String>,
6236 #[serde(rename(serialize = "type", deserialize = "type"))] type_: PassportElementType,
6238
6239}
6240
6241impl RObject for DeletePassportElement {
6242 #[doc(hidden)] fn td_name(&self) -> &'static str { "deletePassportElement" }
6243 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
6244 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
6245}
6246
6247
6248
6249
6250impl RFunction for DeletePassportElement {}
6251
6252impl DeletePassportElement {
6253 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
6254 pub fn builder() -> RTDDeletePassportElementBuilder {
6255 let mut inner = DeletePassportElement::default();
6256 inner.td_name = "deletePassportElement".to_string();
6257 inner.extra = Some(Uuid::new_v4().to_string());
6258 RTDDeletePassportElementBuilder { inner }
6259 }
6260
6261 pub fn type_(&self) -> &PassportElementType { &self.type_ }
6262
6263}
6264
6265#[doc(hidden)]
6266pub struct RTDDeletePassportElementBuilder {
6267 inner: DeletePassportElement
6268}
6269
6270impl RTDDeletePassportElementBuilder {
6271 pub fn build(&self) -> DeletePassportElement { self.inner.clone() }
6272
6273
6274 pub fn type_<T: AsRef<PassportElementType>>(&mut self, type_: T) -> &mut Self {
6275 self.inner.type_ = type_.as_ref().clone();
6276 self
6277 }
6278
6279}
6280
6281impl AsRef<DeletePassportElement> for DeletePassportElement {
6282 fn as_ref(&self) -> &DeletePassportElement { self }
6283}
6284
6285impl AsRef<DeletePassportElement> for RTDDeletePassportElementBuilder {
6286 fn as_ref(&self) -> &DeletePassportElement { &self.inner }
6287}
6288
6289
6290
6291
6292
6293
6294
6295#[derive(Debug, Clone, Default, Serialize, Deserialize)]
6297pub struct DeleteProfilePhoto {
6298 #[doc(hidden)]
6299 #[serde(rename(serialize = "@type", deserialize = "@type"))]
6300 td_name: String,
6301 #[doc(hidden)]
6302 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
6303 extra: Option<String>,
6304 profile_photo_id: isize,
6306
6307}
6308
6309impl RObject for DeleteProfilePhoto {
6310 #[doc(hidden)] fn td_name(&self) -> &'static str { "deleteProfilePhoto" }
6311 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
6312 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
6313}
6314
6315
6316
6317
6318impl RFunction for DeleteProfilePhoto {}
6319
6320impl DeleteProfilePhoto {
6321 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
6322 pub fn builder() -> RTDDeleteProfilePhotoBuilder {
6323 let mut inner = DeleteProfilePhoto::default();
6324 inner.td_name = "deleteProfilePhoto".to_string();
6325 inner.extra = Some(Uuid::new_v4().to_string());
6326 RTDDeleteProfilePhotoBuilder { inner }
6327 }
6328
6329 pub fn profile_photo_id(&self) -> isize { self.profile_photo_id }
6330
6331}
6332
6333#[doc(hidden)]
6334pub struct RTDDeleteProfilePhotoBuilder {
6335 inner: DeleteProfilePhoto
6336}
6337
6338impl RTDDeleteProfilePhotoBuilder {
6339 pub fn build(&self) -> DeleteProfilePhoto { self.inner.clone() }
6340
6341
6342 pub fn profile_photo_id(&mut self, profile_photo_id: isize) -> &mut Self {
6343 self.inner.profile_photo_id = profile_photo_id;
6344 self
6345 }
6346
6347}
6348
6349impl AsRef<DeleteProfilePhoto> for DeleteProfilePhoto {
6350 fn as_ref(&self) -> &DeleteProfilePhoto { self }
6351}
6352
6353impl AsRef<DeleteProfilePhoto> for RTDDeleteProfilePhotoBuilder {
6354 fn as_ref(&self) -> &DeleteProfilePhoto { &self.inner }
6355}
6356
6357
6358
6359
6360
6361
6362
6363#[derive(Debug, Clone, Default, Serialize, Deserialize)]
6365pub struct DeleteRevokedChatInviteLink {
6366 #[doc(hidden)]
6367 #[serde(rename(serialize = "@type", deserialize = "@type"))]
6368 td_name: String,
6369 #[doc(hidden)]
6370 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
6371 extra: Option<String>,
6372 chat_id: i64,
6374 invite_link: String,
6376
6377}
6378
6379impl RObject for DeleteRevokedChatInviteLink {
6380 #[doc(hidden)] fn td_name(&self) -> &'static str { "deleteRevokedChatInviteLink" }
6381 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
6382 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
6383}
6384
6385
6386
6387
6388impl RFunction for DeleteRevokedChatInviteLink {}
6389
6390impl DeleteRevokedChatInviteLink {
6391 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
6392 pub fn builder() -> RTDDeleteRevokedChatInviteLinkBuilder {
6393 let mut inner = DeleteRevokedChatInviteLink::default();
6394 inner.td_name = "deleteRevokedChatInviteLink".to_string();
6395 inner.extra = Some(Uuid::new_v4().to_string());
6396 RTDDeleteRevokedChatInviteLinkBuilder { inner }
6397 }
6398
6399 pub fn chat_id(&self) -> i64 { self.chat_id }
6400
6401 pub fn invite_link(&self) -> &String { &self.invite_link }
6402
6403}
6404
6405#[doc(hidden)]
6406pub struct RTDDeleteRevokedChatInviteLinkBuilder {
6407 inner: DeleteRevokedChatInviteLink
6408}
6409
6410impl RTDDeleteRevokedChatInviteLinkBuilder {
6411 pub fn build(&self) -> DeleteRevokedChatInviteLink { self.inner.clone() }
6412
6413
6414 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
6415 self.inner.chat_id = chat_id;
6416 self
6417 }
6418
6419
6420 pub fn invite_link<T: AsRef<str>>(&mut self, invite_link: T) -> &mut Self {
6421 self.inner.invite_link = invite_link.as_ref().to_string();
6422 self
6423 }
6424
6425}
6426
6427impl AsRef<DeleteRevokedChatInviteLink> for DeleteRevokedChatInviteLink {
6428 fn as_ref(&self) -> &DeleteRevokedChatInviteLink { self }
6429}
6430
6431impl AsRef<DeleteRevokedChatInviteLink> for RTDDeleteRevokedChatInviteLinkBuilder {
6432 fn as_ref(&self) -> &DeleteRevokedChatInviteLink { &self.inner }
6433}
6434
6435
6436
6437
6438
6439
6440
6441#[derive(Debug, Clone, Default, Serialize, Deserialize)]
6443pub struct DeleteSavedCredentials {
6444 #[doc(hidden)]
6445 #[serde(rename(serialize = "@type", deserialize = "@type"))]
6446 td_name: String,
6447 #[doc(hidden)]
6448 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
6449 extra: Option<String>,
6450
6451}
6452
6453impl RObject for DeleteSavedCredentials {
6454 #[doc(hidden)] fn td_name(&self) -> &'static str { "deleteSavedCredentials" }
6455 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
6456 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
6457}
6458
6459
6460
6461
6462impl RFunction for DeleteSavedCredentials {}
6463
6464impl DeleteSavedCredentials {
6465 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
6466 pub fn builder() -> RTDDeleteSavedCredentialsBuilder {
6467 let mut inner = DeleteSavedCredentials::default();
6468 inner.td_name = "deleteSavedCredentials".to_string();
6469 inner.extra = Some(Uuid::new_v4().to_string());
6470 RTDDeleteSavedCredentialsBuilder { inner }
6471 }
6472
6473}
6474
6475#[doc(hidden)]
6476pub struct RTDDeleteSavedCredentialsBuilder {
6477 inner: DeleteSavedCredentials
6478}
6479
6480impl RTDDeleteSavedCredentialsBuilder {
6481 pub fn build(&self) -> DeleteSavedCredentials { self.inner.clone() }
6482
6483}
6484
6485impl AsRef<DeleteSavedCredentials> for DeleteSavedCredentials {
6486 fn as_ref(&self) -> &DeleteSavedCredentials { self }
6487}
6488
6489impl AsRef<DeleteSavedCredentials> for RTDDeleteSavedCredentialsBuilder {
6490 fn as_ref(&self) -> &DeleteSavedCredentials { &self.inner }
6491}
6492
6493
6494
6495
6496
6497
6498
6499#[derive(Debug, Clone, Default, Serialize, Deserialize)]
6501pub struct DeleteSavedOrderInfo {
6502 #[doc(hidden)]
6503 #[serde(rename(serialize = "@type", deserialize = "@type"))]
6504 td_name: String,
6505 #[doc(hidden)]
6506 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
6507 extra: Option<String>,
6508
6509}
6510
6511impl RObject for DeleteSavedOrderInfo {
6512 #[doc(hidden)] fn td_name(&self) -> &'static str { "deleteSavedOrderInfo" }
6513 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
6514 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
6515}
6516
6517
6518
6519
6520impl RFunction for DeleteSavedOrderInfo {}
6521
6522impl DeleteSavedOrderInfo {
6523 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
6524 pub fn builder() -> RTDDeleteSavedOrderInfoBuilder {
6525 let mut inner = DeleteSavedOrderInfo::default();
6526 inner.td_name = "deleteSavedOrderInfo".to_string();
6527 inner.extra = Some(Uuid::new_v4().to_string());
6528 RTDDeleteSavedOrderInfoBuilder { inner }
6529 }
6530
6531}
6532
6533#[doc(hidden)]
6534pub struct RTDDeleteSavedOrderInfoBuilder {
6535 inner: DeleteSavedOrderInfo
6536}
6537
6538impl RTDDeleteSavedOrderInfoBuilder {
6539 pub fn build(&self) -> DeleteSavedOrderInfo { self.inner.clone() }
6540
6541}
6542
6543impl AsRef<DeleteSavedOrderInfo> for DeleteSavedOrderInfo {
6544 fn as_ref(&self) -> &DeleteSavedOrderInfo { self }
6545}
6546
6547impl AsRef<DeleteSavedOrderInfo> for RTDDeleteSavedOrderInfoBuilder {
6548 fn as_ref(&self) -> &DeleteSavedOrderInfo { &self.inner }
6549}
6550
6551
6552
6553
6554
6555
6556
6557#[derive(Debug, Clone, Default, Serialize, Deserialize)]
6559pub struct Destroy {
6560 #[doc(hidden)]
6561 #[serde(rename(serialize = "@type", deserialize = "@type"))]
6562 td_name: String,
6563 #[doc(hidden)]
6564 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
6565 extra: Option<String>,
6566
6567}
6568
6569impl RObject for Destroy {
6570 #[doc(hidden)] fn td_name(&self) -> &'static str { "destroy" }
6571 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
6572 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
6573}
6574
6575
6576
6577
6578impl RFunction for Destroy {}
6579
6580impl Destroy {
6581 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
6582 pub fn builder() -> RTDDestroyBuilder {
6583 let mut inner = Destroy::default();
6584 inner.td_name = "destroy".to_string();
6585 inner.extra = Some(Uuid::new_v4().to_string());
6586 RTDDestroyBuilder { inner }
6587 }
6588
6589}
6590
6591#[doc(hidden)]
6592pub struct RTDDestroyBuilder {
6593 inner: Destroy
6594}
6595
6596impl RTDDestroyBuilder {
6597 pub fn build(&self) -> Destroy { self.inner.clone() }
6598
6599}
6600
6601impl AsRef<Destroy> for Destroy {
6602 fn as_ref(&self) -> &Destroy { self }
6603}
6604
6605impl AsRef<Destroy> for RTDDestroyBuilder {
6606 fn as_ref(&self) -> &Destroy { &self.inner }
6607}
6608
6609
6610
6611
6612
6613
6614
6615#[derive(Debug, Clone, Default, Serialize, Deserialize)]
6617pub struct DisableProxy {
6618 #[doc(hidden)]
6619 #[serde(rename(serialize = "@type", deserialize = "@type"))]
6620 td_name: String,
6621 #[doc(hidden)]
6622 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
6623 extra: Option<String>,
6624
6625}
6626
6627impl RObject for DisableProxy {
6628 #[doc(hidden)] fn td_name(&self) -> &'static str { "disableProxy" }
6629 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
6630 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
6631}
6632
6633
6634
6635
6636impl RFunction for DisableProxy {}
6637
6638impl DisableProxy {
6639 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
6640 pub fn builder() -> RTDDisableProxyBuilder {
6641 let mut inner = DisableProxy::default();
6642 inner.td_name = "disableProxy".to_string();
6643 inner.extra = Some(Uuid::new_v4().to_string());
6644 RTDDisableProxyBuilder { inner }
6645 }
6646
6647}
6648
6649#[doc(hidden)]
6650pub struct RTDDisableProxyBuilder {
6651 inner: DisableProxy
6652}
6653
6654impl RTDDisableProxyBuilder {
6655 pub fn build(&self) -> DisableProxy { self.inner.clone() }
6656
6657}
6658
6659impl AsRef<DisableProxy> for DisableProxy {
6660 fn as_ref(&self) -> &DisableProxy { self }
6661}
6662
6663impl AsRef<DisableProxy> for RTDDisableProxyBuilder {
6664 fn as_ref(&self) -> &DisableProxy { &self.inner }
6665}
6666
6667
6668
6669
6670
6671
6672
6673#[derive(Debug, Clone, Default, Serialize, Deserialize)]
6675pub struct DiscardCall {
6676 #[doc(hidden)]
6677 #[serde(rename(serialize = "@type", deserialize = "@type"))]
6678 td_name: String,
6679 #[doc(hidden)]
6680 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
6681 extra: Option<String>,
6682 call_id: i64,
6684 is_disconnected: bool,
6686 duration: i64,
6688 is_video: bool,
6690 connection_id: isize,
6692
6693}
6694
6695impl RObject for DiscardCall {
6696 #[doc(hidden)] fn td_name(&self) -> &'static str { "discardCall" }
6697 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
6698 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
6699}
6700
6701
6702
6703
6704impl RFunction for DiscardCall {}
6705
6706impl DiscardCall {
6707 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
6708 pub fn builder() -> RTDDiscardCallBuilder {
6709 let mut inner = DiscardCall::default();
6710 inner.td_name = "discardCall".to_string();
6711 inner.extra = Some(Uuid::new_v4().to_string());
6712 RTDDiscardCallBuilder { inner }
6713 }
6714
6715 pub fn call_id(&self) -> i64 { self.call_id }
6716
6717 pub fn is_disconnected(&self) -> bool { self.is_disconnected }
6718
6719 pub fn duration(&self) -> i64 { self.duration }
6720
6721 pub fn is_video(&self) -> bool { self.is_video }
6722
6723 pub fn connection_id(&self) -> isize { self.connection_id }
6724
6725}
6726
6727#[doc(hidden)]
6728pub struct RTDDiscardCallBuilder {
6729 inner: DiscardCall
6730}
6731
6732impl RTDDiscardCallBuilder {
6733 pub fn build(&self) -> DiscardCall { self.inner.clone() }
6734
6735
6736 pub fn call_id(&mut self, call_id: i64) -> &mut Self {
6737 self.inner.call_id = call_id;
6738 self
6739 }
6740
6741
6742 pub fn is_disconnected(&mut self, is_disconnected: bool) -> &mut Self {
6743 self.inner.is_disconnected = is_disconnected;
6744 self
6745 }
6746
6747
6748 pub fn duration(&mut self, duration: i64) -> &mut Self {
6749 self.inner.duration = duration;
6750 self
6751 }
6752
6753
6754 pub fn is_video(&mut self, is_video: bool) -> &mut Self {
6755 self.inner.is_video = is_video;
6756 self
6757 }
6758
6759
6760 pub fn connection_id(&mut self, connection_id: isize) -> &mut Self {
6761 self.inner.connection_id = connection_id;
6762 self
6763 }
6764
6765}
6766
6767impl AsRef<DiscardCall> for DiscardCall {
6768 fn as_ref(&self) -> &DiscardCall { self }
6769}
6770
6771impl AsRef<DiscardCall> for RTDDiscardCallBuilder {
6772 fn as_ref(&self) -> &DiscardCall { &self.inner }
6773}
6774
6775
6776
6777
6778
6779
6780
6781#[derive(Debug, Clone, Default, Serialize, Deserialize)]
6783pub struct DisconnectAllWebsites {
6784 #[doc(hidden)]
6785 #[serde(rename(serialize = "@type", deserialize = "@type"))]
6786 td_name: String,
6787 #[doc(hidden)]
6788 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
6789 extra: Option<String>,
6790
6791}
6792
6793impl RObject for DisconnectAllWebsites {
6794 #[doc(hidden)] fn td_name(&self) -> &'static str { "disconnectAllWebsites" }
6795 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
6796 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
6797}
6798
6799
6800
6801
6802impl RFunction for DisconnectAllWebsites {}
6803
6804impl DisconnectAllWebsites {
6805 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
6806 pub fn builder() -> RTDDisconnectAllWebsitesBuilder {
6807 let mut inner = DisconnectAllWebsites::default();
6808 inner.td_name = "disconnectAllWebsites".to_string();
6809 inner.extra = Some(Uuid::new_v4().to_string());
6810 RTDDisconnectAllWebsitesBuilder { inner }
6811 }
6812
6813}
6814
6815#[doc(hidden)]
6816pub struct RTDDisconnectAllWebsitesBuilder {
6817 inner: DisconnectAllWebsites
6818}
6819
6820impl RTDDisconnectAllWebsitesBuilder {
6821 pub fn build(&self) -> DisconnectAllWebsites { self.inner.clone() }
6822
6823}
6824
6825impl AsRef<DisconnectAllWebsites> for DisconnectAllWebsites {
6826 fn as_ref(&self) -> &DisconnectAllWebsites { self }
6827}
6828
6829impl AsRef<DisconnectAllWebsites> for RTDDisconnectAllWebsitesBuilder {
6830 fn as_ref(&self) -> &DisconnectAllWebsites { &self.inner }
6831}
6832
6833
6834
6835
6836
6837
6838
6839#[derive(Debug, Clone, Default, Serialize, Deserialize)]
6841pub struct DisconnectWebsite {
6842 #[doc(hidden)]
6843 #[serde(rename(serialize = "@type", deserialize = "@type"))]
6844 td_name: String,
6845 #[doc(hidden)]
6846 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
6847 extra: Option<String>,
6848 website_id: isize,
6850
6851}
6852
6853impl RObject for DisconnectWebsite {
6854 #[doc(hidden)] fn td_name(&self) -> &'static str { "disconnectWebsite" }
6855 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
6856 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
6857}
6858
6859
6860
6861
6862impl RFunction for DisconnectWebsite {}
6863
6864impl DisconnectWebsite {
6865 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
6866 pub fn builder() -> RTDDisconnectWebsiteBuilder {
6867 let mut inner = DisconnectWebsite::default();
6868 inner.td_name = "disconnectWebsite".to_string();
6869 inner.extra = Some(Uuid::new_v4().to_string());
6870 RTDDisconnectWebsiteBuilder { inner }
6871 }
6872
6873 pub fn website_id(&self) -> isize { self.website_id }
6874
6875}
6876
6877#[doc(hidden)]
6878pub struct RTDDisconnectWebsiteBuilder {
6879 inner: DisconnectWebsite
6880}
6881
6882impl RTDDisconnectWebsiteBuilder {
6883 pub fn build(&self) -> DisconnectWebsite { self.inner.clone() }
6884
6885
6886 pub fn website_id(&mut self, website_id: isize) -> &mut Self {
6887 self.inner.website_id = website_id;
6888 self
6889 }
6890
6891}
6892
6893impl AsRef<DisconnectWebsite> for DisconnectWebsite {
6894 fn as_ref(&self) -> &DisconnectWebsite { self }
6895}
6896
6897impl AsRef<DisconnectWebsite> for RTDDisconnectWebsiteBuilder {
6898 fn as_ref(&self) -> &DisconnectWebsite { &self.inner }
6899}
6900
6901
6902
6903
6904
6905
6906
6907#[derive(Debug, Clone, Default, Serialize, Deserialize)]
6909pub struct DownloadFile {
6910 #[doc(hidden)]
6911 #[serde(rename(serialize = "@type", deserialize = "@type"))]
6912 td_name: String,
6913 #[doc(hidden)]
6914 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
6915 extra: Option<String>,
6916 file_id: i64,
6918 priority: i64,
6920 offset: i64,
6922 limit: i64,
6924 synchronous: bool,
6926
6927}
6928
6929impl RObject for DownloadFile {
6930 #[doc(hidden)] fn td_name(&self) -> &'static str { "downloadFile" }
6931 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
6932 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
6933}
6934
6935
6936
6937
6938impl RFunction for DownloadFile {}
6939
6940impl DownloadFile {
6941 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
6942 pub fn builder() -> RTDDownloadFileBuilder {
6943 let mut inner = DownloadFile::default();
6944 inner.td_name = "downloadFile".to_string();
6945 inner.extra = Some(Uuid::new_v4().to_string());
6946 RTDDownloadFileBuilder { inner }
6947 }
6948
6949 pub fn file_id(&self) -> i64 { self.file_id }
6950
6951 pub fn priority(&self) -> i64 { self.priority }
6952
6953 pub fn offset(&self) -> i64 { self.offset }
6954
6955 pub fn limit(&self) -> i64 { self.limit }
6956
6957 pub fn synchronous(&self) -> bool { self.synchronous }
6958
6959}
6960
6961#[doc(hidden)]
6962pub struct RTDDownloadFileBuilder {
6963 inner: DownloadFile
6964}
6965
6966impl RTDDownloadFileBuilder {
6967 pub fn build(&self) -> DownloadFile { self.inner.clone() }
6968
6969
6970 pub fn file_id(&mut self, file_id: i64) -> &mut Self {
6971 self.inner.file_id = file_id;
6972 self
6973 }
6974
6975
6976 pub fn priority(&mut self, priority: i64) -> &mut Self {
6977 self.inner.priority = priority;
6978 self
6979 }
6980
6981
6982 pub fn offset(&mut self, offset: i64) -> &mut Self {
6983 self.inner.offset = offset;
6984 self
6985 }
6986
6987
6988 pub fn limit(&mut self, limit: i64) -> &mut Self {
6989 self.inner.limit = limit;
6990 self
6991 }
6992
6993
6994 pub fn synchronous(&mut self, synchronous: bool) -> &mut Self {
6995 self.inner.synchronous = synchronous;
6996 self
6997 }
6998
6999}
7000
7001impl AsRef<DownloadFile> for DownloadFile {
7002 fn as_ref(&self) -> &DownloadFile { self }
7003}
7004
7005impl AsRef<DownloadFile> for RTDDownloadFileBuilder {
7006 fn as_ref(&self) -> &DownloadFile { &self.inner }
7007}
7008
7009
7010
7011
7012
7013
7014
7015#[derive(Debug, Clone, Default, Serialize, Deserialize)]
7017pub struct EditChatFilter {
7018 #[doc(hidden)]
7019 #[serde(rename(serialize = "@type", deserialize = "@type"))]
7020 td_name: String,
7021 #[doc(hidden)]
7022 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
7023 extra: Option<String>,
7024 chat_filter_id: i64,
7026 filter: ChatFilter,
7028
7029}
7030
7031impl RObject for EditChatFilter {
7032 #[doc(hidden)] fn td_name(&self) -> &'static str { "editChatFilter" }
7033 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
7034 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
7035}
7036
7037
7038
7039
7040impl RFunction for EditChatFilter {}
7041
7042impl EditChatFilter {
7043 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
7044 pub fn builder() -> RTDEditChatFilterBuilder {
7045 let mut inner = EditChatFilter::default();
7046 inner.td_name = "editChatFilter".to_string();
7047 inner.extra = Some(Uuid::new_v4().to_string());
7048 RTDEditChatFilterBuilder { inner }
7049 }
7050
7051 pub fn chat_filter_id(&self) -> i64 { self.chat_filter_id }
7052
7053 pub fn filter(&self) -> &ChatFilter { &self.filter }
7054
7055}
7056
7057#[doc(hidden)]
7058pub struct RTDEditChatFilterBuilder {
7059 inner: EditChatFilter
7060}
7061
7062impl RTDEditChatFilterBuilder {
7063 pub fn build(&self) -> EditChatFilter { self.inner.clone() }
7064
7065
7066 pub fn chat_filter_id(&mut self, chat_filter_id: i64) -> &mut Self {
7067 self.inner.chat_filter_id = chat_filter_id;
7068 self
7069 }
7070
7071
7072 pub fn filter<T: AsRef<ChatFilter>>(&mut self, filter: T) -> &mut Self {
7073 self.inner.filter = filter.as_ref().clone();
7074 self
7075 }
7076
7077}
7078
7079impl AsRef<EditChatFilter> for EditChatFilter {
7080 fn as_ref(&self) -> &EditChatFilter { self }
7081}
7082
7083impl AsRef<EditChatFilter> for RTDEditChatFilterBuilder {
7084 fn as_ref(&self) -> &EditChatFilter { &self.inner }
7085}
7086
7087
7088
7089
7090
7091
7092
7093#[derive(Debug, Clone, Default, Serialize, Deserialize)]
7095pub struct EditChatInviteLink {
7096 #[doc(hidden)]
7097 #[serde(rename(serialize = "@type", deserialize = "@type"))]
7098 td_name: String,
7099 #[doc(hidden)]
7100 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
7101 extra: Option<String>,
7102 chat_id: i64,
7104 invite_link: String,
7106 name: String,
7108 expiration_date: i64,
7110 member_limit: i64,
7112 creates_join_request: bool,
7114
7115}
7116
7117impl RObject for EditChatInviteLink {
7118 #[doc(hidden)] fn td_name(&self) -> &'static str { "editChatInviteLink" }
7119 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
7120 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
7121}
7122
7123
7124
7125
7126impl RFunction for EditChatInviteLink {}
7127
7128impl EditChatInviteLink {
7129 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
7130 pub fn builder() -> RTDEditChatInviteLinkBuilder {
7131 let mut inner = EditChatInviteLink::default();
7132 inner.td_name = "editChatInviteLink".to_string();
7133 inner.extra = Some(Uuid::new_v4().to_string());
7134 RTDEditChatInviteLinkBuilder { inner }
7135 }
7136
7137 pub fn chat_id(&self) -> i64 { self.chat_id }
7138
7139 pub fn invite_link(&self) -> &String { &self.invite_link }
7140
7141 pub fn name(&self) -> &String { &self.name }
7142
7143 pub fn expiration_date(&self) -> i64 { self.expiration_date }
7144
7145 pub fn member_limit(&self) -> i64 { self.member_limit }
7146
7147 pub fn creates_join_request(&self) -> bool { self.creates_join_request }
7148
7149}
7150
7151#[doc(hidden)]
7152pub struct RTDEditChatInviteLinkBuilder {
7153 inner: EditChatInviteLink
7154}
7155
7156impl RTDEditChatInviteLinkBuilder {
7157 pub fn build(&self) -> EditChatInviteLink { self.inner.clone() }
7158
7159
7160 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
7161 self.inner.chat_id = chat_id;
7162 self
7163 }
7164
7165
7166 pub fn invite_link<T: AsRef<str>>(&mut self, invite_link: T) -> &mut Self {
7167 self.inner.invite_link = invite_link.as_ref().to_string();
7168 self
7169 }
7170
7171
7172 pub fn name<T: AsRef<str>>(&mut self, name: T) -> &mut Self {
7173 self.inner.name = name.as_ref().to_string();
7174 self
7175 }
7176
7177
7178 pub fn expiration_date(&mut self, expiration_date: i64) -> &mut Self {
7179 self.inner.expiration_date = expiration_date;
7180 self
7181 }
7182
7183
7184 pub fn member_limit(&mut self, member_limit: i64) -> &mut Self {
7185 self.inner.member_limit = member_limit;
7186 self
7187 }
7188
7189
7190 pub fn creates_join_request(&mut self, creates_join_request: bool) -> &mut Self {
7191 self.inner.creates_join_request = creates_join_request;
7192 self
7193 }
7194
7195}
7196
7197impl AsRef<EditChatInviteLink> for EditChatInviteLink {
7198 fn as_ref(&self) -> &EditChatInviteLink { self }
7199}
7200
7201impl AsRef<EditChatInviteLink> for RTDEditChatInviteLinkBuilder {
7202 fn as_ref(&self) -> &EditChatInviteLink { &self.inner }
7203}
7204
7205
7206
7207
7208
7209
7210
7211#[derive(Debug, Clone, Default, Serialize, Deserialize)]
7213pub struct EditCustomLanguagePackInfo {
7214 #[doc(hidden)]
7215 #[serde(rename(serialize = "@type", deserialize = "@type"))]
7216 td_name: String,
7217 #[doc(hidden)]
7218 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
7219 extra: Option<String>,
7220 info: LanguagePackInfo,
7222
7223}
7224
7225impl RObject for EditCustomLanguagePackInfo {
7226 #[doc(hidden)] fn td_name(&self) -> &'static str { "editCustomLanguagePackInfo" }
7227 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
7228 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
7229}
7230
7231
7232
7233
7234impl RFunction for EditCustomLanguagePackInfo {}
7235
7236impl EditCustomLanguagePackInfo {
7237 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
7238 pub fn builder() -> RTDEditCustomLanguagePackInfoBuilder {
7239 let mut inner = EditCustomLanguagePackInfo::default();
7240 inner.td_name = "editCustomLanguagePackInfo".to_string();
7241 inner.extra = Some(Uuid::new_v4().to_string());
7242 RTDEditCustomLanguagePackInfoBuilder { inner }
7243 }
7244
7245 pub fn info(&self) -> &LanguagePackInfo { &self.info }
7246
7247}
7248
7249#[doc(hidden)]
7250pub struct RTDEditCustomLanguagePackInfoBuilder {
7251 inner: EditCustomLanguagePackInfo
7252}
7253
7254impl RTDEditCustomLanguagePackInfoBuilder {
7255 pub fn build(&self) -> EditCustomLanguagePackInfo { self.inner.clone() }
7256
7257
7258 pub fn info<T: AsRef<LanguagePackInfo>>(&mut self, info: T) -> &mut Self {
7259 self.inner.info = info.as_ref().clone();
7260 self
7261 }
7262
7263}
7264
7265impl AsRef<EditCustomLanguagePackInfo> for EditCustomLanguagePackInfo {
7266 fn as_ref(&self) -> &EditCustomLanguagePackInfo { self }
7267}
7268
7269impl AsRef<EditCustomLanguagePackInfo> for RTDEditCustomLanguagePackInfoBuilder {
7270 fn as_ref(&self) -> &EditCustomLanguagePackInfo { &self.inner }
7271}
7272
7273
7274
7275
7276
7277
7278
7279#[derive(Debug, Clone, Default, Serialize, Deserialize)]
7281pub struct EditInlineMessageCaption {
7282 #[doc(hidden)]
7283 #[serde(rename(serialize = "@type", deserialize = "@type"))]
7284 td_name: String,
7285 #[doc(hidden)]
7286 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
7287 extra: Option<String>,
7288 inline_message_id: String,
7290 reply_markup: ReplyMarkup,
7292 caption: FormattedText,
7294
7295}
7296
7297impl RObject for EditInlineMessageCaption {
7298 #[doc(hidden)] fn td_name(&self) -> &'static str { "editInlineMessageCaption" }
7299 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
7300 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
7301}
7302
7303
7304
7305
7306impl RFunction for EditInlineMessageCaption {}
7307
7308impl EditInlineMessageCaption {
7309 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
7310 pub fn builder() -> RTDEditInlineMessageCaptionBuilder {
7311 let mut inner = EditInlineMessageCaption::default();
7312 inner.td_name = "editInlineMessageCaption".to_string();
7313 inner.extra = Some(Uuid::new_v4().to_string());
7314 RTDEditInlineMessageCaptionBuilder { inner }
7315 }
7316
7317 pub fn inline_message_id(&self) -> &String { &self.inline_message_id }
7318
7319 pub fn reply_markup(&self) -> &ReplyMarkup { &self.reply_markup }
7320
7321 pub fn caption(&self) -> &FormattedText { &self.caption }
7322
7323}
7324
7325#[doc(hidden)]
7326pub struct RTDEditInlineMessageCaptionBuilder {
7327 inner: EditInlineMessageCaption
7328}
7329
7330impl RTDEditInlineMessageCaptionBuilder {
7331 pub fn build(&self) -> EditInlineMessageCaption { self.inner.clone() }
7332
7333
7334 pub fn inline_message_id<T: AsRef<str>>(&mut self, inline_message_id: T) -> &mut Self {
7335 self.inner.inline_message_id = inline_message_id.as_ref().to_string();
7336 self
7337 }
7338
7339
7340 pub fn reply_markup<T: AsRef<ReplyMarkup>>(&mut self, reply_markup: T) -> &mut Self {
7341 self.inner.reply_markup = reply_markup.as_ref().clone();
7342 self
7343 }
7344
7345
7346 pub fn caption<T: AsRef<FormattedText>>(&mut self, caption: T) -> &mut Self {
7347 self.inner.caption = caption.as_ref().clone();
7348 self
7349 }
7350
7351}
7352
7353impl AsRef<EditInlineMessageCaption> for EditInlineMessageCaption {
7354 fn as_ref(&self) -> &EditInlineMessageCaption { self }
7355}
7356
7357impl AsRef<EditInlineMessageCaption> for RTDEditInlineMessageCaptionBuilder {
7358 fn as_ref(&self) -> &EditInlineMessageCaption { &self.inner }
7359}
7360
7361
7362
7363
7364
7365
7366
7367#[derive(Debug, Clone, Default, Serialize, Deserialize)]
7369pub struct EditInlineMessageLiveLocation {
7370 #[doc(hidden)]
7371 #[serde(rename(serialize = "@type", deserialize = "@type"))]
7372 td_name: String,
7373 #[doc(hidden)]
7374 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
7375 extra: Option<String>,
7376 inline_message_id: String,
7378 reply_markup: ReplyMarkup,
7380 location: Location,
7382 heading: i64,
7384 proximity_alert_radius: i64,
7386
7387}
7388
7389impl RObject for EditInlineMessageLiveLocation {
7390 #[doc(hidden)] fn td_name(&self) -> &'static str { "editInlineMessageLiveLocation" }
7391 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
7392 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
7393}
7394
7395
7396
7397
7398impl RFunction for EditInlineMessageLiveLocation {}
7399
7400impl EditInlineMessageLiveLocation {
7401 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
7402 pub fn builder() -> RTDEditInlineMessageLiveLocationBuilder {
7403 let mut inner = EditInlineMessageLiveLocation::default();
7404 inner.td_name = "editInlineMessageLiveLocation".to_string();
7405 inner.extra = Some(Uuid::new_v4().to_string());
7406 RTDEditInlineMessageLiveLocationBuilder { inner }
7407 }
7408
7409 pub fn inline_message_id(&self) -> &String { &self.inline_message_id }
7410
7411 pub fn reply_markup(&self) -> &ReplyMarkup { &self.reply_markup }
7412
7413 pub fn location(&self) -> &Location { &self.location }
7414
7415 pub fn heading(&self) -> i64 { self.heading }
7416
7417 pub fn proximity_alert_radius(&self) -> i64 { self.proximity_alert_radius }
7418
7419}
7420
7421#[doc(hidden)]
7422pub struct RTDEditInlineMessageLiveLocationBuilder {
7423 inner: EditInlineMessageLiveLocation
7424}
7425
7426impl RTDEditInlineMessageLiveLocationBuilder {
7427 pub fn build(&self) -> EditInlineMessageLiveLocation { self.inner.clone() }
7428
7429
7430 pub fn inline_message_id<T: AsRef<str>>(&mut self, inline_message_id: T) -> &mut Self {
7431 self.inner.inline_message_id = inline_message_id.as_ref().to_string();
7432 self
7433 }
7434
7435
7436 pub fn reply_markup<T: AsRef<ReplyMarkup>>(&mut self, reply_markup: T) -> &mut Self {
7437 self.inner.reply_markup = reply_markup.as_ref().clone();
7438 self
7439 }
7440
7441
7442 pub fn location<T: AsRef<Location>>(&mut self, location: T) -> &mut Self {
7443 self.inner.location = location.as_ref().clone();
7444 self
7445 }
7446
7447
7448 pub fn heading(&mut self, heading: i64) -> &mut Self {
7449 self.inner.heading = heading;
7450 self
7451 }
7452
7453
7454 pub fn proximity_alert_radius(&mut self, proximity_alert_radius: i64) -> &mut Self {
7455 self.inner.proximity_alert_radius = proximity_alert_radius;
7456 self
7457 }
7458
7459}
7460
7461impl AsRef<EditInlineMessageLiveLocation> for EditInlineMessageLiveLocation {
7462 fn as_ref(&self) -> &EditInlineMessageLiveLocation { self }
7463}
7464
7465impl AsRef<EditInlineMessageLiveLocation> for RTDEditInlineMessageLiveLocationBuilder {
7466 fn as_ref(&self) -> &EditInlineMessageLiveLocation { &self.inner }
7467}
7468
7469
7470
7471
7472
7473
7474
7475#[derive(Debug, Clone, Default, Serialize, Deserialize)]
7477pub struct EditInlineMessageMedia {
7478 #[doc(hidden)]
7479 #[serde(rename(serialize = "@type", deserialize = "@type"))]
7480 td_name: String,
7481 #[doc(hidden)]
7482 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
7483 extra: Option<String>,
7484 inline_message_id: String,
7486 reply_markup: ReplyMarkup,
7488 input_message_content: InputMessageContent,
7490
7491}
7492
7493impl RObject for EditInlineMessageMedia {
7494 #[doc(hidden)] fn td_name(&self) -> &'static str { "editInlineMessageMedia" }
7495 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
7496 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
7497}
7498
7499
7500
7501
7502impl RFunction for EditInlineMessageMedia {}
7503
7504impl EditInlineMessageMedia {
7505 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
7506 pub fn builder() -> RTDEditInlineMessageMediaBuilder {
7507 let mut inner = EditInlineMessageMedia::default();
7508 inner.td_name = "editInlineMessageMedia".to_string();
7509 inner.extra = Some(Uuid::new_v4().to_string());
7510 RTDEditInlineMessageMediaBuilder { inner }
7511 }
7512
7513 pub fn inline_message_id(&self) -> &String { &self.inline_message_id }
7514
7515 pub fn reply_markup(&self) -> &ReplyMarkup { &self.reply_markup }
7516
7517 pub fn input_message_content(&self) -> &InputMessageContent { &self.input_message_content }
7518
7519}
7520
7521#[doc(hidden)]
7522pub struct RTDEditInlineMessageMediaBuilder {
7523 inner: EditInlineMessageMedia
7524}
7525
7526impl RTDEditInlineMessageMediaBuilder {
7527 pub fn build(&self) -> EditInlineMessageMedia { self.inner.clone() }
7528
7529
7530 pub fn inline_message_id<T: AsRef<str>>(&mut self, inline_message_id: T) -> &mut Self {
7531 self.inner.inline_message_id = inline_message_id.as_ref().to_string();
7532 self
7533 }
7534
7535
7536 pub fn reply_markup<T: AsRef<ReplyMarkup>>(&mut self, reply_markup: T) -> &mut Self {
7537 self.inner.reply_markup = reply_markup.as_ref().clone();
7538 self
7539 }
7540
7541
7542 pub fn input_message_content<T: AsRef<InputMessageContent>>(&mut self, input_message_content: T) -> &mut Self {
7543 self.inner.input_message_content = input_message_content.as_ref().clone();
7544 self
7545 }
7546
7547}
7548
7549impl AsRef<EditInlineMessageMedia> for EditInlineMessageMedia {
7550 fn as_ref(&self) -> &EditInlineMessageMedia { self }
7551}
7552
7553impl AsRef<EditInlineMessageMedia> for RTDEditInlineMessageMediaBuilder {
7554 fn as_ref(&self) -> &EditInlineMessageMedia { &self.inner }
7555}
7556
7557
7558
7559
7560
7561
7562
7563#[derive(Debug, Clone, Default, Serialize, Deserialize)]
7565pub struct EditInlineMessageReplyMarkup {
7566 #[doc(hidden)]
7567 #[serde(rename(serialize = "@type", deserialize = "@type"))]
7568 td_name: String,
7569 #[doc(hidden)]
7570 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
7571 extra: Option<String>,
7572 inline_message_id: String,
7574 reply_markup: ReplyMarkup,
7576
7577}
7578
7579impl RObject for EditInlineMessageReplyMarkup {
7580 #[doc(hidden)] fn td_name(&self) -> &'static str { "editInlineMessageReplyMarkup" }
7581 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
7582 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
7583}
7584
7585
7586
7587
7588impl RFunction for EditInlineMessageReplyMarkup {}
7589
7590impl EditInlineMessageReplyMarkup {
7591 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
7592 pub fn builder() -> RTDEditInlineMessageReplyMarkupBuilder {
7593 let mut inner = EditInlineMessageReplyMarkup::default();
7594 inner.td_name = "editInlineMessageReplyMarkup".to_string();
7595 inner.extra = Some(Uuid::new_v4().to_string());
7596 RTDEditInlineMessageReplyMarkupBuilder { inner }
7597 }
7598
7599 pub fn inline_message_id(&self) -> &String { &self.inline_message_id }
7600
7601 pub fn reply_markup(&self) -> &ReplyMarkup { &self.reply_markup }
7602
7603}
7604
7605#[doc(hidden)]
7606pub struct RTDEditInlineMessageReplyMarkupBuilder {
7607 inner: EditInlineMessageReplyMarkup
7608}
7609
7610impl RTDEditInlineMessageReplyMarkupBuilder {
7611 pub fn build(&self) -> EditInlineMessageReplyMarkup { self.inner.clone() }
7612
7613
7614 pub fn inline_message_id<T: AsRef<str>>(&mut self, inline_message_id: T) -> &mut Self {
7615 self.inner.inline_message_id = inline_message_id.as_ref().to_string();
7616 self
7617 }
7618
7619
7620 pub fn reply_markup<T: AsRef<ReplyMarkup>>(&mut self, reply_markup: T) -> &mut Self {
7621 self.inner.reply_markup = reply_markup.as_ref().clone();
7622 self
7623 }
7624
7625}
7626
7627impl AsRef<EditInlineMessageReplyMarkup> for EditInlineMessageReplyMarkup {
7628 fn as_ref(&self) -> &EditInlineMessageReplyMarkup { self }
7629}
7630
7631impl AsRef<EditInlineMessageReplyMarkup> for RTDEditInlineMessageReplyMarkupBuilder {
7632 fn as_ref(&self) -> &EditInlineMessageReplyMarkup { &self.inner }
7633}
7634
7635
7636
7637
7638
7639
7640
7641#[derive(Debug, Clone, Default, Serialize, Deserialize)]
7643pub struct EditInlineMessageText {
7644 #[doc(hidden)]
7645 #[serde(rename(serialize = "@type", deserialize = "@type"))]
7646 td_name: String,
7647 #[doc(hidden)]
7648 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
7649 extra: Option<String>,
7650 inline_message_id: String,
7652 reply_markup: ReplyMarkup,
7654 input_message_content: InputMessageContent,
7656
7657}
7658
7659impl RObject for EditInlineMessageText {
7660 #[doc(hidden)] fn td_name(&self) -> &'static str { "editInlineMessageText" }
7661 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
7662 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
7663}
7664
7665
7666
7667
7668impl RFunction for EditInlineMessageText {}
7669
7670impl EditInlineMessageText {
7671 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
7672 pub fn builder() -> RTDEditInlineMessageTextBuilder {
7673 let mut inner = EditInlineMessageText::default();
7674 inner.td_name = "editInlineMessageText".to_string();
7675 inner.extra = Some(Uuid::new_v4().to_string());
7676 RTDEditInlineMessageTextBuilder { inner }
7677 }
7678
7679 pub fn inline_message_id(&self) -> &String { &self.inline_message_id }
7680
7681 pub fn reply_markup(&self) -> &ReplyMarkup { &self.reply_markup }
7682
7683 pub fn input_message_content(&self) -> &InputMessageContent { &self.input_message_content }
7684
7685}
7686
7687#[doc(hidden)]
7688pub struct RTDEditInlineMessageTextBuilder {
7689 inner: EditInlineMessageText
7690}
7691
7692impl RTDEditInlineMessageTextBuilder {
7693 pub fn build(&self) -> EditInlineMessageText { self.inner.clone() }
7694
7695
7696 pub fn inline_message_id<T: AsRef<str>>(&mut self, inline_message_id: T) -> &mut Self {
7697 self.inner.inline_message_id = inline_message_id.as_ref().to_string();
7698 self
7699 }
7700
7701
7702 pub fn reply_markup<T: AsRef<ReplyMarkup>>(&mut self, reply_markup: T) -> &mut Self {
7703 self.inner.reply_markup = reply_markup.as_ref().clone();
7704 self
7705 }
7706
7707
7708 pub fn input_message_content<T: AsRef<InputMessageContent>>(&mut self, input_message_content: T) -> &mut Self {
7709 self.inner.input_message_content = input_message_content.as_ref().clone();
7710 self
7711 }
7712
7713}
7714
7715impl AsRef<EditInlineMessageText> for EditInlineMessageText {
7716 fn as_ref(&self) -> &EditInlineMessageText { self }
7717}
7718
7719impl AsRef<EditInlineMessageText> for RTDEditInlineMessageTextBuilder {
7720 fn as_ref(&self) -> &EditInlineMessageText { &self.inner }
7721}
7722
7723
7724
7725
7726
7727
7728
7729#[derive(Debug, Clone, Default, Serialize, Deserialize)]
7731pub struct EditMessageCaption {
7732 #[doc(hidden)]
7733 #[serde(rename(serialize = "@type", deserialize = "@type"))]
7734 td_name: String,
7735 #[doc(hidden)]
7736 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
7737 extra: Option<String>,
7738 chat_id: i64,
7740 message_id: i64,
7742 reply_markup: ReplyMarkup,
7744 caption: FormattedText,
7746
7747}
7748
7749impl RObject for EditMessageCaption {
7750 #[doc(hidden)] fn td_name(&self) -> &'static str { "editMessageCaption" }
7751 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
7752 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
7753}
7754
7755
7756
7757
7758impl RFunction for EditMessageCaption {}
7759
7760impl EditMessageCaption {
7761 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
7762 pub fn builder() -> RTDEditMessageCaptionBuilder {
7763 let mut inner = EditMessageCaption::default();
7764 inner.td_name = "editMessageCaption".to_string();
7765 inner.extra = Some(Uuid::new_v4().to_string());
7766 RTDEditMessageCaptionBuilder { inner }
7767 }
7768
7769 pub fn chat_id(&self) -> i64 { self.chat_id }
7770
7771 pub fn message_id(&self) -> i64 { self.message_id }
7772
7773 pub fn reply_markup(&self) -> &ReplyMarkup { &self.reply_markup }
7774
7775 pub fn caption(&self) -> &FormattedText { &self.caption }
7776
7777}
7778
7779#[doc(hidden)]
7780pub struct RTDEditMessageCaptionBuilder {
7781 inner: EditMessageCaption
7782}
7783
7784impl RTDEditMessageCaptionBuilder {
7785 pub fn build(&self) -> EditMessageCaption { self.inner.clone() }
7786
7787
7788 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
7789 self.inner.chat_id = chat_id;
7790 self
7791 }
7792
7793
7794 pub fn message_id(&mut self, message_id: i64) -> &mut Self {
7795 self.inner.message_id = message_id;
7796 self
7797 }
7798
7799
7800 pub fn reply_markup<T: AsRef<ReplyMarkup>>(&mut self, reply_markup: T) -> &mut Self {
7801 self.inner.reply_markup = reply_markup.as_ref().clone();
7802 self
7803 }
7804
7805
7806 pub fn caption<T: AsRef<FormattedText>>(&mut self, caption: T) -> &mut Self {
7807 self.inner.caption = caption.as_ref().clone();
7808 self
7809 }
7810
7811}
7812
7813impl AsRef<EditMessageCaption> for EditMessageCaption {
7814 fn as_ref(&self) -> &EditMessageCaption { self }
7815}
7816
7817impl AsRef<EditMessageCaption> for RTDEditMessageCaptionBuilder {
7818 fn as_ref(&self) -> &EditMessageCaption { &self.inner }
7819}
7820
7821
7822
7823
7824
7825
7826
7827#[derive(Debug, Clone, Default, Serialize, Deserialize)]
7829pub struct EditMessageLiveLocation {
7830 #[doc(hidden)]
7831 #[serde(rename(serialize = "@type", deserialize = "@type"))]
7832 td_name: String,
7833 #[doc(hidden)]
7834 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
7835 extra: Option<String>,
7836 chat_id: i64,
7838 message_id: i64,
7840 reply_markup: ReplyMarkup,
7842 location: Location,
7844 heading: i64,
7846 proximity_alert_radius: i64,
7848
7849}
7850
7851impl RObject for EditMessageLiveLocation {
7852 #[doc(hidden)] fn td_name(&self) -> &'static str { "editMessageLiveLocation" }
7853 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
7854 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
7855}
7856
7857
7858
7859
7860impl RFunction for EditMessageLiveLocation {}
7861
7862impl EditMessageLiveLocation {
7863 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
7864 pub fn builder() -> RTDEditMessageLiveLocationBuilder {
7865 let mut inner = EditMessageLiveLocation::default();
7866 inner.td_name = "editMessageLiveLocation".to_string();
7867 inner.extra = Some(Uuid::new_v4().to_string());
7868 RTDEditMessageLiveLocationBuilder { inner }
7869 }
7870
7871 pub fn chat_id(&self) -> i64 { self.chat_id }
7872
7873 pub fn message_id(&self) -> i64 { self.message_id }
7874
7875 pub fn reply_markup(&self) -> &ReplyMarkup { &self.reply_markup }
7876
7877 pub fn location(&self) -> &Location { &self.location }
7878
7879 pub fn heading(&self) -> i64 { self.heading }
7880
7881 pub fn proximity_alert_radius(&self) -> i64 { self.proximity_alert_radius }
7882
7883}
7884
7885#[doc(hidden)]
7886pub struct RTDEditMessageLiveLocationBuilder {
7887 inner: EditMessageLiveLocation
7888}
7889
7890impl RTDEditMessageLiveLocationBuilder {
7891 pub fn build(&self) -> EditMessageLiveLocation { self.inner.clone() }
7892
7893
7894 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
7895 self.inner.chat_id = chat_id;
7896 self
7897 }
7898
7899
7900 pub fn message_id(&mut self, message_id: i64) -> &mut Self {
7901 self.inner.message_id = message_id;
7902 self
7903 }
7904
7905
7906 pub fn reply_markup<T: AsRef<ReplyMarkup>>(&mut self, reply_markup: T) -> &mut Self {
7907 self.inner.reply_markup = reply_markup.as_ref().clone();
7908 self
7909 }
7910
7911
7912 pub fn location<T: AsRef<Location>>(&mut self, location: T) -> &mut Self {
7913 self.inner.location = location.as_ref().clone();
7914 self
7915 }
7916
7917
7918 pub fn heading(&mut self, heading: i64) -> &mut Self {
7919 self.inner.heading = heading;
7920 self
7921 }
7922
7923
7924 pub fn proximity_alert_radius(&mut self, proximity_alert_radius: i64) -> &mut Self {
7925 self.inner.proximity_alert_radius = proximity_alert_radius;
7926 self
7927 }
7928
7929}
7930
7931impl AsRef<EditMessageLiveLocation> for EditMessageLiveLocation {
7932 fn as_ref(&self) -> &EditMessageLiveLocation { self }
7933}
7934
7935impl AsRef<EditMessageLiveLocation> for RTDEditMessageLiveLocationBuilder {
7936 fn as_ref(&self) -> &EditMessageLiveLocation { &self.inner }
7937}
7938
7939
7940
7941
7942
7943
7944
7945#[derive(Debug, Clone, Default, Serialize, Deserialize)]
7947pub struct EditMessageMedia {
7948 #[doc(hidden)]
7949 #[serde(rename(serialize = "@type", deserialize = "@type"))]
7950 td_name: String,
7951 #[doc(hidden)]
7952 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
7953 extra: Option<String>,
7954 chat_id: i64,
7956 message_id: i64,
7958 reply_markup: ReplyMarkup,
7960 input_message_content: InputMessageContent,
7962
7963}
7964
7965impl RObject for EditMessageMedia {
7966 #[doc(hidden)] fn td_name(&self) -> &'static str { "editMessageMedia" }
7967 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
7968 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
7969}
7970
7971
7972
7973
7974impl RFunction for EditMessageMedia {}
7975
7976impl EditMessageMedia {
7977 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
7978 pub fn builder() -> RTDEditMessageMediaBuilder {
7979 let mut inner = EditMessageMedia::default();
7980 inner.td_name = "editMessageMedia".to_string();
7981 inner.extra = Some(Uuid::new_v4().to_string());
7982 RTDEditMessageMediaBuilder { inner }
7983 }
7984
7985 pub fn chat_id(&self) -> i64 { self.chat_id }
7986
7987 pub fn message_id(&self) -> i64 { self.message_id }
7988
7989 pub fn reply_markup(&self) -> &ReplyMarkup { &self.reply_markup }
7990
7991 pub fn input_message_content(&self) -> &InputMessageContent { &self.input_message_content }
7992
7993}
7994
7995#[doc(hidden)]
7996pub struct RTDEditMessageMediaBuilder {
7997 inner: EditMessageMedia
7998}
7999
8000impl RTDEditMessageMediaBuilder {
8001 pub fn build(&self) -> EditMessageMedia { self.inner.clone() }
8002
8003
8004 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
8005 self.inner.chat_id = chat_id;
8006 self
8007 }
8008
8009
8010 pub fn message_id(&mut self, message_id: i64) -> &mut Self {
8011 self.inner.message_id = message_id;
8012 self
8013 }
8014
8015
8016 pub fn reply_markup<T: AsRef<ReplyMarkup>>(&mut self, reply_markup: T) -> &mut Self {
8017 self.inner.reply_markup = reply_markup.as_ref().clone();
8018 self
8019 }
8020
8021
8022 pub fn input_message_content<T: AsRef<InputMessageContent>>(&mut self, input_message_content: T) -> &mut Self {
8023 self.inner.input_message_content = input_message_content.as_ref().clone();
8024 self
8025 }
8026
8027}
8028
8029impl AsRef<EditMessageMedia> for EditMessageMedia {
8030 fn as_ref(&self) -> &EditMessageMedia { self }
8031}
8032
8033impl AsRef<EditMessageMedia> for RTDEditMessageMediaBuilder {
8034 fn as_ref(&self) -> &EditMessageMedia { &self.inner }
8035}
8036
8037
8038
8039
8040
8041
8042
8043#[derive(Debug, Clone, Default, Serialize, Deserialize)]
8045pub struct EditMessageReplyMarkup {
8046 #[doc(hidden)]
8047 #[serde(rename(serialize = "@type", deserialize = "@type"))]
8048 td_name: String,
8049 #[doc(hidden)]
8050 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
8051 extra: Option<String>,
8052 chat_id: i64,
8054 message_id: i64,
8056 reply_markup: ReplyMarkup,
8058
8059}
8060
8061impl RObject for EditMessageReplyMarkup {
8062 #[doc(hidden)] fn td_name(&self) -> &'static str { "editMessageReplyMarkup" }
8063 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
8064 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
8065}
8066
8067
8068
8069
8070impl RFunction for EditMessageReplyMarkup {}
8071
8072impl EditMessageReplyMarkup {
8073 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
8074 pub fn builder() -> RTDEditMessageReplyMarkupBuilder {
8075 let mut inner = EditMessageReplyMarkup::default();
8076 inner.td_name = "editMessageReplyMarkup".to_string();
8077 inner.extra = Some(Uuid::new_v4().to_string());
8078 RTDEditMessageReplyMarkupBuilder { inner }
8079 }
8080
8081 pub fn chat_id(&self) -> i64 { self.chat_id }
8082
8083 pub fn message_id(&self) -> i64 { self.message_id }
8084
8085 pub fn reply_markup(&self) -> &ReplyMarkup { &self.reply_markup }
8086
8087}
8088
8089#[doc(hidden)]
8090pub struct RTDEditMessageReplyMarkupBuilder {
8091 inner: EditMessageReplyMarkup
8092}
8093
8094impl RTDEditMessageReplyMarkupBuilder {
8095 pub fn build(&self) -> EditMessageReplyMarkup { self.inner.clone() }
8096
8097
8098 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
8099 self.inner.chat_id = chat_id;
8100 self
8101 }
8102
8103
8104 pub fn message_id(&mut self, message_id: i64) -> &mut Self {
8105 self.inner.message_id = message_id;
8106 self
8107 }
8108
8109
8110 pub fn reply_markup<T: AsRef<ReplyMarkup>>(&mut self, reply_markup: T) -> &mut Self {
8111 self.inner.reply_markup = reply_markup.as_ref().clone();
8112 self
8113 }
8114
8115}
8116
8117impl AsRef<EditMessageReplyMarkup> for EditMessageReplyMarkup {
8118 fn as_ref(&self) -> &EditMessageReplyMarkup { self }
8119}
8120
8121impl AsRef<EditMessageReplyMarkup> for RTDEditMessageReplyMarkupBuilder {
8122 fn as_ref(&self) -> &EditMessageReplyMarkup { &self.inner }
8123}
8124
8125
8126
8127
8128
8129
8130
8131#[derive(Debug, Clone, Default, Serialize, Deserialize)]
8133pub struct EditMessageSchedulingState {
8134 #[doc(hidden)]
8135 #[serde(rename(serialize = "@type", deserialize = "@type"))]
8136 td_name: String,
8137 #[doc(hidden)]
8138 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
8139 extra: Option<String>,
8140 chat_id: i64,
8142 message_id: i64,
8144 scheduling_state: MessageSchedulingState,
8146
8147}
8148
8149impl RObject for EditMessageSchedulingState {
8150 #[doc(hidden)] fn td_name(&self) -> &'static str { "editMessageSchedulingState" }
8151 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
8152 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
8153}
8154
8155
8156
8157
8158impl RFunction for EditMessageSchedulingState {}
8159
8160impl EditMessageSchedulingState {
8161 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
8162 pub fn builder() -> RTDEditMessageSchedulingStateBuilder {
8163 let mut inner = EditMessageSchedulingState::default();
8164 inner.td_name = "editMessageSchedulingState".to_string();
8165 inner.extra = Some(Uuid::new_v4().to_string());
8166 RTDEditMessageSchedulingStateBuilder { inner }
8167 }
8168
8169 pub fn chat_id(&self) -> i64 { self.chat_id }
8170
8171 pub fn message_id(&self) -> i64 { self.message_id }
8172
8173 pub fn scheduling_state(&self) -> &MessageSchedulingState { &self.scheduling_state }
8174
8175}
8176
8177#[doc(hidden)]
8178pub struct RTDEditMessageSchedulingStateBuilder {
8179 inner: EditMessageSchedulingState
8180}
8181
8182impl RTDEditMessageSchedulingStateBuilder {
8183 pub fn build(&self) -> EditMessageSchedulingState { self.inner.clone() }
8184
8185
8186 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
8187 self.inner.chat_id = chat_id;
8188 self
8189 }
8190
8191
8192 pub fn message_id(&mut self, message_id: i64) -> &mut Self {
8193 self.inner.message_id = message_id;
8194 self
8195 }
8196
8197
8198 pub fn scheduling_state<T: AsRef<MessageSchedulingState>>(&mut self, scheduling_state: T) -> &mut Self {
8199 self.inner.scheduling_state = scheduling_state.as_ref().clone();
8200 self
8201 }
8202
8203}
8204
8205impl AsRef<EditMessageSchedulingState> for EditMessageSchedulingState {
8206 fn as_ref(&self) -> &EditMessageSchedulingState { self }
8207}
8208
8209impl AsRef<EditMessageSchedulingState> for RTDEditMessageSchedulingStateBuilder {
8210 fn as_ref(&self) -> &EditMessageSchedulingState { &self.inner }
8211}
8212
8213
8214
8215
8216
8217
8218
8219#[derive(Debug, Clone, Default, Serialize, Deserialize)]
8221pub struct EditMessageText {
8222 #[doc(hidden)]
8223 #[serde(rename(serialize = "@type", deserialize = "@type"))]
8224 td_name: String,
8225 #[doc(hidden)]
8226 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
8227 extra: Option<String>,
8228 chat_id: i64,
8230 message_id: i64,
8232 reply_markup: ReplyMarkup,
8234 input_message_content: InputMessageContent,
8236
8237}
8238
8239impl RObject for EditMessageText {
8240 #[doc(hidden)] fn td_name(&self) -> &'static str { "editMessageText" }
8241 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
8242 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
8243}
8244
8245
8246
8247
8248impl RFunction for EditMessageText {}
8249
8250impl EditMessageText {
8251 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
8252 pub fn builder() -> RTDEditMessageTextBuilder {
8253 let mut inner = EditMessageText::default();
8254 inner.td_name = "editMessageText".to_string();
8255 inner.extra = Some(Uuid::new_v4().to_string());
8256 RTDEditMessageTextBuilder { inner }
8257 }
8258
8259 pub fn chat_id(&self) -> i64 { self.chat_id }
8260
8261 pub fn message_id(&self) -> i64 { self.message_id }
8262
8263 pub fn reply_markup(&self) -> &ReplyMarkup { &self.reply_markup }
8264
8265 pub fn input_message_content(&self) -> &InputMessageContent { &self.input_message_content }
8266
8267}
8268
8269#[doc(hidden)]
8270pub struct RTDEditMessageTextBuilder {
8271 inner: EditMessageText
8272}
8273
8274impl RTDEditMessageTextBuilder {
8275 pub fn build(&self) -> EditMessageText { self.inner.clone() }
8276
8277
8278 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
8279 self.inner.chat_id = chat_id;
8280 self
8281 }
8282
8283
8284 pub fn message_id(&mut self, message_id: i64) -> &mut Self {
8285 self.inner.message_id = message_id;
8286 self
8287 }
8288
8289
8290 pub fn reply_markup<T: AsRef<ReplyMarkup>>(&mut self, reply_markup: T) -> &mut Self {
8291 self.inner.reply_markup = reply_markup.as_ref().clone();
8292 self
8293 }
8294
8295
8296 pub fn input_message_content<T: AsRef<InputMessageContent>>(&mut self, input_message_content: T) -> &mut Self {
8297 self.inner.input_message_content = input_message_content.as_ref().clone();
8298 self
8299 }
8300
8301}
8302
8303impl AsRef<EditMessageText> for EditMessageText {
8304 fn as_ref(&self) -> &EditMessageText { self }
8305}
8306
8307impl AsRef<EditMessageText> for RTDEditMessageTextBuilder {
8308 fn as_ref(&self) -> &EditMessageText { &self.inner }
8309}
8310
8311
8312
8313
8314
8315
8316
8317#[derive(Debug, Clone, Default, Serialize, Deserialize)]
8319pub struct EditProxy {
8320 #[doc(hidden)]
8321 #[serde(rename(serialize = "@type", deserialize = "@type"))]
8322 td_name: String,
8323 #[doc(hidden)]
8324 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
8325 extra: Option<String>,
8326 proxy_id: i64,
8328 server: String,
8330 port: i64,
8332 enable: bool,
8334 #[serde(rename(serialize = "type", deserialize = "type"))] type_: ProxyType,
8336
8337}
8338
8339impl RObject for EditProxy {
8340 #[doc(hidden)] fn td_name(&self) -> &'static str { "editProxy" }
8341 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
8342 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
8343}
8344
8345
8346
8347
8348impl RFunction for EditProxy {}
8349
8350impl EditProxy {
8351 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
8352 pub fn builder() -> RTDEditProxyBuilder {
8353 let mut inner = EditProxy::default();
8354 inner.td_name = "editProxy".to_string();
8355 inner.extra = Some(Uuid::new_v4().to_string());
8356 RTDEditProxyBuilder { inner }
8357 }
8358
8359 pub fn proxy_id(&self) -> i64 { self.proxy_id }
8360
8361 pub fn server(&self) -> &String { &self.server }
8362
8363 pub fn port(&self) -> i64 { self.port }
8364
8365 pub fn enable(&self) -> bool { self.enable }
8366
8367 pub fn type_(&self) -> &ProxyType { &self.type_ }
8368
8369}
8370
8371#[doc(hidden)]
8372pub struct RTDEditProxyBuilder {
8373 inner: EditProxy
8374}
8375
8376impl RTDEditProxyBuilder {
8377 pub fn build(&self) -> EditProxy { self.inner.clone() }
8378
8379
8380 pub fn proxy_id(&mut self, proxy_id: i64) -> &mut Self {
8381 self.inner.proxy_id = proxy_id;
8382 self
8383 }
8384
8385
8386 pub fn server<T: AsRef<str>>(&mut self, server: T) -> &mut Self {
8387 self.inner.server = server.as_ref().to_string();
8388 self
8389 }
8390
8391
8392 pub fn port(&mut self, port: i64) -> &mut Self {
8393 self.inner.port = port;
8394 self
8395 }
8396
8397
8398 pub fn enable(&mut self, enable: bool) -> &mut Self {
8399 self.inner.enable = enable;
8400 self
8401 }
8402
8403
8404 pub fn type_<T: AsRef<ProxyType>>(&mut self, type_: T) -> &mut Self {
8405 self.inner.type_ = type_.as_ref().clone();
8406 self
8407 }
8408
8409}
8410
8411impl AsRef<EditProxy> for EditProxy {
8412 fn as_ref(&self) -> &EditProxy { self }
8413}
8414
8415impl AsRef<EditProxy> for RTDEditProxyBuilder {
8416 fn as_ref(&self) -> &EditProxy { &self.inner }
8417}
8418
8419
8420
8421
8422
8423
8424
8425#[derive(Debug, Clone, Default, Serialize, Deserialize)]
8427pub struct EnableProxy {
8428 #[doc(hidden)]
8429 #[serde(rename(serialize = "@type", deserialize = "@type"))]
8430 td_name: String,
8431 #[doc(hidden)]
8432 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
8433 extra: Option<String>,
8434 proxy_id: i64,
8436
8437}
8438
8439impl RObject for EnableProxy {
8440 #[doc(hidden)] fn td_name(&self) -> &'static str { "enableProxy" }
8441 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
8442 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
8443}
8444
8445
8446
8447
8448impl RFunction for EnableProxy {}
8449
8450impl EnableProxy {
8451 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
8452 pub fn builder() -> RTDEnableProxyBuilder {
8453 let mut inner = EnableProxy::default();
8454 inner.td_name = "enableProxy".to_string();
8455 inner.extra = Some(Uuid::new_v4().to_string());
8456 RTDEnableProxyBuilder { inner }
8457 }
8458
8459 pub fn proxy_id(&self) -> i64 { self.proxy_id }
8460
8461}
8462
8463#[doc(hidden)]
8464pub struct RTDEnableProxyBuilder {
8465 inner: EnableProxy
8466}
8467
8468impl RTDEnableProxyBuilder {
8469 pub fn build(&self) -> EnableProxy { self.inner.clone() }
8470
8471
8472 pub fn proxy_id(&mut self, proxy_id: i64) -> &mut Self {
8473 self.inner.proxy_id = proxy_id;
8474 self
8475 }
8476
8477}
8478
8479impl AsRef<EnableProxy> for EnableProxy {
8480 fn as_ref(&self) -> &EnableProxy { self }
8481}
8482
8483impl AsRef<EnableProxy> for RTDEnableProxyBuilder {
8484 fn as_ref(&self) -> &EnableProxy { &self.inner }
8485}
8486
8487
8488
8489
8490
8491
8492
8493#[derive(Debug, Clone, Default, Serialize, Deserialize)]
8495pub struct EndGroupCall {
8496 #[doc(hidden)]
8497 #[serde(rename(serialize = "@type", deserialize = "@type"))]
8498 td_name: String,
8499 #[doc(hidden)]
8500 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
8501 extra: Option<String>,
8502 group_call_id: i64,
8504
8505}
8506
8507impl RObject for EndGroupCall {
8508 #[doc(hidden)] fn td_name(&self) -> &'static str { "endGroupCall" }
8509 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
8510 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
8511}
8512
8513
8514
8515
8516impl RFunction for EndGroupCall {}
8517
8518impl EndGroupCall {
8519 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
8520 pub fn builder() -> RTDEndGroupCallBuilder {
8521 let mut inner = EndGroupCall::default();
8522 inner.td_name = "endGroupCall".to_string();
8523 inner.extra = Some(Uuid::new_v4().to_string());
8524 RTDEndGroupCallBuilder { inner }
8525 }
8526
8527 pub fn group_call_id(&self) -> i64 { self.group_call_id }
8528
8529}
8530
8531#[doc(hidden)]
8532pub struct RTDEndGroupCallBuilder {
8533 inner: EndGroupCall
8534}
8535
8536impl RTDEndGroupCallBuilder {
8537 pub fn build(&self) -> EndGroupCall { self.inner.clone() }
8538
8539
8540 pub fn group_call_id(&mut self, group_call_id: i64) -> &mut Self {
8541 self.inner.group_call_id = group_call_id;
8542 self
8543 }
8544
8545}
8546
8547impl AsRef<EndGroupCall> for EndGroupCall {
8548 fn as_ref(&self) -> &EndGroupCall { self }
8549}
8550
8551impl AsRef<EndGroupCall> for RTDEndGroupCallBuilder {
8552 fn as_ref(&self) -> &EndGroupCall { &self.inner }
8553}
8554
8555
8556
8557
8558
8559
8560
8561#[derive(Debug, Clone, Default, Serialize, Deserialize)]
8563pub struct EndGroupCallRecording {
8564 #[doc(hidden)]
8565 #[serde(rename(serialize = "@type", deserialize = "@type"))]
8566 td_name: String,
8567 #[doc(hidden)]
8568 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
8569 extra: Option<String>,
8570 group_call_id: i64,
8572
8573}
8574
8575impl RObject for EndGroupCallRecording {
8576 #[doc(hidden)] fn td_name(&self) -> &'static str { "endGroupCallRecording" }
8577 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
8578 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
8579}
8580
8581
8582
8583
8584impl RFunction for EndGroupCallRecording {}
8585
8586impl EndGroupCallRecording {
8587 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
8588 pub fn builder() -> RTDEndGroupCallRecordingBuilder {
8589 let mut inner = EndGroupCallRecording::default();
8590 inner.td_name = "endGroupCallRecording".to_string();
8591 inner.extra = Some(Uuid::new_v4().to_string());
8592 RTDEndGroupCallRecordingBuilder { inner }
8593 }
8594
8595 pub fn group_call_id(&self) -> i64 { self.group_call_id }
8596
8597}
8598
8599#[doc(hidden)]
8600pub struct RTDEndGroupCallRecordingBuilder {
8601 inner: EndGroupCallRecording
8602}
8603
8604impl RTDEndGroupCallRecordingBuilder {
8605 pub fn build(&self) -> EndGroupCallRecording { self.inner.clone() }
8606
8607
8608 pub fn group_call_id(&mut self, group_call_id: i64) -> &mut Self {
8609 self.inner.group_call_id = group_call_id;
8610 self
8611 }
8612
8613}
8614
8615impl AsRef<EndGroupCallRecording> for EndGroupCallRecording {
8616 fn as_ref(&self) -> &EndGroupCallRecording { self }
8617}
8618
8619impl AsRef<EndGroupCallRecording> for RTDEndGroupCallRecordingBuilder {
8620 fn as_ref(&self) -> &EndGroupCallRecording { &self.inner }
8621}
8622
8623
8624
8625
8626
8627
8628
8629#[derive(Debug, Clone, Default, Serialize, Deserialize)]
8631pub struct EndGroupCallScreenSharing {
8632 #[doc(hidden)]
8633 #[serde(rename(serialize = "@type", deserialize = "@type"))]
8634 td_name: String,
8635 #[doc(hidden)]
8636 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
8637 extra: Option<String>,
8638 group_call_id: i64,
8640
8641}
8642
8643impl RObject for EndGroupCallScreenSharing {
8644 #[doc(hidden)] fn td_name(&self) -> &'static str { "endGroupCallScreenSharing" }
8645 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
8646 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
8647}
8648
8649
8650
8651
8652impl RFunction for EndGroupCallScreenSharing {}
8653
8654impl EndGroupCallScreenSharing {
8655 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
8656 pub fn builder() -> RTDEndGroupCallScreenSharingBuilder {
8657 let mut inner = EndGroupCallScreenSharing::default();
8658 inner.td_name = "endGroupCallScreenSharing".to_string();
8659 inner.extra = Some(Uuid::new_v4().to_string());
8660 RTDEndGroupCallScreenSharingBuilder { inner }
8661 }
8662
8663 pub fn group_call_id(&self) -> i64 { self.group_call_id }
8664
8665}
8666
8667#[doc(hidden)]
8668pub struct RTDEndGroupCallScreenSharingBuilder {
8669 inner: EndGroupCallScreenSharing
8670}
8671
8672impl RTDEndGroupCallScreenSharingBuilder {
8673 pub fn build(&self) -> EndGroupCallScreenSharing { self.inner.clone() }
8674
8675
8676 pub fn group_call_id(&mut self, group_call_id: i64) -> &mut Self {
8677 self.inner.group_call_id = group_call_id;
8678 self
8679 }
8680
8681}
8682
8683impl AsRef<EndGroupCallScreenSharing> for EndGroupCallScreenSharing {
8684 fn as_ref(&self) -> &EndGroupCallScreenSharing { self }
8685}
8686
8687impl AsRef<EndGroupCallScreenSharing> for RTDEndGroupCallScreenSharingBuilder {
8688 fn as_ref(&self) -> &EndGroupCallScreenSharing { &self.inner }
8689}
8690
8691
8692
8693
8694
8695
8696
8697#[derive(Debug, Clone, Default, Serialize, Deserialize)]
8699pub struct FinishFileGeneration {
8700 #[doc(hidden)]
8701 #[serde(rename(serialize = "@type", deserialize = "@type"))]
8702 td_name: String,
8703 #[doc(hidden)]
8704 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
8705 extra: Option<String>,
8706 generation_id: isize,
8708 error: Error,
8710
8711}
8712
8713impl RObject for FinishFileGeneration {
8714 #[doc(hidden)] fn td_name(&self) -> &'static str { "finishFileGeneration" }
8715 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
8716 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
8717}
8718
8719
8720
8721
8722impl RFunction for FinishFileGeneration {}
8723
8724impl FinishFileGeneration {
8725 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
8726 pub fn builder() -> RTDFinishFileGenerationBuilder {
8727 let mut inner = FinishFileGeneration::default();
8728 inner.td_name = "finishFileGeneration".to_string();
8729 inner.extra = Some(Uuid::new_v4().to_string());
8730 RTDFinishFileGenerationBuilder { inner }
8731 }
8732
8733 pub fn generation_id(&self) -> isize { self.generation_id }
8734
8735 pub fn error(&self) -> &Error { &self.error }
8736
8737}
8738
8739#[doc(hidden)]
8740pub struct RTDFinishFileGenerationBuilder {
8741 inner: FinishFileGeneration
8742}
8743
8744impl RTDFinishFileGenerationBuilder {
8745 pub fn build(&self) -> FinishFileGeneration { self.inner.clone() }
8746
8747
8748 pub fn generation_id(&mut self, generation_id: isize) -> &mut Self {
8749 self.inner.generation_id = generation_id;
8750 self
8751 }
8752
8753
8754 pub fn error<T: AsRef<Error>>(&mut self, error: T) -> &mut Self {
8755 self.inner.error = error.as_ref().clone();
8756 self
8757 }
8758
8759}
8760
8761impl AsRef<FinishFileGeneration> for FinishFileGeneration {
8762 fn as_ref(&self) -> &FinishFileGeneration { self }
8763}
8764
8765impl AsRef<FinishFileGeneration> for RTDFinishFileGenerationBuilder {
8766 fn as_ref(&self) -> &FinishFileGeneration { &self.inner }
8767}
8768
8769
8770
8771
8772
8773
8774
8775#[derive(Debug, Clone, Default, Serialize, Deserialize)]
8777pub struct ForwardMessages {
8778 #[doc(hidden)]
8779 #[serde(rename(serialize = "@type", deserialize = "@type"))]
8780 td_name: String,
8781 #[doc(hidden)]
8782 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
8783 extra: Option<String>,
8784 chat_id: i64,
8786 from_chat_id: i64,
8788 message_ids: Vec<i64>,
8790 options: MessageSendOptions,
8792 send_copy: bool,
8794 remove_caption: bool,
8796 only_preview: bool,
8798
8799}
8800
8801impl RObject for ForwardMessages {
8802 #[doc(hidden)] fn td_name(&self) -> &'static str { "forwardMessages" }
8803 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
8804 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
8805}
8806
8807
8808
8809
8810impl RFunction for ForwardMessages {}
8811
8812impl ForwardMessages {
8813 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
8814 pub fn builder() -> RTDForwardMessagesBuilder {
8815 let mut inner = ForwardMessages::default();
8816 inner.td_name = "forwardMessages".to_string();
8817 inner.extra = Some(Uuid::new_v4().to_string());
8818 RTDForwardMessagesBuilder { inner }
8819 }
8820
8821 pub fn chat_id(&self) -> i64 { self.chat_id }
8822
8823 pub fn from_chat_id(&self) -> i64 { self.from_chat_id }
8824
8825 pub fn message_ids(&self) -> &Vec<i64> { &self.message_ids }
8826
8827 pub fn options(&self) -> &MessageSendOptions { &self.options }
8828
8829 pub fn send_copy(&self) -> bool { self.send_copy }
8830
8831 pub fn remove_caption(&self) -> bool { self.remove_caption }
8832
8833 pub fn only_preview(&self) -> bool { self.only_preview }
8834
8835}
8836
8837#[doc(hidden)]
8838pub struct RTDForwardMessagesBuilder {
8839 inner: ForwardMessages
8840}
8841
8842impl RTDForwardMessagesBuilder {
8843 pub fn build(&self) -> ForwardMessages { self.inner.clone() }
8844
8845
8846 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
8847 self.inner.chat_id = chat_id;
8848 self
8849 }
8850
8851
8852 pub fn from_chat_id(&mut self, from_chat_id: i64) -> &mut Self {
8853 self.inner.from_chat_id = from_chat_id;
8854 self
8855 }
8856
8857
8858 pub fn message_ids(&mut self, message_ids: Vec<i64>) -> &mut Self {
8859 self.inner.message_ids = message_ids;
8860 self
8861 }
8862
8863
8864 pub fn options<T: AsRef<MessageSendOptions>>(&mut self, options: T) -> &mut Self {
8865 self.inner.options = options.as_ref().clone();
8866 self
8867 }
8868
8869
8870 pub fn send_copy(&mut self, send_copy: bool) -> &mut Self {
8871 self.inner.send_copy = send_copy;
8872 self
8873 }
8874
8875
8876 pub fn remove_caption(&mut self, remove_caption: bool) -> &mut Self {
8877 self.inner.remove_caption = remove_caption;
8878 self
8879 }
8880
8881
8882 pub fn only_preview(&mut self, only_preview: bool) -> &mut Self {
8883 self.inner.only_preview = only_preview;
8884 self
8885 }
8886
8887}
8888
8889impl AsRef<ForwardMessages> for ForwardMessages {
8890 fn as_ref(&self) -> &ForwardMessages { self }
8891}
8892
8893impl AsRef<ForwardMessages> for RTDForwardMessagesBuilder {
8894 fn as_ref(&self) -> &ForwardMessages { &self.inner }
8895}
8896
8897
8898
8899
8900
8901
8902
8903#[derive(Debug, Clone, Default, Serialize, Deserialize)]
8905pub struct GetAccountTtl {
8906 #[doc(hidden)]
8907 #[serde(rename(serialize = "@type", deserialize = "@type"))]
8908 td_name: String,
8909 #[doc(hidden)]
8910 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
8911 extra: Option<String>,
8912
8913}
8914
8915impl RObject for GetAccountTtl {
8916 #[doc(hidden)] fn td_name(&self) -> &'static str { "getAccountTtl" }
8917 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
8918 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
8919}
8920
8921
8922
8923
8924impl RFunction for GetAccountTtl {}
8925
8926impl GetAccountTtl {
8927 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
8928 pub fn builder() -> RTDGetAccountTtlBuilder {
8929 let mut inner = GetAccountTtl::default();
8930 inner.td_name = "getAccountTtl".to_string();
8931 inner.extra = Some(Uuid::new_v4().to_string());
8932 RTDGetAccountTtlBuilder { inner }
8933 }
8934
8935}
8936
8937#[doc(hidden)]
8938pub struct RTDGetAccountTtlBuilder {
8939 inner: GetAccountTtl
8940}
8941
8942impl RTDGetAccountTtlBuilder {
8943 pub fn build(&self) -> GetAccountTtl { self.inner.clone() }
8944
8945}
8946
8947impl AsRef<GetAccountTtl> for GetAccountTtl {
8948 fn as_ref(&self) -> &GetAccountTtl { self }
8949}
8950
8951impl AsRef<GetAccountTtl> for RTDGetAccountTtlBuilder {
8952 fn as_ref(&self) -> &GetAccountTtl { &self.inner }
8953}
8954
8955
8956
8957
8958
8959
8960
8961#[derive(Debug, Clone, Default, Serialize, Deserialize)]
8963pub struct GetActiveLiveLocationMessages {
8964 #[doc(hidden)]
8965 #[serde(rename(serialize = "@type", deserialize = "@type"))]
8966 td_name: String,
8967 #[doc(hidden)]
8968 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
8969 extra: Option<String>,
8970
8971}
8972
8973impl RObject for GetActiveLiveLocationMessages {
8974 #[doc(hidden)] fn td_name(&self) -> &'static str { "getActiveLiveLocationMessages" }
8975 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
8976 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
8977}
8978
8979
8980
8981
8982impl RFunction for GetActiveLiveLocationMessages {}
8983
8984impl GetActiveLiveLocationMessages {
8985 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
8986 pub fn builder() -> RTDGetActiveLiveLocationMessagesBuilder {
8987 let mut inner = GetActiveLiveLocationMessages::default();
8988 inner.td_name = "getActiveLiveLocationMessages".to_string();
8989 inner.extra = Some(Uuid::new_v4().to_string());
8990 RTDGetActiveLiveLocationMessagesBuilder { inner }
8991 }
8992
8993}
8994
8995#[doc(hidden)]
8996pub struct RTDGetActiveLiveLocationMessagesBuilder {
8997 inner: GetActiveLiveLocationMessages
8998}
8999
9000impl RTDGetActiveLiveLocationMessagesBuilder {
9001 pub fn build(&self) -> GetActiveLiveLocationMessages { self.inner.clone() }
9002
9003}
9004
9005impl AsRef<GetActiveLiveLocationMessages> for GetActiveLiveLocationMessages {
9006 fn as_ref(&self) -> &GetActiveLiveLocationMessages { self }
9007}
9008
9009impl AsRef<GetActiveLiveLocationMessages> for RTDGetActiveLiveLocationMessagesBuilder {
9010 fn as_ref(&self) -> &GetActiveLiveLocationMessages { &self.inner }
9011}
9012
9013
9014
9015
9016
9017
9018
9019#[derive(Debug, Clone, Default, Serialize, Deserialize)]
9021pub struct GetActiveSessions {
9022 #[doc(hidden)]
9023 #[serde(rename(serialize = "@type", deserialize = "@type"))]
9024 td_name: String,
9025 #[doc(hidden)]
9026 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
9027 extra: Option<String>,
9028
9029}
9030
9031impl RObject for GetActiveSessions {
9032 #[doc(hidden)] fn td_name(&self) -> &'static str { "getActiveSessions" }
9033 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
9034 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
9035}
9036
9037
9038
9039
9040impl RFunction for GetActiveSessions {}
9041
9042impl GetActiveSessions {
9043 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
9044 pub fn builder() -> RTDGetActiveSessionsBuilder {
9045 let mut inner = GetActiveSessions::default();
9046 inner.td_name = "getActiveSessions".to_string();
9047 inner.extra = Some(Uuid::new_v4().to_string());
9048 RTDGetActiveSessionsBuilder { inner }
9049 }
9050
9051}
9052
9053#[doc(hidden)]
9054pub struct RTDGetActiveSessionsBuilder {
9055 inner: GetActiveSessions
9056}
9057
9058impl RTDGetActiveSessionsBuilder {
9059 pub fn build(&self) -> GetActiveSessions { self.inner.clone() }
9060
9061}
9062
9063impl AsRef<GetActiveSessions> for GetActiveSessions {
9064 fn as_ref(&self) -> &GetActiveSessions { self }
9065}
9066
9067impl AsRef<GetActiveSessions> for RTDGetActiveSessionsBuilder {
9068 fn as_ref(&self) -> &GetActiveSessions { &self.inner }
9069}
9070
9071
9072
9073
9074
9075
9076
9077#[derive(Debug, Clone, Default, Serialize, Deserialize)]
9079pub struct GetAllPassportElements {
9080 #[doc(hidden)]
9081 #[serde(rename(serialize = "@type", deserialize = "@type"))]
9082 td_name: String,
9083 #[doc(hidden)]
9084 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
9085 extra: Option<String>,
9086 password: String,
9088
9089}
9090
9091impl RObject for GetAllPassportElements {
9092 #[doc(hidden)] fn td_name(&self) -> &'static str { "getAllPassportElements" }
9093 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
9094 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
9095}
9096
9097
9098
9099
9100impl RFunction for GetAllPassportElements {}
9101
9102impl GetAllPassportElements {
9103 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
9104 pub fn builder() -> RTDGetAllPassportElementsBuilder {
9105 let mut inner = GetAllPassportElements::default();
9106 inner.td_name = "getAllPassportElements".to_string();
9107 inner.extra = Some(Uuid::new_v4().to_string());
9108 RTDGetAllPassportElementsBuilder { inner }
9109 }
9110
9111 pub fn password(&self) -> &String { &self.password }
9112
9113}
9114
9115#[doc(hidden)]
9116pub struct RTDGetAllPassportElementsBuilder {
9117 inner: GetAllPassportElements
9118}
9119
9120impl RTDGetAllPassportElementsBuilder {
9121 pub fn build(&self) -> GetAllPassportElements { self.inner.clone() }
9122
9123
9124 pub fn password<T: AsRef<str>>(&mut self, password: T) -> &mut Self {
9125 self.inner.password = password.as_ref().to_string();
9126 self
9127 }
9128
9129}
9130
9131impl AsRef<GetAllPassportElements> for GetAllPassportElements {
9132 fn as_ref(&self) -> &GetAllPassportElements { self }
9133}
9134
9135impl AsRef<GetAllPassportElements> for RTDGetAllPassportElementsBuilder {
9136 fn as_ref(&self) -> &GetAllPassportElements { &self.inner }
9137}
9138
9139
9140
9141
9142
9143
9144
9145#[derive(Debug, Clone, Default, Serialize, Deserialize)]
9147pub struct GetAnimatedEmoji {
9148 #[doc(hidden)]
9149 #[serde(rename(serialize = "@type", deserialize = "@type"))]
9150 td_name: String,
9151 #[doc(hidden)]
9152 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
9153 extra: Option<String>,
9154 emoji: String,
9156
9157}
9158
9159impl RObject for GetAnimatedEmoji {
9160 #[doc(hidden)] fn td_name(&self) -> &'static str { "getAnimatedEmoji" }
9161 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
9162 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
9163}
9164
9165
9166
9167
9168impl RFunction for GetAnimatedEmoji {}
9169
9170impl GetAnimatedEmoji {
9171 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
9172 pub fn builder() -> RTDGetAnimatedEmojiBuilder {
9173 let mut inner = GetAnimatedEmoji::default();
9174 inner.td_name = "getAnimatedEmoji".to_string();
9175 inner.extra = Some(Uuid::new_v4().to_string());
9176 RTDGetAnimatedEmojiBuilder { inner }
9177 }
9178
9179 pub fn emoji(&self) -> &String { &self.emoji }
9180
9181}
9182
9183#[doc(hidden)]
9184pub struct RTDGetAnimatedEmojiBuilder {
9185 inner: GetAnimatedEmoji
9186}
9187
9188impl RTDGetAnimatedEmojiBuilder {
9189 pub fn build(&self) -> GetAnimatedEmoji { self.inner.clone() }
9190
9191
9192 pub fn emoji<T: AsRef<str>>(&mut self, emoji: T) -> &mut Self {
9193 self.inner.emoji = emoji.as_ref().to_string();
9194 self
9195 }
9196
9197}
9198
9199impl AsRef<GetAnimatedEmoji> for GetAnimatedEmoji {
9200 fn as_ref(&self) -> &GetAnimatedEmoji { self }
9201}
9202
9203impl AsRef<GetAnimatedEmoji> for RTDGetAnimatedEmojiBuilder {
9204 fn as_ref(&self) -> &GetAnimatedEmoji { &self.inner }
9205}
9206
9207
9208
9209
9210
9211
9212
9213#[derive(Debug, Clone, Default, Serialize, Deserialize)]
9215pub struct GetApplicationConfig {
9216 #[doc(hidden)]
9217 #[serde(rename(serialize = "@type", deserialize = "@type"))]
9218 td_name: String,
9219 #[doc(hidden)]
9220 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
9221 extra: Option<String>,
9222
9223}
9224
9225impl RObject for GetApplicationConfig {
9226 #[doc(hidden)] fn td_name(&self) -> &'static str { "getApplicationConfig" }
9227 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
9228 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
9229}
9230
9231
9232impl TDJsonValue for GetApplicationConfig {}
9233
9234impl RFunction for GetApplicationConfig {}
9235
9236impl GetApplicationConfig {
9237 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
9238 pub fn builder() -> RTDGetApplicationConfigBuilder {
9239 let mut inner = GetApplicationConfig::default();
9240 inner.td_name = "getApplicationConfig".to_string();
9241 inner.extra = Some(Uuid::new_v4().to_string());
9242 RTDGetApplicationConfigBuilder { inner }
9243 }
9244
9245}
9246
9247#[doc(hidden)]
9248pub struct RTDGetApplicationConfigBuilder {
9249 inner: GetApplicationConfig
9250}
9251
9252impl RTDGetApplicationConfigBuilder {
9253 pub fn build(&self) -> GetApplicationConfig { self.inner.clone() }
9254
9255}
9256
9257impl AsRef<GetApplicationConfig> for GetApplicationConfig {
9258 fn as_ref(&self) -> &GetApplicationConfig { self }
9259}
9260
9261impl AsRef<GetApplicationConfig> for RTDGetApplicationConfigBuilder {
9262 fn as_ref(&self) -> &GetApplicationConfig { &self.inner }
9263}
9264
9265
9266
9267
9268
9269
9270
9271#[derive(Debug, Clone, Default, Serialize, Deserialize)]
9273pub struct GetApplicationDownloadLink {
9274 #[doc(hidden)]
9275 #[serde(rename(serialize = "@type", deserialize = "@type"))]
9276 td_name: String,
9277 #[doc(hidden)]
9278 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
9279 extra: Option<String>,
9280
9281}
9282
9283impl RObject for GetApplicationDownloadLink {
9284 #[doc(hidden)] fn td_name(&self) -> &'static str { "getApplicationDownloadLink" }
9285 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
9286 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
9287}
9288
9289
9290
9291
9292impl RFunction for GetApplicationDownloadLink {}
9293
9294impl GetApplicationDownloadLink {
9295 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
9296 pub fn builder() -> RTDGetApplicationDownloadLinkBuilder {
9297 let mut inner = GetApplicationDownloadLink::default();
9298 inner.td_name = "getApplicationDownloadLink".to_string();
9299 inner.extra = Some(Uuid::new_v4().to_string());
9300 RTDGetApplicationDownloadLinkBuilder { inner }
9301 }
9302
9303}
9304
9305#[doc(hidden)]
9306pub struct RTDGetApplicationDownloadLinkBuilder {
9307 inner: GetApplicationDownloadLink
9308}
9309
9310impl RTDGetApplicationDownloadLinkBuilder {
9311 pub fn build(&self) -> GetApplicationDownloadLink { self.inner.clone() }
9312
9313}
9314
9315impl AsRef<GetApplicationDownloadLink> for GetApplicationDownloadLink {
9316 fn as_ref(&self) -> &GetApplicationDownloadLink { self }
9317}
9318
9319impl AsRef<GetApplicationDownloadLink> for RTDGetApplicationDownloadLinkBuilder {
9320 fn as_ref(&self) -> &GetApplicationDownloadLink { &self.inner }
9321}
9322
9323
9324
9325
9326
9327
9328
9329#[derive(Debug, Clone, Default, Serialize, Deserialize)]
9331pub struct GetArchivedStickerSets {
9332 #[doc(hidden)]
9333 #[serde(rename(serialize = "@type", deserialize = "@type"))]
9334 td_name: String,
9335 #[doc(hidden)]
9336 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
9337 extra: Option<String>,
9338 is_masks: bool,
9340 offset_sticker_set_id: isize,
9342 limit: i64,
9344
9345}
9346
9347impl RObject for GetArchivedStickerSets {
9348 #[doc(hidden)] fn td_name(&self) -> &'static str { "getArchivedStickerSets" }
9349 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
9350 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
9351}
9352
9353
9354
9355
9356impl RFunction for GetArchivedStickerSets {}
9357
9358impl GetArchivedStickerSets {
9359 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
9360 pub fn builder() -> RTDGetArchivedStickerSetsBuilder {
9361 let mut inner = GetArchivedStickerSets::default();
9362 inner.td_name = "getArchivedStickerSets".to_string();
9363 inner.extra = Some(Uuid::new_v4().to_string());
9364 RTDGetArchivedStickerSetsBuilder { inner }
9365 }
9366
9367 pub fn is_masks(&self) -> bool { self.is_masks }
9368
9369 pub fn offset_sticker_set_id(&self) -> isize { self.offset_sticker_set_id }
9370
9371 pub fn limit(&self) -> i64 { self.limit }
9372
9373}
9374
9375#[doc(hidden)]
9376pub struct RTDGetArchivedStickerSetsBuilder {
9377 inner: GetArchivedStickerSets
9378}
9379
9380impl RTDGetArchivedStickerSetsBuilder {
9381 pub fn build(&self) -> GetArchivedStickerSets { self.inner.clone() }
9382
9383
9384 pub fn is_masks(&mut self, is_masks: bool) -> &mut Self {
9385 self.inner.is_masks = is_masks;
9386 self
9387 }
9388
9389
9390 pub fn offset_sticker_set_id(&mut self, offset_sticker_set_id: isize) -> &mut Self {
9391 self.inner.offset_sticker_set_id = offset_sticker_set_id;
9392 self
9393 }
9394
9395
9396 pub fn limit(&mut self, limit: i64) -> &mut Self {
9397 self.inner.limit = limit;
9398 self
9399 }
9400
9401}
9402
9403impl AsRef<GetArchivedStickerSets> for GetArchivedStickerSets {
9404 fn as_ref(&self) -> &GetArchivedStickerSets { self }
9405}
9406
9407impl AsRef<GetArchivedStickerSets> for RTDGetArchivedStickerSetsBuilder {
9408 fn as_ref(&self) -> &GetArchivedStickerSets { &self.inner }
9409}
9410
9411
9412
9413
9414
9415
9416
9417#[derive(Debug, Clone, Default, Serialize, Deserialize)]
9419pub struct GetAttachedStickerSets {
9420 #[doc(hidden)]
9421 #[serde(rename(serialize = "@type", deserialize = "@type"))]
9422 td_name: String,
9423 #[doc(hidden)]
9424 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
9425 extra: Option<String>,
9426 file_id: i64,
9428
9429}
9430
9431impl RObject for GetAttachedStickerSets {
9432 #[doc(hidden)] fn td_name(&self) -> &'static str { "getAttachedStickerSets" }
9433 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
9434 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
9435}
9436
9437
9438
9439
9440impl RFunction for GetAttachedStickerSets {}
9441
9442impl GetAttachedStickerSets {
9443 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
9444 pub fn builder() -> RTDGetAttachedStickerSetsBuilder {
9445 let mut inner = GetAttachedStickerSets::default();
9446 inner.td_name = "getAttachedStickerSets".to_string();
9447 inner.extra = Some(Uuid::new_v4().to_string());
9448 RTDGetAttachedStickerSetsBuilder { inner }
9449 }
9450
9451 pub fn file_id(&self) -> i64 { self.file_id }
9452
9453}
9454
9455#[doc(hidden)]
9456pub struct RTDGetAttachedStickerSetsBuilder {
9457 inner: GetAttachedStickerSets
9458}
9459
9460impl RTDGetAttachedStickerSetsBuilder {
9461 pub fn build(&self) -> GetAttachedStickerSets { self.inner.clone() }
9462
9463
9464 pub fn file_id(&mut self, file_id: i64) -> &mut Self {
9465 self.inner.file_id = file_id;
9466 self
9467 }
9468
9469}
9470
9471impl AsRef<GetAttachedStickerSets> for GetAttachedStickerSets {
9472 fn as_ref(&self) -> &GetAttachedStickerSets { self }
9473}
9474
9475impl AsRef<GetAttachedStickerSets> for RTDGetAttachedStickerSetsBuilder {
9476 fn as_ref(&self) -> &GetAttachedStickerSets { &self.inner }
9477}
9478
9479
9480
9481
9482
9483
9484
9485#[derive(Debug, Clone, Default, Serialize, Deserialize)]
9487pub struct GetAuthorizationState {
9488 #[doc(hidden)]
9489 #[serde(rename(serialize = "@type", deserialize = "@type"))]
9490 td_name: String,
9491 #[doc(hidden)]
9492 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
9493 extra: Option<String>,
9494
9495}
9496
9497impl RObject for GetAuthorizationState {
9498 #[doc(hidden)] fn td_name(&self) -> &'static str { "getAuthorizationState" }
9499 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
9500 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
9501}
9502
9503
9504impl TDAuthorizationState for GetAuthorizationState {}
9505
9506impl RFunction for GetAuthorizationState {}
9507
9508impl GetAuthorizationState {
9509 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
9510 pub fn builder() -> RTDGetAuthorizationStateBuilder {
9511 let mut inner = GetAuthorizationState::default();
9512 inner.td_name = "getAuthorizationState".to_string();
9513 inner.extra = Some(Uuid::new_v4().to_string());
9514 RTDGetAuthorizationStateBuilder { inner }
9515 }
9516
9517}
9518
9519#[doc(hidden)]
9520pub struct RTDGetAuthorizationStateBuilder {
9521 inner: GetAuthorizationState
9522}
9523
9524impl RTDGetAuthorizationStateBuilder {
9525 pub fn build(&self) -> GetAuthorizationState { self.inner.clone() }
9526
9527}
9528
9529impl AsRef<GetAuthorizationState> for GetAuthorizationState {
9530 fn as_ref(&self) -> &GetAuthorizationState { self }
9531}
9532
9533impl AsRef<GetAuthorizationState> for RTDGetAuthorizationStateBuilder {
9534 fn as_ref(&self) -> &GetAuthorizationState { &self.inner }
9535}
9536
9537
9538
9539
9540
9541
9542
9543#[derive(Debug, Clone, Default, Serialize, Deserialize)]
9545pub struct GetAutoDownloadSettingsPresets {
9546 #[doc(hidden)]
9547 #[serde(rename(serialize = "@type", deserialize = "@type"))]
9548 td_name: String,
9549 #[doc(hidden)]
9550 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
9551 extra: Option<String>,
9552
9553}
9554
9555impl RObject for GetAutoDownloadSettingsPresets {
9556 #[doc(hidden)] fn td_name(&self) -> &'static str { "getAutoDownloadSettingsPresets" }
9557 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
9558 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
9559}
9560
9561
9562
9563
9564impl RFunction for GetAutoDownloadSettingsPresets {}
9565
9566impl GetAutoDownloadSettingsPresets {
9567 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
9568 pub fn builder() -> RTDGetAutoDownloadSettingsPresetsBuilder {
9569 let mut inner = GetAutoDownloadSettingsPresets::default();
9570 inner.td_name = "getAutoDownloadSettingsPresets".to_string();
9571 inner.extra = Some(Uuid::new_v4().to_string());
9572 RTDGetAutoDownloadSettingsPresetsBuilder { inner }
9573 }
9574
9575}
9576
9577#[doc(hidden)]
9578pub struct RTDGetAutoDownloadSettingsPresetsBuilder {
9579 inner: GetAutoDownloadSettingsPresets
9580}
9581
9582impl RTDGetAutoDownloadSettingsPresetsBuilder {
9583 pub fn build(&self) -> GetAutoDownloadSettingsPresets { self.inner.clone() }
9584
9585}
9586
9587impl AsRef<GetAutoDownloadSettingsPresets> for GetAutoDownloadSettingsPresets {
9588 fn as_ref(&self) -> &GetAutoDownloadSettingsPresets { self }
9589}
9590
9591impl AsRef<GetAutoDownloadSettingsPresets> for RTDGetAutoDownloadSettingsPresetsBuilder {
9592 fn as_ref(&self) -> &GetAutoDownloadSettingsPresets { &self.inner }
9593}
9594
9595
9596
9597
9598
9599
9600
9601#[derive(Debug, Clone, Default, Serialize, Deserialize)]
9603pub struct GetBackgroundUrl {
9604 #[doc(hidden)]
9605 #[serde(rename(serialize = "@type", deserialize = "@type"))]
9606 td_name: String,
9607 #[doc(hidden)]
9608 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
9609 extra: Option<String>,
9610 name: String,
9612 #[serde(rename(serialize = "type", deserialize = "type"))] type_: BackgroundType,
9614
9615}
9616
9617impl RObject for GetBackgroundUrl {
9618 #[doc(hidden)] fn td_name(&self) -> &'static str { "getBackgroundUrl" }
9619 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
9620 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
9621}
9622
9623
9624
9625
9626impl RFunction for GetBackgroundUrl {}
9627
9628impl GetBackgroundUrl {
9629 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
9630 pub fn builder() -> RTDGetBackgroundUrlBuilder {
9631 let mut inner = GetBackgroundUrl::default();
9632 inner.td_name = "getBackgroundUrl".to_string();
9633 inner.extra = Some(Uuid::new_v4().to_string());
9634 RTDGetBackgroundUrlBuilder { inner }
9635 }
9636
9637 pub fn name(&self) -> &String { &self.name }
9638
9639 pub fn type_(&self) -> &BackgroundType { &self.type_ }
9640
9641}
9642
9643#[doc(hidden)]
9644pub struct RTDGetBackgroundUrlBuilder {
9645 inner: GetBackgroundUrl
9646}
9647
9648impl RTDGetBackgroundUrlBuilder {
9649 pub fn build(&self) -> GetBackgroundUrl { self.inner.clone() }
9650
9651
9652 pub fn name<T: AsRef<str>>(&mut self, name: T) -> &mut Self {
9653 self.inner.name = name.as_ref().to_string();
9654 self
9655 }
9656
9657
9658 pub fn type_<T: AsRef<BackgroundType>>(&mut self, type_: T) -> &mut Self {
9659 self.inner.type_ = type_.as_ref().clone();
9660 self
9661 }
9662
9663}
9664
9665impl AsRef<GetBackgroundUrl> for GetBackgroundUrl {
9666 fn as_ref(&self) -> &GetBackgroundUrl { self }
9667}
9668
9669impl AsRef<GetBackgroundUrl> for RTDGetBackgroundUrlBuilder {
9670 fn as_ref(&self) -> &GetBackgroundUrl { &self.inner }
9671}
9672
9673
9674
9675
9676
9677
9678
9679#[derive(Debug, Clone, Default, Serialize, Deserialize)]
9681pub struct GetBackgrounds {
9682 #[doc(hidden)]
9683 #[serde(rename(serialize = "@type", deserialize = "@type"))]
9684 td_name: String,
9685 #[doc(hidden)]
9686 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
9687 extra: Option<String>,
9688 for_dark_theme: bool,
9690
9691}
9692
9693impl RObject for GetBackgrounds {
9694 #[doc(hidden)] fn td_name(&self) -> &'static str { "getBackgrounds" }
9695 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
9696 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
9697}
9698
9699
9700
9701
9702impl RFunction for GetBackgrounds {}
9703
9704impl GetBackgrounds {
9705 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
9706 pub fn builder() -> RTDGetBackgroundsBuilder {
9707 let mut inner = GetBackgrounds::default();
9708 inner.td_name = "getBackgrounds".to_string();
9709 inner.extra = Some(Uuid::new_v4().to_string());
9710 RTDGetBackgroundsBuilder { inner }
9711 }
9712
9713 pub fn for_dark_theme(&self) -> bool { self.for_dark_theme }
9714
9715}
9716
9717#[doc(hidden)]
9718pub struct RTDGetBackgroundsBuilder {
9719 inner: GetBackgrounds
9720}
9721
9722impl RTDGetBackgroundsBuilder {
9723 pub fn build(&self) -> GetBackgrounds { self.inner.clone() }
9724
9725
9726 pub fn for_dark_theme(&mut self, for_dark_theme: bool) -> &mut Self {
9727 self.inner.for_dark_theme = for_dark_theme;
9728 self
9729 }
9730
9731}
9732
9733impl AsRef<GetBackgrounds> for GetBackgrounds {
9734 fn as_ref(&self) -> &GetBackgrounds { self }
9735}
9736
9737impl AsRef<GetBackgrounds> for RTDGetBackgroundsBuilder {
9738 fn as_ref(&self) -> &GetBackgrounds { &self.inner }
9739}
9740
9741
9742
9743
9744
9745
9746
9747#[derive(Debug, Clone, Default, Serialize, Deserialize)]
9749pub struct GetBankCardInfo {
9750 #[doc(hidden)]
9751 #[serde(rename(serialize = "@type", deserialize = "@type"))]
9752 td_name: String,
9753 #[doc(hidden)]
9754 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
9755 extra: Option<String>,
9756 bank_card_number: String,
9758
9759}
9760
9761impl RObject for GetBankCardInfo {
9762 #[doc(hidden)] fn td_name(&self) -> &'static str { "getBankCardInfo" }
9763 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
9764 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
9765}
9766
9767
9768
9769
9770impl RFunction for GetBankCardInfo {}
9771
9772impl GetBankCardInfo {
9773 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
9774 pub fn builder() -> RTDGetBankCardInfoBuilder {
9775 let mut inner = GetBankCardInfo::default();
9776 inner.td_name = "getBankCardInfo".to_string();
9777 inner.extra = Some(Uuid::new_v4().to_string());
9778 RTDGetBankCardInfoBuilder { inner }
9779 }
9780
9781 pub fn bank_card_number(&self) -> &String { &self.bank_card_number }
9782
9783}
9784
9785#[doc(hidden)]
9786pub struct RTDGetBankCardInfoBuilder {
9787 inner: GetBankCardInfo
9788}
9789
9790impl RTDGetBankCardInfoBuilder {
9791 pub fn build(&self) -> GetBankCardInfo { self.inner.clone() }
9792
9793
9794 pub fn bank_card_number<T: AsRef<str>>(&mut self, bank_card_number: T) -> &mut Self {
9795 self.inner.bank_card_number = bank_card_number.as_ref().to_string();
9796 self
9797 }
9798
9799}
9800
9801impl AsRef<GetBankCardInfo> for GetBankCardInfo {
9802 fn as_ref(&self) -> &GetBankCardInfo { self }
9803}
9804
9805impl AsRef<GetBankCardInfo> for RTDGetBankCardInfoBuilder {
9806 fn as_ref(&self) -> &GetBankCardInfo { &self.inner }
9807}
9808
9809
9810
9811
9812
9813
9814
9815#[derive(Debug, Clone, Default, Serialize, Deserialize)]
9817pub struct GetBasicGroup {
9818 #[doc(hidden)]
9819 #[serde(rename(serialize = "@type", deserialize = "@type"))]
9820 td_name: String,
9821 #[doc(hidden)]
9822 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
9823 extra: Option<String>,
9824 basic_group_id: i64,
9826
9827}
9828
9829impl RObject for GetBasicGroup {
9830 #[doc(hidden)] fn td_name(&self) -> &'static str { "getBasicGroup" }
9831 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
9832 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
9833}
9834
9835
9836
9837
9838impl RFunction for GetBasicGroup {}
9839
9840impl GetBasicGroup {
9841 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
9842 pub fn builder() -> RTDGetBasicGroupBuilder {
9843 let mut inner = GetBasicGroup::default();
9844 inner.td_name = "getBasicGroup".to_string();
9845 inner.extra = Some(Uuid::new_v4().to_string());
9846 RTDGetBasicGroupBuilder { inner }
9847 }
9848
9849 pub fn basic_group_id(&self) -> i64 { self.basic_group_id }
9850
9851}
9852
9853#[doc(hidden)]
9854pub struct RTDGetBasicGroupBuilder {
9855 inner: GetBasicGroup
9856}
9857
9858impl RTDGetBasicGroupBuilder {
9859 pub fn build(&self) -> GetBasicGroup { self.inner.clone() }
9860
9861
9862 pub fn basic_group_id(&mut self, basic_group_id: i64) -> &mut Self {
9863 self.inner.basic_group_id = basic_group_id;
9864 self
9865 }
9866
9867}
9868
9869impl AsRef<GetBasicGroup> for GetBasicGroup {
9870 fn as_ref(&self) -> &GetBasicGroup { self }
9871}
9872
9873impl AsRef<GetBasicGroup> for RTDGetBasicGroupBuilder {
9874 fn as_ref(&self) -> &GetBasicGroup { &self.inner }
9875}
9876
9877
9878
9879
9880
9881
9882
9883#[derive(Debug, Clone, Default, Serialize, Deserialize)]
9885pub struct GetBasicGroupFullInfo {
9886 #[doc(hidden)]
9887 #[serde(rename(serialize = "@type", deserialize = "@type"))]
9888 td_name: String,
9889 #[doc(hidden)]
9890 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
9891 extra: Option<String>,
9892 basic_group_id: i64,
9894
9895}
9896
9897impl RObject for GetBasicGroupFullInfo {
9898 #[doc(hidden)] fn td_name(&self) -> &'static str { "getBasicGroupFullInfo" }
9899 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
9900 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
9901}
9902
9903
9904
9905
9906impl RFunction for GetBasicGroupFullInfo {}
9907
9908impl GetBasicGroupFullInfo {
9909 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
9910 pub fn builder() -> RTDGetBasicGroupFullInfoBuilder {
9911 let mut inner = GetBasicGroupFullInfo::default();
9912 inner.td_name = "getBasicGroupFullInfo".to_string();
9913 inner.extra = Some(Uuid::new_v4().to_string());
9914 RTDGetBasicGroupFullInfoBuilder { inner }
9915 }
9916
9917 pub fn basic_group_id(&self) -> i64 { self.basic_group_id }
9918
9919}
9920
9921#[doc(hidden)]
9922pub struct RTDGetBasicGroupFullInfoBuilder {
9923 inner: GetBasicGroupFullInfo
9924}
9925
9926impl RTDGetBasicGroupFullInfoBuilder {
9927 pub fn build(&self) -> GetBasicGroupFullInfo { self.inner.clone() }
9928
9929
9930 pub fn basic_group_id(&mut self, basic_group_id: i64) -> &mut Self {
9931 self.inner.basic_group_id = basic_group_id;
9932 self
9933 }
9934
9935}
9936
9937impl AsRef<GetBasicGroupFullInfo> for GetBasicGroupFullInfo {
9938 fn as_ref(&self) -> &GetBasicGroupFullInfo { self }
9939}
9940
9941impl AsRef<GetBasicGroupFullInfo> for RTDGetBasicGroupFullInfoBuilder {
9942 fn as_ref(&self) -> &GetBasicGroupFullInfo { &self.inner }
9943}
9944
9945
9946
9947
9948
9949
9950
9951#[derive(Debug, Clone, Default, Serialize, Deserialize)]
9953pub struct GetBlockedMessageSenders {
9954 #[doc(hidden)]
9955 #[serde(rename(serialize = "@type", deserialize = "@type"))]
9956 td_name: String,
9957 #[doc(hidden)]
9958 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
9959 extra: Option<String>,
9960 offset: i64,
9962 limit: i64,
9964
9965}
9966
9967impl RObject for GetBlockedMessageSenders {
9968 #[doc(hidden)] fn td_name(&self) -> &'static str { "getBlockedMessageSenders" }
9969 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
9970 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
9971}
9972
9973
9974
9975
9976impl RFunction for GetBlockedMessageSenders {}
9977
9978impl GetBlockedMessageSenders {
9979 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
9980 pub fn builder() -> RTDGetBlockedMessageSendersBuilder {
9981 let mut inner = GetBlockedMessageSenders::default();
9982 inner.td_name = "getBlockedMessageSenders".to_string();
9983 inner.extra = Some(Uuid::new_v4().to_string());
9984 RTDGetBlockedMessageSendersBuilder { inner }
9985 }
9986
9987 pub fn offset(&self) -> i64 { self.offset }
9988
9989 pub fn limit(&self) -> i64 { self.limit }
9990
9991}
9992
9993#[doc(hidden)]
9994pub struct RTDGetBlockedMessageSendersBuilder {
9995 inner: GetBlockedMessageSenders
9996}
9997
9998impl RTDGetBlockedMessageSendersBuilder {
9999 pub fn build(&self) -> GetBlockedMessageSenders { self.inner.clone() }
10000
10001
10002 pub fn offset(&mut self, offset: i64) -> &mut Self {
10003 self.inner.offset = offset;
10004 self
10005 }
10006
10007
10008 pub fn limit(&mut self, limit: i64) -> &mut Self {
10009 self.inner.limit = limit;
10010 self
10011 }
10012
10013}
10014
10015impl AsRef<GetBlockedMessageSenders> for GetBlockedMessageSenders {
10016 fn as_ref(&self) -> &GetBlockedMessageSenders { self }
10017}
10018
10019impl AsRef<GetBlockedMessageSenders> for RTDGetBlockedMessageSendersBuilder {
10020 fn as_ref(&self) -> &GetBlockedMessageSenders { &self.inner }
10021}
10022
10023
10024
10025
10026
10027
10028
10029#[derive(Debug, Clone, Default, Serialize, Deserialize)]
10031pub struct GetCallbackQueryAnswer {
10032 #[doc(hidden)]
10033 #[serde(rename(serialize = "@type", deserialize = "@type"))]
10034 td_name: String,
10035 #[doc(hidden)]
10036 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
10037 extra: Option<String>,
10038 chat_id: i64,
10040 message_id: i64,
10042 payload: CallbackQueryPayload,
10044
10045}
10046
10047impl RObject for GetCallbackQueryAnswer {
10048 #[doc(hidden)] fn td_name(&self) -> &'static str { "getCallbackQueryAnswer" }
10049 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
10050 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
10051}
10052
10053
10054
10055
10056impl RFunction for GetCallbackQueryAnswer {}
10057
10058impl GetCallbackQueryAnswer {
10059 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
10060 pub fn builder() -> RTDGetCallbackQueryAnswerBuilder {
10061 let mut inner = GetCallbackQueryAnswer::default();
10062 inner.td_name = "getCallbackQueryAnswer".to_string();
10063 inner.extra = Some(Uuid::new_v4().to_string());
10064 RTDGetCallbackQueryAnswerBuilder { inner }
10065 }
10066
10067 pub fn chat_id(&self) -> i64 { self.chat_id }
10068
10069 pub fn message_id(&self) -> i64 { self.message_id }
10070
10071 pub fn payload(&self) -> &CallbackQueryPayload { &self.payload }
10072
10073}
10074
10075#[doc(hidden)]
10076pub struct RTDGetCallbackQueryAnswerBuilder {
10077 inner: GetCallbackQueryAnswer
10078}
10079
10080impl RTDGetCallbackQueryAnswerBuilder {
10081 pub fn build(&self) -> GetCallbackQueryAnswer { self.inner.clone() }
10082
10083
10084 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
10085 self.inner.chat_id = chat_id;
10086 self
10087 }
10088
10089
10090 pub fn message_id(&mut self, message_id: i64) -> &mut Self {
10091 self.inner.message_id = message_id;
10092 self
10093 }
10094
10095
10096 pub fn payload<T: AsRef<CallbackQueryPayload>>(&mut self, payload: T) -> &mut Self {
10097 self.inner.payload = payload.as_ref().clone();
10098 self
10099 }
10100
10101}
10102
10103impl AsRef<GetCallbackQueryAnswer> for GetCallbackQueryAnswer {
10104 fn as_ref(&self) -> &GetCallbackQueryAnswer { self }
10105}
10106
10107impl AsRef<GetCallbackQueryAnswer> for RTDGetCallbackQueryAnswerBuilder {
10108 fn as_ref(&self) -> &GetCallbackQueryAnswer { &self.inner }
10109}
10110
10111
10112
10113
10114
10115
10116
10117#[derive(Debug, Clone, Default, Serialize, Deserialize)]
10119pub struct GetCallbackQueryMessage {
10120 #[doc(hidden)]
10121 #[serde(rename(serialize = "@type", deserialize = "@type"))]
10122 td_name: String,
10123 #[doc(hidden)]
10124 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
10125 extra: Option<String>,
10126 chat_id: i64,
10128 message_id: i64,
10130 callback_query_id: isize,
10132
10133}
10134
10135impl RObject for GetCallbackQueryMessage {
10136 #[doc(hidden)] fn td_name(&self) -> &'static str { "getCallbackQueryMessage" }
10137 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
10138 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
10139}
10140
10141
10142
10143
10144impl RFunction for GetCallbackQueryMessage {}
10145
10146impl GetCallbackQueryMessage {
10147 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
10148 pub fn builder() -> RTDGetCallbackQueryMessageBuilder {
10149 let mut inner = GetCallbackQueryMessage::default();
10150 inner.td_name = "getCallbackQueryMessage".to_string();
10151 inner.extra = Some(Uuid::new_v4().to_string());
10152 RTDGetCallbackQueryMessageBuilder { inner }
10153 }
10154
10155 pub fn chat_id(&self) -> i64 { self.chat_id }
10156
10157 pub fn message_id(&self) -> i64 { self.message_id }
10158
10159 pub fn callback_query_id(&self) -> isize { self.callback_query_id }
10160
10161}
10162
10163#[doc(hidden)]
10164pub struct RTDGetCallbackQueryMessageBuilder {
10165 inner: GetCallbackQueryMessage
10166}
10167
10168impl RTDGetCallbackQueryMessageBuilder {
10169 pub fn build(&self) -> GetCallbackQueryMessage { self.inner.clone() }
10170
10171
10172 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
10173 self.inner.chat_id = chat_id;
10174 self
10175 }
10176
10177
10178 pub fn message_id(&mut self, message_id: i64) -> &mut Self {
10179 self.inner.message_id = message_id;
10180 self
10181 }
10182
10183
10184 pub fn callback_query_id(&mut self, callback_query_id: isize) -> &mut Self {
10185 self.inner.callback_query_id = callback_query_id;
10186 self
10187 }
10188
10189}
10190
10191impl AsRef<GetCallbackQueryMessage> for GetCallbackQueryMessage {
10192 fn as_ref(&self) -> &GetCallbackQueryMessage { self }
10193}
10194
10195impl AsRef<GetCallbackQueryMessage> for RTDGetCallbackQueryMessageBuilder {
10196 fn as_ref(&self) -> &GetCallbackQueryMessage { &self.inner }
10197}
10198
10199
10200
10201
10202
10203
10204
10205#[derive(Debug, Clone, Default, Serialize, Deserialize)]
10207pub struct GetChat {
10208 #[doc(hidden)]
10209 #[serde(rename(serialize = "@type", deserialize = "@type"))]
10210 td_name: String,
10211 #[doc(hidden)]
10212 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
10213 extra: Option<String>,
10214 chat_id: i64,
10216
10217}
10218
10219impl RObject for GetChat {
10220 #[doc(hidden)] fn td_name(&self) -> &'static str { "getChat" }
10221 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
10222 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
10223}
10224
10225
10226
10227
10228impl RFunction for GetChat {}
10229
10230impl GetChat {
10231 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
10232 pub fn builder() -> RTDGetChatBuilder {
10233 let mut inner = GetChat::default();
10234 inner.td_name = "getChat".to_string();
10235 inner.extra = Some(Uuid::new_v4().to_string());
10236 RTDGetChatBuilder { inner }
10237 }
10238
10239 pub fn chat_id(&self) -> i64 { self.chat_id }
10240
10241}
10242
10243#[doc(hidden)]
10244pub struct RTDGetChatBuilder {
10245 inner: GetChat
10246}
10247
10248impl RTDGetChatBuilder {
10249 pub fn build(&self) -> GetChat { self.inner.clone() }
10250
10251
10252 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
10253 self.inner.chat_id = chat_id;
10254 self
10255 }
10256
10257}
10258
10259impl AsRef<GetChat> for GetChat {
10260 fn as_ref(&self) -> &GetChat { self }
10261}
10262
10263impl AsRef<GetChat> for RTDGetChatBuilder {
10264 fn as_ref(&self) -> &GetChat { &self.inner }
10265}
10266
10267
10268
10269
10270
10271
10272
10273#[derive(Debug, Clone, Default, Serialize, Deserialize)]
10275pub struct GetChatAdministrators {
10276 #[doc(hidden)]
10277 #[serde(rename(serialize = "@type", deserialize = "@type"))]
10278 td_name: String,
10279 #[doc(hidden)]
10280 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
10281 extra: Option<String>,
10282 chat_id: i64,
10284
10285}
10286
10287impl RObject for GetChatAdministrators {
10288 #[doc(hidden)] fn td_name(&self) -> &'static str { "getChatAdministrators" }
10289 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
10290 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
10291}
10292
10293
10294
10295
10296impl RFunction for GetChatAdministrators {}
10297
10298impl GetChatAdministrators {
10299 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
10300 pub fn builder() -> RTDGetChatAdministratorsBuilder {
10301 let mut inner = GetChatAdministrators::default();
10302 inner.td_name = "getChatAdministrators".to_string();
10303 inner.extra = Some(Uuid::new_v4().to_string());
10304 RTDGetChatAdministratorsBuilder { inner }
10305 }
10306
10307 pub fn chat_id(&self) -> i64 { self.chat_id }
10308
10309}
10310
10311#[doc(hidden)]
10312pub struct RTDGetChatAdministratorsBuilder {
10313 inner: GetChatAdministrators
10314}
10315
10316impl RTDGetChatAdministratorsBuilder {
10317 pub fn build(&self) -> GetChatAdministrators { self.inner.clone() }
10318
10319
10320 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
10321 self.inner.chat_id = chat_id;
10322 self
10323 }
10324
10325}
10326
10327impl AsRef<GetChatAdministrators> for GetChatAdministrators {
10328 fn as_ref(&self) -> &GetChatAdministrators { self }
10329}
10330
10331impl AsRef<GetChatAdministrators> for RTDGetChatAdministratorsBuilder {
10332 fn as_ref(&self) -> &GetChatAdministrators { &self.inner }
10333}
10334
10335
10336
10337
10338
10339
10340
10341#[derive(Debug, Clone, Default, Serialize, Deserialize)]
10343pub struct GetChatAvailableMessageSenders {
10344 #[doc(hidden)]
10345 #[serde(rename(serialize = "@type", deserialize = "@type"))]
10346 td_name: String,
10347 #[doc(hidden)]
10348 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
10349 extra: Option<String>,
10350 chat_id: i64,
10352
10353}
10354
10355impl RObject for GetChatAvailableMessageSenders {
10356 #[doc(hidden)] fn td_name(&self) -> &'static str { "getChatAvailableMessageSenders" }
10357 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
10358 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
10359}
10360
10361
10362
10363
10364impl RFunction for GetChatAvailableMessageSenders {}
10365
10366impl GetChatAvailableMessageSenders {
10367 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
10368 pub fn builder() -> RTDGetChatAvailableMessageSendersBuilder {
10369 let mut inner = GetChatAvailableMessageSenders::default();
10370 inner.td_name = "getChatAvailableMessageSenders".to_string();
10371 inner.extra = Some(Uuid::new_v4().to_string());
10372 RTDGetChatAvailableMessageSendersBuilder { inner }
10373 }
10374
10375 pub fn chat_id(&self) -> i64 { self.chat_id }
10376
10377}
10378
10379#[doc(hidden)]
10380pub struct RTDGetChatAvailableMessageSendersBuilder {
10381 inner: GetChatAvailableMessageSenders
10382}
10383
10384impl RTDGetChatAvailableMessageSendersBuilder {
10385 pub fn build(&self) -> GetChatAvailableMessageSenders { self.inner.clone() }
10386
10387
10388 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
10389 self.inner.chat_id = chat_id;
10390 self
10391 }
10392
10393}
10394
10395impl AsRef<GetChatAvailableMessageSenders> for GetChatAvailableMessageSenders {
10396 fn as_ref(&self) -> &GetChatAvailableMessageSenders { self }
10397}
10398
10399impl AsRef<GetChatAvailableMessageSenders> for RTDGetChatAvailableMessageSendersBuilder {
10400 fn as_ref(&self) -> &GetChatAvailableMessageSenders { &self.inner }
10401}
10402
10403
10404
10405
10406
10407
10408
10409#[derive(Debug, Clone, Default, Serialize, Deserialize)]
10411pub struct GetChatEventLog {
10412 #[doc(hidden)]
10413 #[serde(rename(serialize = "@type", deserialize = "@type"))]
10414 td_name: String,
10415 #[doc(hidden)]
10416 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
10417 extra: Option<String>,
10418 chat_id: i64,
10420 query: String,
10422 from_event_id: isize,
10424 limit: i64,
10426 filters: ChatEventLogFilters,
10428 user_ids: Vec<i64>,
10430
10431}
10432
10433impl RObject for GetChatEventLog {
10434 #[doc(hidden)] fn td_name(&self) -> &'static str { "getChatEventLog" }
10435 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
10436 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
10437}
10438
10439
10440
10441
10442impl RFunction for GetChatEventLog {}
10443
10444impl GetChatEventLog {
10445 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
10446 pub fn builder() -> RTDGetChatEventLogBuilder {
10447 let mut inner = GetChatEventLog::default();
10448 inner.td_name = "getChatEventLog".to_string();
10449 inner.extra = Some(Uuid::new_v4().to_string());
10450 RTDGetChatEventLogBuilder { inner }
10451 }
10452
10453 pub fn chat_id(&self) -> i64 { self.chat_id }
10454
10455 pub fn query(&self) -> &String { &self.query }
10456
10457 pub fn from_event_id(&self) -> isize { self.from_event_id }
10458
10459 pub fn limit(&self) -> i64 { self.limit }
10460
10461 pub fn filters(&self) -> &ChatEventLogFilters { &self.filters }
10462
10463 pub fn user_ids(&self) -> &Vec<i64> { &self.user_ids }
10464
10465}
10466
10467#[doc(hidden)]
10468pub struct RTDGetChatEventLogBuilder {
10469 inner: GetChatEventLog
10470}
10471
10472impl RTDGetChatEventLogBuilder {
10473 pub fn build(&self) -> GetChatEventLog { self.inner.clone() }
10474
10475
10476 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
10477 self.inner.chat_id = chat_id;
10478 self
10479 }
10480
10481
10482 pub fn query<T: AsRef<str>>(&mut self, query: T) -> &mut Self {
10483 self.inner.query = query.as_ref().to_string();
10484 self
10485 }
10486
10487
10488 pub fn from_event_id(&mut self, from_event_id: isize) -> &mut Self {
10489 self.inner.from_event_id = from_event_id;
10490 self
10491 }
10492
10493
10494 pub fn limit(&mut self, limit: i64) -> &mut Self {
10495 self.inner.limit = limit;
10496 self
10497 }
10498
10499
10500 pub fn filters<T: AsRef<ChatEventLogFilters>>(&mut self, filters: T) -> &mut Self {
10501 self.inner.filters = filters.as_ref().clone();
10502 self
10503 }
10504
10505
10506 pub fn user_ids(&mut self, user_ids: Vec<i64>) -> &mut Self {
10507 self.inner.user_ids = user_ids;
10508 self
10509 }
10510
10511}
10512
10513impl AsRef<GetChatEventLog> for GetChatEventLog {
10514 fn as_ref(&self) -> &GetChatEventLog { self }
10515}
10516
10517impl AsRef<GetChatEventLog> for RTDGetChatEventLogBuilder {
10518 fn as_ref(&self) -> &GetChatEventLog { &self.inner }
10519}
10520
10521
10522
10523
10524
10525
10526
10527#[derive(Debug, Clone, Default, Serialize, Deserialize)]
10529pub struct GetChatFilter {
10530 #[doc(hidden)]
10531 #[serde(rename(serialize = "@type", deserialize = "@type"))]
10532 td_name: String,
10533 #[doc(hidden)]
10534 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
10535 extra: Option<String>,
10536 chat_filter_id: i64,
10538
10539}
10540
10541impl RObject for GetChatFilter {
10542 #[doc(hidden)] fn td_name(&self) -> &'static str { "getChatFilter" }
10543 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
10544 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
10545}
10546
10547
10548
10549
10550impl RFunction for GetChatFilter {}
10551
10552impl GetChatFilter {
10553 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
10554 pub fn builder() -> RTDGetChatFilterBuilder {
10555 let mut inner = GetChatFilter::default();
10556 inner.td_name = "getChatFilter".to_string();
10557 inner.extra = Some(Uuid::new_v4().to_string());
10558 RTDGetChatFilterBuilder { inner }
10559 }
10560
10561 pub fn chat_filter_id(&self) -> i64 { self.chat_filter_id }
10562
10563}
10564
10565#[doc(hidden)]
10566pub struct RTDGetChatFilterBuilder {
10567 inner: GetChatFilter
10568}
10569
10570impl RTDGetChatFilterBuilder {
10571 pub fn build(&self) -> GetChatFilter { self.inner.clone() }
10572
10573
10574 pub fn chat_filter_id(&mut self, chat_filter_id: i64) -> &mut Self {
10575 self.inner.chat_filter_id = chat_filter_id;
10576 self
10577 }
10578
10579}
10580
10581impl AsRef<GetChatFilter> for GetChatFilter {
10582 fn as_ref(&self) -> &GetChatFilter { self }
10583}
10584
10585impl AsRef<GetChatFilter> for RTDGetChatFilterBuilder {
10586 fn as_ref(&self) -> &GetChatFilter { &self.inner }
10587}
10588
10589
10590
10591
10592
10593
10594
10595#[derive(Debug, Clone, Default, Serialize, Deserialize)]
10597pub struct GetChatFilterDefaultIconName {
10598 #[doc(hidden)]
10599 #[serde(rename(serialize = "@type", deserialize = "@type"))]
10600 td_name: String,
10601 #[doc(hidden)]
10602 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
10603 extra: Option<String>,
10604 filter: ChatFilter,
10606
10607}
10608
10609impl RObject for GetChatFilterDefaultIconName {
10610 #[doc(hidden)] fn td_name(&self) -> &'static str { "getChatFilterDefaultIconName" }
10611 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
10612 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
10613}
10614
10615
10616
10617
10618impl RFunction for GetChatFilterDefaultIconName {}
10619
10620impl GetChatFilterDefaultIconName {
10621 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
10622 pub fn builder() -> RTDGetChatFilterDefaultIconNameBuilder {
10623 let mut inner = GetChatFilterDefaultIconName::default();
10624 inner.td_name = "getChatFilterDefaultIconName".to_string();
10625 inner.extra = Some(Uuid::new_v4().to_string());
10626 RTDGetChatFilterDefaultIconNameBuilder { inner }
10627 }
10628
10629 pub fn filter(&self) -> &ChatFilter { &self.filter }
10630
10631}
10632
10633#[doc(hidden)]
10634pub struct RTDGetChatFilterDefaultIconNameBuilder {
10635 inner: GetChatFilterDefaultIconName
10636}
10637
10638impl RTDGetChatFilterDefaultIconNameBuilder {
10639 pub fn build(&self) -> GetChatFilterDefaultIconName { self.inner.clone() }
10640
10641
10642 pub fn filter<T: AsRef<ChatFilter>>(&mut self, filter: T) -> &mut Self {
10643 self.inner.filter = filter.as_ref().clone();
10644 self
10645 }
10646
10647}
10648
10649impl AsRef<GetChatFilterDefaultIconName> for GetChatFilterDefaultIconName {
10650 fn as_ref(&self) -> &GetChatFilterDefaultIconName { self }
10651}
10652
10653impl AsRef<GetChatFilterDefaultIconName> for RTDGetChatFilterDefaultIconNameBuilder {
10654 fn as_ref(&self) -> &GetChatFilterDefaultIconName { &self.inner }
10655}
10656
10657
10658
10659
10660
10661
10662
10663#[derive(Debug, Clone, Default, Serialize, Deserialize)]
10665pub struct GetChatHistory {
10666 #[doc(hidden)]
10667 #[serde(rename(serialize = "@type", deserialize = "@type"))]
10668 td_name: String,
10669 #[doc(hidden)]
10670 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
10671 extra: Option<String>,
10672 chat_id: i64,
10674 from_message_id: i64,
10676 offset: i64,
10678 limit: i64,
10680 only_local: bool,
10682
10683}
10684
10685impl RObject for GetChatHistory {
10686 #[doc(hidden)] fn td_name(&self) -> &'static str { "getChatHistory" }
10687 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
10688 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
10689}
10690
10691
10692
10693
10694impl RFunction for GetChatHistory {}
10695
10696impl GetChatHistory {
10697 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
10698 pub fn builder() -> RTDGetChatHistoryBuilder {
10699 let mut inner = GetChatHistory::default();
10700 inner.td_name = "getChatHistory".to_string();
10701 inner.extra = Some(Uuid::new_v4().to_string());
10702 RTDGetChatHistoryBuilder { inner }
10703 }
10704
10705 pub fn chat_id(&self) -> i64 { self.chat_id }
10706
10707 pub fn from_message_id(&self) -> i64 { self.from_message_id }
10708
10709 pub fn offset(&self) -> i64 { self.offset }
10710
10711 pub fn limit(&self) -> i64 { self.limit }
10712
10713 pub fn only_local(&self) -> bool { self.only_local }
10714
10715}
10716
10717#[doc(hidden)]
10718pub struct RTDGetChatHistoryBuilder {
10719 inner: GetChatHistory
10720}
10721
10722impl RTDGetChatHistoryBuilder {
10723 pub fn build(&self) -> GetChatHistory { self.inner.clone() }
10724
10725
10726 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
10727 self.inner.chat_id = chat_id;
10728 self
10729 }
10730
10731
10732 pub fn from_message_id(&mut self, from_message_id: i64) -> &mut Self {
10733 self.inner.from_message_id = from_message_id;
10734 self
10735 }
10736
10737
10738 pub fn offset(&mut self, offset: i64) -> &mut Self {
10739 self.inner.offset = offset;
10740 self
10741 }
10742
10743
10744 pub fn limit(&mut self, limit: i64) -> &mut Self {
10745 self.inner.limit = limit;
10746 self
10747 }
10748
10749
10750 pub fn only_local(&mut self, only_local: bool) -> &mut Self {
10751 self.inner.only_local = only_local;
10752 self
10753 }
10754
10755}
10756
10757impl AsRef<GetChatHistory> for GetChatHistory {
10758 fn as_ref(&self) -> &GetChatHistory { self }
10759}
10760
10761impl AsRef<GetChatHistory> for RTDGetChatHistoryBuilder {
10762 fn as_ref(&self) -> &GetChatHistory { &self.inner }
10763}
10764
10765
10766
10767
10768
10769
10770
10771#[derive(Debug, Clone, Default, Serialize, Deserialize)]
10773pub struct GetChatInviteLink {
10774 #[doc(hidden)]
10775 #[serde(rename(serialize = "@type", deserialize = "@type"))]
10776 td_name: String,
10777 #[doc(hidden)]
10778 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
10779 extra: Option<String>,
10780 chat_id: i64,
10782 invite_link: String,
10784
10785}
10786
10787impl RObject for GetChatInviteLink {
10788 #[doc(hidden)] fn td_name(&self) -> &'static str { "getChatInviteLink" }
10789 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
10790 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
10791}
10792
10793
10794
10795
10796impl RFunction for GetChatInviteLink {}
10797
10798impl GetChatInviteLink {
10799 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
10800 pub fn builder() -> RTDGetChatInviteLinkBuilder {
10801 let mut inner = GetChatInviteLink::default();
10802 inner.td_name = "getChatInviteLink".to_string();
10803 inner.extra = Some(Uuid::new_v4().to_string());
10804 RTDGetChatInviteLinkBuilder { inner }
10805 }
10806
10807 pub fn chat_id(&self) -> i64 { self.chat_id }
10808
10809 pub fn invite_link(&self) -> &String { &self.invite_link }
10810
10811}
10812
10813#[doc(hidden)]
10814pub struct RTDGetChatInviteLinkBuilder {
10815 inner: GetChatInviteLink
10816}
10817
10818impl RTDGetChatInviteLinkBuilder {
10819 pub fn build(&self) -> GetChatInviteLink { self.inner.clone() }
10820
10821
10822 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
10823 self.inner.chat_id = chat_id;
10824 self
10825 }
10826
10827
10828 pub fn invite_link<T: AsRef<str>>(&mut self, invite_link: T) -> &mut Self {
10829 self.inner.invite_link = invite_link.as_ref().to_string();
10830 self
10831 }
10832
10833}
10834
10835impl AsRef<GetChatInviteLink> for GetChatInviteLink {
10836 fn as_ref(&self) -> &GetChatInviteLink { self }
10837}
10838
10839impl AsRef<GetChatInviteLink> for RTDGetChatInviteLinkBuilder {
10840 fn as_ref(&self) -> &GetChatInviteLink { &self.inner }
10841}
10842
10843
10844
10845
10846
10847
10848
10849#[derive(Debug, Clone, Default, Serialize, Deserialize)]
10851pub struct GetChatInviteLinkCounts {
10852 #[doc(hidden)]
10853 #[serde(rename(serialize = "@type", deserialize = "@type"))]
10854 td_name: String,
10855 #[doc(hidden)]
10856 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
10857 extra: Option<String>,
10858 chat_id: i64,
10860
10861}
10862
10863impl RObject for GetChatInviteLinkCounts {
10864 #[doc(hidden)] fn td_name(&self) -> &'static str { "getChatInviteLinkCounts" }
10865 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
10866 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
10867}
10868
10869
10870
10871
10872impl RFunction for GetChatInviteLinkCounts {}
10873
10874impl GetChatInviteLinkCounts {
10875 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
10876 pub fn builder() -> RTDGetChatInviteLinkCountsBuilder {
10877 let mut inner = GetChatInviteLinkCounts::default();
10878 inner.td_name = "getChatInviteLinkCounts".to_string();
10879 inner.extra = Some(Uuid::new_v4().to_string());
10880 RTDGetChatInviteLinkCountsBuilder { inner }
10881 }
10882
10883 pub fn chat_id(&self) -> i64 { self.chat_id }
10884
10885}
10886
10887#[doc(hidden)]
10888pub struct RTDGetChatInviteLinkCountsBuilder {
10889 inner: GetChatInviteLinkCounts
10890}
10891
10892impl RTDGetChatInviteLinkCountsBuilder {
10893 pub fn build(&self) -> GetChatInviteLinkCounts { self.inner.clone() }
10894
10895
10896 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
10897 self.inner.chat_id = chat_id;
10898 self
10899 }
10900
10901}
10902
10903impl AsRef<GetChatInviteLinkCounts> for GetChatInviteLinkCounts {
10904 fn as_ref(&self) -> &GetChatInviteLinkCounts { self }
10905}
10906
10907impl AsRef<GetChatInviteLinkCounts> for RTDGetChatInviteLinkCountsBuilder {
10908 fn as_ref(&self) -> &GetChatInviteLinkCounts { &self.inner }
10909}
10910
10911
10912
10913
10914
10915
10916
10917#[derive(Debug, Clone, Default, Serialize, Deserialize)]
10919pub struct GetChatInviteLinkMembers {
10920 #[doc(hidden)]
10921 #[serde(rename(serialize = "@type", deserialize = "@type"))]
10922 td_name: String,
10923 #[doc(hidden)]
10924 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
10925 extra: Option<String>,
10926 chat_id: i64,
10928 invite_link: String,
10930 offset_member: ChatInviteLinkMember,
10932 limit: i64,
10934
10935}
10936
10937impl RObject for GetChatInviteLinkMembers {
10938 #[doc(hidden)] fn td_name(&self) -> &'static str { "getChatInviteLinkMembers" }
10939 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
10940 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
10941}
10942
10943
10944
10945
10946impl RFunction for GetChatInviteLinkMembers {}
10947
10948impl GetChatInviteLinkMembers {
10949 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
10950 pub fn builder() -> RTDGetChatInviteLinkMembersBuilder {
10951 let mut inner = GetChatInviteLinkMembers::default();
10952 inner.td_name = "getChatInviteLinkMembers".to_string();
10953 inner.extra = Some(Uuid::new_v4().to_string());
10954 RTDGetChatInviteLinkMembersBuilder { inner }
10955 }
10956
10957 pub fn chat_id(&self) -> i64 { self.chat_id }
10958
10959 pub fn invite_link(&self) -> &String { &self.invite_link }
10960
10961 pub fn offset_member(&self) -> &ChatInviteLinkMember { &self.offset_member }
10962
10963 pub fn limit(&self) -> i64 { self.limit }
10964
10965}
10966
10967#[doc(hidden)]
10968pub struct RTDGetChatInviteLinkMembersBuilder {
10969 inner: GetChatInviteLinkMembers
10970}
10971
10972impl RTDGetChatInviteLinkMembersBuilder {
10973 pub fn build(&self) -> GetChatInviteLinkMembers { self.inner.clone() }
10974
10975
10976 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
10977 self.inner.chat_id = chat_id;
10978 self
10979 }
10980
10981
10982 pub fn invite_link<T: AsRef<str>>(&mut self, invite_link: T) -> &mut Self {
10983 self.inner.invite_link = invite_link.as_ref().to_string();
10984 self
10985 }
10986
10987
10988 pub fn offset_member<T: AsRef<ChatInviteLinkMember>>(&mut self, offset_member: T) -> &mut Self {
10989 self.inner.offset_member = offset_member.as_ref().clone();
10990 self
10991 }
10992
10993
10994 pub fn limit(&mut self, limit: i64) -> &mut Self {
10995 self.inner.limit = limit;
10996 self
10997 }
10998
10999}
11000
11001impl AsRef<GetChatInviteLinkMembers> for GetChatInviteLinkMembers {
11002 fn as_ref(&self) -> &GetChatInviteLinkMembers { self }
11003}
11004
11005impl AsRef<GetChatInviteLinkMembers> for RTDGetChatInviteLinkMembersBuilder {
11006 fn as_ref(&self) -> &GetChatInviteLinkMembers { &self.inner }
11007}
11008
11009
11010
11011
11012
11013
11014
11015#[derive(Debug, Clone, Default, Serialize, Deserialize)]
11017pub struct GetChatInviteLinks {
11018 #[doc(hidden)]
11019 #[serde(rename(serialize = "@type", deserialize = "@type"))]
11020 td_name: String,
11021 #[doc(hidden)]
11022 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
11023 extra: Option<String>,
11024 chat_id: i64,
11026 creator_user_id: i64,
11028 is_revoked: bool,
11030 offset_date: i64,
11032 offset_invite_link: String,
11034 limit: i64,
11036
11037}
11038
11039impl RObject for GetChatInviteLinks {
11040 #[doc(hidden)] fn td_name(&self) -> &'static str { "getChatInviteLinks" }
11041 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
11042 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
11043}
11044
11045
11046
11047
11048impl RFunction for GetChatInviteLinks {}
11049
11050impl GetChatInviteLinks {
11051 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
11052 pub fn builder() -> RTDGetChatInviteLinksBuilder {
11053 let mut inner = GetChatInviteLinks::default();
11054 inner.td_name = "getChatInviteLinks".to_string();
11055 inner.extra = Some(Uuid::new_v4().to_string());
11056 RTDGetChatInviteLinksBuilder { inner }
11057 }
11058
11059 pub fn chat_id(&self) -> i64 { self.chat_id }
11060
11061 pub fn creator_user_id(&self) -> i64 { self.creator_user_id }
11062
11063 pub fn is_revoked(&self) -> bool { self.is_revoked }
11064
11065 pub fn offset_date(&self) -> i64 { self.offset_date }
11066
11067 pub fn offset_invite_link(&self) -> &String { &self.offset_invite_link }
11068
11069 pub fn limit(&self) -> i64 { self.limit }
11070
11071}
11072
11073#[doc(hidden)]
11074pub struct RTDGetChatInviteLinksBuilder {
11075 inner: GetChatInviteLinks
11076}
11077
11078impl RTDGetChatInviteLinksBuilder {
11079 pub fn build(&self) -> GetChatInviteLinks { self.inner.clone() }
11080
11081
11082 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
11083 self.inner.chat_id = chat_id;
11084 self
11085 }
11086
11087
11088 pub fn creator_user_id(&mut self, creator_user_id: i64) -> &mut Self {
11089 self.inner.creator_user_id = creator_user_id;
11090 self
11091 }
11092
11093
11094 pub fn is_revoked(&mut self, is_revoked: bool) -> &mut Self {
11095 self.inner.is_revoked = is_revoked;
11096 self
11097 }
11098
11099
11100 pub fn offset_date(&mut self, offset_date: i64) -> &mut Self {
11101 self.inner.offset_date = offset_date;
11102 self
11103 }
11104
11105
11106 pub fn offset_invite_link<T: AsRef<str>>(&mut self, offset_invite_link: T) -> &mut Self {
11107 self.inner.offset_invite_link = offset_invite_link.as_ref().to_string();
11108 self
11109 }
11110
11111
11112 pub fn limit(&mut self, limit: i64) -> &mut Self {
11113 self.inner.limit = limit;
11114 self
11115 }
11116
11117}
11118
11119impl AsRef<GetChatInviteLinks> for GetChatInviteLinks {
11120 fn as_ref(&self) -> &GetChatInviteLinks { self }
11121}
11122
11123impl AsRef<GetChatInviteLinks> for RTDGetChatInviteLinksBuilder {
11124 fn as_ref(&self) -> &GetChatInviteLinks { &self.inner }
11125}
11126
11127
11128
11129
11130
11131
11132
11133#[derive(Debug, Clone, Default, Serialize, Deserialize)]
11135pub struct GetChatJoinRequests {
11136 #[doc(hidden)]
11137 #[serde(rename(serialize = "@type", deserialize = "@type"))]
11138 td_name: String,
11139 #[doc(hidden)]
11140 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
11141 extra: Option<String>,
11142 chat_id: i64,
11144 invite_link: String,
11146 query: String,
11148 offset_request: ChatJoinRequest,
11150 limit: i64,
11152
11153}
11154
11155impl RObject for GetChatJoinRequests {
11156 #[doc(hidden)] fn td_name(&self) -> &'static str { "getChatJoinRequests" }
11157 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
11158 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
11159}
11160
11161
11162
11163
11164impl RFunction for GetChatJoinRequests {}
11165
11166impl GetChatJoinRequests {
11167 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
11168 pub fn builder() -> RTDGetChatJoinRequestsBuilder {
11169 let mut inner = GetChatJoinRequests::default();
11170 inner.td_name = "getChatJoinRequests".to_string();
11171 inner.extra = Some(Uuid::new_v4().to_string());
11172 RTDGetChatJoinRequestsBuilder { inner }
11173 }
11174
11175 pub fn chat_id(&self) -> i64 { self.chat_id }
11176
11177 pub fn invite_link(&self) -> &String { &self.invite_link }
11178
11179 pub fn query(&self) -> &String { &self.query }
11180
11181 pub fn offset_request(&self) -> &ChatJoinRequest { &self.offset_request }
11182
11183 pub fn limit(&self) -> i64 { self.limit }
11184
11185}
11186
11187#[doc(hidden)]
11188pub struct RTDGetChatJoinRequestsBuilder {
11189 inner: GetChatJoinRequests
11190}
11191
11192impl RTDGetChatJoinRequestsBuilder {
11193 pub fn build(&self) -> GetChatJoinRequests { self.inner.clone() }
11194
11195
11196 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
11197 self.inner.chat_id = chat_id;
11198 self
11199 }
11200
11201
11202 pub fn invite_link<T: AsRef<str>>(&mut self, invite_link: T) -> &mut Self {
11203 self.inner.invite_link = invite_link.as_ref().to_string();
11204 self
11205 }
11206
11207
11208 pub fn query<T: AsRef<str>>(&mut self, query: T) -> &mut Self {
11209 self.inner.query = query.as_ref().to_string();
11210 self
11211 }
11212
11213
11214 pub fn offset_request<T: AsRef<ChatJoinRequest>>(&mut self, offset_request: T) -> &mut Self {
11215 self.inner.offset_request = offset_request.as_ref().clone();
11216 self
11217 }
11218
11219
11220 pub fn limit(&mut self, limit: i64) -> &mut Self {
11221 self.inner.limit = limit;
11222 self
11223 }
11224
11225}
11226
11227impl AsRef<GetChatJoinRequests> for GetChatJoinRequests {
11228 fn as_ref(&self) -> &GetChatJoinRequests { self }
11229}
11230
11231impl AsRef<GetChatJoinRequests> for RTDGetChatJoinRequestsBuilder {
11232 fn as_ref(&self) -> &GetChatJoinRequests { &self.inner }
11233}
11234
11235
11236
11237
11238
11239
11240
11241#[derive(Debug, Clone, Default, Serialize, Deserialize)]
11243pub struct GetChatListsToAddChat {
11244 #[doc(hidden)]
11245 #[serde(rename(serialize = "@type", deserialize = "@type"))]
11246 td_name: String,
11247 #[doc(hidden)]
11248 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
11249 extra: Option<String>,
11250 chat_id: i64,
11252
11253}
11254
11255impl RObject for GetChatListsToAddChat {
11256 #[doc(hidden)] fn td_name(&self) -> &'static str { "getChatListsToAddChat" }
11257 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
11258 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
11259}
11260
11261
11262
11263
11264impl RFunction for GetChatListsToAddChat {}
11265
11266impl GetChatListsToAddChat {
11267 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
11268 pub fn builder() -> RTDGetChatListsToAddChatBuilder {
11269 let mut inner = GetChatListsToAddChat::default();
11270 inner.td_name = "getChatListsToAddChat".to_string();
11271 inner.extra = Some(Uuid::new_v4().to_string());
11272 RTDGetChatListsToAddChatBuilder { inner }
11273 }
11274
11275 pub fn chat_id(&self) -> i64 { self.chat_id }
11276
11277}
11278
11279#[doc(hidden)]
11280pub struct RTDGetChatListsToAddChatBuilder {
11281 inner: GetChatListsToAddChat
11282}
11283
11284impl RTDGetChatListsToAddChatBuilder {
11285 pub fn build(&self) -> GetChatListsToAddChat { self.inner.clone() }
11286
11287
11288 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
11289 self.inner.chat_id = chat_id;
11290 self
11291 }
11292
11293}
11294
11295impl AsRef<GetChatListsToAddChat> for GetChatListsToAddChat {
11296 fn as_ref(&self) -> &GetChatListsToAddChat { self }
11297}
11298
11299impl AsRef<GetChatListsToAddChat> for RTDGetChatListsToAddChatBuilder {
11300 fn as_ref(&self) -> &GetChatListsToAddChat { &self.inner }
11301}
11302
11303
11304
11305
11306
11307
11308
11309#[derive(Debug, Clone, Default, Serialize, Deserialize)]
11311pub struct GetChatMember {
11312 #[doc(hidden)]
11313 #[serde(rename(serialize = "@type", deserialize = "@type"))]
11314 td_name: String,
11315 #[doc(hidden)]
11316 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
11317 extra: Option<String>,
11318 chat_id: i64,
11320 member_id: MessageSender,
11322
11323}
11324
11325impl RObject for GetChatMember {
11326 #[doc(hidden)] fn td_name(&self) -> &'static str { "getChatMember" }
11327 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
11328 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
11329}
11330
11331
11332
11333
11334impl RFunction for GetChatMember {}
11335
11336impl GetChatMember {
11337 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
11338 pub fn builder() -> RTDGetChatMemberBuilder {
11339 let mut inner = GetChatMember::default();
11340 inner.td_name = "getChatMember".to_string();
11341 inner.extra = Some(Uuid::new_v4().to_string());
11342 RTDGetChatMemberBuilder { inner }
11343 }
11344
11345 pub fn chat_id(&self) -> i64 { self.chat_id }
11346
11347 pub fn member_id(&self) -> &MessageSender { &self.member_id }
11348
11349}
11350
11351#[doc(hidden)]
11352pub struct RTDGetChatMemberBuilder {
11353 inner: GetChatMember
11354}
11355
11356impl RTDGetChatMemberBuilder {
11357 pub fn build(&self) -> GetChatMember { self.inner.clone() }
11358
11359
11360 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
11361 self.inner.chat_id = chat_id;
11362 self
11363 }
11364
11365
11366 pub fn member_id<T: AsRef<MessageSender>>(&mut self, member_id: T) -> &mut Self {
11367 self.inner.member_id = member_id.as_ref().clone();
11368 self
11369 }
11370
11371}
11372
11373impl AsRef<GetChatMember> for GetChatMember {
11374 fn as_ref(&self) -> &GetChatMember { self }
11375}
11376
11377impl AsRef<GetChatMember> for RTDGetChatMemberBuilder {
11378 fn as_ref(&self) -> &GetChatMember { &self.inner }
11379}
11380
11381
11382
11383
11384
11385
11386
11387#[derive(Debug, Clone, Default, Serialize, Deserialize)]
11389pub struct GetChatMessageByDate {
11390 #[doc(hidden)]
11391 #[serde(rename(serialize = "@type", deserialize = "@type"))]
11392 td_name: String,
11393 #[doc(hidden)]
11394 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
11395 extra: Option<String>,
11396 chat_id: i64,
11398 date: i64,
11400
11401}
11402
11403impl RObject for GetChatMessageByDate {
11404 #[doc(hidden)] fn td_name(&self) -> &'static str { "getChatMessageByDate" }
11405 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
11406 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
11407}
11408
11409
11410
11411
11412impl RFunction for GetChatMessageByDate {}
11413
11414impl GetChatMessageByDate {
11415 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
11416 pub fn builder() -> RTDGetChatMessageByDateBuilder {
11417 let mut inner = GetChatMessageByDate::default();
11418 inner.td_name = "getChatMessageByDate".to_string();
11419 inner.extra = Some(Uuid::new_v4().to_string());
11420 RTDGetChatMessageByDateBuilder { inner }
11421 }
11422
11423 pub fn chat_id(&self) -> i64 { self.chat_id }
11424
11425 pub fn date(&self) -> i64 { self.date }
11426
11427}
11428
11429#[doc(hidden)]
11430pub struct RTDGetChatMessageByDateBuilder {
11431 inner: GetChatMessageByDate
11432}
11433
11434impl RTDGetChatMessageByDateBuilder {
11435 pub fn build(&self) -> GetChatMessageByDate { self.inner.clone() }
11436
11437
11438 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
11439 self.inner.chat_id = chat_id;
11440 self
11441 }
11442
11443
11444 pub fn date(&mut self, date: i64) -> &mut Self {
11445 self.inner.date = date;
11446 self
11447 }
11448
11449}
11450
11451impl AsRef<GetChatMessageByDate> for GetChatMessageByDate {
11452 fn as_ref(&self) -> &GetChatMessageByDate { self }
11453}
11454
11455impl AsRef<GetChatMessageByDate> for RTDGetChatMessageByDateBuilder {
11456 fn as_ref(&self) -> &GetChatMessageByDate { &self.inner }
11457}
11458
11459
11460
11461
11462
11463
11464
11465#[derive(Debug, Clone, Default, Serialize, Deserialize)]
11467pub struct GetChatMessageCalendar {
11468 #[doc(hidden)]
11469 #[serde(rename(serialize = "@type", deserialize = "@type"))]
11470 td_name: String,
11471 #[doc(hidden)]
11472 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
11473 extra: Option<String>,
11474 chat_id: i64,
11476 filter: SearchMessagesFilter,
11478 from_message_id: i64,
11480
11481}
11482
11483impl RObject for GetChatMessageCalendar {
11484 #[doc(hidden)] fn td_name(&self) -> &'static str { "getChatMessageCalendar" }
11485 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
11486 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
11487}
11488
11489
11490
11491
11492impl RFunction for GetChatMessageCalendar {}
11493
11494impl GetChatMessageCalendar {
11495 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
11496 pub fn builder() -> RTDGetChatMessageCalendarBuilder {
11497 let mut inner = GetChatMessageCalendar::default();
11498 inner.td_name = "getChatMessageCalendar".to_string();
11499 inner.extra = Some(Uuid::new_v4().to_string());
11500 RTDGetChatMessageCalendarBuilder { inner }
11501 }
11502
11503 pub fn chat_id(&self) -> i64 { self.chat_id }
11504
11505 pub fn filter(&self) -> &SearchMessagesFilter { &self.filter }
11506
11507 pub fn from_message_id(&self) -> i64 { self.from_message_id }
11508
11509}
11510
11511#[doc(hidden)]
11512pub struct RTDGetChatMessageCalendarBuilder {
11513 inner: GetChatMessageCalendar
11514}
11515
11516impl RTDGetChatMessageCalendarBuilder {
11517 pub fn build(&self) -> GetChatMessageCalendar { self.inner.clone() }
11518
11519
11520 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
11521 self.inner.chat_id = chat_id;
11522 self
11523 }
11524
11525
11526 pub fn filter<T: AsRef<SearchMessagesFilter>>(&mut self, filter: T) -> &mut Self {
11527 self.inner.filter = filter.as_ref().clone();
11528 self
11529 }
11530
11531
11532 pub fn from_message_id(&mut self, from_message_id: i64) -> &mut Self {
11533 self.inner.from_message_id = from_message_id;
11534 self
11535 }
11536
11537}
11538
11539impl AsRef<GetChatMessageCalendar> for GetChatMessageCalendar {
11540 fn as_ref(&self) -> &GetChatMessageCalendar { self }
11541}
11542
11543impl AsRef<GetChatMessageCalendar> for RTDGetChatMessageCalendarBuilder {
11544 fn as_ref(&self) -> &GetChatMessageCalendar { &self.inner }
11545}
11546
11547
11548
11549
11550
11551
11552
11553#[derive(Debug, Clone, Default, Serialize, Deserialize)]
11555pub struct GetChatMessageCount {
11556 #[doc(hidden)]
11557 #[serde(rename(serialize = "@type", deserialize = "@type"))]
11558 td_name: String,
11559 #[doc(hidden)]
11560 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
11561 extra: Option<String>,
11562 chat_id: i64,
11564 filter: SearchMessagesFilter,
11566 return_local: bool,
11568
11569}
11570
11571impl RObject for GetChatMessageCount {
11572 #[doc(hidden)] fn td_name(&self) -> &'static str { "getChatMessageCount" }
11573 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
11574 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
11575}
11576
11577
11578
11579
11580impl RFunction for GetChatMessageCount {}
11581
11582impl GetChatMessageCount {
11583 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
11584 pub fn builder() -> RTDGetChatMessageCountBuilder {
11585 let mut inner = GetChatMessageCount::default();
11586 inner.td_name = "getChatMessageCount".to_string();
11587 inner.extra = Some(Uuid::new_v4().to_string());
11588 RTDGetChatMessageCountBuilder { inner }
11589 }
11590
11591 pub fn chat_id(&self) -> i64 { self.chat_id }
11592
11593 pub fn filter(&self) -> &SearchMessagesFilter { &self.filter }
11594
11595 pub fn return_local(&self) -> bool { self.return_local }
11596
11597}
11598
11599#[doc(hidden)]
11600pub struct RTDGetChatMessageCountBuilder {
11601 inner: GetChatMessageCount
11602}
11603
11604impl RTDGetChatMessageCountBuilder {
11605 pub fn build(&self) -> GetChatMessageCount { self.inner.clone() }
11606
11607
11608 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
11609 self.inner.chat_id = chat_id;
11610 self
11611 }
11612
11613
11614 pub fn filter<T: AsRef<SearchMessagesFilter>>(&mut self, filter: T) -> &mut Self {
11615 self.inner.filter = filter.as_ref().clone();
11616 self
11617 }
11618
11619
11620 pub fn return_local(&mut self, return_local: bool) -> &mut Self {
11621 self.inner.return_local = return_local;
11622 self
11623 }
11624
11625}
11626
11627impl AsRef<GetChatMessageCount> for GetChatMessageCount {
11628 fn as_ref(&self) -> &GetChatMessageCount { self }
11629}
11630
11631impl AsRef<GetChatMessageCount> for RTDGetChatMessageCountBuilder {
11632 fn as_ref(&self) -> &GetChatMessageCount { &self.inner }
11633}
11634
11635
11636
11637
11638
11639
11640
11641#[derive(Debug, Clone, Default, Serialize, Deserialize)]
11643pub struct GetChatNotificationSettingsExceptions {
11644 #[doc(hidden)]
11645 #[serde(rename(serialize = "@type", deserialize = "@type"))]
11646 td_name: String,
11647 #[doc(hidden)]
11648 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
11649 extra: Option<String>,
11650 scope: NotificationSettingsScope,
11652 compare_sound: bool,
11654
11655}
11656
11657impl RObject for GetChatNotificationSettingsExceptions {
11658 #[doc(hidden)] fn td_name(&self) -> &'static str { "getChatNotificationSettingsExceptions" }
11659 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
11660 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
11661}
11662
11663
11664
11665
11666impl RFunction for GetChatNotificationSettingsExceptions {}
11667
11668impl GetChatNotificationSettingsExceptions {
11669 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
11670 pub fn builder() -> RTDGetChatNotificationSettingsExceptionsBuilder {
11671 let mut inner = GetChatNotificationSettingsExceptions::default();
11672 inner.td_name = "getChatNotificationSettingsExceptions".to_string();
11673 inner.extra = Some(Uuid::new_v4().to_string());
11674 RTDGetChatNotificationSettingsExceptionsBuilder { inner }
11675 }
11676
11677 pub fn scope(&self) -> &NotificationSettingsScope { &self.scope }
11678
11679 pub fn compare_sound(&self) -> bool { self.compare_sound }
11680
11681}
11682
11683#[doc(hidden)]
11684pub struct RTDGetChatNotificationSettingsExceptionsBuilder {
11685 inner: GetChatNotificationSettingsExceptions
11686}
11687
11688impl RTDGetChatNotificationSettingsExceptionsBuilder {
11689 pub fn build(&self) -> GetChatNotificationSettingsExceptions { self.inner.clone() }
11690
11691
11692 pub fn scope<T: AsRef<NotificationSettingsScope>>(&mut self, scope: T) -> &mut Self {
11693 self.inner.scope = scope.as_ref().clone();
11694 self
11695 }
11696
11697
11698 pub fn compare_sound(&mut self, compare_sound: bool) -> &mut Self {
11699 self.inner.compare_sound = compare_sound;
11700 self
11701 }
11702
11703}
11704
11705impl AsRef<GetChatNotificationSettingsExceptions> for GetChatNotificationSettingsExceptions {
11706 fn as_ref(&self) -> &GetChatNotificationSettingsExceptions { self }
11707}
11708
11709impl AsRef<GetChatNotificationSettingsExceptions> for RTDGetChatNotificationSettingsExceptionsBuilder {
11710 fn as_ref(&self) -> &GetChatNotificationSettingsExceptions { &self.inner }
11711}
11712
11713
11714
11715
11716
11717
11718
11719#[derive(Debug, Clone, Default, Serialize, Deserialize)]
11721pub struct GetChatPinnedMessage {
11722 #[doc(hidden)]
11723 #[serde(rename(serialize = "@type", deserialize = "@type"))]
11724 td_name: String,
11725 #[doc(hidden)]
11726 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
11727 extra: Option<String>,
11728 chat_id: i64,
11730
11731}
11732
11733impl RObject for GetChatPinnedMessage {
11734 #[doc(hidden)] fn td_name(&self) -> &'static str { "getChatPinnedMessage" }
11735 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
11736 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
11737}
11738
11739
11740
11741
11742impl RFunction for GetChatPinnedMessage {}
11743
11744impl GetChatPinnedMessage {
11745 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
11746 pub fn builder() -> RTDGetChatPinnedMessageBuilder {
11747 let mut inner = GetChatPinnedMessage::default();
11748 inner.td_name = "getChatPinnedMessage".to_string();
11749 inner.extra = Some(Uuid::new_v4().to_string());
11750 RTDGetChatPinnedMessageBuilder { inner }
11751 }
11752
11753 pub fn chat_id(&self) -> i64 { self.chat_id }
11754
11755}
11756
11757#[doc(hidden)]
11758pub struct RTDGetChatPinnedMessageBuilder {
11759 inner: GetChatPinnedMessage
11760}
11761
11762impl RTDGetChatPinnedMessageBuilder {
11763 pub fn build(&self) -> GetChatPinnedMessage { self.inner.clone() }
11764
11765
11766 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
11767 self.inner.chat_id = chat_id;
11768 self
11769 }
11770
11771}
11772
11773impl AsRef<GetChatPinnedMessage> for GetChatPinnedMessage {
11774 fn as_ref(&self) -> &GetChatPinnedMessage { self }
11775}
11776
11777impl AsRef<GetChatPinnedMessage> for RTDGetChatPinnedMessageBuilder {
11778 fn as_ref(&self) -> &GetChatPinnedMessage { &self.inner }
11779}
11780
11781
11782
11783
11784
11785
11786
11787#[derive(Debug, Clone, Default, Serialize, Deserialize)]
11789pub struct GetChatScheduledMessages {
11790 #[doc(hidden)]
11791 #[serde(rename(serialize = "@type", deserialize = "@type"))]
11792 td_name: String,
11793 #[doc(hidden)]
11794 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
11795 extra: Option<String>,
11796 chat_id: i64,
11798
11799}
11800
11801impl RObject for GetChatScheduledMessages {
11802 #[doc(hidden)] fn td_name(&self) -> &'static str { "getChatScheduledMessages" }
11803 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
11804 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
11805}
11806
11807
11808
11809
11810impl RFunction for GetChatScheduledMessages {}
11811
11812impl GetChatScheduledMessages {
11813 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
11814 pub fn builder() -> RTDGetChatScheduledMessagesBuilder {
11815 let mut inner = GetChatScheduledMessages::default();
11816 inner.td_name = "getChatScheduledMessages".to_string();
11817 inner.extra = Some(Uuid::new_v4().to_string());
11818 RTDGetChatScheduledMessagesBuilder { inner }
11819 }
11820
11821 pub fn chat_id(&self) -> i64 { self.chat_id }
11822
11823}
11824
11825#[doc(hidden)]
11826pub struct RTDGetChatScheduledMessagesBuilder {
11827 inner: GetChatScheduledMessages
11828}
11829
11830impl RTDGetChatScheduledMessagesBuilder {
11831 pub fn build(&self) -> GetChatScheduledMessages { self.inner.clone() }
11832
11833
11834 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
11835 self.inner.chat_id = chat_id;
11836 self
11837 }
11838
11839}
11840
11841impl AsRef<GetChatScheduledMessages> for GetChatScheduledMessages {
11842 fn as_ref(&self) -> &GetChatScheduledMessages { self }
11843}
11844
11845impl AsRef<GetChatScheduledMessages> for RTDGetChatScheduledMessagesBuilder {
11846 fn as_ref(&self) -> &GetChatScheduledMessages { &self.inner }
11847}
11848
11849
11850
11851
11852
11853
11854
11855#[derive(Debug, Clone, Default, Serialize, Deserialize)]
11857pub struct GetChatSparseMessagePositions {
11858 #[doc(hidden)]
11859 #[serde(rename(serialize = "@type", deserialize = "@type"))]
11860 td_name: String,
11861 #[doc(hidden)]
11862 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
11863 extra: Option<String>,
11864 chat_id: i64,
11866 filter: SearchMessagesFilter,
11868 from_message_id: i64,
11870 limit: i64,
11872
11873}
11874
11875impl RObject for GetChatSparseMessagePositions {
11876 #[doc(hidden)] fn td_name(&self) -> &'static str { "getChatSparseMessagePositions" }
11877 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
11878 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
11879}
11880
11881
11882
11883
11884impl RFunction for GetChatSparseMessagePositions {}
11885
11886impl GetChatSparseMessagePositions {
11887 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
11888 pub fn builder() -> RTDGetChatSparseMessagePositionsBuilder {
11889 let mut inner = GetChatSparseMessagePositions::default();
11890 inner.td_name = "getChatSparseMessagePositions".to_string();
11891 inner.extra = Some(Uuid::new_v4().to_string());
11892 RTDGetChatSparseMessagePositionsBuilder { inner }
11893 }
11894
11895 pub fn chat_id(&self) -> i64 { self.chat_id }
11896
11897 pub fn filter(&self) -> &SearchMessagesFilter { &self.filter }
11898
11899 pub fn from_message_id(&self) -> i64 { self.from_message_id }
11900
11901 pub fn limit(&self) -> i64 { self.limit }
11902
11903}
11904
11905#[doc(hidden)]
11906pub struct RTDGetChatSparseMessagePositionsBuilder {
11907 inner: GetChatSparseMessagePositions
11908}
11909
11910impl RTDGetChatSparseMessagePositionsBuilder {
11911 pub fn build(&self) -> GetChatSparseMessagePositions { self.inner.clone() }
11912
11913
11914 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
11915 self.inner.chat_id = chat_id;
11916 self
11917 }
11918
11919
11920 pub fn filter<T: AsRef<SearchMessagesFilter>>(&mut self, filter: T) -> &mut Self {
11921 self.inner.filter = filter.as_ref().clone();
11922 self
11923 }
11924
11925
11926 pub fn from_message_id(&mut self, from_message_id: i64) -> &mut Self {
11927 self.inner.from_message_id = from_message_id;
11928 self
11929 }
11930
11931
11932 pub fn limit(&mut self, limit: i64) -> &mut Self {
11933 self.inner.limit = limit;
11934 self
11935 }
11936
11937}
11938
11939impl AsRef<GetChatSparseMessagePositions> for GetChatSparseMessagePositions {
11940 fn as_ref(&self) -> &GetChatSparseMessagePositions { self }
11941}
11942
11943impl AsRef<GetChatSparseMessagePositions> for RTDGetChatSparseMessagePositionsBuilder {
11944 fn as_ref(&self) -> &GetChatSparseMessagePositions { &self.inner }
11945}
11946
11947
11948
11949
11950
11951
11952
11953#[derive(Debug, Clone, Default, Serialize, Deserialize)]
11955pub struct GetChatSponsoredMessage {
11956 #[doc(hidden)]
11957 #[serde(rename(serialize = "@type", deserialize = "@type"))]
11958 td_name: String,
11959 #[doc(hidden)]
11960 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
11961 extra: Option<String>,
11962 chat_id: i64,
11964
11965}
11966
11967impl RObject for GetChatSponsoredMessage {
11968 #[doc(hidden)] fn td_name(&self) -> &'static str { "getChatSponsoredMessage" }
11969 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
11970 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
11971}
11972
11973
11974
11975
11976impl RFunction for GetChatSponsoredMessage {}
11977
11978impl GetChatSponsoredMessage {
11979 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
11980 pub fn builder() -> RTDGetChatSponsoredMessageBuilder {
11981 let mut inner = GetChatSponsoredMessage::default();
11982 inner.td_name = "getChatSponsoredMessage".to_string();
11983 inner.extra = Some(Uuid::new_v4().to_string());
11984 RTDGetChatSponsoredMessageBuilder { inner }
11985 }
11986
11987 pub fn chat_id(&self) -> i64 { self.chat_id }
11988
11989}
11990
11991#[doc(hidden)]
11992pub struct RTDGetChatSponsoredMessageBuilder {
11993 inner: GetChatSponsoredMessage
11994}
11995
11996impl RTDGetChatSponsoredMessageBuilder {
11997 pub fn build(&self) -> GetChatSponsoredMessage { self.inner.clone() }
11998
11999
12000 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
12001 self.inner.chat_id = chat_id;
12002 self
12003 }
12004
12005}
12006
12007impl AsRef<GetChatSponsoredMessage> for GetChatSponsoredMessage {
12008 fn as_ref(&self) -> &GetChatSponsoredMessage { self }
12009}
12010
12011impl AsRef<GetChatSponsoredMessage> for RTDGetChatSponsoredMessageBuilder {
12012 fn as_ref(&self) -> &GetChatSponsoredMessage { &self.inner }
12013}
12014
12015
12016
12017
12018
12019
12020
12021#[derive(Debug, Clone, Default, Serialize, Deserialize)]
12023pub struct GetChatStatistics {
12024 #[doc(hidden)]
12025 #[serde(rename(serialize = "@type", deserialize = "@type"))]
12026 td_name: String,
12027 #[doc(hidden)]
12028 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
12029 extra: Option<String>,
12030 chat_id: i64,
12032 is_dark: bool,
12034
12035}
12036
12037impl RObject for GetChatStatistics {
12038 #[doc(hidden)] fn td_name(&self) -> &'static str { "getChatStatistics" }
12039 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
12040 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
12041}
12042
12043
12044impl TDChatStatistics for GetChatStatistics {}
12045
12046impl RFunction for GetChatStatistics {}
12047
12048impl GetChatStatistics {
12049 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
12050 pub fn builder() -> RTDGetChatStatisticsBuilder {
12051 let mut inner = GetChatStatistics::default();
12052 inner.td_name = "getChatStatistics".to_string();
12053 inner.extra = Some(Uuid::new_v4().to_string());
12054 RTDGetChatStatisticsBuilder { inner }
12055 }
12056
12057 pub fn chat_id(&self) -> i64 { self.chat_id }
12058
12059 pub fn is_dark(&self) -> bool { self.is_dark }
12060
12061}
12062
12063#[doc(hidden)]
12064pub struct RTDGetChatStatisticsBuilder {
12065 inner: GetChatStatistics
12066}
12067
12068impl RTDGetChatStatisticsBuilder {
12069 pub fn build(&self) -> GetChatStatistics { self.inner.clone() }
12070
12071
12072 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
12073 self.inner.chat_id = chat_id;
12074 self
12075 }
12076
12077
12078 pub fn is_dark(&mut self, is_dark: bool) -> &mut Self {
12079 self.inner.is_dark = is_dark;
12080 self
12081 }
12082
12083}
12084
12085impl AsRef<GetChatStatistics> for GetChatStatistics {
12086 fn as_ref(&self) -> &GetChatStatistics { self }
12087}
12088
12089impl AsRef<GetChatStatistics> for RTDGetChatStatisticsBuilder {
12090 fn as_ref(&self) -> &GetChatStatistics { &self.inner }
12091}
12092
12093
12094
12095
12096
12097
12098
12099#[derive(Debug, Clone, Default, Serialize, Deserialize)]
12101pub struct GetChats {
12102 #[doc(hidden)]
12103 #[serde(rename(serialize = "@type", deserialize = "@type"))]
12104 td_name: String,
12105 #[doc(hidden)]
12106 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
12107 extra: Option<String>,
12108 chat_list: ChatList,
12110 limit: i64,
12112
12113}
12114
12115impl RObject for GetChats {
12116 #[doc(hidden)] fn td_name(&self) -> &'static str { "getChats" }
12117 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
12118 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
12119}
12120
12121
12122
12123
12124impl RFunction for GetChats {}
12125
12126impl GetChats {
12127 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
12128 pub fn builder() -> RTDGetChatsBuilder {
12129 let mut inner = GetChats::default();
12130 inner.td_name = "getChats".to_string();
12131 inner.extra = Some(Uuid::new_v4().to_string());
12132 RTDGetChatsBuilder { inner }
12133 }
12134
12135 pub fn chat_list(&self) -> &ChatList { &self.chat_list }
12136
12137 pub fn limit(&self) -> i64 { self.limit }
12138
12139}
12140
12141#[doc(hidden)]
12142pub struct RTDGetChatsBuilder {
12143 inner: GetChats
12144}
12145
12146impl RTDGetChatsBuilder {
12147 pub fn build(&self) -> GetChats { self.inner.clone() }
12148
12149
12150 pub fn chat_list<T: AsRef<ChatList>>(&mut self, chat_list: T) -> &mut Self {
12151 self.inner.chat_list = chat_list.as_ref().clone();
12152 self
12153 }
12154
12155
12156 pub fn limit(&mut self, limit: i64) -> &mut Self {
12157 self.inner.limit = limit;
12158 self
12159 }
12160
12161}
12162
12163impl AsRef<GetChats> for GetChats {
12164 fn as_ref(&self) -> &GetChats { self }
12165}
12166
12167impl AsRef<GetChats> for RTDGetChatsBuilder {
12168 fn as_ref(&self) -> &GetChats { &self.inner }
12169}
12170
12171
12172
12173
12174
12175
12176
12177#[derive(Debug, Clone, Default, Serialize, Deserialize)]
12179pub struct GetCommands {
12180 #[doc(hidden)]
12181 #[serde(rename(serialize = "@type", deserialize = "@type"))]
12182 td_name: String,
12183 #[doc(hidden)]
12184 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
12185 extra: Option<String>,
12186 scope: BotCommandScope,
12188 language_code: String,
12190
12191}
12192
12193impl RObject for GetCommands {
12194 #[doc(hidden)] fn td_name(&self) -> &'static str { "getCommands" }
12195 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
12196 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
12197}
12198
12199
12200
12201
12202impl RFunction for GetCommands {}
12203
12204impl GetCommands {
12205 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
12206 pub fn builder() -> RTDGetCommandsBuilder {
12207 let mut inner = GetCommands::default();
12208 inner.td_name = "getCommands".to_string();
12209 inner.extra = Some(Uuid::new_v4().to_string());
12210 RTDGetCommandsBuilder { inner }
12211 }
12212
12213 pub fn scope(&self) -> &BotCommandScope { &self.scope }
12214
12215 pub fn language_code(&self) -> &String { &self.language_code }
12216
12217}
12218
12219#[doc(hidden)]
12220pub struct RTDGetCommandsBuilder {
12221 inner: GetCommands
12222}
12223
12224impl RTDGetCommandsBuilder {
12225 pub fn build(&self) -> GetCommands { self.inner.clone() }
12226
12227
12228 pub fn scope<T: AsRef<BotCommandScope>>(&mut self, scope: T) -> &mut Self {
12229 self.inner.scope = scope.as_ref().clone();
12230 self
12231 }
12232
12233
12234 pub fn language_code<T: AsRef<str>>(&mut self, language_code: T) -> &mut Self {
12235 self.inner.language_code = language_code.as_ref().to_string();
12236 self
12237 }
12238
12239}
12240
12241impl AsRef<GetCommands> for GetCommands {
12242 fn as_ref(&self) -> &GetCommands { self }
12243}
12244
12245impl AsRef<GetCommands> for RTDGetCommandsBuilder {
12246 fn as_ref(&self) -> &GetCommands { &self.inner }
12247}
12248
12249
12250
12251
12252
12253
12254
12255#[derive(Debug, Clone, Default, Serialize, Deserialize)]
12257pub struct GetConnectedWebsites {
12258 #[doc(hidden)]
12259 #[serde(rename(serialize = "@type", deserialize = "@type"))]
12260 td_name: String,
12261 #[doc(hidden)]
12262 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
12263 extra: Option<String>,
12264
12265}
12266
12267impl RObject for GetConnectedWebsites {
12268 #[doc(hidden)] fn td_name(&self) -> &'static str { "getConnectedWebsites" }
12269 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
12270 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
12271}
12272
12273
12274
12275
12276impl RFunction for GetConnectedWebsites {}
12277
12278impl GetConnectedWebsites {
12279 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
12280 pub fn builder() -> RTDGetConnectedWebsitesBuilder {
12281 let mut inner = GetConnectedWebsites::default();
12282 inner.td_name = "getConnectedWebsites".to_string();
12283 inner.extra = Some(Uuid::new_v4().to_string());
12284 RTDGetConnectedWebsitesBuilder { inner }
12285 }
12286
12287}
12288
12289#[doc(hidden)]
12290pub struct RTDGetConnectedWebsitesBuilder {
12291 inner: GetConnectedWebsites
12292}
12293
12294impl RTDGetConnectedWebsitesBuilder {
12295 pub fn build(&self) -> GetConnectedWebsites { self.inner.clone() }
12296
12297}
12298
12299impl AsRef<GetConnectedWebsites> for GetConnectedWebsites {
12300 fn as_ref(&self) -> &GetConnectedWebsites { self }
12301}
12302
12303impl AsRef<GetConnectedWebsites> for RTDGetConnectedWebsitesBuilder {
12304 fn as_ref(&self) -> &GetConnectedWebsites { &self.inner }
12305}
12306
12307
12308
12309
12310
12311
12312
12313#[derive(Debug, Clone, Default, Serialize, Deserialize)]
12315pub struct GetContacts {
12316 #[doc(hidden)]
12317 #[serde(rename(serialize = "@type", deserialize = "@type"))]
12318 td_name: String,
12319 #[doc(hidden)]
12320 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
12321 extra: Option<String>,
12322
12323}
12324
12325impl RObject for GetContacts {
12326 #[doc(hidden)] fn td_name(&self) -> &'static str { "getContacts" }
12327 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
12328 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
12329}
12330
12331
12332
12333
12334impl RFunction for GetContacts {}
12335
12336impl GetContacts {
12337 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
12338 pub fn builder() -> RTDGetContactsBuilder {
12339 let mut inner = GetContacts::default();
12340 inner.td_name = "getContacts".to_string();
12341 inner.extra = Some(Uuid::new_v4().to_string());
12342 RTDGetContactsBuilder { inner }
12343 }
12344
12345}
12346
12347#[doc(hidden)]
12348pub struct RTDGetContactsBuilder {
12349 inner: GetContacts
12350}
12351
12352impl RTDGetContactsBuilder {
12353 pub fn build(&self) -> GetContacts { self.inner.clone() }
12354
12355}
12356
12357impl AsRef<GetContacts> for GetContacts {
12358 fn as_ref(&self) -> &GetContacts { self }
12359}
12360
12361impl AsRef<GetContacts> for RTDGetContactsBuilder {
12362 fn as_ref(&self) -> &GetContacts { &self.inner }
12363}
12364
12365
12366
12367
12368
12369
12370
12371#[derive(Debug, Clone, Default, Serialize, Deserialize)]
12373pub struct GetCountries {
12374 #[doc(hidden)]
12375 #[serde(rename(serialize = "@type", deserialize = "@type"))]
12376 td_name: String,
12377 #[doc(hidden)]
12378 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
12379 extra: Option<String>,
12380
12381}
12382
12383impl RObject for GetCountries {
12384 #[doc(hidden)] fn td_name(&self) -> &'static str { "getCountries" }
12385 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
12386 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
12387}
12388
12389
12390
12391
12392impl RFunction for GetCountries {}
12393
12394impl GetCountries {
12395 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
12396 pub fn builder() -> RTDGetCountriesBuilder {
12397 let mut inner = GetCountries::default();
12398 inner.td_name = "getCountries".to_string();
12399 inner.extra = Some(Uuid::new_v4().to_string());
12400 RTDGetCountriesBuilder { inner }
12401 }
12402
12403}
12404
12405#[doc(hidden)]
12406pub struct RTDGetCountriesBuilder {
12407 inner: GetCountries
12408}
12409
12410impl RTDGetCountriesBuilder {
12411 pub fn build(&self) -> GetCountries { self.inner.clone() }
12412
12413}
12414
12415impl AsRef<GetCountries> for GetCountries {
12416 fn as_ref(&self) -> &GetCountries { self }
12417}
12418
12419impl AsRef<GetCountries> for RTDGetCountriesBuilder {
12420 fn as_ref(&self) -> &GetCountries { &self.inner }
12421}
12422
12423
12424
12425
12426
12427
12428
12429#[derive(Debug, Clone, Default, Serialize, Deserialize)]
12431pub struct GetCountryCode {
12432 #[doc(hidden)]
12433 #[serde(rename(serialize = "@type", deserialize = "@type"))]
12434 td_name: String,
12435 #[doc(hidden)]
12436 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
12437 extra: Option<String>,
12438
12439}
12440
12441impl RObject for GetCountryCode {
12442 #[doc(hidden)] fn td_name(&self) -> &'static str { "getCountryCode" }
12443 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
12444 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
12445}
12446
12447
12448
12449
12450impl RFunction for GetCountryCode {}
12451
12452impl GetCountryCode {
12453 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
12454 pub fn builder() -> RTDGetCountryCodeBuilder {
12455 let mut inner = GetCountryCode::default();
12456 inner.td_name = "getCountryCode".to_string();
12457 inner.extra = Some(Uuid::new_v4().to_string());
12458 RTDGetCountryCodeBuilder { inner }
12459 }
12460
12461}
12462
12463#[doc(hidden)]
12464pub struct RTDGetCountryCodeBuilder {
12465 inner: GetCountryCode
12466}
12467
12468impl RTDGetCountryCodeBuilder {
12469 pub fn build(&self) -> GetCountryCode { self.inner.clone() }
12470
12471}
12472
12473impl AsRef<GetCountryCode> for GetCountryCode {
12474 fn as_ref(&self) -> &GetCountryCode { self }
12475}
12476
12477impl AsRef<GetCountryCode> for RTDGetCountryCodeBuilder {
12478 fn as_ref(&self) -> &GetCountryCode { &self.inner }
12479}
12480
12481
12482
12483
12484
12485
12486
12487#[derive(Debug, Clone, Default, Serialize, Deserialize)]
12489pub struct GetCreatedPublicChats {
12490 #[doc(hidden)]
12491 #[serde(rename(serialize = "@type", deserialize = "@type"))]
12492 td_name: String,
12493 #[doc(hidden)]
12494 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
12495 extra: Option<String>,
12496 #[serde(rename(serialize = "type", deserialize = "type"))] type_: PublicChatType,
12498
12499}
12500
12501impl RObject for GetCreatedPublicChats {
12502 #[doc(hidden)] fn td_name(&self) -> &'static str { "getCreatedPublicChats" }
12503 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
12504 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
12505}
12506
12507
12508
12509
12510impl RFunction for GetCreatedPublicChats {}
12511
12512impl GetCreatedPublicChats {
12513 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
12514 pub fn builder() -> RTDGetCreatedPublicChatsBuilder {
12515 let mut inner = GetCreatedPublicChats::default();
12516 inner.td_name = "getCreatedPublicChats".to_string();
12517 inner.extra = Some(Uuid::new_v4().to_string());
12518 RTDGetCreatedPublicChatsBuilder { inner }
12519 }
12520
12521 pub fn type_(&self) -> &PublicChatType { &self.type_ }
12522
12523}
12524
12525#[doc(hidden)]
12526pub struct RTDGetCreatedPublicChatsBuilder {
12527 inner: GetCreatedPublicChats
12528}
12529
12530impl RTDGetCreatedPublicChatsBuilder {
12531 pub fn build(&self) -> GetCreatedPublicChats { self.inner.clone() }
12532
12533
12534 pub fn type_<T: AsRef<PublicChatType>>(&mut self, type_: T) -> &mut Self {
12535 self.inner.type_ = type_.as_ref().clone();
12536 self
12537 }
12538
12539}
12540
12541impl AsRef<GetCreatedPublicChats> for GetCreatedPublicChats {
12542 fn as_ref(&self) -> &GetCreatedPublicChats { self }
12543}
12544
12545impl AsRef<GetCreatedPublicChats> for RTDGetCreatedPublicChatsBuilder {
12546 fn as_ref(&self) -> &GetCreatedPublicChats { &self.inner }
12547}
12548
12549
12550
12551
12552
12553
12554
12555#[derive(Debug, Clone, Default, Serialize, Deserialize)]
12557pub struct GetCurrentState {
12558 #[doc(hidden)]
12559 #[serde(rename(serialize = "@type", deserialize = "@type"))]
12560 td_name: String,
12561 #[doc(hidden)]
12562 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
12563 extra: Option<String>,
12564
12565}
12566
12567impl RObject for GetCurrentState {
12568 #[doc(hidden)] fn td_name(&self) -> &'static str { "getCurrentState" }
12569 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
12570 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
12571}
12572
12573
12574
12575
12576impl RFunction for GetCurrentState {}
12577
12578impl GetCurrentState {
12579 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
12580 pub fn builder() -> RTDGetCurrentStateBuilder {
12581 let mut inner = GetCurrentState::default();
12582 inner.td_name = "getCurrentState".to_string();
12583 inner.extra = Some(Uuid::new_v4().to_string());
12584 RTDGetCurrentStateBuilder { inner }
12585 }
12586
12587}
12588
12589#[doc(hidden)]
12590pub struct RTDGetCurrentStateBuilder {
12591 inner: GetCurrentState
12592}
12593
12594impl RTDGetCurrentStateBuilder {
12595 pub fn build(&self) -> GetCurrentState { self.inner.clone() }
12596
12597}
12598
12599impl AsRef<GetCurrentState> for GetCurrentState {
12600 fn as_ref(&self) -> &GetCurrentState { self }
12601}
12602
12603impl AsRef<GetCurrentState> for RTDGetCurrentStateBuilder {
12604 fn as_ref(&self) -> &GetCurrentState { &self.inner }
12605}
12606
12607
12608
12609
12610
12611
12612
12613#[derive(Debug, Clone, Default, Serialize, Deserialize)]
12615pub struct GetDatabaseStatistics {
12616 #[doc(hidden)]
12617 #[serde(rename(serialize = "@type", deserialize = "@type"))]
12618 td_name: String,
12619 #[doc(hidden)]
12620 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
12621 extra: Option<String>,
12622
12623}
12624
12625impl RObject for GetDatabaseStatistics {
12626 #[doc(hidden)] fn td_name(&self) -> &'static str { "getDatabaseStatistics" }
12627 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
12628 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
12629}
12630
12631
12632
12633
12634impl RFunction for GetDatabaseStatistics {}
12635
12636impl GetDatabaseStatistics {
12637 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
12638 pub fn builder() -> RTDGetDatabaseStatisticsBuilder {
12639 let mut inner = GetDatabaseStatistics::default();
12640 inner.td_name = "getDatabaseStatistics".to_string();
12641 inner.extra = Some(Uuid::new_v4().to_string());
12642 RTDGetDatabaseStatisticsBuilder { inner }
12643 }
12644
12645}
12646
12647#[doc(hidden)]
12648pub struct RTDGetDatabaseStatisticsBuilder {
12649 inner: GetDatabaseStatistics
12650}
12651
12652impl RTDGetDatabaseStatisticsBuilder {
12653 pub fn build(&self) -> GetDatabaseStatistics { self.inner.clone() }
12654
12655}
12656
12657impl AsRef<GetDatabaseStatistics> for GetDatabaseStatistics {
12658 fn as_ref(&self) -> &GetDatabaseStatistics { self }
12659}
12660
12661impl AsRef<GetDatabaseStatistics> for RTDGetDatabaseStatisticsBuilder {
12662 fn as_ref(&self) -> &GetDatabaseStatistics { &self.inner }
12663}
12664
12665
12666
12667
12668
12669
12670
12671#[derive(Debug, Clone, Default, Serialize, Deserialize)]
12673pub struct GetDeepLinkInfo {
12674 #[doc(hidden)]
12675 #[serde(rename(serialize = "@type", deserialize = "@type"))]
12676 td_name: String,
12677 #[doc(hidden)]
12678 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
12679 extra: Option<String>,
12680 link: String,
12682
12683}
12684
12685impl RObject for GetDeepLinkInfo {
12686 #[doc(hidden)] fn td_name(&self) -> &'static str { "getDeepLinkInfo" }
12687 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
12688 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
12689}
12690
12691
12692
12693
12694impl RFunction for GetDeepLinkInfo {}
12695
12696impl GetDeepLinkInfo {
12697 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
12698 pub fn builder() -> RTDGetDeepLinkInfoBuilder {
12699 let mut inner = GetDeepLinkInfo::default();
12700 inner.td_name = "getDeepLinkInfo".to_string();
12701 inner.extra = Some(Uuid::new_v4().to_string());
12702 RTDGetDeepLinkInfoBuilder { inner }
12703 }
12704
12705 pub fn link(&self) -> &String { &self.link }
12706
12707}
12708
12709#[doc(hidden)]
12710pub struct RTDGetDeepLinkInfoBuilder {
12711 inner: GetDeepLinkInfo
12712}
12713
12714impl RTDGetDeepLinkInfoBuilder {
12715 pub fn build(&self) -> GetDeepLinkInfo { self.inner.clone() }
12716
12717
12718 pub fn link<T: AsRef<str>>(&mut self, link: T) -> &mut Self {
12719 self.inner.link = link.as_ref().to_string();
12720 self
12721 }
12722
12723}
12724
12725impl AsRef<GetDeepLinkInfo> for GetDeepLinkInfo {
12726 fn as_ref(&self) -> &GetDeepLinkInfo { self }
12727}
12728
12729impl AsRef<GetDeepLinkInfo> for RTDGetDeepLinkInfoBuilder {
12730 fn as_ref(&self) -> &GetDeepLinkInfo { &self.inner }
12731}
12732
12733
12734
12735
12736
12737
12738
12739#[derive(Debug, Clone, Default, Serialize, Deserialize)]
12741pub struct GetEmojiSuggestionsUrl {
12742 #[doc(hidden)]
12743 #[serde(rename(serialize = "@type", deserialize = "@type"))]
12744 td_name: String,
12745 #[doc(hidden)]
12746 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
12747 extra: Option<String>,
12748 language_code: String,
12750
12751}
12752
12753impl RObject for GetEmojiSuggestionsUrl {
12754 #[doc(hidden)] fn td_name(&self) -> &'static str { "getEmojiSuggestionsUrl" }
12755 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
12756 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
12757}
12758
12759
12760
12761
12762impl RFunction for GetEmojiSuggestionsUrl {}
12763
12764impl GetEmojiSuggestionsUrl {
12765 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
12766 pub fn builder() -> RTDGetEmojiSuggestionsUrlBuilder {
12767 let mut inner = GetEmojiSuggestionsUrl::default();
12768 inner.td_name = "getEmojiSuggestionsUrl".to_string();
12769 inner.extra = Some(Uuid::new_v4().to_string());
12770 RTDGetEmojiSuggestionsUrlBuilder { inner }
12771 }
12772
12773 pub fn language_code(&self) -> &String { &self.language_code }
12774
12775}
12776
12777#[doc(hidden)]
12778pub struct RTDGetEmojiSuggestionsUrlBuilder {
12779 inner: GetEmojiSuggestionsUrl
12780}
12781
12782impl RTDGetEmojiSuggestionsUrlBuilder {
12783 pub fn build(&self) -> GetEmojiSuggestionsUrl { self.inner.clone() }
12784
12785
12786 pub fn language_code<T: AsRef<str>>(&mut self, language_code: T) -> &mut Self {
12787 self.inner.language_code = language_code.as_ref().to_string();
12788 self
12789 }
12790
12791}
12792
12793impl AsRef<GetEmojiSuggestionsUrl> for GetEmojiSuggestionsUrl {
12794 fn as_ref(&self) -> &GetEmojiSuggestionsUrl { self }
12795}
12796
12797impl AsRef<GetEmojiSuggestionsUrl> for RTDGetEmojiSuggestionsUrlBuilder {
12798 fn as_ref(&self) -> &GetEmojiSuggestionsUrl { &self.inner }
12799}
12800
12801
12802
12803
12804
12805
12806
12807#[derive(Debug, Clone, Default, Serialize, Deserialize)]
12809pub struct GetExternalLink {
12810 #[doc(hidden)]
12811 #[serde(rename(serialize = "@type", deserialize = "@type"))]
12812 td_name: String,
12813 #[doc(hidden)]
12814 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
12815 extra: Option<String>,
12816 link: String,
12818 allow_write_access: bool,
12820
12821}
12822
12823impl RObject for GetExternalLink {
12824 #[doc(hidden)] fn td_name(&self) -> &'static str { "getExternalLink" }
12825 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
12826 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
12827}
12828
12829
12830
12831
12832impl RFunction for GetExternalLink {}
12833
12834impl GetExternalLink {
12835 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
12836 pub fn builder() -> RTDGetExternalLinkBuilder {
12837 let mut inner = GetExternalLink::default();
12838 inner.td_name = "getExternalLink".to_string();
12839 inner.extra = Some(Uuid::new_v4().to_string());
12840 RTDGetExternalLinkBuilder { inner }
12841 }
12842
12843 pub fn link(&self) -> &String { &self.link }
12844
12845 pub fn allow_write_access(&self) -> bool { self.allow_write_access }
12846
12847}
12848
12849#[doc(hidden)]
12850pub struct RTDGetExternalLinkBuilder {
12851 inner: GetExternalLink
12852}
12853
12854impl RTDGetExternalLinkBuilder {
12855 pub fn build(&self) -> GetExternalLink { self.inner.clone() }
12856
12857
12858 pub fn link<T: AsRef<str>>(&mut self, link: T) -> &mut Self {
12859 self.inner.link = link.as_ref().to_string();
12860 self
12861 }
12862
12863
12864 pub fn allow_write_access(&mut self, allow_write_access: bool) -> &mut Self {
12865 self.inner.allow_write_access = allow_write_access;
12866 self
12867 }
12868
12869}
12870
12871impl AsRef<GetExternalLink> for GetExternalLink {
12872 fn as_ref(&self) -> &GetExternalLink { self }
12873}
12874
12875impl AsRef<GetExternalLink> for RTDGetExternalLinkBuilder {
12876 fn as_ref(&self) -> &GetExternalLink { &self.inner }
12877}
12878
12879
12880
12881
12882
12883
12884
12885#[derive(Debug, Clone, Default, Serialize, Deserialize)]
12887pub struct GetExternalLinkInfo {
12888 #[doc(hidden)]
12889 #[serde(rename(serialize = "@type", deserialize = "@type"))]
12890 td_name: String,
12891 #[doc(hidden)]
12892 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
12893 extra: Option<String>,
12894 link: String,
12896
12897}
12898
12899impl RObject for GetExternalLinkInfo {
12900 #[doc(hidden)] fn td_name(&self) -> &'static str { "getExternalLinkInfo" }
12901 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
12902 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
12903}
12904
12905
12906impl TDLoginUrlInfo for GetExternalLinkInfo {}
12907
12908impl RFunction for GetExternalLinkInfo {}
12909
12910impl GetExternalLinkInfo {
12911 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
12912 pub fn builder() -> RTDGetExternalLinkInfoBuilder {
12913 let mut inner = GetExternalLinkInfo::default();
12914 inner.td_name = "getExternalLinkInfo".to_string();
12915 inner.extra = Some(Uuid::new_v4().to_string());
12916 RTDGetExternalLinkInfoBuilder { inner }
12917 }
12918
12919 pub fn link(&self) -> &String { &self.link }
12920
12921}
12922
12923#[doc(hidden)]
12924pub struct RTDGetExternalLinkInfoBuilder {
12925 inner: GetExternalLinkInfo
12926}
12927
12928impl RTDGetExternalLinkInfoBuilder {
12929 pub fn build(&self) -> GetExternalLinkInfo { self.inner.clone() }
12930
12931
12932 pub fn link<T: AsRef<str>>(&mut self, link: T) -> &mut Self {
12933 self.inner.link = link.as_ref().to_string();
12934 self
12935 }
12936
12937}
12938
12939impl AsRef<GetExternalLinkInfo> for GetExternalLinkInfo {
12940 fn as_ref(&self) -> &GetExternalLinkInfo { self }
12941}
12942
12943impl AsRef<GetExternalLinkInfo> for RTDGetExternalLinkInfoBuilder {
12944 fn as_ref(&self) -> &GetExternalLinkInfo { &self.inner }
12945}
12946
12947
12948
12949
12950
12951
12952
12953#[derive(Debug, Clone, Default, Serialize, Deserialize)]
12955pub struct GetFavoriteStickers {
12956 #[doc(hidden)]
12957 #[serde(rename(serialize = "@type", deserialize = "@type"))]
12958 td_name: String,
12959 #[doc(hidden)]
12960 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
12961 extra: Option<String>,
12962
12963}
12964
12965impl RObject for GetFavoriteStickers {
12966 #[doc(hidden)] fn td_name(&self) -> &'static str { "getFavoriteStickers" }
12967 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
12968 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
12969}
12970
12971
12972
12973
12974impl RFunction for GetFavoriteStickers {}
12975
12976impl GetFavoriteStickers {
12977 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
12978 pub fn builder() -> RTDGetFavoriteStickersBuilder {
12979 let mut inner = GetFavoriteStickers::default();
12980 inner.td_name = "getFavoriteStickers".to_string();
12981 inner.extra = Some(Uuid::new_v4().to_string());
12982 RTDGetFavoriteStickersBuilder { inner }
12983 }
12984
12985}
12986
12987#[doc(hidden)]
12988pub struct RTDGetFavoriteStickersBuilder {
12989 inner: GetFavoriteStickers
12990}
12991
12992impl RTDGetFavoriteStickersBuilder {
12993 pub fn build(&self) -> GetFavoriteStickers { self.inner.clone() }
12994
12995}
12996
12997impl AsRef<GetFavoriteStickers> for GetFavoriteStickers {
12998 fn as_ref(&self) -> &GetFavoriteStickers { self }
12999}
13000
13001impl AsRef<GetFavoriteStickers> for RTDGetFavoriteStickersBuilder {
13002 fn as_ref(&self) -> &GetFavoriteStickers { &self.inner }
13003}
13004
13005
13006
13007
13008
13009
13010
13011#[derive(Debug, Clone, Default, Serialize, Deserialize)]
13013pub struct GetFile {
13014 #[doc(hidden)]
13015 #[serde(rename(serialize = "@type", deserialize = "@type"))]
13016 td_name: String,
13017 #[doc(hidden)]
13018 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
13019 extra: Option<String>,
13020 file_id: i64,
13022
13023}
13024
13025impl RObject for GetFile {
13026 #[doc(hidden)] fn td_name(&self) -> &'static str { "getFile" }
13027 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
13028 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
13029}
13030
13031
13032
13033
13034impl RFunction for GetFile {}
13035
13036impl GetFile {
13037 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
13038 pub fn builder() -> RTDGetFileBuilder {
13039 let mut inner = GetFile::default();
13040 inner.td_name = "getFile".to_string();
13041 inner.extra = Some(Uuid::new_v4().to_string());
13042 RTDGetFileBuilder { inner }
13043 }
13044
13045 pub fn file_id(&self) -> i64 { self.file_id }
13046
13047}
13048
13049#[doc(hidden)]
13050pub struct RTDGetFileBuilder {
13051 inner: GetFile
13052}
13053
13054impl RTDGetFileBuilder {
13055 pub fn build(&self) -> GetFile { self.inner.clone() }
13056
13057
13058 pub fn file_id(&mut self, file_id: i64) -> &mut Self {
13059 self.inner.file_id = file_id;
13060 self
13061 }
13062
13063}
13064
13065impl AsRef<GetFile> for GetFile {
13066 fn as_ref(&self) -> &GetFile { self }
13067}
13068
13069impl AsRef<GetFile> for RTDGetFileBuilder {
13070 fn as_ref(&self) -> &GetFile { &self.inner }
13071}
13072
13073
13074
13075
13076
13077
13078
13079#[derive(Debug, Clone, Default, Serialize, Deserialize)]
13081pub struct GetFileDownloadedPrefixSize {
13082 #[doc(hidden)]
13083 #[serde(rename(serialize = "@type", deserialize = "@type"))]
13084 td_name: String,
13085 #[doc(hidden)]
13086 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
13087 extra: Option<String>,
13088 file_id: i64,
13090 offset: i64,
13092
13093}
13094
13095impl RObject for GetFileDownloadedPrefixSize {
13096 #[doc(hidden)] fn td_name(&self) -> &'static str { "getFileDownloadedPrefixSize" }
13097 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
13098 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
13099}
13100
13101
13102
13103
13104impl RFunction for GetFileDownloadedPrefixSize {}
13105
13106impl GetFileDownloadedPrefixSize {
13107 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
13108 pub fn builder() -> RTDGetFileDownloadedPrefixSizeBuilder {
13109 let mut inner = GetFileDownloadedPrefixSize::default();
13110 inner.td_name = "getFileDownloadedPrefixSize".to_string();
13111 inner.extra = Some(Uuid::new_v4().to_string());
13112 RTDGetFileDownloadedPrefixSizeBuilder { inner }
13113 }
13114
13115 pub fn file_id(&self) -> i64 { self.file_id }
13116
13117 pub fn offset(&self) -> i64 { self.offset }
13118
13119}
13120
13121#[doc(hidden)]
13122pub struct RTDGetFileDownloadedPrefixSizeBuilder {
13123 inner: GetFileDownloadedPrefixSize
13124}
13125
13126impl RTDGetFileDownloadedPrefixSizeBuilder {
13127 pub fn build(&self) -> GetFileDownloadedPrefixSize { self.inner.clone() }
13128
13129
13130 pub fn file_id(&mut self, file_id: i64) -> &mut Self {
13131 self.inner.file_id = file_id;
13132 self
13133 }
13134
13135
13136 pub fn offset(&mut self, offset: i64) -> &mut Self {
13137 self.inner.offset = offset;
13138 self
13139 }
13140
13141}
13142
13143impl AsRef<GetFileDownloadedPrefixSize> for GetFileDownloadedPrefixSize {
13144 fn as_ref(&self) -> &GetFileDownloadedPrefixSize { self }
13145}
13146
13147impl AsRef<GetFileDownloadedPrefixSize> for RTDGetFileDownloadedPrefixSizeBuilder {
13148 fn as_ref(&self) -> &GetFileDownloadedPrefixSize { &self.inner }
13149}
13150
13151
13152
13153
13154
13155
13156
13157#[derive(Debug, Clone, Default, Serialize, Deserialize)]
13159pub struct GetFileExtension {
13160 #[doc(hidden)]
13161 #[serde(rename(serialize = "@type", deserialize = "@type"))]
13162 td_name: String,
13163 #[doc(hidden)]
13164 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
13165 extra: Option<String>,
13166 mime_type: String,
13168
13169}
13170
13171impl RObject for GetFileExtension {
13172 #[doc(hidden)] fn td_name(&self) -> &'static str { "getFileExtension" }
13173 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
13174 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
13175}
13176
13177
13178
13179
13180impl RFunction for GetFileExtension {}
13181
13182impl GetFileExtension {
13183 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
13184 pub fn builder() -> RTDGetFileExtensionBuilder {
13185 let mut inner = GetFileExtension::default();
13186 inner.td_name = "getFileExtension".to_string();
13187 inner.extra = Some(Uuid::new_v4().to_string());
13188 RTDGetFileExtensionBuilder { inner }
13189 }
13190
13191 pub fn mime_type(&self) -> &String { &self.mime_type }
13192
13193}
13194
13195#[doc(hidden)]
13196pub struct RTDGetFileExtensionBuilder {
13197 inner: GetFileExtension
13198}
13199
13200impl RTDGetFileExtensionBuilder {
13201 pub fn build(&self) -> GetFileExtension { self.inner.clone() }
13202
13203
13204 pub fn mime_type<T: AsRef<str>>(&mut self, mime_type: T) -> &mut Self {
13205 self.inner.mime_type = mime_type.as_ref().to_string();
13206 self
13207 }
13208
13209}
13210
13211impl AsRef<GetFileExtension> for GetFileExtension {
13212 fn as_ref(&self) -> &GetFileExtension { self }
13213}
13214
13215impl AsRef<GetFileExtension> for RTDGetFileExtensionBuilder {
13216 fn as_ref(&self) -> &GetFileExtension { &self.inner }
13217}
13218
13219
13220
13221
13222
13223
13224
13225#[derive(Debug, Clone, Default, Serialize, Deserialize)]
13227pub struct GetFileMimeType {
13228 #[doc(hidden)]
13229 #[serde(rename(serialize = "@type", deserialize = "@type"))]
13230 td_name: String,
13231 #[doc(hidden)]
13232 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
13233 extra: Option<String>,
13234 file_name: String,
13236
13237}
13238
13239impl RObject for GetFileMimeType {
13240 #[doc(hidden)] fn td_name(&self) -> &'static str { "getFileMimeType" }
13241 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
13242 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
13243}
13244
13245
13246
13247
13248impl RFunction for GetFileMimeType {}
13249
13250impl GetFileMimeType {
13251 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
13252 pub fn builder() -> RTDGetFileMimeTypeBuilder {
13253 let mut inner = GetFileMimeType::default();
13254 inner.td_name = "getFileMimeType".to_string();
13255 inner.extra = Some(Uuid::new_v4().to_string());
13256 RTDGetFileMimeTypeBuilder { inner }
13257 }
13258
13259 pub fn file_name(&self) -> &String { &self.file_name }
13260
13261}
13262
13263#[doc(hidden)]
13264pub struct RTDGetFileMimeTypeBuilder {
13265 inner: GetFileMimeType
13266}
13267
13268impl RTDGetFileMimeTypeBuilder {
13269 pub fn build(&self) -> GetFileMimeType { self.inner.clone() }
13270
13271
13272 pub fn file_name<T: AsRef<str>>(&mut self, file_name: T) -> &mut Self {
13273 self.inner.file_name = file_name.as_ref().to_string();
13274 self
13275 }
13276
13277}
13278
13279impl AsRef<GetFileMimeType> for GetFileMimeType {
13280 fn as_ref(&self) -> &GetFileMimeType { self }
13281}
13282
13283impl AsRef<GetFileMimeType> for RTDGetFileMimeTypeBuilder {
13284 fn as_ref(&self) -> &GetFileMimeType { &self.inner }
13285}
13286
13287
13288
13289
13290
13291
13292
13293#[derive(Debug, Clone, Default, Serialize, Deserialize)]
13295pub struct GetGameHighScores {
13296 #[doc(hidden)]
13297 #[serde(rename(serialize = "@type", deserialize = "@type"))]
13298 td_name: String,
13299 #[doc(hidden)]
13300 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
13301 extra: Option<String>,
13302 chat_id: i64,
13304 message_id: i64,
13306 user_id: i64,
13308
13309}
13310
13311impl RObject for GetGameHighScores {
13312 #[doc(hidden)] fn td_name(&self) -> &'static str { "getGameHighScores" }
13313 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
13314 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
13315}
13316
13317
13318
13319
13320impl RFunction for GetGameHighScores {}
13321
13322impl GetGameHighScores {
13323 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
13324 pub fn builder() -> RTDGetGameHighScoresBuilder {
13325 let mut inner = GetGameHighScores::default();
13326 inner.td_name = "getGameHighScores".to_string();
13327 inner.extra = Some(Uuid::new_v4().to_string());
13328 RTDGetGameHighScoresBuilder { inner }
13329 }
13330
13331 pub fn chat_id(&self) -> i64 { self.chat_id }
13332
13333 pub fn message_id(&self) -> i64 { self.message_id }
13334
13335 pub fn user_id(&self) -> i64 { self.user_id }
13336
13337}
13338
13339#[doc(hidden)]
13340pub struct RTDGetGameHighScoresBuilder {
13341 inner: GetGameHighScores
13342}
13343
13344impl RTDGetGameHighScoresBuilder {
13345 pub fn build(&self) -> GetGameHighScores { self.inner.clone() }
13346
13347
13348 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
13349 self.inner.chat_id = chat_id;
13350 self
13351 }
13352
13353
13354 pub fn message_id(&mut self, message_id: i64) -> &mut Self {
13355 self.inner.message_id = message_id;
13356 self
13357 }
13358
13359
13360 pub fn user_id(&mut self, user_id: i64) -> &mut Self {
13361 self.inner.user_id = user_id;
13362 self
13363 }
13364
13365}
13366
13367impl AsRef<GetGameHighScores> for GetGameHighScores {
13368 fn as_ref(&self) -> &GetGameHighScores { self }
13369}
13370
13371impl AsRef<GetGameHighScores> for RTDGetGameHighScoresBuilder {
13372 fn as_ref(&self) -> &GetGameHighScores { &self.inner }
13373}
13374
13375
13376
13377
13378
13379
13380
13381#[derive(Debug, Clone, Default, Serialize, Deserialize)]
13383pub struct GetGroupCall {
13384 #[doc(hidden)]
13385 #[serde(rename(serialize = "@type", deserialize = "@type"))]
13386 td_name: String,
13387 #[doc(hidden)]
13388 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
13389 extra: Option<String>,
13390 group_call_id: i64,
13392
13393}
13394
13395impl RObject for GetGroupCall {
13396 #[doc(hidden)] fn td_name(&self) -> &'static str { "getGroupCall" }
13397 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
13398 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
13399}
13400
13401
13402
13403
13404impl RFunction for GetGroupCall {}
13405
13406impl GetGroupCall {
13407 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
13408 pub fn builder() -> RTDGetGroupCallBuilder {
13409 let mut inner = GetGroupCall::default();
13410 inner.td_name = "getGroupCall".to_string();
13411 inner.extra = Some(Uuid::new_v4().to_string());
13412 RTDGetGroupCallBuilder { inner }
13413 }
13414
13415 pub fn group_call_id(&self) -> i64 { self.group_call_id }
13416
13417}
13418
13419#[doc(hidden)]
13420pub struct RTDGetGroupCallBuilder {
13421 inner: GetGroupCall
13422}
13423
13424impl RTDGetGroupCallBuilder {
13425 pub fn build(&self) -> GetGroupCall { self.inner.clone() }
13426
13427
13428 pub fn group_call_id(&mut self, group_call_id: i64) -> &mut Self {
13429 self.inner.group_call_id = group_call_id;
13430 self
13431 }
13432
13433}
13434
13435impl AsRef<GetGroupCall> for GetGroupCall {
13436 fn as_ref(&self) -> &GetGroupCall { self }
13437}
13438
13439impl AsRef<GetGroupCall> for RTDGetGroupCallBuilder {
13440 fn as_ref(&self) -> &GetGroupCall { &self.inner }
13441}
13442
13443
13444
13445
13446
13447
13448
13449#[derive(Debug, Clone, Default, Serialize, Deserialize)]
13451pub struct GetGroupCallInviteLink {
13452 #[doc(hidden)]
13453 #[serde(rename(serialize = "@type", deserialize = "@type"))]
13454 td_name: String,
13455 #[doc(hidden)]
13456 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
13457 extra: Option<String>,
13458 group_call_id: i64,
13460 can_self_unmute: bool,
13462
13463}
13464
13465impl RObject for GetGroupCallInviteLink {
13466 #[doc(hidden)] fn td_name(&self) -> &'static str { "getGroupCallInviteLink" }
13467 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
13468 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
13469}
13470
13471
13472
13473
13474impl RFunction for GetGroupCallInviteLink {}
13475
13476impl GetGroupCallInviteLink {
13477 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
13478 pub fn builder() -> RTDGetGroupCallInviteLinkBuilder {
13479 let mut inner = GetGroupCallInviteLink::default();
13480 inner.td_name = "getGroupCallInviteLink".to_string();
13481 inner.extra = Some(Uuid::new_v4().to_string());
13482 RTDGetGroupCallInviteLinkBuilder { inner }
13483 }
13484
13485 pub fn group_call_id(&self) -> i64 { self.group_call_id }
13486
13487 pub fn can_self_unmute(&self) -> bool { self.can_self_unmute }
13488
13489}
13490
13491#[doc(hidden)]
13492pub struct RTDGetGroupCallInviteLinkBuilder {
13493 inner: GetGroupCallInviteLink
13494}
13495
13496impl RTDGetGroupCallInviteLinkBuilder {
13497 pub fn build(&self) -> GetGroupCallInviteLink { self.inner.clone() }
13498
13499
13500 pub fn group_call_id(&mut self, group_call_id: i64) -> &mut Self {
13501 self.inner.group_call_id = group_call_id;
13502 self
13503 }
13504
13505
13506 pub fn can_self_unmute(&mut self, can_self_unmute: bool) -> &mut Self {
13507 self.inner.can_self_unmute = can_self_unmute;
13508 self
13509 }
13510
13511}
13512
13513impl AsRef<GetGroupCallInviteLink> for GetGroupCallInviteLink {
13514 fn as_ref(&self) -> &GetGroupCallInviteLink { self }
13515}
13516
13517impl AsRef<GetGroupCallInviteLink> for RTDGetGroupCallInviteLinkBuilder {
13518 fn as_ref(&self) -> &GetGroupCallInviteLink { &self.inner }
13519}
13520
13521
13522
13523
13524
13525
13526
13527#[derive(Debug, Clone, Default, Serialize, Deserialize)]
13529pub struct GetGroupCallStreamSegment {
13530 #[doc(hidden)]
13531 #[serde(rename(serialize = "@type", deserialize = "@type"))]
13532 td_name: String,
13533 #[doc(hidden)]
13534 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
13535 extra: Option<String>,
13536 group_call_id: i64,
13538 time_offset: i64,
13540 scale: i64,
13542 channel_id: i64,
13544 video_quality: GroupCallVideoQuality,
13546
13547}
13548
13549impl RObject for GetGroupCallStreamSegment {
13550 #[doc(hidden)] fn td_name(&self) -> &'static str { "getGroupCallStreamSegment" }
13551 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
13552 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
13553}
13554
13555
13556
13557
13558impl RFunction for GetGroupCallStreamSegment {}
13559
13560impl GetGroupCallStreamSegment {
13561 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
13562 pub fn builder() -> RTDGetGroupCallStreamSegmentBuilder {
13563 let mut inner = GetGroupCallStreamSegment::default();
13564 inner.td_name = "getGroupCallStreamSegment".to_string();
13565 inner.extra = Some(Uuid::new_v4().to_string());
13566 RTDGetGroupCallStreamSegmentBuilder { inner }
13567 }
13568
13569 pub fn group_call_id(&self) -> i64 { self.group_call_id }
13570
13571 pub fn time_offset(&self) -> i64 { self.time_offset }
13572
13573 pub fn scale(&self) -> i64 { self.scale }
13574
13575 pub fn channel_id(&self) -> i64 { self.channel_id }
13576
13577 pub fn video_quality(&self) -> &GroupCallVideoQuality { &self.video_quality }
13578
13579}
13580
13581#[doc(hidden)]
13582pub struct RTDGetGroupCallStreamSegmentBuilder {
13583 inner: GetGroupCallStreamSegment
13584}
13585
13586impl RTDGetGroupCallStreamSegmentBuilder {
13587 pub fn build(&self) -> GetGroupCallStreamSegment { self.inner.clone() }
13588
13589
13590 pub fn group_call_id(&mut self, group_call_id: i64) -> &mut Self {
13591 self.inner.group_call_id = group_call_id;
13592 self
13593 }
13594
13595
13596 pub fn time_offset(&mut self, time_offset: i64) -> &mut Self {
13597 self.inner.time_offset = time_offset;
13598 self
13599 }
13600
13601
13602 pub fn scale(&mut self, scale: i64) -> &mut Self {
13603 self.inner.scale = scale;
13604 self
13605 }
13606
13607
13608 pub fn channel_id(&mut self, channel_id: i64) -> &mut Self {
13609 self.inner.channel_id = channel_id;
13610 self
13611 }
13612
13613
13614 pub fn video_quality<T: AsRef<GroupCallVideoQuality>>(&mut self, video_quality: T) -> &mut Self {
13615 self.inner.video_quality = video_quality.as_ref().clone();
13616 self
13617 }
13618
13619}
13620
13621impl AsRef<GetGroupCallStreamSegment> for GetGroupCallStreamSegment {
13622 fn as_ref(&self) -> &GetGroupCallStreamSegment { self }
13623}
13624
13625impl AsRef<GetGroupCallStreamSegment> for RTDGetGroupCallStreamSegmentBuilder {
13626 fn as_ref(&self) -> &GetGroupCallStreamSegment { &self.inner }
13627}
13628
13629
13630
13631
13632
13633
13634
13635#[derive(Debug, Clone, Default, Serialize, Deserialize)]
13637pub struct GetGroupsInCommon {
13638 #[doc(hidden)]
13639 #[serde(rename(serialize = "@type", deserialize = "@type"))]
13640 td_name: String,
13641 #[doc(hidden)]
13642 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
13643 extra: Option<String>,
13644 user_id: i64,
13646 offset_chat_id: i64,
13648 limit: i64,
13650
13651}
13652
13653impl RObject for GetGroupsInCommon {
13654 #[doc(hidden)] fn td_name(&self) -> &'static str { "getGroupsInCommon" }
13655 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
13656 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
13657}
13658
13659
13660
13661
13662impl RFunction for GetGroupsInCommon {}
13663
13664impl GetGroupsInCommon {
13665 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
13666 pub fn builder() -> RTDGetGroupsInCommonBuilder {
13667 let mut inner = GetGroupsInCommon::default();
13668 inner.td_name = "getGroupsInCommon".to_string();
13669 inner.extra = Some(Uuid::new_v4().to_string());
13670 RTDGetGroupsInCommonBuilder { inner }
13671 }
13672
13673 pub fn user_id(&self) -> i64 { self.user_id }
13674
13675 pub fn offset_chat_id(&self) -> i64 { self.offset_chat_id }
13676
13677 pub fn limit(&self) -> i64 { self.limit }
13678
13679}
13680
13681#[doc(hidden)]
13682pub struct RTDGetGroupsInCommonBuilder {
13683 inner: GetGroupsInCommon
13684}
13685
13686impl RTDGetGroupsInCommonBuilder {
13687 pub fn build(&self) -> GetGroupsInCommon { self.inner.clone() }
13688
13689
13690 pub fn user_id(&mut self, user_id: i64) -> &mut Self {
13691 self.inner.user_id = user_id;
13692 self
13693 }
13694
13695
13696 pub fn offset_chat_id(&mut self, offset_chat_id: i64) -> &mut Self {
13697 self.inner.offset_chat_id = offset_chat_id;
13698 self
13699 }
13700
13701
13702 pub fn limit(&mut self, limit: i64) -> &mut Self {
13703 self.inner.limit = limit;
13704 self
13705 }
13706
13707}
13708
13709impl AsRef<GetGroupsInCommon> for GetGroupsInCommon {
13710 fn as_ref(&self) -> &GetGroupsInCommon { self }
13711}
13712
13713impl AsRef<GetGroupsInCommon> for RTDGetGroupsInCommonBuilder {
13714 fn as_ref(&self) -> &GetGroupsInCommon { &self.inner }
13715}
13716
13717
13718
13719
13720
13721
13722
13723#[derive(Debug, Clone, Default, Serialize, Deserialize)]
13725pub struct GetImportedContactCount {
13726 #[doc(hidden)]
13727 #[serde(rename(serialize = "@type", deserialize = "@type"))]
13728 td_name: String,
13729 #[doc(hidden)]
13730 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
13731 extra: Option<String>,
13732
13733}
13734
13735impl RObject for GetImportedContactCount {
13736 #[doc(hidden)] fn td_name(&self) -> &'static str { "getImportedContactCount" }
13737 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
13738 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
13739}
13740
13741
13742
13743
13744impl RFunction for GetImportedContactCount {}
13745
13746impl GetImportedContactCount {
13747 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
13748 pub fn builder() -> RTDGetImportedContactCountBuilder {
13749 let mut inner = GetImportedContactCount::default();
13750 inner.td_name = "getImportedContactCount".to_string();
13751 inner.extra = Some(Uuid::new_v4().to_string());
13752 RTDGetImportedContactCountBuilder { inner }
13753 }
13754
13755}
13756
13757#[doc(hidden)]
13758pub struct RTDGetImportedContactCountBuilder {
13759 inner: GetImportedContactCount
13760}
13761
13762impl RTDGetImportedContactCountBuilder {
13763 pub fn build(&self) -> GetImportedContactCount { self.inner.clone() }
13764
13765}
13766
13767impl AsRef<GetImportedContactCount> for GetImportedContactCount {
13768 fn as_ref(&self) -> &GetImportedContactCount { self }
13769}
13770
13771impl AsRef<GetImportedContactCount> for RTDGetImportedContactCountBuilder {
13772 fn as_ref(&self) -> &GetImportedContactCount { &self.inner }
13773}
13774
13775
13776
13777
13778
13779
13780
13781#[derive(Debug, Clone, Default, Serialize, Deserialize)]
13783pub struct GetInactiveSupergroupChats {
13784 #[doc(hidden)]
13785 #[serde(rename(serialize = "@type", deserialize = "@type"))]
13786 td_name: String,
13787 #[doc(hidden)]
13788 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
13789 extra: Option<String>,
13790
13791}
13792
13793impl RObject for GetInactiveSupergroupChats {
13794 #[doc(hidden)] fn td_name(&self) -> &'static str { "getInactiveSupergroupChats" }
13795 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
13796 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
13797}
13798
13799
13800
13801
13802impl RFunction for GetInactiveSupergroupChats {}
13803
13804impl GetInactiveSupergroupChats {
13805 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
13806 pub fn builder() -> RTDGetInactiveSupergroupChatsBuilder {
13807 let mut inner = GetInactiveSupergroupChats::default();
13808 inner.td_name = "getInactiveSupergroupChats".to_string();
13809 inner.extra = Some(Uuid::new_v4().to_string());
13810 RTDGetInactiveSupergroupChatsBuilder { inner }
13811 }
13812
13813}
13814
13815#[doc(hidden)]
13816pub struct RTDGetInactiveSupergroupChatsBuilder {
13817 inner: GetInactiveSupergroupChats
13818}
13819
13820impl RTDGetInactiveSupergroupChatsBuilder {
13821 pub fn build(&self) -> GetInactiveSupergroupChats { self.inner.clone() }
13822
13823}
13824
13825impl AsRef<GetInactiveSupergroupChats> for GetInactiveSupergroupChats {
13826 fn as_ref(&self) -> &GetInactiveSupergroupChats { self }
13827}
13828
13829impl AsRef<GetInactiveSupergroupChats> for RTDGetInactiveSupergroupChatsBuilder {
13830 fn as_ref(&self) -> &GetInactiveSupergroupChats { &self.inner }
13831}
13832
13833
13834
13835
13836
13837
13838
13839#[derive(Debug, Clone, Default, Serialize, Deserialize)]
13841pub struct GetInlineGameHighScores {
13842 #[doc(hidden)]
13843 #[serde(rename(serialize = "@type", deserialize = "@type"))]
13844 td_name: String,
13845 #[doc(hidden)]
13846 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
13847 extra: Option<String>,
13848 inline_message_id: String,
13850 user_id: i64,
13852
13853}
13854
13855impl RObject for GetInlineGameHighScores {
13856 #[doc(hidden)] fn td_name(&self) -> &'static str { "getInlineGameHighScores" }
13857 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
13858 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
13859}
13860
13861
13862
13863
13864impl RFunction for GetInlineGameHighScores {}
13865
13866impl GetInlineGameHighScores {
13867 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
13868 pub fn builder() -> RTDGetInlineGameHighScoresBuilder {
13869 let mut inner = GetInlineGameHighScores::default();
13870 inner.td_name = "getInlineGameHighScores".to_string();
13871 inner.extra = Some(Uuid::new_v4().to_string());
13872 RTDGetInlineGameHighScoresBuilder { inner }
13873 }
13874
13875 pub fn inline_message_id(&self) -> &String { &self.inline_message_id }
13876
13877 pub fn user_id(&self) -> i64 { self.user_id }
13878
13879}
13880
13881#[doc(hidden)]
13882pub struct RTDGetInlineGameHighScoresBuilder {
13883 inner: GetInlineGameHighScores
13884}
13885
13886impl RTDGetInlineGameHighScoresBuilder {
13887 pub fn build(&self) -> GetInlineGameHighScores { self.inner.clone() }
13888
13889
13890 pub fn inline_message_id<T: AsRef<str>>(&mut self, inline_message_id: T) -> &mut Self {
13891 self.inner.inline_message_id = inline_message_id.as_ref().to_string();
13892 self
13893 }
13894
13895
13896 pub fn user_id(&mut self, user_id: i64) -> &mut Self {
13897 self.inner.user_id = user_id;
13898 self
13899 }
13900
13901}
13902
13903impl AsRef<GetInlineGameHighScores> for GetInlineGameHighScores {
13904 fn as_ref(&self) -> &GetInlineGameHighScores { self }
13905}
13906
13907impl AsRef<GetInlineGameHighScores> for RTDGetInlineGameHighScoresBuilder {
13908 fn as_ref(&self) -> &GetInlineGameHighScores { &self.inner }
13909}
13910
13911
13912
13913
13914
13915
13916
13917#[derive(Debug, Clone, Default, Serialize, Deserialize)]
13919pub struct GetInlineQueryResults {
13920 #[doc(hidden)]
13921 #[serde(rename(serialize = "@type", deserialize = "@type"))]
13922 td_name: String,
13923 #[doc(hidden)]
13924 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
13925 extra: Option<String>,
13926 bot_user_id: i64,
13928 chat_id: i64,
13930 user_location: Location,
13932 query: String,
13934 offset: String,
13936
13937}
13938
13939impl RObject for GetInlineQueryResults {
13940 #[doc(hidden)] fn td_name(&self) -> &'static str { "getInlineQueryResults" }
13941 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
13942 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
13943}
13944
13945
13946
13947
13948impl RFunction for GetInlineQueryResults {}
13949
13950impl GetInlineQueryResults {
13951 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
13952 pub fn builder() -> RTDGetInlineQueryResultsBuilder {
13953 let mut inner = GetInlineQueryResults::default();
13954 inner.td_name = "getInlineQueryResults".to_string();
13955 inner.extra = Some(Uuid::new_v4().to_string());
13956 RTDGetInlineQueryResultsBuilder { inner }
13957 }
13958
13959 pub fn bot_user_id(&self) -> i64 { self.bot_user_id }
13960
13961 pub fn chat_id(&self) -> i64 { self.chat_id }
13962
13963 pub fn user_location(&self) -> &Location { &self.user_location }
13964
13965 pub fn query(&self) -> &String { &self.query }
13966
13967 pub fn offset(&self) -> &String { &self.offset }
13968
13969}
13970
13971#[doc(hidden)]
13972pub struct RTDGetInlineQueryResultsBuilder {
13973 inner: GetInlineQueryResults
13974}
13975
13976impl RTDGetInlineQueryResultsBuilder {
13977 pub fn build(&self) -> GetInlineQueryResults { self.inner.clone() }
13978
13979
13980 pub fn bot_user_id(&mut self, bot_user_id: i64) -> &mut Self {
13981 self.inner.bot_user_id = bot_user_id;
13982 self
13983 }
13984
13985
13986 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
13987 self.inner.chat_id = chat_id;
13988 self
13989 }
13990
13991
13992 pub fn user_location<T: AsRef<Location>>(&mut self, user_location: T) -> &mut Self {
13993 self.inner.user_location = user_location.as_ref().clone();
13994 self
13995 }
13996
13997
13998 pub fn query<T: AsRef<str>>(&mut self, query: T) -> &mut Self {
13999 self.inner.query = query.as_ref().to_string();
14000 self
14001 }
14002
14003
14004 pub fn offset<T: AsRef<str>>(&mut self, offset: T) -> &mut Self {
14005 self.inner.offset = offset.as_ref().to_string();
14006 self
14007 }
14008
14009}
14010
14011impl AsRef<GetInlineQueryResults> for GetInlineQueryResults {
14012 fn as_ref(&self) -> &GetInlineQueryResults { self }
14013}
14014
14015impl AsRef<GetInlineQueryResults> for RTDGetInlineQueryResultsBuilder {
14016 fn as_ref(&self) -> &GetInlineQueryResults { &self.inner }
14017}
14018
14019
14020
14021
14022
14023
14024
14025#[derive(Debug, Clone, Default, Serialize, Deserialize)]
14027pub struct GetInstalledStickerSets {
14028 #[doc(hidden)]
14029 #[serde(rename(serialize = "@type", deserialize = "@type"))]
14030 td_name: String,
14031 #[doc(hidden)]
14032 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
14033 extra: Option<String>,
14034 is_masks: bool,
14036
14037}
14038
14039impl RObject for GetInstalledStickerSets {
14040 #[doc(hidden)] fn td_name(&self) -> &'static str { "getInstalledStickerSets" }
14041 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
14042 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
14043}
14044
14045
14046
14047
14048impl RFunction for GetInstalledStickerSets {}
14049
14050impl GetInstalledStickerSets {
14051 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
14052 pub fn builder() -> RTDGetInstalledStickerSetsBuilder {
14053 let mut inner = GetInstalledStickerSets::default();
14054 inner.td_name = "getInstalledStickerSets".to_string();
14055 inner.extra = Some(Uuid::new_v4().to_string());
14056 RTDGetInstalledStickerSetsBuilder { inner }
14057 }
14058
14059 pub fn is_masks(&self) -> bool { self.is_masks }
14060
14061}
14062
14063#[doc(hidden)]
14064pub struct RTDGetInstalledStickerSetsBuilder {
14065 inner: GetInstalledStickerSets
14066}
14067
14068impl RTDGetInstalledStickerSetsBuilder {
14069 pub fn build(&self) -> GetInstalledStickerSets { self.inner.clone() }
14070
14071
14072 pub fn is_masks(&mut self, is_masks: bool) -> &mut Self {
14073 self.inner.is_masks = is_masks;
14074 self
14075 }
14076
14077}
14078
14079impl AsRef<GetInstalledStickerSets> for GetInstalledStickerSets {
14080 fn as_ref(&self) -> &GetInstalledStickerSets { self }
14081}
14082
14083impl AsRef<GetInstalledStickerSets> for RTDGetInstalledStickerSetsBuilder {
14084 fn as_ref(&self) -> &GetInstalledStickerSets { &self.inner }
14085}
14086
14087
14088
14089
14090
14091
14092
14093#[derive(Debug, Clone, Default, Serialize, Deserialize)]
14095pub struct GetInternalLinkType {
14096 #[doc(hidden)]
14097 #[serde(rename(serialize = "@type", deserialize = "@type"))]
14098 td_name: String,
14099 #[doc(hidden)]
14100 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
14101 extra: Option<String>,
14102 link: String,
14104
14105}
14106
14107impl RObject for GetInternalLinkType {
14108 #[doc(hidden)] fn td_name(&self) -> &'static str { "getInternalLinkType" }
14109 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
14110 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
14111}
14112
14113
14114impl TDInternalLinkType for GetInternalLinkType {}
14115
14116impl RFunction for GetInternalLinkType {}
14117
14118impl GetInternalLinkType {
14119 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
14120 pub fn builder() -> RTDGetInternalLinkTypeBuilder {
14121 let mut inner = GetInternalLinkType::default();
14122 inner.td_name = "getInternalLinkType".to_string();
14123 inner.extra = Some(Uuid::new_v4().to_string());
14124 RTDGetInternalLinkTypeBuilder { inner }
14125 }
14126
14127 pub fn link(&self) -> &String { &self.link }
14128
14129}
14130
14131#[doc(hidden)]
14132pub struct RTDGetInternalLinkTypeBuilder {
14133 inner: GetInternalLinkType
14134}
14135
14136impl RTDGetInternalLinkTypeBuilder {
14137 pub fn build(&self) -> GetInternalLinkType { self.inner.clone() }
14138
14139
14140 pub fn link<T: AsRef<str>>(&mut self, link: T) -> &mut Self {
14141 self.inner.link = link.as_ref().to_string();
14142 self
14143 }
14144
14145}
14146
14147impl AsRef<GetInternalLinkType> for GetInternalLinkType {
14148 fn as_ref(&self) -> &GetInternalLinkType { self }
14149}
14150
14151impl AsRef<GetInternalLinkType> for RTDGetInternalLinkTypeBuilder {
14152 fn as_ref(&self) -> &GetInternalLinkType { &self.inner }
14153}
14154
14155
14156
14157
14158
14159
14160
14161#[derive(Debug, Clone, Default, Serialize, Deserialize)]
14163pub struct GetJsonString {
14164 #[doc(hidden)]
14165 #[serde(rename(serialize = "@type", deserialize = "@type"))]
14166 td_name: String,
14167 #[doc(hidden)]
14168 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
14169 extra: Option<String>,
14170 json_value: JsonValue,
14172
14173}
14174
14175impl RObject for GetJsonString {
14176 #[doc(hidden)] fn td_name(&self) -> &'static str { "getJsonString" }
14177 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
14178 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
14179}
14180
14181
14182
14183
14184impl RFunction for GetJsonString {}
14185
14186impl GetJsonString {
14187 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
14188 pub fn builder() -> RTDGetJsonStringBuilder {
14189 let mut inner = GetJsonString::default();
14190 inner.td_name = "getJsonString".to_string();
14191 inner.extra = Some(Uuid::new_v4().to_string());
14192 RTDGetJsonStringBuilder { inner }
14193 }
14194
14195 pub fn json_value(&self) -> &JsonValue { &self.json_value }
14196
14197}
14198
14199#[doc(hidden)]
14200pub struct RTDGetJsonStringBuilder {
14201 inner: GetJsonString
14202}
14203
14204impl RTDGetJsonStringBuilder {
14205 pub fn build(&self) -> GetJsonString { self.inner.clone() }
14206
14207
14208 pub fn json_value<T: AsRef<JsonValue>>(&mut self, json_value: T) -> &mut Self {
14209 self.inner.json_value = json_value.as_ref().clone();
14210 self
14211 }
14212
14213}
14214
14215impl AsRef<GetJsonString> for GetJsonString {
14216 fn as_ref(&self) -> &GetJsonString { self }
14217}
14218
14219impl AsRef<GetJsonString> for RTDGetJsonStringBuilder {
14220 fn as_ref(&self) -> &GetJsonString { &self.inner }
14221}
14222
14223
14224
14225
14226
14227
14228
14229#[derive(Debug, Clone, Default, Serialize, Deserialize)]
14231pub struct GetJsonValue {
14232 #[doc(hidden)]
14233 #[serde(rename(serialize = "@type", deserialize = "@type"))]
14234 td_name: String,
14235 #[doc(hidden)]
14236 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
14237 extra: Option<String>,
14238 json: String,
14240
14241}
14242
14243impl RObject for GetJsonValue {
14244 #[doc(hidden)] fn td_name(&self) -> &'static str { "getJsonValue" }
14245 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
14246 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
14247}
14248
14249
14250impl TDJsonValue for GetJsonValue {}
14251
14252impl RFunction for GetJsonValue {}
14253
14254impl GetJsonValue {
14255 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
14256 pub fn builder() -> RTDGetJsonValueBuilder {
14257 let mut inner = GetJsonValue::default();
14258 inner.td_name = "getJsonValue".to_string();
14259 inner.extra = Some(Uuid::new_v4().to_string());
14260 RTDGetJsonValueBuilder { inner }
14261 }
14262
14263 pub fn json(&self) -> &String { &self.json }
14264
14265}
14266
14267#[doc(hidden)]
14268pub struct RTDGetJsonValueBuilder {
14269 inner: GetJsonValue
14270}
14271
14272impl RTDGetJsonValueBuilder {
14273 pub fn build(&self) -> GetJsonValue { self.inner.clone() }
14274
14275
14276 pub fn json<T: AsRef<str>>(&mut self, json: T) -> &mut Self {
14277 self.inner.json = json.as_ref().to_string();
14278 self
14279 }
14280
14281}
14282
14283impl AsRef<GetJsonValue> for GetJsonValue {
14284 fn as_ref(&self) -> &GetJsonValue { self }
14285}
14286
14287impl AsRef<GetJsonValue> for RTDGetJsonValueBuilder {
14288 fn as_ref(&self) -> &GetJsonValue { &self.inner }
14289}
14290
14291
14292
14293
14294
14295
14296
14297#[derive(Debug, Clone, Default, Serialize, Deserialize)]
14299pub struct GetLanguagePackInfo {
14300 #[doc(hidden)]
14301 #[serde(rename(serialize = "@type", deserialize = "@type"))]
14302 td_name: String,
14303 #[doc(hidden)]
14304 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
14305 extra: Option<String>,
14306 language_pack_id: String,
14308
14309}
14310
14311impl RObject for GetLanguagePackInfo {
14312 #[doc(hidden)] fn td_name(&self) -> &'static str { "getLanguagePackInfo" }
14313 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
14314 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
14315}
14316
14317
14318
14319
14320impl RFunction for GetLanguagePackInfo {}
14321
14322impl GetLanguagePackInfo {
14323 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
14324 pub fn builder() -> RTDGetLanguagePackInfoBuilder {
14325 let mut inner = GetLanguagePackInfo::default();
14326 inner.td_name = "getLanguagePackInfo".to_string();
14327 inner.extra = Some(Uuid::new_v4().to_string());
14328 RTDGetLanguagePackInfoBuilder { inner }
14329 }
14330
14331 pub fn language_pack_id(&self) -> &String { &self.language_pack_id }
14332
14333}
14334
14335#[doc(hidden)]
14336pub struct RTDGetLanguagePackInfoBuilder {
14337 inner: GetLanguagePackInfo
14338}
14339
14340impl RTDGetLanguagePackInfoBuilder {
14341 pub fn build(&self) -> GetLanguagePackInfo { self.inner.clone() }
14342
14343
14344 pub fn language_pack_id<T: AsRef<str>>(&mut self, language_pack_id: T) -> &mut Self {
14345 self.inner.language_pack_id = language_pack_id.as_ref().to_string();
14346 self
14347 }
14348
14349}
14350
14351impl AsRef<GetLanguagePackInfo> for GetLanguagePackInfo {
14352 fn as_ref(&self) -> &GetLanguagePackInfo { self }
14353}
14354
14355impl AsRef<GetLanguagePackInfo> for RTDGetLanguagePackInfoBuilder {
14356 fn as_ref(&self) -> &GetLanguagePackInfo { &self.inner }
14357}
14358
14359
14360
14361
14362
14363
14364
14365#[derive(Debug, Clone, Default, Serialize, Deserialize)]
14367pub struct GetLanguagePackString {
14368 #[doc(hidden)]
14369 #[serde(rename(serialize = "@type", deserialize = "@type"))]
14370 td_name: String,
14371 #[doc(hidden)]
14372 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
14373 extra: Option<String>,
14374 language_pack_database_path: String,
14376 localization_target: String,
14378 language_pack_id: String,
14380 key: String,
14382
14383}
14384
14385impl RObject for GetLanguagePackString {
14386 #[doc(hidden)] fn td_name(&self) -> &'static str { "getLanguagePackString" }
14387 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
14388 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
14389}
14390
14391
14392impl TDLanguagePackStringValue for GetLanguagePackString {}
14393
14394impl RFunction for GetLanguagePackString {}
14395
14396impl GetLanguagePackString {
14397 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
14398 pub fn builder() -> RTDGetLanguagePackStringBuilder {
14399 let mut inner = GetLanguagePackString::default();
14400 inner.td_name = "getLanguagePackString".to_string();
14401 inner.extra = Some(Uuid::new_v4().to_string());
14402 RTDGetLanguagePackStringBuilder { inner }
14403 }
14404
14405 pub fn language_pack_database_path(&self) -> &String { &self.language_pack_database_path }
14406
14407 pub fn localization_target(&self) -> &String { &self.localization_target }
14408
14409 pub fn language_pack_id(&self) -> &String { &self.language_pack_id }
14410
14411 pub fn key(&self) -> &String { &self.key }
14412
14413}
14414
14415#[doc(hidden)]
14416pub struct RTDGetLanguagePackStringBuilder {
14417 inner: GetLanguagePackString
14418}
14419
14420impl RTDGetLanguagePackStringBuilder {
14421 pub fn build(&self) -> GetLanguagePackString { self.inner.clone() }
14422
14423
14424 pub fn language_pack_database_path<T: AsRef<str>>(&mut self, language_pack_database_path: T) -> &mut Self {
14425 self.inner.language_pack_database_path = language_pack_database_path.as_ref().to_string();
14426 self
14427 }
14428
14429
14430 pub fn localization_target<T: AsRef<str>>(&mut self, localization_target: T) -> &mut Self {
14431 self.inner.localization_target = localization_target.as_ref().to_string();
14432 self
14433 }
14434
14435
14436 pub fn language_pack_id<T: AsRef<str>>(&mut self, language_pack_id: T) -> &mut Self {
14437 self.inner.language_pack_id = language_pack_id.as_ref().to_string();
14438 self
14439 }
14440
14441
14442 pub fn key<T: AsRef<str>>(&mut self, key: T) -> &mut Self {
14443 self.inner.key = key.as_ref().to_string();
14444 self
14445 }
14446
14447}
14448
14449impl AsRef<GetLanguagePackString> for GetLanguagePackString {
14450 fn as_ref(&self) -> &GetLanguagePackString { self }
14451}
14452
14453impl AsRef<GetLanguagePackString> for RTDGetLanguagePackStringBuilder {
14454 fn as_ref(&self) -> &GetLanguagePackString { &self.inner }
14455}
14456
14457
14458
14459
14460
14461
14462
14463#[derive(Debug, Clone, Default, Serialize, Deserialize)]
14465pub struct GetLanguagePackStrings {
14466 #[doc(hidden)]
14467 #[serde(rename(serialize = "@type", deserialize = "@type"))]
14468 td_name: String,
14469 #[doc(hidden)]
14470 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
14471 extra: Option<String>,
14472 language_pack_id: String,
14474 keys: Vec<String>,
14476
14477}
14478
14479impl RObject for GetLanguagePackStrings {
14480 #[doc(hidden)] fn td_name(&self) -> &'static str { "getLanguagePackStrings" }
14481 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
14482 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
14483}
14484
14485
14486
14487
14488impl RFunction for GetLanguagePackStrings {}
14489
14490impl GetLanguagePackStrings {
14491 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
14492 pub fn builder() -> RTDGetLanguagePackStringsBuilder {
14493 let mut inner = GetLanguagePackStrings::default();
14494 inner.td_name = "getLanguagePackStrings".to_string();
14495 inner.extra = Some(Uuid::new_v4().to_string());
14496 RTDGetLanguagePackStringsBuilder { inner }
14497 }
14498
14499 pub fn language_pack_id(&self) -> &String { &self.language_pack_id }
14500
14501 pub fn keys(&self) -> &Vec<String> { &self.keys }
14502
14503}
14504
14505#[doc(hidden)]
14506pub struct RTDGetLanguagePackStringsBuilder {
14507 inner: GetLanguagePackStrings
14508}
14509
14510impl RTDGetLanguagePackStringsBuilder {
14511 pub fn build(&self) -> GetLanguagePackStrings { self.inner.clone() }
14512
14513
14514 pub fn language_pack_id<T: AsRef<str>>(&mut self, language_pack_id: T) -> &mut Self {
14515 self.inner.language_pack_id = language_pack_id.as_ref().to_string();
14516 self
14517 }
14518
14519
14520 pub fn keys(&mut self, keys: Vec<String>) -> &mut Self {
14521 self.inner.keys = keys;
14522 self
14523 }
14524
14525}
14526
14527impl AsRef<GetLanguagePackStrings> for GetLanguagePackStrings {
14528 fn as_ref(&self) -> &GetLanguagePackStrings { self }
14529}
14530
14531impl AsRef<GetLanguagePackStrings> for RTDGetLanguagePackStringsBuilder {
14532 fn as_ref(&self) -> &GetLanguagePackStrings { &self.inner }
14533}
14534
14535
14536
14537
14538
14539
14540
14541#[derive(Debug, Clone, Default, Serialize, Deserialize)]
14543pub struct GetLocalizationTargetInfo {
14544 #[doc(hidden)]
14545 #[serde(rename(serialize = "@type", deserialize = "@type"))]
14546 td_name: String,
14547 #[doc(hidden)]
14548 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
14549 extra: Option<String>,
14550 only_local: bool,
14552
14553}
14554
14555impl RObject for GetLocalizationTargetInfo {
14556 #[doc(hidden)] fn td_name(&self) -> &'static str { "getLocalizationTargetInfo" }
14557 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
14558 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
14559}
14560
14561
14562
14563
14564impl RFunction for GetLocalizationTargetInfo {}
14565
14566impl GetLocalizationTargetInfo {
14567 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
14568 pub fn builder() -> RTDGetLocalizationTargetInfoBuilder {
14569 let mut inner = GetLocalizationTargetInfo::default();
14570 inner.td_name = "getLocalizationTargetInfo".to_string();
14571 inner.extra = Some(Uuid::new_v4().to_string());
14572 RTDGetLocalizationTargetInfoBuilder { inner }
14573 }
14574
14575 pub fn only_local(&self) -> bool { self.only_local }
14576
14577}
14578
14579#[doc(hidden)]
14580pub struct RTDGetLocalizationTargetInfoBuilder {
14581 inner: GetLocalizationTargetInfo
14582}
14583
14584impl RTDGetLocalizationTargetInfoBuilder {
14585 pub fn build(&self) -> GetLocalizationTargetInfo { self.inner.clone() }
14586
14587
14588 pub fn only_local(&mut self, only_local: bool) -> &mut Self {
14589 self.inner.only_local = only_local;
14590 self
14591 }
14592
14593}
14594
14595impl AsRef<GetLocalizationTargetInfo> for GetLocalizationTargetInfo {
14596 fn as_ref(&self) -> &GetLocalizationTargetInfo { self }
14597}
14598
14599impl AsRef<GetLocalizationTargetInfo> for RTDGetLocalizationTargetInfoBuilder {
14600 fn as_ref(&self) -> &GetLocalizationTargetInfo { &self.inner }
14601}
14602
14603
14604
14605
14606
14607
14608
14609#[derive(Debug, Clone, Default, Serialize, Deserialize)]
14611pub struct GetLogStream {
14612 #[doc(hidden)]
14613 #[serde(rename(serialize = "@type", deserialize = "@type"))]
14614 td_name: String,
14615 #[doc(hidden)]
14616 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
14617 extra: Option<String>,
14618
14619}
14620
14621impl RObject for GetLogStream {
14622 #[doc(hidden)] fn td_name(&self) -> &'static str { "getLogStream" }
14623 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
14624 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
14625}
14626
14627
14628impl TDLogStream for GetLogStream {}
14629
14630impl RFunction for GetLogStream {}
14631
14632impl GetLogStream {
14633 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
14634 pub fn builder() -> RTDGetLogStreamBuilder {
14635 let mut inner = GetLogStream::default();
14636 inner.td_name = "getLogStream".to_string();
14637 inner.extra = Some(Uuid::new_v4().to_string());
14638 RTDGetLogStreamBuilder { inner }
14639 }
14640
14641}
14642
14643#[doc(hidden)]
14644pub struct RTDGetLogStreamBuilder {
14645 inner: GetLogStream
14646}
14647
14648impl RTDGetLogStreamBuilder {
14649 pub fn build(&self) -> GetLogStream { self.inner.clone() }
14650
14651}
14652
14653impl AsRef<GetLogStream> for GetLogStream {
14654 fn as_ref(&self) -> &GetLogStream { self }
14655}
14656
14657impl AsRef<GetLogStream> for RTDGetLogStreamBuilder {
14658 fn as_ref(&self) -> &GetLogStream { &self.inner }
14659}
14660
14661
14662
14663
14664
14665
14666
14667#[derive(Debug, Clone, Default, Serialize, Deserialize)]
14669pub struct GetLogTagVerbosityLevel {
14670 #[doc(hidden)]
14671 #[serde(rename(serialize = "@type", deserialize = "@type"))]
14672 td_name: String,
14673 #[doc(hidden)]
14674 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
14675 extra: Option<String>,
14676 tag: String,
14678
14679}
14680
14681impl RObject for GetLogTagVerbosityLevel {
14682 #[doc(hidden)] fn td_name(&self) -> &'static str { "getLogTagVerbosityLevel" }
14683 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
14684 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
14685}
14686
14687
14688
14689
14690impl RFunction for GetLogTagVerbosityLevel {}
14691
14692impl GetLogTagVerbosityLevel {
14693 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
14694 pub fn builder() -> RTDGetLogTagVerbosityLevelBuilder {
14695 let mut inner = GetLogTagVerbosityLevel::default();
14696 inner.td_name = "getLogTagVerbosityLevel".to_string();
14697 inner.extra = Some(Uuid::new_v4().to_string());
14698 RTDGetLogTagVerbosityLevelBuilder { inner }
14699 }
14700
14701 pub fn tag(&self) -> &String { &self.tag }
14702
14703}
14704
14705#[doc(hidden)]
14706pub struct RTDGetLogTagVerbosityLevelBuilder {
14707 inner: GetLogTagVerbosityLevel
14708}
14709
14710impl RTDGetLogTagVerbosityLevelBuilder {
14711 pub fn build(&self) -> GetLogTagVerbosityLevel { self.inner.clone() }
14712
14713
14714 pub fn tag<T: AsRef<str>>(&mut self, tag: T) -> &mut Self {
14715 self.inner.tag = tag.as_ref().to_string();
14716 self
14717 }
14718
14719}
14720
14721impl AsRef<GetLogTagVerbosityLevel> for GetLogTagVerbosityLevel {
14722 fn as_ref(&self) -> &GetLogTagVerbosityLevel { self }
14723}
14724
14725impl AsRef<GetLogTagVerbosityLevel> for RTDGetLogTagVerbosityLevelBuilder {
14726 fn as_ref(&self) -> &GetLogTagVerbosityLevel { &self.inner }
14727}
14728
14729
14730
14731
14732
14733
14734
14735#[derive(Debug, Clone, Default, Serialize, Deserialize)]
14737pub struct GetLogTags {
14738 #[doc(hidden)]
14739 #[serde(rename(serialize = "@type", deserialize = "@type"))]
14740 td_name: String,
14741 #[doc(hidden)]
14742 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
14743 extra: Option<String>,
14744
14745}
14746
14747impl RObject for GetLogTags {
14748 #[doc(hidden)] fn td_name(&self) -> &'static str { "getLogTags" }
14749 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
14750 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
14751}
14752
14753
14754
14755
14756impl RFunction for GetLogTags {}
14757
14758impl GetLogTags {
14759 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
14760 pub fn builder() -> RTDGetLogTagsBuilder {
14761 let mut inner = GetLogTags::default();
14762 inner.td_name = "getLogTags".to_string();
14763 inner.extra = Some(Uuid::new_v4().to_string());
14764 RTDGetLogTagsBuilder { inner }
14765 }
14766
14767}
14768
14769#[doc(hidden)]
14770pub struct RTDGetLogTagsBuilder {
14771 inner: GetLogTags
14772}
14773
14774impl RTDGetLogTagsBuilder {
14775 pub fn build(&self) -> GetLogTags { self.inner.clone() }
14776
14777}
14778
14779impl AsRef<GetLogTags> for GetLogTags {
14780 fn as_ref(&self) -> &GetLogTags { self }
14781}
14782
14783impl AsRef<GetLogTags> for RTDGetLogTagsBuilder {
14784 fn as_ref(&self) -> &GetLogTags { &self.inner }
14785}
14786
14787
14788
14789
14790
14791
14792
14793#[derive(Debug, Clone, Default, Serialize, Deserialize)]
14795pub struct GetLogVerbosityLevel {
14796 #[doc(hidden)]
14797 #[serde(rename(serialize = "@type", deserialize = "@type"))]
14798 td_name: String,
14799 #[doc(hidden)]
14800 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
14801 extra: Option<String>,
14802
14803}
14804
14805impl RObject for GetLogVerbosityLevel {
14806 #[doc(hidden)] fn td_name(&self) -> &'static str { "getLogVerbosityLevel" }
14807 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
14808 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
14809}
14810
14811
14812
14813
14814impl RFunction for GetLogVerbosityLevel {}
14815
14816impl GetLogVerbosityLevel {
14817 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
14818 pub fn builder() -> RTDGetLogVerbosityLevelBuilder {
14819 let mut inner = GetLogVerbosityLevel::default();
14820 inner.td_name = "getLogVerbosityLevel".to_string();
14821 inner.extra = Some(Uuid::new_v4().to_string());
14822 RTDGetLogVerbosityLevelBuilder { inner }
14823 }
14824
14825}
14826
14827#[doc(hidden)]
14828pub struct RTDGetLogVerbosityLevelBuilder {
14829 inner: GetLogVerbosityLevel
14830}
14831
14832impl RTDGetLogVerbosityLevelBuilder {
14833 pub fn build(&self) -> GetLogVerbosityLevel { self.inner.clone() }
14834
14835}
14836
14837impl AsRef<GetLogVerbosityLevel> for GetLogVerbosityLevel {
14838 fn as_ref(&self) -> &GetLogVerbosityLevel { self }
14839}
14840
14841impl AsRef<GetLogVerbosityLevel> for RTDGetLogVerbosityLevelBuilder {
14842 fn as_ref(&self) -> &GetLogVerbosityLevel { &self.inner }
14843}
14844
14845
14846
14847
14848
14849
14850
14851#[derive(Debug, Clone, Default, Serialize, Deserialize)]
14853pub struct GetLoginUrl {
14854 #[doc(hidden)]
14855 #[serde(rename(serialize = "@type", deserialize = "@type"))]
14856 td_name: String,
14857 #[doc(hidden)]
14858 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
14859 extra: Option<String>,
14860 chat_id: i64,
14862 message_id: i64,
14864 button_id: i64,
14866 allow_write_access: bool,
14868
14869}
14870
14871impl RObject for GetLoginUrl {
14872 #[doc(hidden)] fn td_name(&self) -> &'static str { "getLoginUrl" }
14873 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
14874 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
14875}
14876
14877
14878
14879
14880impl RFunction for GetLoginUrl {}
14881
14882impl GetLoginUrl {
14883 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
14884 pub fn builder() -> RTDGetLoginUrlBuilder {
14885 let mut inner = GetLoginUrl::default();
14886 inner.td_name = "getLoginUrl".to_string();
14887 inner.extra = Some(Uuid::new_v4().to_string());
14888 RTDGetLoginUrlBuilder { inner }
14889 }
14890
14891 pub fn chat_id(&self) -> i64 { self.chat_id }
14892
14893 pub fn message_id(&self) -> i64 { self.message_id }
14894
14895 pub fn button_id(&self) -> i64 { self.button_id }
14896
14897 pub fn allow_write_access(&self) -> bool { self.allow_write_access }
14898
14899}
14900
14901#[doc(hidden)]
14902pub struct RTDGetLoginUrlBuilder {
14903 inner: GetLoginUrl
14904}
14905
14906impl RTDGetLoginUrlBuilder {
14907 pub fn build(&self) -> GetLoginUrl { self.inner.clone() }
14908
14909
14910 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
14911 self.inner.chat_id = chat_id;
14912 self
14913 }
14914
14915
14916 pub fn message_id(&mut self, message_id: i64) -> &mut Self {
14917 self.inner.message_id = message_id;
14918 self
14919 }
14920
14921
14922 pub fn button_id(&mut self, button_id: i64) -> &mut Self {
14923 self.inner.button_id = button_id;
14924 self
14925 }
14926
14927
14928 pub fn allow_write_access(&mut self, allow_write_access: bool) -> &mut Self {
14929 self.inner.allow_write_access = allow_write_access;
14930 self
14931 }
14932
14933}
14934
14935impl AsRef<GetLoginUrl> for GetLoginUrl {
14936 fn as_ref(&self) -> &GetLoginUrl { self }
14937}
14938
14939impl AsRef<GetLoginUrl> for RTDGetLoginUrlBuilder {
14940 fn as_ref(&self) -> &GetLoginUrl { &self.inner }
14941}
14942
14943
14944
14945
14946
14947
14948
14949#[derive(Debug, Clone, Default, Serialize, Deserialize)]
14951pub struct GetLoginUrlInfo {
14952 #[doc(hidden)]
14953 #[serde(rename(serialize = "@type", deserialize = "@type"))]
14954 td_name: String,
14955 #[doc(hidden)]
14956 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
14957 extra: Option<String>,
14958 chat_id: i64,
14960 message_id: i64,
14962 button_id: i64,
14964
14965}
14966
14967impl RObject for GetLoginUrlInfo {
14968 #[doc(hidden)] fn td_name(&self) -> &'static str { "getLoginUrlInfo" }
14969 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
14970 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
14971}
14972
14973
14974impl TDLoginUrlInfo for GetLoginUrlInfo {}
14975
14976impl RFunction for GetLoginUrlInfo {}
14977
14978impl GetLoginUrlInfo {
14979 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
14980 pub fn builder() -> RTDGetLoginUrlInfoBuilder {
14981 let mut inner = GetLoginUrlInfo::default();
14982 inner.td_name = "getLoginUrlInfo".to_string();
14983 inner.extra = Some(Uuid::new_v4().to_string());
14984 RTDGetLoginUrlInfoBuilder { inner }
14985 }
14986
14987 pub fn chat_id(&self) -> i64 { self.chat_id }
14988
14989 pub fn message_id(&self) -> i64 { self.message_id }
14990
14991 pub fn button_id(&self) -> i64 { self.button_id }
14992
14993}
14994
14995#[doc(hidden)]
14996pub struct RTDGetLoginUrlInfoBuilder {
14997 inner: GetLoginUrlInfo
14998}
14999
15000impl RTDGetLoginUrlInfoBuilder {
15001 pub fn build(&self) -> GetLoginUrlInfo { self.inner.clone() }
15002
15003
15004 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
15005 self.inner.chat_id = chat_id;
15006 self
15007 }
15008
15009
15010 pub fn message_id(&mut self, message_id: i64) -> &mut Self {
15011 self.inner.message_id = message_id;
15012 self
15013 }
15014
15015
15016 pub fn button_id(&mut self, button_id: i64) -> &mut Self {
15017 self.inner.button_id = button_id;
15018 self
15019 }
15020
15021}
15022
15023impl AsRef<GetLoginUrlInfo> for GetLoginUrlInfo {
15024 fn as_ref(&self) -> &GetLoginUrlInfo { self }
15025}
15026
15027impl AsRef<GetLoginUrlInfo> for RTDGetLoginUrlInfoBuilder {
15028 fn as_ref(&self) -> &GetLoginUrlInfo { &self.inner }
15029}
15030
15031
15032
15033
15034
15035
15036
15037#[derive(Debug, Clone, Default, Serialize, Deserialize)]
15039pub struct GetMapThumbnailFile {
15040 #[doc(hidden)]
15041 #[serde(rename(serialize = "@type", deserialize = "@type"))]
15042 td_name: String,
15043 #[doc(hidden)]
15044 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
15045 extra: Option<String>,
15046 location: Location,
15048 zoom: i64,
15050 width: i64,
15052 height: i64,
15054 scale: i64,
15056 chat_id: i64,
15058
15059}
15060
15061impl RObject for GetMapThumbnailFile {
15062 #[doc(hidden)] fn td_name(&self) -> &'static str { "getMapThumbnailFile" }
15063 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
15064 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
15065}
15066
15067
15068
15069
15070impl RFunction for GetMapThumbnailFile {}
15071
15072impl GetMapThumbnailFile {
15073 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
15074 pub fn builder() -> RTDGetMapThumbnailFileBuilder {
15075 let mut inner = GetMapThumbnailFile::default();
15076 inner.td_name = "getMapThumbnailFile".to_string();
15077 inner.extra = Some(Uuid::new_v4().to_string());
15078 RTDGetMapThumbnailFileBuilder { inner }
15079 }
15080
15081 pub fn location(&self) -> &Location { &self.location }
15082
15083 pub fn zoom(&self) -> i64 { self.zoom }
15084
15085 pub fn width(&self) -> i64 { self.width }
15086
15087 pub fn height(&self) -> i64 { self.height }
15088
15089 pub fn scale(&self) -> i64 { self.scale }
15090
15091 pub fn chat_id(&self) -> i64 { self.chat_id }
15092
15093}
15094
15095#[doc(hidden)]
15096pub struct RTDGetMapThumbnailFileBuilder {
15097 inner: GetMapThumbnailFile
15098}
15099
15100impl RTDGetMapThumbnailFileBuilder {
15101 pub fn build(&self) -> GetMapThumbnailFile { self.inner.clone() }
15102
15103
15104 pub fn location<T: AsRef<Location>>(&mut self, location: T) -> &mut Self {
15105 self.inner.location = location.as_ref().clone();
15106 self
15107 }
15108
15109
15110 pub fn zoom(&mut self, zoom: i64) -> &mut Self {
15111 self.inner.zoom = zoom;
15112 self
15113 }
15114
15115
15116 pub fn width(&mut self, width: i64) -> &mut Self {
15117 self.inner.width = width;
15118 self
15119 }
15120
15121
15122 pub fn height(&mut self, height: i64) -> &mut Self {
15123 self.inner.height = height;
15124 self
15125 }
15126
15127
15128 pub fn scale(&mut self, scale: i64) -> &mut Self {
15129 self.inner.scale = scale;
15130 self
15131 }
15132
15133
15134 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
15135 self.inner.chat_id = chat_id;
15136 self
15137 }
15138
15139}
15140
15141impl AsRef<GetMapThumbnailFile> for GetMapThumbnailFile {
15142 fn as_ref(&self) -> &GetMapThumbnailFile { self }
15143}
15144
15145impl AsRef<GetMapThumbnailFile> for RTDGetMapThumbnailFileBuilder {
15146 fn as_ref(&self) -> &GetMapThumbnailFile { &self.inner }
15147}
15148
15149
15150
15151
15152
15153
15154
15155#[derive(Debug, Clone, Default, Serialize, Deserialize)]
15157pub struct GetMarkdownText {
15158 #[doc(hidden)]
15159 #[serde(rename(serialize = "@type", deserialize = "@type"))]
15160 td_name: String,
15161 #[doc(hidden)]
15162 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
15163 extra: Option<String>,
15164 text: FormattedText,
15166
15167}
15168
15169impl RObject for GetMarkdownText {
15170 #[doc(hidden)] fn td_name(&self) -> &'static str { "getMarkdownText" }
15171 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
15172 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
15173}
15174
15175
15176
15177
15178impl RFunction for GetMarkdownText {}
15179
15180impl GetMarkdownText {
15181 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
15182 pub fn builder() -> RTDGetMarkdownTextBuilder {
15183 let mut inner = GetMarkdownText::default();
15184 inner.td_name = "getMarkdownText".to_string();
15185 inner.extra = Some(Uuid::new_v4().to_string());
15186 RTDGetMarkdownTextBuilder { inner }
15187 }
15188
15189 pub fn text(&self) -> &FormattedText { &self.text }
15190
15191}
15192
15193#[doc(hidden)]
15194pub struct RTDGetMarkdownTextBuilder {
15195 inner: GetMarkdownText
15196}
15197
15198impl RTDGetMarkdownTextBuilder {
15199 pub fn build(&self) -> GetMarkdownText { self.inner.clone() }
15200
15201
15202 pub fn text<T: AsRef<FormattedText>>(&mut self, text: T) -> &mut Self {
15203 self.inner.text = text.as_ref().clone();
15204 self
15205 }
15206
15207}
15208
15209impl AsRef<GetMarkdownText> for GetMarkdownText {
15210 fn as_ref(&self) -> &GetMarkdownText { self }
15211}
15212
15213impl AsRef<GetMarkdownText> for RTDGetMarkdownTextBuilder {
15214 fn as_ref(&self) -> &GetMarkdownText { &self.inner }
15215}
15216
15217
15218
15219
15220
15221
15222
15223#[derive(Debug, Clone, Default, Serialize, Deserialize)]
15225pub struct GetMe {
15226 #[doc(hidden)]
15227 #[serde(rename(serialize = "@type", deserialize = "@type"))]
15228 td_name: String,
15229 #[doc(hidden)]
15230 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
15231 extra: Option<String>,
15232
15233}
15234
15235impl RObject for GetMe {
15236 #[doc(hidden)] fn td_name(&self) -> &'static str { "getMe" }
15237 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
15238 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
15239}
15240
15241
15242
15243
15244impl RFunction for GetMe {}
15245
15246impl GetMe {
15247 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
15248 pub fn builder() -> RTDGetMeBuilder {
15249 let mut inner = GetMe::default();
15250 inner.td_name = "getMe".to_string();
15251 inner.extra = Some(Uuid::new_v4().to_string());
15252 RTDGetMeBuilder { inner }
15253 }
15254
15255}
15256
15257#[doc(hidden)]
15258pub struct RTDGetMeBuilder {
15259 inner: GetMe
15260}
15261
15262impl RTDGetMeBuilder {
15263 pub fn build(&self) -> GetMe { self.inner.clone() }
15264
15265}
15266
15267impl AsRef<GetMe> for GetMe {
15268 fn as_ref(&self) -> &GetMe { self }
15269}
15270
15271impl AsRef<GetMe> for RTDGetMeBuilder {
15272 fn as_ref(&self) -> &GetMe { &self.inner }
15273}
15274
15275
15276
15277
15278
15279
15280
15281#[derive(Debug, Clone, Default, Serialize, Deserialize)]
15283pub struct GetMessage {
15284 #[doc(hidden)]
15285 #[serde(rename(serialize = "@type", deserialize = "@type"))]
15286 td_name: String,
15287 #[doc(hidden)]
15288 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
15289 extra: Option<String>,
15290 chat_id: i64,
15292 message_id: i64,
15294
15295}
15296
15297impl RObject for GetMessage {
15298 #[doc(hidden)] fn td_name(&self) -> &'static str { "getMessage" }
15299 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
15300 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
15301}
15302
15303
15304
15305
15306impl RFunction for GetMessage {}
15307
15308impl GetMessage {
15309 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
15310 pub fn builder() -> RTDGetMessageBuilder {
15311 let mut inner = GetMessage::default();
15312 inner.td_name = "getMessage".to_string();
15313 inner.extra = Some(Uuid::new_v4().to_string());
15314 RTDGetMessageBuilder { inner }
15315 }
15316
15317 pub fn chat_id(&self) -> i64 { self.chat_id }
15318
15319 pub fn message_id(&self) -> i64 { self.message_id }
15320
15321}
15322
15323#[doc(hidden)]
15324pub struct RTDGetMessageBuilder {
15325 inner: GetMessage
15326}
15327
15328impl RTDGetMessageBuilder {
15329 pub fn build(&self) -> GetMessage { self.inner.clone() }
15330
15331
15332 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
15333 self.inner.chat_id = chat_id;
15334 self
15335 }
15336
15337
15338 pub fn message_id(&mut self, message_id: i64) -> &mut Self {
15339 self.inner.message_id = message_id;
15340 self
15341 }
15342
15343}
15344
15345impl AsRef<GetMessage> for GetMessage {
15346 fn as_ref(&self) -> &GetMessage { self }
15347}
15348
15349impl AsRef<GetMessage> for RTDGetMessageBuilder {
15350 fn as_ref(&self) -> &GetMessage { &self.inner }
15351}
15352
15353
15354
15355
15356
15357
15358
15359#[derive(Debug, Clone, Default, Serialize, Deserialize)]
15361pub struct GetMessageEmbeddingCode {
15362 #[doc(hidden)]
15363 #[serde(rename(serialize = "@type", deserialize = "@type"))]
15364 td_name: String,
15365 #[doc(hidden)]
15366 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
15367 extra: Option<String>,
15368 chat_id: i64,
15370 message_id: i64,
15372 for_album: bool,
15374
15375}
15376
15377impl RObject for GetMessageEmbeddingCode {
15378 #[doc(hidden)] fn td_name(&self) -> &'static str { "getMessageEmbeddingCode" }
15379 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
15380 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
15381}
15382
15383
15384
15385
15386impl RFunction for GetMessageEmbeddingCode {}
15387
15388impl GetMessageEmbeddingCode {
15389 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
15390 pub fn builder() -> RTDGetMessageEmbeddingCodeBuilder {
15391 let mut inner = GetMessageEmbeddingCode::default();
15392 inner.td_name = "getMessageEmbeddingCode".to_string();
15393 inner.extra = Some(Uuid::new_v4().to_string());
15394 RTDGetMessageEmbeddingCodeBuilder { inner }
15395 }
15396
15397 pub fn chat_id(&self) -> i64 { self.chat_id }
15398
15399 pub fn message_id(&self) -> i64 { self.message_id }
15400
15401 pub fn for_album(&self) -> bool { self.for_album }
15402
15403}
15404
15405#[doc(hidden)]
15406pub struct RTDGetMessageEmbeddingCodeBuilder {
15407 inner: GetMessageEmbeddingCode
15408}
15409
15410impl RTDGetMessageEmbeddingCodeBuilder {
15411 pub fn build(&self) -> GetMessageEmbeddingCode { self.inner.clone() }
15412
15413
15414 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
15415 self.inner.chat_id = chat_id;
15416 self
15417 }
15418
15419
15420 pub fn message_id(&mut self, message_id: i64) -> &mut Self {
15421 self.inner.message_id = message_id;
15422 self
15423 }
15424
15425
15426 pub fn for_album(&mut self, for_album: bool) -> &mut Self {
15427 self.inner.for_album = for_album;
15428 self
15429 }
15430
15431}
15432
15433impl AsRef<GetMessageEmbeddingCode> for GetMessageEmbeddingCode {
15434 fn as_ref(&self) -> &GetMessageEmbeddingCode { self }
15435}
15436
15437impl AsRef<GetMessageEmbeddingCode> for RTDGetMessageEmbeddingCodeBuilder {
15438 fn as_ref(&self) -> &GetMessageEmbeddingCode { &self.inner }
15439}
15440
15441
15442
15443
15444
15445
15446
15447#[derive(Debug, Clone, Default, Serialize, Deserialize)]
15449pub struct GetMessageFileType {
15450 #[doc(hidden)]
15451 #[serde(rename(serialize = "@type", deserialize = "@type"))]
15452 td_name: String,
15453 #[doc(hidden)]
15454 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
15455 extra: Option<String>,
15456 message_file_head: String,
15458
15459}
15460
15461impl RObject for GetMessageFileType {
15462 #[doc(hidden)] fn td_name(&self) -> &'static str { "getMessageFileType" }
15463 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
15464 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
15465}
15466
15467
15468impl TDMessageFileType for GetMessageFileType {}
15469
15470impl RFunction for GetMessageFileType {}
15471
15472impl GetMessageFileType {
15473 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
15474 pub fn builder() -> RTDGetMessageFileTypeBuilder {
15475 let mut inner = GetMessageFileType::default();
15476 inner.td_name = "getMessageFileType".to_string();
15477 inner.extra = Some(Uuid::new_v4().to_string());
15478 RTDGetMessageFileTypeBuilder { inner }
15479 }
15480
15481 pub fn message_file_head(&self) -> &String { &self.message_file_head }
15482
15483}
15484
15485#[doc(hidden)]
15486pub struct RTDGetMessageFileTypeBuilder {
15487 inner: GetMessageFileType
15488}
15489
15490impl RTDGetMessageFileTypeBuilder {
15491 pub fn build(&self) -> GetMessageFileType { self.inner.clone() }
15492
15493
15494 pub fn message_file_head<T: AsRef<str>>(&mut self, message_file_head: T) -> &mut Self {
15495 self.inner.message_file_head = message_file_head.as_ref().to_string();
15496 self
15497 }
15498
15499}
15500
15501impl AsRef<GetMessageFileType> for GetMessageFileType {
15502 fn as_ref(&self) -> &GetMessageFileType { self }
15503}
15504
15505impl AsRef<GetMessageFileType> for RTDGetMessageFileTypeBuilder {
15506 fn as_ref(&self) -> &GetMessageFileType { &self.inner }
15507}
15508
15509
15510
15511
15512
15513
15514
15515#[derive(Debug, Clone, Default, Serialize, Deserialize)]
15517pub struct GetMessageImportConfirmationText {
15518 #[doc(hidden)]
15519 #[serde(rename(serialize = "@type", deserialize = "@type"))]
15520 td_name: String,
15521 #[doc(hidden)]
15522 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
15523 extra: Option<String>,
15524 chat_id: i64,
15526
15527}
15528
15529impl RObject for GetMessageImportConfirmationText {
15530 #[doc(hidden)] fn td_name(&self) -> &'static str { "getMessageImportConfirmationText" }
15531 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
15532 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
15533}
15534
15535
15536
15537
15538impl RFunction for GetMessageImportConfirmationText {}
15539
15540impl GetMessageImportConfirmationText {
15541 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
15542 pub fn builder() -> RTDGetMessageImportConfirmationTextBuilder {
15543 let mut inner = GetMessageImportConfirmationText::default();
15544 inner.td_name = "getMessageImportConfirmationText".to_string();
15545 inner.extra = Some(Uuid::new_v4().to_string());
15546 RTDGetMessageImportConfirmationTextBuilder { inner }
15547 }
15548
15549 pub fn chat_id(&self) -> i64 { self.chat_id }
15550
15551}
15552
15553#[doc(hidden)]
15554pub struct RTDGetMessageImportConfirmationTextBuilder {
15555 inner: GetMessageImportConfirmationText
15556}
15557
15558impl RTDGetMessageImportConfirmationTextBuilder {
15559 pub fn build(&self) -> GetMessageImportConfirmationText { self.inner.clone() }
15560
15561
15562 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
15563 self.inner.chat_id = chat_id;
15564 self
15565 }
15566
15567}
15568
15569impl AsRef<GetMessageImportConfirmationText> for GetMessageImportConfirmationText {
15570 fn as_ref(&self) -> &GetMessageImportConfirmationText { self }
15571}
15572
15573impl AsRef<GetMessageImportConfirmationText> for RTDGetMessageImportConfirmationTextBuilder {
15574 fn as_ref(&self) -> &GetMessageImportConfirmationText { &self.inner }
15575}
15576
15577
15578
15579
15580
15581
15582
15583#[derive(Debug, Clone, Default, Serialize, Deserialize)]
15585pub struct GetMessageLink {
15586 #[doc(hidden)]
15587 #[serde(rename(serialize = "@type", deserialize = "@type"))]
15588 td_name: String,
15589 #[doc(hidden)]
15590 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
15591 extra: Option<String>,
15592 chat_id: i64,
15594 message_id: i64,
15596 media_timestamp: i64,
15598 for_album: bool,
15600 for_comment: bool,
15602
15603}
15604
15605impl RObject for GetMessageLink {
15606 #[doc(hidden)] fn td_name(&self) -> &'static str { "getMessageLink" }
15607 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
15608 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
15609}
15610
15611
15612
15613
15614impl RFunction for GetMessageLink {}
15615
15616impl GetMessageLink {
15617 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
15618 pub fn builder() -> RTDGetMessageLinkBuilder {
15619 let mut inner = GetMessageLink::default();
15620 inner.td_name = "getMessageLink".to_string();
15621 inner.extra = Some(Uuid::new_v4().to_string());
15622 RTDGetMessageLinkBuilder { inner }
15623 }
15624
15625 pub fn chat_id(&self) -> i64 { self.chat_id }
15626
15627 pub fn message_id(&self) -> i64 { self.message_id }
15628
15629 pub fn media_timestamp(&self) -> i64 { self.media_timestamp }
15630
15631 pub fn for_album(&self) -> bool { self.for_album }
15632
15633 pub fn for_comment(&self) -> bool { self.for_comment }
15634
15635}
15636
15637#[doc(hidden)]
15638pub struct RTDGetMessageLinkBuilder {
15639 inner: GetMessageLink
15640}
15641
15642impl RTDGetMessageLinkBuilder {
15643 pub fn build(&self) -> GetMessageLink { self.inner.clone() }
15644
15645
15646 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
15647 self.inner.chat_id = chat_id;
15648 self
15649 }
15650
15651
15652 pub fn message_id(&mut self, message_id: i64) -> &mut Self {
15653 self.inner.message_id = message_id;
15654 self
15655 }
15656
15657
15658 pub fn media_timestamp(&mut self, media_timestamp: i64) -> &mut Self {
15659 self.inner.media_timestamp = media_timestamp;
15660 self
15661 }
15662
15663
15664 pub fn for_album(&mut self, for_album: bool) -> &mut Self {
15665 self.inner.for_album = for_album;
15666 self
15667 }
15668
15669
15670 pub fn for_comment(&mut self, for_comment: bool) -> &mut Self {
15671 self.inner.for_comment = for_comment;
15672 self
15673 }
15674
15675}
15676
15677impl AsRef<GetMessageLink> for GetMessageLink {
15678 fn as_ref(&self) -> &GetMessageLink { self }
15679}
15680
15681impl AsRef<GetMessageLink> for RTDGetMessageLinkBuilder {
15682 fn as_ref(&self) -> &GetMessageLink { &self.inner }
15683}
15684
15685
15686
15687
15688
15689
15690
15691#[derive(Debug, Clone, Default, Serialize, Deserialize)]
15693pub struct GetMessageLinkInfo {
15694 #[doc(hidden)]
15695 #[serde(rename(serialize = "@type", deserialize = "@type"))]
15696 td_name: String,
15697 #[doc(hidden)]
15698 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
15699 extra: Option<String>,
15700 url: String,
15702
15703}
15704
15705impl RObject for GetMessageLinkInfo {
15706 #[doc(hidden)] fn td_name(&self) -> &'static str { "getMessageLinkInfo" }
15707 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
15708 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
15709}
15710
15711
15712
15713
15714impl RFunction for GetMessageLinkInfo {}
15715
15716impl GetMessageLinkInfo {
15717 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
15718 pub fn builder() -> RTDGetMessageLinkInfoBuilder {
15719 let mut inner = GetMessageLinkInfo::default();
15720 inner.td_name = "getMessageLinkInfo".to_string();
15721 inner.extra = Some(Uuid::new_v4().to_string());
15722 RTDGetMessageLinkInfoBuilder { inner }
15723 }
15724
15725 pub fn url(&self) -> &String { &self.url }
15726
15727}
15728
15729#[doc(hidden)]
15730pub struct RTDGetMessageLinkInfoBuilder {
15731 inner: GetMessageLinkInfo
15732}
15733
15734impl RTDGetMessageLinkInfoBuilder {
15735 pub fn build(&self) -> GetMessageLinkInfo { self.inner.clone() }
15736
15737
15738 pub fn url<T: AsRef<str>>(&mut self, url: T) -> &mut Self {
15739 self.inner.url = url.as_ref().to_string();
15740 self
15741 }
15742
15743}
15744
15745impl AsRef<GetMessageLinkInfo> for GetMessageLinkInfo {
15746 fn as_ref(&self) -> &GetMessageLinkInfo { self }
15747}
15748
15749impl AsRef<GetMessageLinkInfo> for RTDGetMessageLinkInfoBuilder {
15750 fn as_ref(&self) -> &GetMessageLinkInfo { &self.inner }
15751}
15752
15753
15754
15755
15756
15757
15758
15759#[derive(Debug, Clone, Default, Serialize, Deserialize)]
15761pub struct GetMessageLocally {
15762 #[doc(hidden)]
15763 #[serde(rename(serialize = "@type", deserialize = "@type"))]
15764 td_name: String,
15765 #[doc(hidden)]
15766 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
15767 extra: Option<String>,
15768 chat_id: i64,
15770 message_id: i64,
15772
15773}
15774
15775impl RObject for GetMessageLocally {
15776 #[doc(hidden)] fn td_name(&self) -> &'static str { "getMessageLocally" }
15777 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
15778 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
15779}
15780
15781
15782
15783
15784impl RFunction for GetMessageLocally {}
15785
15786impl GetMessageLocally {
15787 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
15788 pub fn builder() -> RTDGetMessageLocallyBuilder {
15789 let mut inner = GetMessageLocally::default();
15790 inner.td_name = "getMessageLocally".to_string();
15791 inner.extra = Some(Uuid::new_v4().to_string());
15792 RTDGetMessageLocallyBuilder { inner }
15793 }
15794
15795 pub fn chat_id(&self) -> i64 { self.chat_id }
15796
15797 pub fn message_id(&self) -> i64 { self.message_id }
15798
15799}
15800
15801#[doc(hidden)]
15802pub struct RTDGetMessageLocallyBuilder {
15803 inner: GetMessageLocally
15804}
15805
15806impl RTDGetMessageLocallyBuilder {
15807 pub fn build(&self) -> GetMessageLocally { self.inner.clone() }
15808
15809
15810 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
15811 self.inner.chat_id = chat_id;
15812 self
15813 }
15814
15815
15816 pub fn message_id(&mut self, message_id: i64) -> &mut Self {
15817 self.inner.message_id = message_id;
15818 self
15819 }
15820
15821}
15822
15823impl AsRef<GetMessageLocally> for GetMessageLocally {
15824 fn as_ref(&self) -> &GetMessageLocally { self }
15825}
15826
15827impl AsRef<GetMessageLocally> for RTDGetMessageLocallyBuilder {
15828 fn as_ref(&self) -> &GetMessageLocally { &self.inner }
15829}
15830
15831
15832
15833
15834
15835
15836
15837#[derive(Debug, Clone, Default, Serialize, Deserialize)]
15839pub struct GetMessagePublicForwards {
15840 #[doc(hidden)]
15841 #[serde(rename(serialize = "@type", deserialize = "@type"))]
15842 td_name: String,
15843 #[doc(hidden)]
15844 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
15845 extra: Option<String>,
15846 chat_id: i64,
15848 message_id: i64,
15850 offset: String,
15852 limit: i64,
15854
15855}
15856
15857impl RObject for GetMessagePublicForwards {
15858 #[doc(hidden)] fn td_name(&self) -> &'static str { "getMessagePublicForwards" }
15859 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
15860 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
15861}
15862
15863
15864
15865
15866impl RFunction for GetMessagePublicForwards {}
15867
15868impl GetMessagePublicForwards {
15869 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
15870 pub fn builder() -> RTDGetMessagePublicForwardsBuilder {
15871 let mut inner = GetMessagePublicForwards::default();
15872 inner.td_name = "getMessagePublicForwards".to_string();
15873 inner.extra = Some(Uuid::new_v4().to_string());
15874 RTDGetMessagePublicForwardsBuilder { inner }
15875 }
15876
15877 pub fn chat_id(&self) -> i64 { self.chat_id }
15878
15879 pub fn message_id(&self) -> i64 { self.message_id }
15880
15881 pub fn offset(&self) -> &String { &self.offset }
15882
15883 pub fn limit(&self) -> i64 { self.limit }
15884
15885}
15886
15887#[doc(hidden)]
15888pub struct RTDGetMessagePublicForwardsBuilder {
15889 inner: GetMessagePublicForwards
15890}
15891
15892impl RTDGetMessagePublicForwardsBuilder {
15893 pub fn build(&self) -> GetMessagePublicForwards { self.inner.clone() }
15894
15895
15896 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
15897 self.inner.chat_id = chat_id;
15898 self
15899 }
15900
15901
15902 pub fn message_id(&mut self, message_id: i64) -> &mut Self {
15903 self.inner.message_id = message_id;
15904 self
15905 }
15906
15907
15908 pub fn offset<T: AsRef<str>>(&mut self, offset: T) -> &mut Self {
15909 self.inner.offset = offset.as_ref().to_string();
15910 self
15911 }
15912
15913
15914 pub fn limit(&mut self, limit: i64) -> &mut Self {
15915 self.inner.limit = limit;
15916 self
15917 }
15918
15919}
15920
15921impl AsRef<GetMessagePublicForwards> for GetMessagePublicForwards {
15922 fn as_ref(&self) -> &GetMessagePublicForwards { self }
15923}
15924
15925impl AsRef<GetMessagePublicForwards> for RTDGetMessagePublicForwardsBuilder {
15926 fn as_ref(&self) -> &GetMessagePublicForwards { &self.inner }
15927}
15928
15929
15930
15931
15932
15933
15934
15935#[derive(Debug, Clone, Default, Serialize, Deserialize)]
15937pub struct GetMessageStatistics {
15938 #[doc(hidden)]
15939 #[serde(rename(serialize = "@type", deserialize = "@type"))]
15940 td_name: String,
15941 #[doc(hidden)]
15942 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
15943 extra: Option<String>,
15944 chat_id: i64,
15946 message_id: i64,
15948 is_dark: bool,
15950
15951}
15952
15953impl RObject for GetMessageStatistics {
15954 #[doc(hidden)] fn td_name(&self) -> &'static str { "getMessageStatistics" }
15955 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
15956 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
15957}
15958
15959
15960
15961
15962impl RFunction for GetMessageStatistics {}
15963
15964impl GetMessageStatistics {
15965 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
15966 pub fn builder() -> RTDGetMessageStatisticsBuilder {
15967 let mut inner = GetMessageStatistics::default();
15968 inner.td_name = "getMessageStatistics".to_string();
15969 inner.extra = Some(Uuid::new_v4().to_string());
15970 RTDGetMessageStatisticsBuilder { inner }
15971 }
15972
15973 pub fn chat_id(&self) -> i64 { self.chat_id }
15974
15975 pub fn message_id(&self) -> i64 { self.message_id }
15976
15977 pub fn is_dark(&self) -> bool { self.is_dark }
15978
15979}
15980
15981#[doc(hidden)]
15982pub struct RTDGetMessageStatisticsBuilder {
15983 inner: GetMessageStatistics
15984}
15985
15986impl RTDGetMessageStatisticsBuilder {
15987 pub fn build(&self) -> GetMessageStatistics { self.inner.clone() }
15988
15989
15990 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
15991 self.inner.chat_id = chat_id;
15992 self
15993 }
15994
15995
15996 pub fn message_id(&mut self, message_id: i64) -> &mut Self {
15997 self.inner.message_id = message_id;
15998 self
15999 }
16000
16001
16002 pub fn is_dark(&mut self, is_dark: bool) -> &mut Self {
16003 self.inner.is_dark = is_dark;
16004 self
16005 }
16006
16007}
16008
16009impl AsRef<GetMessageStatistics> for GetMessageStatistics {
16010 fn as_ref(&self) -> &GetMessageStatistics { self }
16011}
16012
16013impl AsRef<GetMessageStatistics> for RTDGetMessageStatisticsBuilder {
16014 fn as_ref(&self) -> &GetMessageStatistics { &self.inner }
16015}
16016
16017
16018
16019
16020
16021
16022
16023#[derive(Debug, Clone, Default, Serialize, Deserialize)]
16025pub struct GetMessageThread {
16026 #[doc(hidden)]
16027 #[serde(rename(serialize = "@type", deserialize = "@type"))]
16028 td_name: String,
16029 #[doc(hidden)]
16030 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
16031 extra: Option<String>,
16032 chat_id: i64,
16034 message_id: i64,
16036
16037}
16038
16039impl RObject for GetMessageThread {
16040 #[doc(hidden)] fn td_name(&self) -> &'static str { "getMessageThread" }
16041 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
16042 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
16043}
16044
16045
16046
16047
16048impl RFunction for GetMessageThread {}
16049
16050impl GetMessageThread {
16051 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
16052 pub fn builder() -> RTDGetMessageThreadBuilder {
16053 let mut inner = GetMessageThread::default();
16054 inner.td_name = "getMessageThread".to_string();
16055 inner.extra = Some(Uuid::new_v4().to_string());
16056 RTDGetMessageThreadBuilder { inner }
16057 }
16058
16059 pub fn chat_id(&self) -> i64 { self.chat_id }
16060
16061 pub fn message_id(&self) -> i64 { self.message_id }
16062
16063}
16064
16065#[doc(hidden)]
16066pub struct RTDGetMessageThreadBuilder {
16067 inner: GetMessageThread
16068}
16069
16070impl RTDGetMessageThreadBuilder {
16071 pub fn build(&self) -> GetMessageThread { self.inner.clone() }
16072
16073
16074 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
16075 self.inner.chat_id = chat_id;
16076 self
16077 }
16078
16079
16080 pub fn message_id(&mut self, message_id: i64) -> &mut Self {
16081 self.inner.message_id = message_id;
16082 self
16083 }
16084
16085}
16086
16087impl AsRef<GetMessageThread> for GetMessageThread {
16088 fn as_ref(&self) -> &GetMessageThread { self }
16089}
16090
16091impl AsRef<GetMessageThread> for RTDGetMessageThreadBuilder {
16092 fn as_ref(&self) -> &GetMessageThread { &self.inner }
16093}
16094
16095
16096
16097
16098
16099
16100
16101#[derive(Debug, Clone, Default, Serialize, Deserialize)]
16103pub struct GetMessageThreadHistory {
16104 #[doc(hidden)]
16105 #[serde(rename(serialize = "@type", deserialize = "@type"))]
16106 td_name: String,
16107 #[doc(hidden)]
16108 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
16109 extra: Option<String>,
16110 chat_id: i64,
16112 message_id: i64,
16114 from_message_id: i64,
16116 offset: i64,
16118 limit: i64,
16120
16121}
16122
16123impl RObject for GetMessageThreadHistory {
16124 #[doc(hidden)] fn td_name(&self) -> &'static str { "getMessageThreadHistory" }
16125 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
16126 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
16127}
16128
16129
16130
16131
16132impl RFunction for GetMessageThreadHistory {}
16133
16134impl GetMessageThreadHistory {
16135 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
16136 pub fn builder() -> RTDGetMessageThreadHistoryBuilder {
16137 let mut inner = GetMessageThreadHistory::default();
16138 inner.td_name = "getMessageThreadHistory".to_string();
16139 inner.extra = Some(Uuid::new_v4().to_string());
16140 RTDGetMessageThreadHistoryBuilder { inner }
16141 }
16142
16143 pub fn chat_id(&self) -> i64 { self.chat_id }
16144
16145 pub fn message_id(&self) -> i64 { self.message_id }
16146
16147 pub fn from_message_id(&self) -> i64 { self.from_message_id }
16148
16149 pub fn offset(&self) -> i64 { self.offset }
16150
16151 pub fn limit(&self) -> i64 { self.limit }
16152
16153}
16154
16155#[doc(hidden)]
16156pub struct RTDGetMessageThreadHistoryBuilder {
16157 inner: GetMessageThreadHistory
16158}
16159
16160impl RTDGetMessageThreadHistoryBuilder {
16161 pub fn build(&self) -> GetMessageThreadHistory { self.inner.clone() }
16162
16163
16164 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
16165 self.inner.chat_id = chat_id;
16166 self
16167 }
16168
16169
16170 pub fn message_id(&mut self, message_id: i64) -> &mut Self {
16171 self.inner.message_id = message_id;
16172 self
16173 }
16174
16175
16176 pub fn from_message_id(&mut self, from_message_id: i64) -> &mut Self {
16177 self.inner.from_message_id = from_message_id;
16178 self
16179 }
16180
16181
16182 pub fn offset(&mut self, offset: i64) -> &mut Self {
16183 self.inner.offset = offset;
16184 self
16185 }
16186
16187
16188 pub fn limit(&mut self, limit: i64) -> &mut Self {
16189 self.inner.limit = limit;
16190 self
16191 }
16192
16193}
16194
16195impl AsRef<GetMessageThreadHistory> for GetMessageThreadHistory {
16196 fn as_ref(&self) -> &GetMessageThreadHistory { self }
16197}
16198
16199impl AsRef<GetMessageThreadHistory> for RTDGetMessageThreadHistoryBuilder {
16200 fn as_ref(&self) -> &GetMessageThreadHistory { &self.inner }
16201}
16202
16203
16204
16205
16206
16207
16208
16209#[derive(Debug, Clone, Default, Serialize, Deserialize)]
16211pub struct GetMessageViewers {
16212 #[doc(hidden)]
16213 #[serde(rename(serialize = "@type", deserialize = "@type"))]
16214 td_name: String,
16215 #[doc(hidden)]
16216 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
16217 extra: Option<String>,
16218 chat_id: i64,
16220 message_id: i64,
16222
16223}
16224
16225impl RObject for GetMessageViewers {
16226 #[doc(hidden)] fn td_name(&self) -> &'static str { "getMessageViewers" }
16227 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
16228 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
16229}
16230
16231
16232
16233
16234impl RFunction for GetMessageViewers {}
16235
16236impl GetMessageViewers {
16237 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
16238 pub fn builder() -> RTDGetMessageViewersBuilder {
16239 let mut inner = GetMessageViewers::default();
16240 inner.td_name = "getMessageViewers".to_string();
16241 inner.extra = Some(Uuid::new_v4().to_string());
16242 RTDGetMessageViewersBuilder { inner }
16243 }
16244
16245 pub fn chat_id(&self) -> i64 { self.chat_id }
16246
16247 pub fn message_id(&self) -> i64 { self.message_id }
16248
16249}
16250
16251#[doc(hidden)]
16252pub struct RTDGetMessageViewersBuilder {
16253 inner: GetMessageViewers
16254}
16255
16256impl RTDGetMessageViewersBuilder {
16257 pub fn build(&self) -> GetMessageViewers { self.inner.clone() }
16258
16259
16260 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
16261 self.inner.chat_id = chat_id;
16262 self
16263 }
16264
16265
16266 pub fn message_id(&mut self, message_id: i64) -> &mut Self {
16267 self.inner.message_id = message_id;
16268 self
16269 }
16270
16271}
16272
16273impl AsRef<GetMessageViewers> for GetMessageViewers {
16274 fn as_ref(&self) -> &GetMessageViewers { self }
16275}
16276
16277impl AsRef<GetMessageViewers> for RTDGetMessageViewersBuilder {
16278 fn as_ref(&self) -> &GetMessageViewers { &self.inner }
16279}
16280
16281
16282
16283
16284
16285
16286
16287#[derive(Debug, Clone, Default, Serialize, Deserialize)]
16289pub struct GetMessages {
16290 #[doc(hidden)]
16291 #[serde(rename(serialize = "@type", deserialize = "@type"))]
16292 td_name: String,
16293 #[doc(hidden)]
16294 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
16295 extra: Option<String>,
16296 chat_id: i64,
16298 message_ids: Vec<i64>,
16300
16301}
16302
16303impl RObject for GetMessages {
16304 #[doc(hidden)] fn td_name(&self) -> &'static str { "getMessages" }
16305 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
16306 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
16307}
16308
16309
16310
16311
16312impl RFunction for GetMessages {}
16313
16314impl GetMessages {
16315 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
16316 pub fn builder() -> RTDGetMessagesBuilder {
16317 let mut inner = GetMessages::default();
16318 inner.td_name = "getMessages".to_string();
16319 inner.extra = Some(Uuid::new_v4().to_string());
16320 RTDGetMessagesBuilder { inner }
16321 }
16322
16323 pub fn chat_id(&self) -> i64 { self.chat_id }
16324
16325 pub fn message_ids(&self) -> &Vec<i64> { &self.message_ids }
16326
16327}
16328
16329#[doc(hidden)]
16330pub struct RTDGetMessagesBuilder {
16331 inner: GetMessages
16332}
16333
16334impl RTDGetMessagesBuilder {
16335 pub fn build(&self) -> GetMessages { self.inner.clone() }
16336
16337
16338 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
16339 self.inner.chat_id = chat_id;
16340 self
16341 }
16342
16343
16344 pub fn message_ids(&mut self, message_ids: Vec<i64>) -> &mut Self {
16345 self.inner.message_ids = message_ids;
16346 self
16347 }
16348
16349}
16350
16351impl AsRef<GetMessages> for GetMessages {
16352 fn as_ref(&self) -> &GetMessages { self }
16353}
16354
16355impl AsRef<GetMessages> for RTDGetMessagesBuilder {
16356 fn as_ref(&self) -> &GetMessages { &self.inner }
16357}
16358
16359
16360
16361
16362
16363
16364
16365#[derive(Debug, Clone, Default, Serialize, Deserialize)]
16367pub struct GetNetworkStatistics {
16368 #[doc(hidden)]
16369 #[serde(rename(serialize = "@type", deserialize = "@type"))]
16370 td_name: String,
16371 #[doc(hidden)]
16372 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
16373 extra: Option<String>,
16374 only_current: bool,
16376
16377}
16378
16379impl RObject for GetNetworkStatistics {
16380 #[doc(hidden)] fn td_name(&self) -> &'static str { "getNetworkStatistics" }
16381 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
16382 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
16383}
16384
16385
16386
16387
16388impl RFunction for GetNetworkStatistics {}
16389
16390impl GetNetworkStatistics {
16391 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
16392 pub fn builder() -> RTDGetNetworkStatisticsBuilder {
16393 let mut inner = GetNetworkStatistics::default();
16394 inner.td_name = "getNetworkStatistics".to_string();
16395 inner.extra = Some(Uuid::new_v4().to_string());
16396 RTDGetNetworkStatisticsBuilder { inner }
16397 }
16398
16399 pub fn only_current(&self) -> bool { self.only_current }
16400
16401}
16402
16403#[doc(hidden)]
16404pub struct RTDGetNetworkStatisticsBuilder {
16405 inner: GetNetworkStatistics
16406}
16407
16408impl RTDGetNetworkStatisticsBuilder {
16409 pub fn build(&self) -> GetNetworkStatistics { self.inner.clone() }
16410
16411
16412 pub fn only_current(&mut self, only_current: bool) -> &mut Self {
16413 self.inner.only_current = only_current;
16414 self
16415 }
16416
16417}
16418
16419impl AsRef<GetNetworkStatistics> for GetNetworkStatistics {
16420 fn as_ref(&self) -> &GetNetworkStatistics { self }
16421}
16422
16423impl AsRef<GetNetworkStatistics> for RTDGetNetworkStatisticsBuilder {
16424 fn as_ref(&self) -> &GetNetworkStatistics { &self.inner }
16425}
16426
16427
16428
16429
16430
16431
16432
16433#[derive(Debug, Clone, Default, Serialize, Deserialize)]
16435pub struct GetOption {
16436 #[doc(hidden)]
16437 #[serde(rename(serialize = "@type", deserialize = "@type"))]
16438 td_name: String,
16439 #[doc(hidden)]
16440 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
16441 extra: Option<String>,
16442 name: String,
16444
16445}
16446
16447impl RObject for GetOption {
16448 #[doc(hidden)] fn td_name(&self) -> &'static str { "getOption" }
16449 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
16450 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
16451}
16452
16453
16454impl TDOptionValue for GetOption {}
16455
16456impl RFunction for GetOption {}
16457
16458impl GetOption {
16459 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
16460 pub fn builder() -> RTDGetOptionBuilder {
16461 let mut inner = GetOption::default();
16462 inner.td_name = "getOption".to_string();
16463 inner.extra = Some(Uuid::new_v4().to_string());
16464 RTDGetOptionBuilder { inner }
16465 }
16466
16467 pub fn name(&self) -> &String { &self.name }
16468
16469}
16470
16471#[doc(hidden)]
16472pub struct RTDGetOptionBuilder {
16473 inner: GetOption
16474}
16475
16476impl RTDGetOptionBuilder {
16477 pub fn build(&self) -> GetOption { self.inner.clone() }
16478
16479
16480 pub fn name<T: AsRef<str>>(&mut self, name: T) -> &mut Self {
16481 self.inner.name = name.as_ref().to_string();
16482 self
16483 }
16484
16485}
16486
16487impl AsRef<GetOption> for GetOption {
16488 fn as_ref(&self) -> &GetOption { self }
16489}
16490
16491impl AsRef<GetOption> for RTDGetOptionBuilder {
16492 fn as_ref(&self) -> &GetOption { &self.inner }
16493}
16494
16495
16496
16497
16498
16499
16500
16501#[derive(Debug, Clone, Default, Serialize, Deserialize)]
16503pub struct GetPassportAuthorizationForm {
16504 #[doc(hidden)]
16505 #[serde(rename(serialize = "@type", deserialize = "@type"))]
16506 td_name: String,
16507 #[doc(hidden)]
16508 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
16509 extra: Option<String>,
16510 bot_user_id: i64,
16512 scope: String,
16514 public_key: String,
16516 nonce: String,
16518
16519}
16520
16521impl RObject for GetPassportAuthorizationForm {
16522 #[doc(hidden)] fn td_name(&self) -> &'static str { "getPassportAuthorizationForm" }
16523 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
16524 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
16525}
16526
16527
16528
16529
16530impl RFunction for GetPassportAuthorizationForm {}
16531
16532impl GetPassportAuthorizationForm {
16533 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
16534 pub fn builder() -> RTDGetPassportAuthorizationFormBuilder {
16535 let mut inner = GetPassportAuthorizationForm::default();
16536 inner.td_name = "getPassportAuthorizationForm".to_string();
16537 inner.extra = Some(Uuid::new_v4().to_string());
16538 RTDGetPassportAuthorizationFormBuilder { inner }
16539 }
16540
16541 pub fn bot_user_id(&self) -> i64 { self.bot_user_id }
16542
16543 pub fn scope(&self) -> &String { &self.scope }
16544
16545 pub fn public_key(&self) -> &String { &self.public_key }
16546
16547 pub fn nonce(&self) -> &String { &self.nonce }
16548
16549}
16550
16551#[doc(hidden)]
16552pub struct RTDGetPassportAuthorizationFormBuilder {
16553 inner: GetPassportAuthorizationForm
16554}
16555
16556impl RTDGetPassportAuthorizationFormBuilder {
16557 pub fn build(&self) -> GetPassportAuthorizationForm { self.inner.clone() }
16558
16559
16560 pub fn bot_user_id(&mut self, bot_user_id: i64) -> &mut Self {
16561 self.inner.bot_user_id = bot_user_id;
16562 self
16563 }
16564
16565
16566 pub fn scope<T: AsRef<str>>(&mut self, scope: T) -> &mut Self {
16567 self.inner.scope = scope.as_ref().to_string();
16568 self
16569 }
16570
16571
16572 pub fn public_key<T: AsRef<str>>(&mut self, public_key: T) -> &mut Self {
16573 self.inner.public_key = public_key.as_ref().to_string();
16574 self
16575 }
16576
16577
16578 pub fn nonce<T: AsRef<str>>(&mut self, nonce: T) -> &mut Self {
16579 self.inner.nonce = nonce.as_ref().to_string();
16580 self
16581 }
16582
16583}
16584
16585impl AsRef<GetPassportAuthorizationForm> for GetPassportAuthorizationForm {
16586 fn as_ref(&self) -> &GetPassportAuthorizationForm { self }
16587}
16588
16589impl AsRef<GetPassportAuthorizationForm> for RTDGetPassportAuthorizationFormBuilder {
16590 fn as_ref(&self) -> &GetPassportAuthorizationForm { &self.inner }
16591}
16592
16593
16594
16595
16596
16597
16598
16599#[derive(Debug, Clone, Default, Serialize, Deserialize)]
16601pub struct GetPassportAuthorizationFormAvailableElements {
16602 #[doc(hidden)]
16603 #[serde(rename(serialize = "@type", deserialize = "@type"))]
16604 td_name: String,
16605 #[doc(hidden)]
16606 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
16607 extra: Option<String>,
16608 autorization_form_id: i64,
16610 password: String,
16612
16613}
16614
16615impl RObject for GetPassportAuthorizationFormAvailableElements {
16616 #[doc(hidden)] fn td_name(&self) -> &'static str { "getPassportAuthorizationFormAvailableElements" }
16617 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
16618 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
16619}
16620
16621
16622
16623
16624impl RFunction for GetPassportAuthorizationFormAvailableElements {}
16625
16626impl GetPassportAuthorizationFormAvailableElements {
16627 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
16628 pub fn builder() -> RTDGetPassportAuthorizationFormAvailableElementsBuilder {
16629 let mut inner = GetPassportAuthorizationFormAvailableElements::default();
16630 inner.td_name = "getPassportAuthorizationFormAvailableElements".to_string();
16631 inner.extra = Some(Uuid::new_v4().to_string());
16632 RTDGetPassportAuthorizationFormAvailableElementsBuilder { inner }
16633 }
16634
16635 pub fn autorization_form_id(&self) -> i64 { self.autorization_form_id }
16636
16637 pub fn password(&self) -> &String { &self.password }
16638
16639}
16640
16641#[doc(hidden)]
16642pub struct RTDGetPassportAuthorizationFormAvailableElementsBuilder {
16643 inner: GetPassportAuthorizationFormAvailableElements
16644}
16645
16646impl RTDGetPassportAuthorizationFormAvailableElementsBuilder {
16647 pub fn build(&self) -> GetPassportAuthorizationFormAvailableElements { self.inner.clone() }
16648
16649
16650 pub fn autorization_form_id(&mut self, autorization_form_id: i64) -> &mut Self {
16651 self.inner.autorization_form_id = autorization_form_id;
16652 self
16653 }
16654
16655
16656 pub fn password<T: AsRef<str>>(&mut self, password: T) -> &mut Self {
16657 self.inner.password = password.as_ref().to_string();
16658 self
16659 }
16660
16661}
16662
16663impl AsRef<GetPassportAuthorizationFormAvailableElements> for GetPassportAuthorizationFormAvailableElements {
16664 fn as_ref(&self) -> &GetPassportAuthorizationFormAvailableElements { self }
16665}
16666
16667impl AsRef<GetPassportAuthorizationFormAvailableElements> for RTDGetPassportAuthorizationFormAvailableElementsBuilder {
16668 fn as_ref(&self) -> &GetPassportAuthorizationFormAvailableElements { &self.inner }
16669}
16670
16671
16672
16673
16674
16675
16676
16677#[derive(Debug, Clone, Default, Serialize, Deserialize)]
16679pub struct GetPassportElement {
16680 #[doc(hidden)]
16681 #[serde(rename(serialize = "@type", deserialize = "@type"))]
16682 td_name: String,
16683 #[doc(hidden)]
16684 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
16685 extra: Option<String>,
16686 #[serde(rename(serialize = "type", deserialize = "type"))] type_: PassportElementType,
16688 password: String,
16690
16691}
16692
16693impl RObject for GetPassportElement {
16694 #[doc(hidden)] fn td_name(&self) -> &'static str { "getPassportElement" }
16695 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
16696 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
16697}
16698
16699
16700impl TDPassportElement for GetPassportElement {}
16701
16702impl RFunction for GetPassportElement {}
16703
16704impl GetPassportElement {
16705 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
16706 pub fn builder() -> RTDGetPassportElementBuilder {
16707 let mut inner = GetPassportElement::default();
16708 inner.td_name = "getPassportElement".to_string();
16709 inner.extra = Some(Uuid::new_v4().to_string());
16710 RTDGetPassportElementBuilder { inner }
16711 }
16712
16713 pub fn type_(&self) -> &PassportElementType { &self.type_ }
16714
16715 pub fn password(&self) -> &String { &self.password }
16716
16717}
16718
16719#[doc(hidden)]
16720pub struct RTDGetPassportElementBuilder {
16721 inner: GetPassportElement
16722}
16723
16724impl RTDGetPassportElementBuilder {
16725 pub fn build(&self) -> GetPassportElement { self.inner.clone() }
16726
16727
16728 pub fn type_<T: AsRef<PassportElementType>>(&mut self, type_: T) -> &mut Self {
16729 self.inner.type_ = type_.as_ref().clone();
16730 self
16731 }
16732
16733
16734 pub fn password<T: AsRef<str>>(&mut self, password: T) -> &mut Self {
16735 self.inner.password = password.as_ref().to_string();
16736 self
16737 }
16738
16739}
16740
16741impl AsRef<GetPassportElement> for GetPassportElement {
16742 fn as_ref(&self) -> &GetPassportElement { self }
16743}
16744
16745impl AsRef<GetPassportElement> for RTDGetPassportElementBuilder {
16746 fn as_ref(&self) -> &GetPassportElement { &self.inner }
16747}
16748
16749
16750
16751
16752
16753
16754
16755#[derive(Debug, Clone, Default, Serialize, Deserialize)]
16757pub struct GetPasswordState {
16758 #[doc(hidden)]
16759 #[serde(rename(serialize = "@type", deserialize = "@type"))]
16760 td_name: String,
16761 #[doc(hidden)]
16762 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
16763 extra: Option<String>,
16764
16765}
16766
16767impl RObject for GetPasswordState {
16768 #[doc(hidden)] fn td_name(&self) -> &'static str { "getPasswordState" }
16769 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
16770 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
16771}
16772
16773
16774
16775
16776impl RFunction for GetPasswordState {}
16777
16778impl GetPasswordState {
16779 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
16780 pub fn builder() -> RTDGetPasswordStateBuilder {
16781 let mut inner = GetPasswordState::default();
16782 inner.td_name = "getPasswordState".to_string();
16783 inner.extra = Some(Uuid::new_v4().to_string());
16784 RTDGetPasswordStateBuilder { inner }
16785 }
16786
16787}
16788
16789#[doc(hidden)]
16790pub struct RTDGetPasswordStateBuilder {
16791 inner: GetPasswordState
16792}
16793
16794impl RTDGetPasswordStateBuilder {
16795 pub fn build(&self) -> GetPasswordState { self.inner.clone() }
16796
16797}
16798
16799impl AsRef<GetPasswordState> for GetPasswordState {
16800 fn as_ref(&self) -> &GetPasswordState { self }
16801}
16802
16803impl AsRef<GetPasswordState> for RTDGetPasswordStateBuilder {
16804 fn as_ref(&self) -> &GetPasswordState { &self.inner }
16805}
16806
16807
16808
16809
16810
16811
16812
16813#[derive(Debug, Clone, Default, Serialize, Deserialize)]
16815pub struct GetPaymentForm {
16816 #[doc(hidden)]
16817 #[serde(rename(serialize = "@type", deserialize = "@type"))]
16818 td_name: String,
16819 #[doc(hidden)]
16820 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
16821 extra: Option<String>,
16822 chat_id: i64,
16824 message_id: i64,
16826 theme: PaymentFormTheme,
16828
16829}
16830
16831impl RObject for GetPaymentForm {
16832 #[doc(hidden)] fn td_name(&self) -> &'static str { "getPaymentForm" }
16833 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
16834 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
16835}
16836
16837
16838
16839
16840impl RFunction for GetPaymentForm {}
16841
16842impl GetPaymentForm {
16843 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
16844 pub fn builder() -> RTDGetPaymentFormBuilder {
16845 let mut inner = GetPaymentForm::default();
16846 inner.td_name = "getPaymentForm".to_string();
16847 inner.extra = Some(Uuid::new_v4().to_string());
16848 RTDGetPaymentFormBuilder { inner }
16849 }
16850
16851 pub fn chat_id(&self) -> i64 { self.chat_id }
16852
16853 pub fn message_id(&self) -> i64 { self.message_id }
16854
16855 pub fn theme(&self) -> &PaymentFormTheme { &self.theme }
16856
16857}
16858
16859#[doc(hidden)]
16860pub struct RTDGetPaymentFormBuilder {
16861 inner: GetPaymentForm
16862}
16863
16864impl RTDGetPaymentFormBuilder {
16865 pub fn build(&self) -> GetPaymentForm { self.inner.clone() }
16866
16867
16868 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
16869 self.inner.chat_id = chat_id;
16870 self
16871 }
16872
16873
16874 pub fn message_id(&mut self, message_id: i64) -> &mut Self {
16875 self.inner.message_id = message_id;
16876 self
16877 }
16878
16879
16880 pub fn theme<T: AsRef<PaymentFormTheme>>(&mut self, theme: T) -> &mut Self {
16881 self.inner.theme = theme.as_ref().clone();
16882 self
16883 }
16884
16885}
16886
16887impl AsRef<GetPaymentForm> for GetPaymentForm {
16888 fn as_ref(&self) -> &GetPaymentForm { self }
16889}
16890
16891impl AsRef<GetPaymentForm> for RTDGetPaymentFormBuilder {
16892 fn as_ref(&self) -> &GetPaymentForm { &self.inner }
16893}
16894
16895
16896
16897
16898
16899
16900
16901#[derive(Debug, Clone, Default, Serialize, Deserialize)]
16903pub struct GetPaymentReceipt {
16904 #[doc(hidden)]
16905 #[serde(rename(serialize = "@type", deserialize = "@type"))]
16906 td_name: String,
16907 #[doc(hidden)]
16908 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
16909 extra: Option<String>,
16910 chat_id: i64,
16912 message_id: i64,
16914
16915}
16916
16917impl RObject for GetPaymentReceipt {
16918 #[doc(hidden)] fn td_name(&self) -> &'static str { "getPaymentReceipt" }
16919 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
16920 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
16921}
16922
16923
16924
16925
16926impl RFunction for GetPaymentReceipt {}
16927
16928impl GetPaymentReceipt {
16929 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
16930 pub fn builder() -> RTDGetPaymentReceiptBuilder {
16931 let mut inner = GetPaymentReceipt::default();
16932 inner.td_name = "getPaymentReceipt".to_string();
16933 inner.extra = Some(Uuid::new_v4().to_string());
16934 RTDGetPaymentReceiptBuilder { inner }
16935 }
16936
16937 pub fn chat_id(&self) -> i64 { self.chat_id }
16938
16939 pub fn message_id(&self) -> i64 { self.message_id }
16940
16941}
16942
16943#[doc(hidden)]
16944pub struct RTDGetPaymentReceiptBuilder {
16945 inner: GetPaymentReceipt
16946}
16947
16948impl RTDGetPaymentReceiptBuilder {
16949 pub fn build(&self) -> GetPaymentReceipt { self.inner.clone() }
16950
16951
16952 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
16953 self.inner.chat_id = chat_id;
16954 self
16955 }
16956
16957
16958 pub fn message_id(&mut self, message_id: i64) -> &mut Self {
16959 self.inner.message_id = message_id;
16960 self
16961 }
16962
16963}
16964
16965impl AsRef<GetPaymentReceipt> for GetPaymentReceipt {
16966 fn as_ref(&self) -> &GetPaymentReceipt { self }
16967}
16968
16969impl AsRef<GetPaymentReceipt> for RTDGetPaymentReceiptBuilder {
16970 fn as_ref(&self) -> &GetPaymentReceipt { &self.inner }
16971}
16972
16973
16974
16975
16976
16977
16978
16979#[derive(Debug, Clone, Default, Serialize, Deserialize)]
16981pub struct GetPhoneNumberInfo {
16982 #[doc(hidden)]
16983 #[serde(rename(serialize = "@type", deserialize = "@type"))]
16984 td_name: String,
16985 #[doc(hidden)]
16986 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
16987 extra: Option<String>,
16988 phone_number_prefix: String,
16990
16991}
16992
16993impl RObject for GetPhoneNumberInfo {
16994 #[doc(hidden)] fn td_name(&self) -> &'static str { "getPhoneNumberInfo" }
16995 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
16996 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
16997}
16998
16999
17000
17001
17002impl RFunction for GetPhoneNumberInfo {}
17003
17004impl GetPhoneNumberInfo {
17005 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
17006 pub fn builder() -> RTDGetPhoneNumberInfoBuilder {
17007 let mut inner = GetPhoneNumberInfo::default();
17008 inner.td_name = "getPhoneNumberInfo".to_string();
17009 inner.extra = Some(Uuid::new_v4().to_string());
17010 RTDGetPhoneNumberInfoBuilder { inner }
17011 }
17012
17013 pub fn phone_number_prefix(&self) -> &String { &self.phone_number_prefix }
17014
17015}
17016
17017#[doc(hidden)]
17018pub struct RTDGetPhoneNumberInfoBuilder {
17019 inner: GetPhoneNumberInfo
17020}
17021
17022impl RTDGetPhoneNumberInfoBuilder {
17023 pub fn build(&self) -> GetPhoneNumberInfo { self.inner.clone() }
17024
17025
17026 pub fn phone_number_prefix<T: AsRef<str>>(&mut self, phone_number_prefix: T) -> &mut Self {
17027 self.inner.phone_number_prefix = phone_number_prefix.as_ref().to_string();
17028 self
17029 }
17030
17031}
17032
17033impl AsRef<GetPhoneNumberInfo> for GetPhoneNumberInfo {
17034 fn as_ref(&self) -> &GetPhoneNumberInfo { self }
17035}
17036
17037impl AsRef<GetPhoneNumberInfo> for RTDGetPhoneNumberInfoBuilder {
17038 fn as_ref(&self) -> &GetPhoneNumberInfo { &self.inner }
17039}
17040
17041
17042
17043
17044
17045
17046
17047#[derive(Debug, Clone, Default, Serialize, Deserialize)]
17049pub struct GetPhoneNumberInfoSync {
17050 #[doc(hidden)]
17051 #[serde(rename(serialize = "@type", deserialize = "@type"))]
17052 td_name: String,
17053 #[doc(hidden)]
17054 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
17055 extra: Option<String>,
17056 language_code: String,
17058 phone_number_prefix: String,
17060
17061}
17062
17063impl RObject for GetPhoneNumberInfoSync {
17064 #[doc(hidden)] fn td_name(&self) -> &'static str { "getPhoneNumberInfoSync" }
17065 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
17066 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
17067}
17068
17069
17070
17071
17072impl RFunction for GetPhoneNumberInfoSync {}
17073
17074impl GetPhoneNumberInfoSync {
17075 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
17076 pub fn builder() -> RTDGetPhoneNumberInfoSyncBuilder {
17077 let mut inner = GetPhoneNumberInfoSync::default();
17078 inner.td_name = "getPhoneNumberInfoSync".to_string();
17079 inner.extra = Some(Uuid::new_v4().to_string());
17080 RTDGetPhoneNumberInfoSyncBuilder { inner }
17081 }
17082
17083 pub fn language_code(&self) -> &String { &self.language_code }
17084
17085 pub fn phone_number_prefix(&self) -> &String { &self.phone_number_prefix }
17086
17087}
17088
17089#[doc(hidden)]
17090pub struct RTDGetPhoneNumberInfoSyncBuilder {
17091 inner: GetPhoneNumberInfoSync
17092}
17093
17094impl RTDGetPhoneNumberInfoSyncBuilder {
17095 pub fn build(&self) -> GetPhoneNumberInfoSync { self.inner.clone() }
17096
17097
17098 pub fn language_code<T: AsRef<str>>(&mut self, language_code: T) -> &mut Self {
17099 self.inner.language_code = language_code.as_ref().to_string();
17100 self
17101 }
17102
17103
17104 pub fn phone_number_prefix<T: AsRef<str>>(&mut self, phone_number_prefix: T) -> &mut Self {
17105 self.inner.phone_number_prefix = phone_number_prefix.as_ref().to_string();
17106 self
17107 }
17108
17109}
17110
17111impl AsRef<GetPhoneNumberInfoSync> for GetPhoneNumberInfoSync {
17112 fn as_ref(&self) -> &GetPhoneNumberInfoSync { self }
17113}
17114
17115impl AsRef<GetPhoneNumberInfoSync> for RTDGetPhoneNumberInfoSyncBuilder {
17116 fn as_ref(&self) -> &GetPhoneNumberInfoSync { &self.inner }
17117}
17118
17119
17120
17121
17122
17123
17124
17125#[derive(Debug, Clone, Default, Serialize, Deserialize)]
17127pub struct GetPollVoters {
17128 #[doc(hidden)]
17129 #[serde(rename(serialize = "@type", deserialize = "@type"))]
17130 td_name: String,
17131 #[doc(hidden)]
17132 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
17133 extra: Option<String>,
17134 chat_id: i64,
17136 message_id: i64,
17138 option_id: i64,
17140 offset: i64,
17142 limit: i64,
17144
17145}
17146
17147impl RObject for GetPollVoters {
17148 #[doc(hidden)] fn td_name(&self) -> &'static str { "getPollVoters" }
17149 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
17150 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
17151}
17152
17153
17154
17155
17156impl RFunction for GetPollVoters {}
17157
17158impl GetPollVoters {
17159 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
17160 pub fn builder() -> RTDGetPollVotersBuilder {
17161 let mut inner = GetPollVoters::default();
17162 inner.td_name = "getPollVoters".to_string();
17163 inner.extra = Some(Uuid::new_v4().to_string());
17164 RTDGetPollVotersBuilder { inner }
17165 }
17166
17167 pub fn chat_id(&self) -> i64 { self.chat_id }
17168
17169 pub fn message_id(&self) -> i64 { self.message_id }
17170
17171 pub fn option_id(&self) -> i64 { self.option_id }
17172
17173 pub fn offset(&self) -> i64 { self.offset }
17174
17175 pub fn limit(&self) -> i64 { self.limit }
17176
17177}
17178
17179#[doc(hidden)]
17180pub struct RTDGetPollVotersBuilder {
17181 inner: GetPollVoters
17182}
17183
17184impl RTDGetPollVotersBuilder {
17185 pub fn build(&self) -> GetPollVoters { self.inner.clone() }
17186
17187
17188 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
17189 self.inner.chat_id = chat_id;
17190 self
17191 }
17192
17193
17194 pub fn message_id(&mut self, message_id: i64) -> &mut Self {
17195 self.inner.message_id = message_id;
17196 self
17197 }
17198
17199
17200 pub fn option_id(&mut self, option_id: i64) -> &mut Self {
17201 self.inner.option_id = option_id;
17202 self
17203 }
17204
17205
17206 pub fn offset(&mut self, offset: i64) -> &mut Self {
17207 self.inner.offset = offset;
17208 self
17209 }
17210
17211
17212 pub fn limit(&mut self, limit: i64) -> &mut Self {
17213 self.inner.limit = limit;
17214 self
17215 }
17216
17217}
17218
17219impl AsRef<GetPollVoters> for GetPollVoters {
17220 fn as_ref(&self) -> &GetPollVoters { self }
17221}
17222
17223impl AsRef<GetPollVoters> for RTDGetPollVotersBuilder {
17224 fn as_ref(&self) -> &GetPollVoters { &self.inner }
17225}
17226
17227
17228
17229
17230
17231
17232
17233#[derive(Debug, Clone, Default, Serialize, Deserialize)]
17235pub struct GetPreferredCountryLanguage {
17236 #[doc(hidden)]
17237 #[serde(rename(serialize = "@type", deserialize = "@type"))]
17238 td_name: String,
17239 #[doc(hidden)]
17240 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
17241 extra: Option<String>,
17242 country_code: String,
17244
17245}
17246
17247impl RObject for GetPreferredCountryLanguage {
17248 #[doc(hidden)] fn td_name(&self) -> &'static str { "getPreferredCountryLanguage" }
17249 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
17250 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
17251}
17252
17253
17254
17255
17256impl RFunction for GetPreferredCountryLanguage {}
17257
17258impl GetPreferredCountryLanguage {
17259 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
17260 pub fn builder() -> RTDGetPreferredCountryLanguageBuilder {
17261 let mut inner = GetPreferredCountryLanguage::default();
17262 inner.td_name = "getPreferredCountryLanguage".to_string();
17263 inner.extra = Some(Uuid::new_v4().to_string());
17264 RTDGetPreferredCountryLanguageBuilder { inner }
17265 }
17266
17267 pub fn country_code(&self) -> &String { &self.country_code }
17268
17269}
17270
17271#[doc(hidden)]
17272pub struct RTDGetPreferredCountryLanguageBuilder {
17273 inner: GetPreferredCountryLanguage
17274}
17275
17276impl RTDGetPreferredCountryLanguageBuilder {
17277 pub fn build(&self) -> GetPreferredCountryLanguage { self.inner.clone() }
17278
17279
17280 pub fn country_code<T: AsRef<str>>(&mut self, country_code: T) -> &mut Self {
17281 self.inner.country_code = country_code.as_ref().to_string();
17282 self
17283 }
17284
17285}
17286
17287impl AsRef<GetPreferredCountryLanguage> for GetPreferredCountryLanguage {
17288 fn as_ref(&self) -> &GetPreferredCountryLanguage { self }
17289}
17290
17291impl AsRef<GetPreferredCountryLanguage> for RTDGetPreferredCountryLanguageBuilder {
17292 fn as_ref(&self) -> &GetPreferredCountryLanguage { &self.inner }
17293}
17294
17295
17296
17297
17298
17299
17300
17301#[derive(Debug, Clone, Default, Serialize, Deserialize)]
17303pub struct GetProxies {
17304 #[doc(hidden)]
17305 #[serde(rename(serialize = "@type", deserialize = "@type"))]
17306 td_name: String,
17307 #[doc(hidden)]
17308 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
17309 extra: Option<String>,
17310
17311}
17312
17313impl RObject for GetProxies {
17314 #[doc(hidden)] fn td_name(&self) -> &'static str { "getProxies" }
17315 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
17316 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
17317}
17318
17319
17320
17321
17322impl RFunction for GetProxies {}
17323
17324impl GetProxies {
17325 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
17326 pub fn builder() -> RTDGetProxiesBuilder {
17327 let mut inner = GetProxies::default();
17328 inner.td_name = "getProxies".to_string();
17329 inner.extra = Some(Uuid::new_v4().to_string());
17330 RTDGetProxiesBuilder { inner }
17331 }
17332
17333}
17334
17335#[doc(hidden)]
17336pub struct RTDGetProxiesBuilder {
17337 inner: GetProxies
17338}
17339
17340impl RTDGetProxiesBuilder {
17341 pub fn build(&self) -> GetProxies { self.inner.clone() }
17342
17343}
17344
17345impl AsRef<GetProxies> for GetProxies {
17346 fn as_ref(&self) -> &GetProxies { self }
17347}
17348
17349impl AsRef<GetProxies> for RTDGetProxiesBuilder {
17350 fn as_ref(&self) -> &GetProxies { &self.inner }
17351}
17352
17353
17354
17355
17356
17357
17358
17359#[derive(Debug, Clone, Default, Serialize, Deserialize)]
17361pub struct GetProxyLink {
17362 #[doc(hidden)]
17363 #[serde(rename(serialize = "@type", deserialize = "@type"))]
17364 td_name: String,
17365 #[doc(hidden)]
17366 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
17367 extra: Option<String>,
17368 proxy_id: i64,
17370
17371}
17372
17373impl RObject for GetProxyLink {
17374 #[doc(hidden)] fn td_name(&self) -> &'static str { "getProxyLink" }
17375 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
17376 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
17377}
17378
17379
17380
17381
17382impl RFunction for GetProxyLink {}
17383
17384impl GetProxyLink {
17385 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
17386 pub fn builder() -> RTDGetProxyLinkBuilder {
17387 let mut inner = GetProxyLink::default();
17388 inner.td_name = "getProxyLink".to_string();
17389 inner.extra = Some(Uuid::new_v4().to_string());
17390 RTDGetProxyLinkBuilder { inner }
17391 }
17392
17393 pub fn proxy_id(&self) -> i64 { self.proxy_id }
17394
17395}
17396
17397#[doc(hidden)]
17398pub struct RTDGetProxyLinkBuilder {
17399 inner: GetProxyLink
17400}
17401
17402impl RTDGetProxyLinkBuilder {
17403 pub fn build(&self) -> GetProxyLink { self.inner.clone() }
17404
17405
17406 pub fn proxy_id(&mut self, proxy_id: i64) -> &mut Self {
17407 self.inner.proxy_id = proxy_id;
17408 self
17409 }
17410
17411}
17412
17413impl AsRef<GetProxyLink> for GetProxyLink {
17414 fn as_ref(&self) -> &GetProxyLink { self }
17415}
17416
17417impl AsRef<GetProxyLink> for RTDGetProxyLinkBuilder {
17418 fn as_ref(&self) -> &GetProxyLink { &self.inner }
17419}
17420
17421
17422
17423
17424
17425
17426
17427#[derive(Debug, Clone, Default, Serialize, Deserialize)]
17429pub struct GetPushReceiverId {
17430 #[doc(hidden)]
17431 #[serde(rename(serialize = "@type", deserialize = "@type"))]
17432 td_name: String,
17433 #[doc(hidden)]
17434 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
17435 extra: Option<String>,
17436 payload: String,
17438
17439}
17440
17441impl RObject for GetPushReceiverId {
17442 #[doc(hidden)] fn td_name(&self) -> &'static str { "getPushReceiverId" }
17443 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
17444 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
17445}
17446
17447
17448
17449
17450impl RFunction for GetPushReceiverId {}
17451
17452impl GetPushReceiverId {
17453 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
17454 pub fn builder() -> RTDGetPushReceiverIdBuilder {
17455 let mut inner = GetPushReceiverId::default();
17456 inner.td_name = "getPushReceiverId".to_string();
17457 inner.extra = Some(Uuid::new_v4().to_string());
17458 RTDGetPushReceiverIdBuilder { inner }
17459 }
17460
17461 pub fn payload(&self) -> &String { &self.payload }
17462
17463}
17464
17465#[doc(hidden)]
17466pub struct RTDGetPushReceiverIdBuilder {
17467 inner: GetPushReceiverId
17468}
17469
17470impl RTDGetPushReceiverIdBuilder {
17471 pub fn build(&self) -> GetPushReceiverId { self.inner.clone() }
17472
17473
17474 pub fn payload<T: AsRef<str>>(&mut self, payload: T) -> &mut Self {
17475 self.inner.payload = payload.as_ref().to_string();
17476 self
17477 }
17478
17479}
17480
17481impl AsRef<GetPushReceiverId> for GetPushReceiverId {
17482 fn as_ref(&self) -> &GetPushReceiverId { self }
17483}
17484
17485impl AsRef<GetPushReceiverId> for RTDGetPushReceiverIdBuilder {
17486 fn as_ref(&self) -> &GetPushReceiverId { &self.inner }
17487}
17488
17489
17490
17491
17492
17493
17494
17495#[derive(Debug, Clone, Default, Serialize, Deserialize)]
17497pub struct GetRecentInlineBots {
17498 #[doc(hidden)]
17499 #[serde(rename(serialize = "@type", deserialize = "@type"))]
17500 td_name: String,
17501 #[doc(hidden)]
17502 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
17503 extra: Option<String>,
17504
17505}
17506
17507impl RObject for GetRecentInlineBots {
17508 #[doc(hidden)] fn td_name(&self) -> &'static str { "getRecentInlineBots" }
17509 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
17510 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
17511}
17512
17513
17514
17515
17516impl RFunction for GetRecentInlineBots {}
17517
17518impl GetRecentInlineBots {
17519 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
17520 pub fn builder() -> RTDGetRecentInlineBotsBuilder {
17521 let mut inner = GetRecentInlineBots::default();
17522 inner.td_name = "getRecentInlineBots".to_string();
17523 inner.extra = Some(Uuid::new_v4().to_string());
17524 RTDGetRecentInlineBotsBuilder { inner }
17525 }
17526
17527}
17528
17529#[doc(hidden)]
17530pub struct RTDGetRecentInlineBotsBuilder {
17531 inner: GetRecentInlineBots
17532}
17533
17534impl RTDGetRecentInlineBotsBuilder {
17535 pub fn build(&self) -> GetRecentInlineBots { self.inner.clone() }
17536
17537}
17538
17539impl AsRef<GetRecentInlineBots> for GetRecentInlineBots {
17540 fn as_ref(&self) -> &GetRecentInlineBots { self }
17541}
17542
17543impl AsRef<GetRecentInlineBots> for RTDGetRecentInlineBotsBuilder {
17544 fn as_ref(&self) -> &GetRecentInlineBots { &self.inner }
17545}
17546
17547
17548
17549
17550
17551
17552
17553#[derive(Debug, Clone, Default, Serialize, Deserialize)]
17555pub struct GetRecentStickers {
17556 #[doc(hidden)]
17557 #[serde(rename(serialize = "@type", deserialize = "@type"))]
17558 td_name: String,
17559 #[doc(hidden)]
17560 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
17561 extra: Option<String>,
17562 is_attached: bool,
17564
17565}
17566
17567impl RObject for GetRecentStickers {
17568 #[doc(hidden)] fn td_name(&self) -> &'static str { "getRecentStickers" }
17569 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
17570 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
17571}
17572
17573
17574
17575
17576impl RFunction for GetRecentStickers {}
17577
17578impl GetRecentStickers {
17579 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
17580 pub fn builder() -> RTDGetRecentStickersBuilder {
17581 let mut inner = GetRecentStickers::default();
17582 inner.td_name = "getRecentStickers".to_string();
17583 inner.extra = Some(Uuid::new_v4().to_string());
17584 RTDGetRecentStickersBuilder { inner }
17585 }
17586
17587 pub fn is_attached(&self) -> bool { self.is_attached }
17588
17589}
17590
17591#[doc(hidden)]
17592pub struct RTDGetRecentStickersBuilder {
17593 inner: GetRecentStickers
17594}
17595
17596impl RTDGetRecentStickersBuilder {
17597 pub fn build(&self) -> GetRecentStickers { self.inner.clone() }
17598
17599
17600 pub fn is_attached(&mut self, is_attached: bool) -> &mut Self {
17601 self.inner.is_attached = is_attached;
17602 self
17603 }
17604
17605}
17606
17607impl AsRef<GetRecentStickers> for GetRecentStickers {
17608 fn as_ref(&self) -> &GetRecentStickers { self }
17609}
17610
17611impl AsRef<GetRecentStickers> for RTDGetRecentStickersBuilder {
17612 fn as_ref(&self) -> &GetRecentStickers { &self.inner }
17613}
17614
17615
17616
17617
17618
17619
17620
17621#[derive(Debug, Clone, Default, Serialize, Deserialize)]
17623pub struct GetRecentlyOpenedChats {
17624 #[doc(hidden)]
17625 #[serde(rename(serialize = "@type", deserialize = "@type"))]
17626 td_name: String,
17627 #[doc(hidden)]
17628 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
17629 extra: Option<String>,
17630 limit: i64,
17632
17633}
17634
17635impl RObject for GetRecentlyOpenedChats {
17636 #[doc(hidden)] fn td_name(&self) -> &'static str { "getRecentlyOpenedChats" }
17637 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
17638 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
17639}
17640
17641
17642
17643
17644impl RFunction for GetRecentlyOpenedChats {}
17645
17646impl GetRecentlyOpenedChats {
17647 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
17648 pub fn builder() -> RTDGetRecentlyOpenedChatsBuilder {
17649 let mut inner = GetRecentlyOpenedChats::default();
17650 inner.td_name = "getRecentlyOpenedChats".to_string();
17651 inner.extra = Some(Uuid::new_v4().to_string());
17652 RTDGetRecentlyOpenedChatsBuilder { inner }
17653 }
17654
17655 pub fn limit(&self) -> i64 { self.limit }
17656
17657}
17658
17659#[doc(hidden)]
17660pub struct RTDGetRecentlyOpenedChatsBuilder {
17661 inner: GetRecentlyOpenedChats
17662}
17663
17664impl RTDGetRecentlyOpenedChatsBuilder {
17665 pub fn build(&self) -> GetRecentlyOpenedChats { self.inner.clone() }
17666
17667
17668 pub fn limit(&mut self, limit: i64) -> &mut Self {
17669 self.inner.limit = limit;
17670 self
17671 }
17672
17673}
17674
17675impl AsRef<GetRecentlyOpenedChats> for GetRecentlyOpenedChats {
17676 fn as_ref(&self) -> &GetRecentlyOpenedChats { self }
17677}
17678
17679impl AsRef<GetRecentlyOpenedChats> for RTDGetRecentlyOpenedChatsBuilder {
17680 fn as_ref(&self) -> &GetRecentlyOpenedChats { &self.inner }
17681}
17682
17683
17684
17685
17686
17687
17688
17689#[derive(Debug, Clone, Default, Serialize, Deserialize)]
17691pub struct GetRecentlyVisitedTMeUrls {
17692 #[doc(hidden)]
17693 #[serde(rename(serialize = "@type", deserialize = "@type"))]
17694 td_name: String,
17695 #[doc(hidden)]
17696 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
17697 extra: Option<String>,
17698 referrer: String,
17700
17701}
17702
17703impl RObject for GetRecentlyVisitedTMeUrls {
17704 #[doc(hidden)] fn td_name(&self) -> &'static str { "getRecentlyVisitedTMeUrls" }
17705 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
17706 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
17707}
17708
17709
17710
17711
17712impl RFunction for GetRecentlyVisitedTMeUrls {}
17713
17714impl GetRecentlyVisitedTMeUrls {
17715 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
17716 pub fn builder() -> RTDGetRecentlyVisitedTMeUrlsBuilder {
17717 let mut inner = GetRecentlyVisitedTMeUrls::default();
17718 inner.td_name = "getRecentlyVisitedTMeUrls".to_string();
17719 inner.extra = Some(Uuid::new_v4().to_string());
17720 RTDGetRecentlyVisitedTMeUrlsBuilder { inner }
17721 }
17722
17723 pub fn referrer(&self) -> &String { &self.referrer }
17724
17725}
17726
17727#[doc(hidden)]
17728pub struct RTDGetRecentlyVisitedTMeUrlsBuilder {
17729 inner: GetRecentlyVisitedTMeUrls
17730}
17731
17732impl RTDGetRecentlyVisitedTMeUrlsBuilder {
17733 pub fn build(&self) -> GetRecentlyVisitedTMeUrls { self.inner.clone() }
17734
17735
17736 pub fn referrer<T: AsRef<str>>(&mut self, referrer: T) -> &mut Self {
17737 self.inner.referrer = referrer.as_ref().to_string();
17738 self
17739 }
17740
17741}
17742
17743impl AsRef<GetRecentlyVisitedTMeUrls> for GetRecentlyVisitedTMeUrls {
17744 fn as_ref(&self) -> &GetRecentlyVisitedTMeUrls { self }
17745}
17746
17747impl AsRef<GetRecentlyVisitedTMeUrls> for RTDGetRecentlyVisitedTMeUrlsBuilder {
17748 fn as_ref(&self) -> &GetRecentlyVisitedTMeUrls { &self.inner }
17749}
17750
17751
17752
17753
17754
17755
17756
17757#[derive(Debug, Clone, Default, Serialize, Deserialize)]
17759pub struct GetRecommendedChatFilters {
17760 #[doc(hidden)]
17761 #[serde(rename(serialize = "@type", deserialize = "@type"))]
17762 td_name: String,
17763 #[doc(hidden)]
17764 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
17765 extra: Option<String>,
17766
17767}
17768
17769impl RObject for GetRecommendedChatFilters {
17770 #[doc(hidden)] fn td_name(&self) -> &'static str { "getRecommendedChatFilters" }
17771 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
17772 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
17773}
17774
17775
17776
17777
17778impl RFunction for GetRecommendedChatFilters {}
17779
17780impl GetRecommendedChatFilters {
17781 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
17782 pub fn builder() -> RTDGetRecommendedChatFiltersBuilder {
17783 let mut inner = GetRecommendedChatFilters::default();
17784 inner.td_name = "getRecommendedChatFilters".to_string();
17785 inner.extra = Some(Uuid::new_v4().to_string());
17786 RTDGetRecommendedChatFiltersBuilder { inner }
17787 }
17788
17789}
17790
17791#[doc(hidden)]
17792pub struct RTDGetRecommendedChatFiltersBuilder {
17793 inner: GetRecommendedChatFilters
17794}
17795
17796impl RTDGetRecommendedChatFiltersBuilder {
17797 pub fn build(&self) -> GetRecommendedChatFilters { self.inner.clone() }
17798
17799}
17800
17801impl AsRef<GetRecommendedChatFilters> for GetRecommendedChatFilters {
17802 fn as_ref(&self) -> &GetRecommendedChatFilters { self }
17803}
17804
17805impl AsRef<GetRecommendedChatFilters> for RTDGetRecommendedChatFiltersBuilder {
17806 fn as_ref(&self) -> &GetRecommendedChatFilters { &self.inner }
17807}
17808
17809
17810
17811
17812
17813
17814
17815#[derive(Debug, Clone, Default, Serialize, Deserialize)]
17817pub struct GetRecoveryEmailAddress {
17818 #[doc(hidden)]
17819 #[serde(rename(serialize = "@type", deserialize = "@type"))]
17820 td_name: String,
17821 #[doc(hidden)]
17822 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
17823 extra: Option<String>,
17824 password: String,
17826
17827}
17828
17829impl RObject for GetRecoveryEmailAddress {
17830 #[doc(hidden)] fn td_name(&self) -> &'static str { "getRecoveryEmailAddress" }
17831 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
17832 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
17833}
17834
17835
17836
17837
17838impl RFunction for GetRecoveryEmailAddress {}
17839
17840impl GetRecoveryEmailAddress {
17841 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
17842 pub fn builder() -> RTDGetRecoveryEmailAddressBuilder {
17843 let mut inner = GetRecoveryEmailAddress::default();
17844 inner.td_name = "getRecoveryEmailAddress".to_string();
17845 inner.extra = Some(Uuid::new_v4().to_string());
17846 RTDGetRecoveryEmailAddressBuilder { inner }
17847 }
17848
17849 pub fn password(&self) -> &String { &self.password }
17850
17851}
17852
17853#[doc(hidden)]
17854pub struct RTDGetRecoveryEmailAddressBuilder {
17855 inner: GetRecoveryEmailAddress
17856}
17857
17858impl RTDGetRecoveryEmailAddressBuilder {
17859 pub fn build(&self) -> GetRecoveryEmailAddress { self.inner.clone() }
17860
17861
17862 pub fn password<T: AsRef<str>>(&mut self, password: T) -> &mut Self {
17863 self.inner.password = password.as_ref().to_string();
17864 self
17865 }
17866
17867}
17868
17869impl AsRef<GetRecoveryEmailAddress> for GetRecoveryEmailAddress {
17870 fn as_ref(&self) -> &GetRecoveryEmailAddress { self }
17871}
17872
17873impl AsRef<GetRecoveryEmailAddress> for RTDGetRecoveryEmailAddressBuilder {
17874 fn as_ref(&self) -> &GetRecoveryEmailAddress { &self.inner }
17875}
17876
17877
17878
17879
17880
17881
17882
17883#[derive(Debug, Clone, Default, Serialize, Deserialize)]
17885pub struct GetRemoteFile {
17886 #[doc(hidden)]
17887 #[serde(rename(serialize = "@type", deserialize = "@type"))]
17888 td_name: String,
17889 #[doc(hidden)]
17890 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
17891 extra: Option<String>,
17892 remote_file_id: String,
17894 file_type: FileType,
17896
17897}
17898
17899impl RObject for GetRemoteFile {
17900 #[doc(hidden)] fn td_name(&self) -> &'static str { "getRemoteFile" }
17901 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
17902 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
17903}
17904
17905
17906
17907
17908impl RFunction for GetRemoteFile {}
17909
17910impl GetRemoteFile {
17911 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
17912 pub fn builder() -> RTDGetRemoteFileBuilder {
17913 let mut inner = GetRemoteFile::default();
17914 inner.td_name = "getRemoteFile".to_string();
17915 inner.extra = Some(Uuid::new_v4().to_string());
17916 RTDGetRemoteFileBuilder { inner }
17917 }
17918
17919 pub fn remote_file_id(&self) -> &String { &self.remote_file_id }
17920
17921 pub fn file_type(&self) -> &FileType { &self.file_type }
17922
17923}
17924
17925#[doc(hidden)]
17926pub struct RTDGetRemoteFileBuilder {
17927 inner: GetRemoteFile
17928}
17929
17930impl RTDGetRemoteFileBuilder {
17931 pub fn build(&self) -> GetRemoteFile { self.inner.clone() }
17932
17933
17934 pub fn remote_file_id<T: AsRef<str>>(&mut self, remote_file_id: T) -> &mut Self {
17935 self.inner.remote_file_id = remote_file_id.as_ref().to_string();
17936 self
17937 }
17938
17939
17940 pub fn file_type<T: AsRef<FileType>>(&mut self, file_type: T) -> &mut Self {
17941 self.inner.file_type = file_type.as_ref().clone();
17942 self
17943 }
17944
17945}
17946
17947impl AsRef<GetRemoteFile> for GetRemoteFile {
17948 fn as_ref(&self) -> &GetRemoteFile { self }
17949}
17950
17951impl AsRef<GetRemoteFile> for RTDGetRemoteFileBuilder {
17952 fn as_ref(&self) -> &GetRemoteFile { &self.inner }
17953}
17954
17955
17956
17957
17958
17959
17960
17961#[derive(Debug, Clone, Default, Serialize, Deserialize)]
17963pub struct GetRepliedMessage {
17964 #[doc(hidden)]
17965 #[serde(rename(serialize = "@type", deserialize = "@type"))]
17966 td_name: String,
17967 #[doc(hidden)]
17968 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
17969 extra: Option<String>,
17970 chat_id: i64,
17972 message_id: i64,
17974
17975}
17976
17977impl RObject for GetRepliedMessage {
17978 #[doc(hidden)] fn td_name(&self) -> &'static str { "getRepliedMessage" }
17979 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
17980 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
17981}
17982
17983
17984
17985
17986impl RFunction for GetRepliedMessage {}
17987
17988impl GetRepliedMessage {
17989 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
17990 pub fn builder() -> RTDGetRepliedMessageBuilder {
17991 let mut inner = GetRepliedMessage::default();
17992 inner.td_name = "getRepliedMessage".to_string();
17993 inner.extra = Some(Uuid::new_v4().to_string());
17994 RTDGetRepliedMessageBuilder { inner }
17995 }
17996
17997 pub fn chat_id(&self) -> i64 { self.chat_id }
17998
17999 pub fn message_id(&self) -> i64 { self.message_id }
18000
18001}
18002
18003#[doc(hidden)]
18004pub struct RTDGetRepliedMessageBuilder {
18005 inner: GetRepliedMessage
18006}
18007
18008impl RTDGetRepliedMessageBuilder {
18009 pub fn build(&self) -> GetRepliedMessage { self.inner.clone() }
18010
18011
18012 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
18013 self.inner.chat_id = chat_id;
18014 self
18015 }
18016
18017
18018 pub fn message_id(&mut self, message_id: i64) -> &mut Self {
18019 self.inner.message_id = message_id;
18020 self
18021 }
18022
18023}
18024
18025impl AsRef<GetRepliedMessage> for GetRepliedMessage {
18026 fn as_ref(&self) -> &GetRepliedMessage { self }
18027}
18028
18029impl AsRef<GetRepliedMessage> for RTDGetRepliedMessageBuilder {
18030 fn as_ref(&self) -> &GetRepliedMessage { &self.inner }
18031}
18032
18033
18034
18035
18036
18037
18038
18039#[derive(Debug, Clone, Default, Serialize, Deserialize)]
18041pub struct GetSavedAnimations {
18042 #[doc(hidden)]
18043 #[serde(rename(serialize = "@type", deserialize = "@type"))]
18044 td_name: String,
18045 #[doc(hidden)]
18046 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
18047 extra: Option<String>,
18048
18049}
18050
18051impl RObject for GetSavedAnimations {
18052 #[doc(hidden)] fn td_name(&self) -> &'static str { "getSavedAnimations" }
18053 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
18054 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
18055}
18056
18057
18058
18059
18060impl RFunction for GetSavedAnimations {}
18061
18062impl GetSavedAnimations {
18063 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
18064 pub fn builder() -> RTDGetSavedAnimationsBuilder {
18065 let mut inner = GetSavedAnimations::default();
18066 inner.td_name = "getSavedAnimations".to_string();
18067 inner.extra = Some(Uuid::new_v4().to_string());
18068 RTDGetSavedAnimationsBuilder { inner }
18069 }
18070
18071}
18072
18073#[doc(hidden)]
18074pub struct RTDGetSavedAnimationsBuilder {
18075 inner: GetSavedAnimations
18076}
18077
18078impl RTDGetSavedAnimationsBuilder {
18079 pub fn build(&self) -> GetSavedAnimations { self.inner.clone() }
18080
18081}
18082
18083impl AsRef<GetSavedAnimations> for GetSavedAnimations {
18084 fn as_ref(&self) -> &GetSavedAnimations { self }
18085}
18086
18087impl AsRef<GetSavedAnimations> for RTDGetSavedAnimationsBuilder {
18088 fn as_ref(&self) -> &GetSavedAnimations { &self.inner }
18089}
18090
18091
18092
18093
18094
18095
18096
18097#[derive(Debug, Clone, Default, Serialize, Deserialize)]
18099pub struct GetSavedOrderInfo {
18100 #[doc(hidden)]
18101 #[serde(rename(serialize = "@type", deserialize = "@type"))]
18102 td_name: String,
18103 #[doc(hidden)]
18104 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
18105 extra: Option<String>,
18106
18107}
18108
18109impl RObject for GetSavedOrderInfo {
18110 #[doc(hidden)] fn td_name(&self) -> &'static str { "getSavedOrderInfo" }
18111 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
18112 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
18113}
18114
18115
18116
18117
18118impl RFunction for GetSavedOrderInfo {}
18119
18120impl GetSavedOrderInfo {
18121 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
18122 pub fn builder() -> RTDGetSavedOrderInfoBuilder {
18123 let mut inner = GetSavedOrderInfo::default();
18124 inner.td_name = "getSavedOrderInfo".to_string();
18125 inner.extra = Some(Uuid::new_v4().to_string());
18126 RTDGetSavedOrderInfoBuilder { inner }
18127 }
18128
18129}
18130
18131#[doc(hidden)]
18132pub struct RTDGetSavedOrderInfoBuilder {
18133 inner: GetSavedOrderInfo
18134}
18135
18136impl RTDGetSavedOrderInfoBuilder {
18137 pub fn build(&self) -> GetSavedOrderInfo { self.inner.clone() }
18138
18139}
18140
18141impl AsRef<GetSavedOrderInfo> for GetSavedOrderInfo {
18142 fn as_ref(&self) -> &GetSavedOrderInfo { self }
18143}
18144
18145impl AsRef<GetSavedOrderInfo> for RTDGetSavedOrderInfoBuilder {
18146 fn as_ref(&self) -> &GetSavedOrderInfo { &self.inner }
18147}
18148
18149
18150
18151
18152
18153
18154
18155#[derive(Debug, Clone, Default, Serialize, Deserialize)]
18157pub struct GetScopeNotificationSettings {
18158 #[doc(hidden)]
18159 #[serde(rename(serialize = "@type", deserialize = "@type"))]
18160 td_name: String,
18161 #[doc(hidden)]
18162 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
18163 extra: Option<String>,
18164 scope: NotificationSettingsScope,
18166
18167}
18168
18169impl RObject for GetScopeNotificationSettings {
18170 #[doc(hidden)] fn td_name(&self) -> &'static str { "getScopeNotificationSettings" }
18171 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
18172 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
18173}
18174
18175
18176
18177
18178impl RFunction for GetScopeNotificationSettings {}
18179
18180impl GetScopeNotificationSettings {
18181 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
18182 pub fn builder() -> RTDGetScopeNotificationSettingsBuilder {
18183 let mut inner = GetScopeNotificationSettings::default();
18184 inner.td_name = "getScopeNotificationSettings".to_string();
18185 inner.extra = Some(Uuid::new_v4().to_string());
18186 RTDGetScopeNotificationSettingsBuilder { inner }
18187 }
18188
18189 pub fn scope(&self) -> &NotificationSettingsScope { &self.scope }
18190
18191}
18192
18193#[doc(hidden)]
18194pub struct RTDGetScopeNotificationSettingsBuilder {
18195 inner: GetScopeNotificationSettings
18196}
18197
18198impl RTDGetScopeNotificationSettingsBuilder {
18199 pub fn build(&self) -> GetScopeNotificationSettings { self.inner.clone() }
18200
18201
18202 pub fn scope<T: AsRef<NotificationSettingsScope>>(&mut self, scope: T) -> &mut Self {
18203 self.inner.scope = scope.as_ref().clone();
18204 self
18205 }
18206
18207}
18208
18209impl AsRef<GetScopeNotificationSettings> for GetScopeNotificationSettings {
18210 fn as_ref(&self) -> &GetScopeNotificationSettings { self }
18211}
18212
18213impl AsRef<GetScopeNotificationSettings> for RTDGetScopeNotificationSettingsBuilder {
18214 fn as_ref(&self) -> &GetScopeNotificationSettings { &self.inner }
18215}
18216
18217
18218
18219
18220
18221
18222
18223#[derive(Debug, Clone, Default, Serialize, Deserialize)]
18225pub struct GetSecretChat {
18226 #[doc(hidden)]
18227 #[serde(rename(serialize = "@type", deserialize = "@type"))]
18228 td_name: String,
18229 #[doc(hidden)]
18230 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
18231 extra: Option<String>,
18232 secret_chat_id: i64,
18234
18235}
18236
18237impl RObject for GetSecretChat {
18238 #[doc(hidden)] fn td_name(&self) -> &'static str { "getSecretChat" }
18239 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
18240 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
18241}
18242
18243
18244
18245
18246impl RFunction for GetSecretChat {}
18247
18248impl GetSecretChat {
18249 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
18250 pub fn builder() -> RTDGetSecretChatBuilder {
18251 let mut inner = GetSecretChat::default();
18252 inner.td_name = "getSecretChat".to_string();
18253 inner.extra = Some(Uuid::new_v4().to_string());
18254 RTDGetSecretChatBuilder { inner }
18255 }
18256
18257 pub fn secret_chat_id(&self) -> i64 { self.secret_chat_id }
18258
18259}
18260
18261#[doc(hidden)]
18262pub struct RTDGetSecretChatBuilder {
18263 inner: GetSecretChat
18264}
18265
18266impl RTDGetSecretChatBuilder {
18267 pub fn build(&self) -> GetSecretChat { self.inner.clone() }
18268
18269
18270 pub fn secret_chat_id(&mut self, secret_chat_id: i64) -> &mut Self {
18271 self.inner.secret_chat_id = secret_chat_id;
18272 self
18273 }
18274
18275}
18276
18277impl AsRef<GetSecretChat> for GetSecretChat {
18278 fn as_ref(&self) -> &GetSecretChat { self }
18279}
18280
18281impl AsRef<GetSecretChat> for RTDGetSecretChatBuilder {
18282 fn as_ref(&self) -> &GetSecretChat { &self.inner }
18283}
18284
18285
18286
18287
18288
18289
18290
18291#[derive(Debug, Clone, Default, Serialize, Deserialize)]
18293pub struct GetStatisticalGraph {
18294 #[doc(hidden)]
18295 #[serde(rename(serialize = "@type", deserialize = "@type"))]
18296 td_name: String,
18297 #[doc(hidden)]
18298 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
18299 extra: Option<String>,
18300 chat_id: i64,
18302 token: String,
18304 x: i64,
18306
18307}
18308
18309impl RObject for GetStatisticalGraph {
18310 #[doc(hidden)] fn td_name(&self) -> &'static str { "getStatisticalGraph" }
18311 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
18312 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
18313}
18314
18315
18316impl TDStatisticalGraph for GetStatisticalGraph {}
18317
18318impl RFunction for GetStatisticalGraph {}
18319
18320impl GetStatisticalGraph {
18321 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
18322 pub fn builder() -> RTDGetStatisticalGraphBuilder {
18323 let mut inner = GetStatisticalGraph::default();
18324 inner.td_name = "getStatisticalGraph".to_string();
18325 inner.extra = Some(Uuid::new_v4().to_string());
18326 RTDGetStatisticalGraphBuilder { inner }
18327 }
18328
18329 pub fn chat_id(&self) -> i64 { self.chat_id }
18330
18331 pub fn token(&self) -> &String { &self.token }
18332
18333 pub fn x(&self) -> i64 { self.x }
18334
18335}
18336
18337#[doc(hidden)]
18338pub struct RTDGetStatisticalGraphBuilder {
18339 inner: GetStatisticalGraph
18340}
18341
18342impl RTDGetStatisticalGraphBuilder {
18343 pub fn build(&self) -> GetStatisticalGraph { self.inner.clone() }
18344
18345
18346 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
18347 self.inner.chat_id = chat_id;
18348 self
18349 }
18350
18351
18352 pub fn token<T: AsRef<str>>(&mut self, token: T) -> &mut Self {
18353 self.inner.token = token.as_ref().to_string();
18354 self
18355 }
18356
18357
18358 pub fn x(&mut self, x: i64) -> &mut Self {
18359 self.inner.x = x;
18360 self
18361 }
18362
18363}
18364
18365impl AsRef<GetStatisticalGraph> for GetStatisticalGraph {
18366 fn as_ref(&self) -> &GetStatisticalGraph { self }
18367}
18368
18369impl AsRef<GetStatisticalGraph> for RTDGetStatisticalGraphBuilder {
18370 fn as_ref(&self) -> &GetStatisticalGraph { &self.inner }
18371}
18372
18373
18374
18375
18376
18377
18378
18379#[derive(Debug, Clone, Default, Serialize, Deserialize)]
18381pub struct GetStickerEmojis {
18382 #[doc(hidden)]
18383 #[serde(rename(serialize = "@type", deserialize = "@type"))]
18384 td_name: String,
18385 #[doc(hidden)]
18386 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
18387 extra: Option<String>,
18388 sticker: InputFile,
18390
18391}
18392
18393impl RObject for GetStickerEmojis {
18394 #[doc(hidden)] fn td_name(&self) -> &'static str { "getStickerEmojis" }
18395 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
18396 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
18397}
18398
18399
18400
18401
18402impl RFunction for GetStickerEmojis {}
18403
18404impl GetStickerEmojis {
18405 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
18406 pub fn builder() -> RTDGetStickerEmojisBuilder {
18407 let mut inner = GetStickerEmojis::default();
18408 inner.td_name = "getStickerEmojis".to_string();
18409 inner.extra = Some(Uuid::new_v4().to_string());
18410 RTDGetStickerEmojisBuilder { inner }
18411 }
18412
18413 pub fn sticker(&self) -> &InputFile { &self.sticker }
18414
18415}
18416
18417#[doc(hidden)]
18418pub struct RTDGetStickerEmojisBuilder {
18419 inner: GetStickerEmojis
18420}
18421
18422impl RTDGetStickerEmojisBuilder {
18423 pub fn build(&self) -> GetStickerEmojis { self.inner.clone() }
18424
18425
18426 pub fn sticker<T: AsRef<InputFile>>(&mut self, sticker: T) -> &mut Self {
18427 self.inner.sticker = sticker.as_ref().clone();
18428 self
18429 }
18430
18431}
18432
18433impl AsRef<GetStickerEmojis> for GetStickerEmojis {
18434 fn as_ref(&self) -> &GetStickerEmojis { self }
18435}
18436
18437impl AsRef<GetStickerEmojis> for RTDGetStickerEmojisBuilder {
18438 fn as_ref(&self) -> &GetStickerEmojis { &self.inner }
18439}
18440
18441
18442
18443
18444
18445
18446
18447#[derive(Debug, Clone, Default, Serialize, Deserialize)]
18449pub struct GetStickerSet {
18450 #[doc(hidden)]
18451 #[serde(rename(serialize = "@type", deserialize = "@type"))]
18452 td_name: String,
18453 #[doc(hidden)]
18454 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
18455 extra: Option<String>,
18456 set_id: isize,
18458
18459}
18460
18461impl RObject for GetStickerSet {
18462 #[doc(hidden)] fn td_name(&self) -> &'static str { "getStickerSet" }
18463 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
18464 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
18465}
18466
18467
18468
18469
18470impl RFunction for GetStickerSet {}
18471
18472impl GetStickerSet {
18473 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
18474 pub fn builder() -> RTDGetStickerSetBuilder {
18475 let mut inner = GetStickerSet::default();
18476 inner.td_name = "getStickerSet".to_string();
18477 inner.extra = Some(Uuid::new_v4().to_string());
18478 RTDGetStickerSetBuilder { inner }
18479 }
18480
18481 pub fn set_id(&self) -> isize { self.set_id }
18482
18483}
18484
18485#[doc(hidden)]
18486pub struct RTDGetStickerSetBuilder {
18487 inner: GetStickerSet
18488}
18489
18490impl RTDGetStickerSetBuilder {
18491 pub fn build(&self) -> GetStickerSet { self.inner.clone() }
18492
18493
18494 pub fn set_id(&mut self, set_id: isize) -> &mut Self {
18495 self.inner.set_id = set_id;
18496 self
18497 }
18498
18499}
18500
18501impl AsRef<GetStickerSet> for GetStickerSet {
18502 fn as_ref(&self) -> &GetStickerSet { self }
18503}
18504
18505impl AsRef<GetStickerSet> for RTDGetStickerSetBuilder {
18506 fn as_ref(&self) -> &GetStickerSet { &self.inner }
18507}
18508
18509
18510
18511
18512
18513
18514
18515#[derive(Debug, Clone, Default, Serialize, Deserialize)]
18517pub struct GetStickers {
18518 #[doc(hidden)]
18519 #[serde(rename(serialize = "@type", deserialize = "@type"))]
18520 td_name: String,
18521 #[doc(hidden)]
18522 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
18523 extra: Option<String>,
18524 emoji: String,
18526 limit: i64,
18528
18529}
18530
18531impl RObject for GetStickers {
18532 #[doc(hidden)] fn td_name(&self) -> &'static str { "getStickers" }
18533 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
18534 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
18535}
18536
18537
18538
18539
18540impl RFunction for GetStickers {}
18541
18542impl GetStickers {
18543 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
18544 pub fn builder() -> RTDGetStickersBuilder {
18545 let mut inner = GetStickers::default();
18546 inner.td_name = "getStickers".to_string();
18547 inner.extra = Some(Uuid::new_v4().to_string());
18548 RTDGetStickersBuilder { inner }
18549 }
18550
18551 pub fn emoji(&self) -> &String { &self.emoji }
18552
18553 pub fn limit(&self) -> i64 { self.limit }
18554
18555}
18556
18557#[doc(hidden)]
18558pub struct RTDGetStickersBuilder {
18559 inner: GetStickers
18560}
18561
18562impl RTDGetStickersBuilder {
18563 pub fn build(&self) -> GetStickers { self.inner.clone() }
18564
18565
18566 pub fn emoji<T: AsRef<str>>(&mut self, emoji: T) -> &mut Self {
18567 self.inner.emoji = emoji.as_ref().to_string();
18568 self
18569 }
18570
18571
18572 pub fn limit(&mut self, limit: i64) -> &mut Self {
18573 self.inner.limit = limit;
18574 self
18575 }
18576
18577}
18578
18579impl AsRef<GetStickers> for GetStickers {
18580 fn as_ref(&self) -> &GetStickers { self }
18581}
18582
18583impl AsRef<GetStickers> for RTDGetStickersBuilder {
18584 fn as_ref(&self) -> &GetStickers { &self.inner }
18585}
18586
18587
18588
18589
18590
18591
18592
18593#[derive(Debug, Clone, Default, Serialize, Deserialize)]
18595pub struct GetStorageStatistics {
18596 #[doc(hidden)]
18597 #[serde(rename(serialize = "@type", deserialize = "@type"))]
18598 td_name: String,
18599 #[doc(hidden)]
18600 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
18601 extra: Option<String>,
18602 chat_limit: i64,
18604
18605}
18606
18607impl RObject for GetStorageStatistics {
18608 #[doc(hidden)] fn td_name(&self) -> &'static str { "getStorageStatistics" }
18609 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
18610 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
18611}
18612
18613
18614
18615
18616impl RFunction for GetStorageStatistics {}
18617
18618impl GetStorageStatistics {
18619 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
18620 pub fn builder() -> RTDGetStorageStatisticsBuilder {
18621 let mut inner = GetStorageStatistics::default();
18622 inner.td_name = "getStorageStatistics".to_string();
18623 inner.extra = Some(Uuid::new_v4().to_string());
18624 RTDGetStorageStatisticsBuilder { inner }
18625 }
18626
18627 pub fn chat_limit(&self) -> i64 { self.chat_limit }
18628
18629}
18630
18631#[doc(hidden)]
18632pub struct RTDGetStorageStatisticsBuilder {
18633 inner: GetStorageStatistics
18634}
18635
18636impl RTDGetStorageStatisticsBuilder {
18637 pub fn build(&self) -> GetStorageStatistics { self.inner.clone() }
18638
18639
18640 pub fn chat_limit(&mut self, chat_limit: i64) -> &mut Self {
18641 self.inner.chat_limit = chat_limit;
18642 self
18643 }
18644
18645}
18646
18647impl AsRef<GetStorageStatistics> for GetStorageStatistics {
18648 fn as_ref(&self) -> &GetStorageStatistics { self }
18649}
18650
18651impl AsRef<GetStorageStatistics> for RTDGetStorageStatisticsBuilder {
18652 fn as_ref(&self) -> &GetStorageStatistics { &self.inner }
18653}
18654
18655
18656
18657
18658
18659
18660
18661#[derive(Debug, Clone, Default, Serialize, Deserialize)]
18663pub struct GetStorageStatisticsFast {
18664 #[doc(hidden)]
18665 #[serde(rename(serialize = "@type", deserialize = "@type"))]
18666 td_name: String,
18667 #[doc(hidden)]
18668 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
18669 extra: Option<String>,
18670
18671}
18672
18673impl RObject for GetStorageStatisticsFast {
18674 #[doc(hidden)] fn td_name(&self) -> &'static str { "getStorageStatisticsFast" }
18675 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
18676 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
18677}
18678
18679
18680
18681
18682impl RFunction for GetStorageStatisticsFast {}
18683
18684impl GetStorageStatisticsFast {
18685 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
18686 pub fn builder() -> RTDGetStorageStatisticsFastBuilder {
18687 let mut inner = GetStorageStatisticsFast::default();
18688 inner.td_name = "getStorageStatisticsFast".to_string();
18689 inner.extra = Some(Uuid::new_v4().to_string());
18690 RTDGetStorageStatisticsFastBuilder { inner }
18691 }
18692
18693}
18694
18695#[doc(hidden)]
18696pub struct RTDGetStorageStatisticsFastBuilder {
18697 inner: GetStorageStatisticsFast
18698}
18699
18700impl RTDGetStorageStatisticsFastBuilder {
18701 pub fn build(&self) -> GetStorageStatisticsFast { self.inner.clone() }
18702
18703}
18704
18705impl AsRef<GetStorageStatisticsFast> for GetStorageStatisticsFast {
18706 fn as_ref(&self) -> &GetStorageStatisticsFast { self }
18707}
18708
18709impl AsRef<GetStorageStatisticsFast> for RTDGetStorageStatisticsFastBuilder {
18710 fn as_ref(&self) -> &GetStorageStatisticsFast { &self.inner }
18711}
18712
18713
18714
18715
18716
18717
18718
18719#[derive(Debug, Clone, Default, Serialize, Deserialize)]
18721pub struct GetSuggestedFileName {
18722 #[doc(hidden)]
18723 #[serde(rename(serialize = "@type", deserialize = "@type"))]
18724 td_name: String,
18725 #[doc(hidden)]
18726 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
18727 extra: Option<String>,
18728 file_id: i64,
18730 directory: String,
18732
18733}
18734
18735impl RObject for GetSuggestedFileName {
18736 #[doc(hidden)] fn td_name(&self) -> &'static str { "getSuggestedFileName" }
18737 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
18738 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
18739}
18740
18741
18742
18743
18744impl RFunction for GetSuggestedFileName {}
18745
18746impl GetSuggestedFileName {
18747 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
18748 pub fn builder() -> RTDGetSuggestedFileNameBuilder {
18749 let mut inner = GetSuggestedFileName::default();
18750 inner.td_name = "getSuggestedFileName".to_string();
18751 inner.extra = Some(Uuid::new_v4().to_string());
18752 RTDGetSuggestedFileNameBuilder { inner }
18753 }
18754
18755 pub fn file_id(&self) -> i64 { self.file_id }
18756
18757 pub fn directory(&self) -> &String { &self.directory }
18758
18759}
18760
18761#[doc(hidden)]
18762pub struct RTDGetSuggestedFileNameBuilder {
18763 inner: GetSuggestedFileName
18764}
18765
18766impl RTDGetSuggestedFileNameBuilder {
18767 pub fn build(&self) -> GetSuggestedFileName { self.inner.clone() }
18768
18769
18770 pub fn file_id(&mut self, file_id: i64) -> &mut Self {
18771 self.inner.file_id = file_id;
18772 self
18773 }
18774
18775
18776 pub fn directory<T: AsRef<str>>(&mut self, directory: T) -> &mut Self {
18777 self.inner.directory = directory.as_ref().to_string();
18778 self
18779 }
18780
18781}
18782
18783impl AsRef<GetSuggestedFileName> for GetSuggestedFileName {
18784 fn as_ref(&self) -> &GetSuggestedFileName { self }
18785}
18786
18787impl AsRef<GetSuggestedFileName> for RTDGetSuggestedFileNameBuilder {
18788 fn as_ref(&self) -> &GetSuggestedFileName { &self.inner }
18789}
18790
18791
18792
18793
18794
18795
18796
18797#[derive(Debug, Clone, Default, Serialize, Deserialize)]
18799pub struct GetSuggestedStickerSetName {
18800 #[doc(hidden)]
18801 #[serde(rename(serialize = "@type", deserialize = "@type"))]
18802 td_name: String,
18803 #[doc(hidden)]
18804 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
18805 extra: Option<String>,
18806 title: String,
18808
18809}
18810
18811impl RObject for GetSuggestedStickerSetName {
18812 #[doc(hidden)] fn td_name(&self) -> &'static str { "getSuggestedStickerSetName" }
18813 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
18814 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
18815}
18816
18817
18818
18819
18820impl RFunction for GetSuggestedStickerSetName {}
18821
18822impl GetSuggestedStickerSetName {
18823 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
18824 pub fn builder() -> RTDGetSuggestedStickerSetNameBuilder {
18825 let mut inner = GetSuggestedStickerSetName::default();
18826 inner.td_name = "getSuggestedStickerSetName".to_string();
18827 inner.extra = Some(Uuid::new_v4().to_string());
18828 RTDGetSuggestedStickerSetNameBuilder { inner }
18829 }
18830
18831 pub fn title(&self) -> &String { &self.title }
18832
18833}
18834
18835#[doc(hidden)]
18836pub struct RTDGetSuggestedStickerSetNameBuilder {
18837 inner: GetSuggestedStickerSetName
18838}
18839
18840impl RTDGetSuggestedStickerSetNameBuilder {
18841 pub fn build(&self) -> GetSuggestedStickerSetName { self.inner.clone() }
18842
18843
18844 pub fn title<T: AsRef<str>>(&mut self, title: T) -> &mut Self {
18845 self.inner.title = title.as_ref().to_string();
18846 self
18847 }
18848
18849}
18850
18851impl AsRef<GetSuggestedStickerSetName> for GetSuggestedStickerSetName {
18852 fn as_ref(&self) -> &GetSuggestedStickerSetName { self }
18853}
18854
18855impl AsRef<GetSuggestedStickerSetName> for RTDGetSuggestedStickerSetNameBuilder {
18856 fn as_ref(&self) -> &GetSuggestedStickerSetName { &self.inner }
18857}
18858
18859
18860
18861
18862
18863
18864
18865#[derive(Debug, Clone, Default, Serialize, Deserialize)]
18867pub struct GetSuitableDiscussionChats {
18868 #[doc(hidden)]
18869 #[serde(rename(serialize = "@type", deserialize = "@type"))]
18870 td_name: String,
18871 #[doc(hidden)]
18872 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
18873 extra: Option<String>,
18874
18875}
18876
18877impl RObject for GetSuitableDiscussionChats {
18878 #[doc(hidden)] fn td_name(&self) -> &'static str { "getSuitableDiscussionChats" }
18879 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
18880 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
18881}
18882
18883
18884
18885
18886impl RFunction for GetSuitableDiscussionChats {}
18887
18888impl GetSuitableDiscussionChats {
18889 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
18890 pub fn builder() -> RTDGetSuitableDiscussionChatsBuilder {
18891 let mut inner = GetSuitableDiscussionChats::default();
18892 inner.td_name = "getSuitableDiscussionChats".to_string();
18893 inner.extra = Some(Uuid::new_v4().to_string());
18894 RTDGetSuitableDiscussionChatsBuilder { inner }
18895 }
18896
18897}
18898
18899#[doc(hidden)]
18900pub struct RTDGetSuitableDiscussionChatsBuilder {
18901 inner: GetSuitableDiscussionChats
18902}
18903
18904impl RTDGetSuitableDiscussionChatsBuilder {
18905 pub fn build(&self) -> GetSuitableDiscussionChats { self.inner.clone() }
18906
18907}
18908
18909impl AsRef<GetSuitableDiscussionChats> for GetSuitableDiscussionChats {
18910 fn as_ref(&self) -> &GetSuitableDiscussionChats { self }
18911}
18912
18913impl AsRef<GetSuitableDiscussionChats> for RTDGetSuitableDiscussionChatsBuilder {
18914 fn as_ref(&self) -> &GetSuitableDiscussionChats { &self.inner }
18915}
18916
18917
18918
18919
18920
18921
18922
18923#[derive(Debug, Clone, Default, Serialize, Deserialize)]
18925pub struct GetSupergroup {
18926 #[doc(hidden)]
18927 #[serde(rename(serialize = "@type", deserialize = "@type"))]
18928 td_name: String,
18929 #[doc(hidden)]
18930 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
18931 extra: Option<String>,
18932 supergroup_id: i64,
18934
18935}
18936
18937impl RObject for GetSupergroup {
18938 #[doc(hidden)] fn td_name(&self) -> &'static str { "getSupergroup" }
18939 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
18940 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
18941}
18942
18943
18944
18945
18946impl RFunction for GetSupergroup {}
18947
18948impl GetSupergroup {
18949 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
18950 pub fn builder() -> RTDGetSupergroupBuilder {
18951 let mut inner = GetSupergroup::default();
18952 inner.td_name = "getSupergroup".to_string();
18953 inner.extra = Some(Uuid::new_v4().to_string());
18954 RTDGetSupergroupBuilder { inner }
18955 }
18956
18957 pub fn supergroup_id(&self) -> i64 { self.supergroup_id }
18958
18959}
18960
18961#[doc(hidden)]
18962pub struct RTDGetSupergroupBuilder {
18963 inner: GetSupergroup
18964}
18965
18966impl RTDGetSupergroupBuilder {
18967 pub fn build(&self) -> GetSupergroup { self.inner.clone() }
18968
18969
18970 pub fn supergroup_id(&mut self, supergroup_id: i64) -> &mut Self {
18971 self.inner.supergroup_id = supergroup_id;
18972 self
18973 }
18974
18975}
18976
18977impl AsRef<GetSupergroup> for GetSupergroup {
18978 fn as_ref(&self) -> &GetSupergroup { self }
18979}
18980
18981impl AsRef<GetSupergroup> for RTDGetSupergroupBuilder {
18982 fn as_ref(&self) -> &GetSupergroup { &self.inner }
18983}
18984
18985
18986
18987
18988
18989
18990
18991#[derive(Debug, Clone, Default, Serialize, Deserialize)]
18993pub struct GetSupergroupFullInfo {
18994 #[doc(hidden)]
18995 #[serde(rename(serialize = "@type", deserialize = "@type"))]
18996 td_name: String,
18997 #[doc(hidden)]
18998 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
18999 extra: Option<String>,
19000 supergroup_id: i64,
19002
19003}
19004
19005impl RObject for GetSupergroupFullInfo {
19006 #[doc(hidden)] fn td_name(&self) -> &'static str { "getSupergroupFullInfo" }
19007 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
19008 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
19009}
19010
19011
19012
19013
19014impl RFunction for GetSupergroupFullInfo {}
19015
19016impl GetSupergroupFullInfo {
19017 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
19018 pub fn builder() -> RTDGetSupergroupFullInfoBuilder {
19019 let mut inner = GetSupergroupFullInfo::default();
19020 inner.td_name = "getSupergroupFullInfo".to_string();
19021 inner.extra = Some(Uuid::new_v4().to_string());
19022 RTDGetSupergroupFullInfoBuilder { inner }
19023 }
19024
19025 pub fn supergroup_id(&self) -> i64 { self.supergroup_id }
19026
19027}
19028
19029#[doc(hidden)]
19030pub struct RTDGetSupergroupFullInfoBuilder {
19031 inner: GetSupergroupFullInfo
19032}
19033
19034impl RTDGetSupergroupFullInfoBuilder {
19035 pub fn build(&self) -> GetSupergroupFullInfo { self.inner.clone() }
19036
19037
19038 pub fn supergroup_id(&mut self, supergroup_id: i64) -> &mut Self {
19039 self.inner.supergroup_id = supergroup_id;
19040 self
19041 }
19042
19043}
19044
19045impl AsRef<GetSupergroupFullInfo> for GetSupergroupFullInfo {
19046 fn as_ref(&self) -> &GetSupergroupFullInfo { self }
19047}
19048
19049impl AsRef<GetSupergroupFullInfo> for RTDGetSupergroupFullInfoBuilder {
19050 fn as_ref(&self) -> &GetSupergroupFullInfo { &self.inner }
19051}
19052
19053
19054
19055
19056
19057
19058
19059#[derive(Debug, Clone, Default, Serialize, Deserialize)]
19061pub struct GetSupergroupMembers {
19062 #[doc(hidden)]
19063 #[serde(rename(serialize = "@type", deserialize = "@type"))]
19064 td_name: String,
19065 #[doc(hidden)]
19066 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
19067 extra: Option<String>,
19068 supergroup_id: i64,
19070 filter: SupergroupMembersFilter,
19072 offset: i64,
19074 limit: i64,
19076
19077}
19078
19079impl RObject for GetSupergroupMembers {
19080 #[doc(hidden)] fn td_name(&self) -> &'static str { "getSupergroupMembers" }
19081 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
19082 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
19083}
19084
19085
19086
19087
19088impl RFunction for GetSupergroupMembers {}
19089
19090impl GetSupergroupMembers {
19091 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
19092 pub fn builder() -> RTDGetSupergroupMembersBuilder {
19093 let mut inner = GetSupergroupMembers::default();
19094 inner.td_name = "getSupergroupMembers".to_string();
19095 inner.extra = Some(Uuid::new_v4().to_string());
19096 RTDGetSupergroupMembersBuilder { inner }
19097 }
19098
19099 pub fn supergroup_id(&self) -> i64 { self.supergroup_id }
19100
19101 pub fn filter(&self) -> &SupergroupMembersFilter { &self.filter }
19102
19103 pub fn offset(&self) -> i64 { self.offset }
19104
19105 pub fn limit(&self) -> i64 { self.limit }
19106
19107}
19108
19109#[doc(hidden)]
19110pub struct RTDGetSupergroupMembersBuilder {
19111 inner: GetSupergroupMembers
19112}
19113
19114impl RTDGetSupergroupMembersBuilder {
19115 pub fn build(&self) -> GetSupergroupMembers { self.inner.clone() }
19116
19117
19118 pub fn supergroup_id(&mut self, supergroup_id: i64) -> &mut Self {
19119 self.inner.supergroup_id = supergroup_id;
19120 self
19121 }
19122
19123
19124 pub fn filter<T: AsRef<SupergroupMembersFilter>>(&mut self, filter: T) -> &mut Self {
19125 self.inner.filter = filter.as_ref().clone();
19126 self
19127 }
19128
19129
19130 pub fn offset(&mut self, offset: i64) -> &mut Self {
19131 self.inner.offset = offset;
19132 self
19133 }
19134
19135
19136 pub fn limit(&mut self, limit: i64) -> &mut Self {
19137 self.inner.limit = limit;
19138 self
19139 }
19140
19141}
19142
19143impl AsRef<GetSupergroupMembers> for GetSupergroupMembers {
19144 fn as_ref(&self) -> &GetSupergroupMembers { self }
19145}
19146
19147impl AsRef<GetSupergroupMembers> for RTDGetSupergroupMembersBuilder {
19148 fn as_ref(&self) -> &GetSupergroupMembers { &self.inner }
19149}
19150
19151
19152
19153
19154
19155
19156
19157#[derive(Debug, Clone, Default, Serialize, Deserialize)]
19159pub struct GetSupportUser {
19160 #[doc(hidden)]
19161 #[serde(rename(serialize = "@type", deserialize = "@type"))]
19162 td_name: String,
19163 #[doc(hidden)]
19164 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
19165 extra: Option<String>,
19166
19167}
19168
19169impl RObject for GetSupportUser {
19170 #[doc(hidden)] fn td_name(&self) -> &'static str { "getSupportUser" }
19171 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
19172 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
19173}
19174
19175
19176
19177
19178impl RFunction for GetSupportUser {}
19179
19180impl GetSupportUser {
19181 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
19182 pub fn builder() -> RTDGetSupportUserBuilder {
19183 let mut inner = GetSupportUser::default();
19184 inner.td_name = "getSupportUser".to_string();
19185 inner.extra = Some(Uuid::new_v4().to_string());
19186 RTDGetSupportUserBuilder { inner }
19187 }
19188
19189}
19190
19191#[doc(hidden)]
19192pub struct RTDGetSupportUserBuilder {
19193 inner: GetSupportUser
19194}
19195
19196impl RTDGetSupportUserBuilder {
19197 pub fn build(&self) -> GetSupportUser { self.inner.clone() }
19198
19199}
19200
19201impl AsRef<GetSupportUser> for GetSupportUser {
19202 fn as_ref(&self) -> &GetSupportUser { self }
19203}
19204
19205impl AsRef<GetSupportUser> for RTDGetSupportUserBuilder {
19206 fn as_ref(&self) -> &GetSupportUser { &self.inner }
19207}
19208
19209
19210
19211
19212
19213
19214
19215#[derive(Debug, Clone, Default, Serialize, Deserialize)]
19217pub struct GetTemporaryPasswordState {
19218 #[doc(hidden)]
19219 #[serde(rename(serialize = "@type", deserialize = "@type"))]
19220 td_name: String,
19221 #[doc(hidden)]
19222 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
19223 extra: Option<String>,
19224
19225}
19226
19227impl RObject for GetTemporaryPasswordState {
19228 #[doc(hidden)] fn td_name(&self) -> &'static str { "getTemporaryPasswordState" }
19229 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
19230 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
19231}
19232
19233
19234
19235
19236impl RFunction for GetTemporaryPasswordState {}
19237
19238impl GetTemporaryPasswordState {
19239 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
19240 pub fn builder() -> RTDGetTemporaryPasswordStateBuilder {
19241 let mut inner = GetTemporaryPasswordState::default();
19242 inner.td_name = "getTemporaryPasswordState".to_string();
19243 inner.extra = Some(Uuid::new_v4().to_string());
19244 RTDGetTemporaryPasswordStateBuilder { inner }
19245 }
19246
19247}
19248
19249#[doc(hidden)]
19250pub struct RTDGetTemporaryPasswordStateBuilder {
19251 inner: GetTemporaryPasswordState
19252}
19253
19254impl RTDGetTemporaryPasswordStateBuilder {
19255 pub fn build(&self) -> GetTemporaryPasswordState { self.inner.clone() }
19256
19257}
19258
19259impl AsRef<GetTemporaryPasswordState> for GetTemporaryPasswordState {
19260 fn as_ref(&self) -> &GetTemporaryPasswordState { self }
19261}
19262
19263impl AsRef<GetTemporaryPasswordState> for RTDGetTemporaryPasswordStateBuilder {
19264 fn as_ref(&self) -> &GetTemporaryPasswordState { &self.inner }
19265}
19266
19267
19268
19269
19270
19271
19272
19273#[derive(Debug, Clone, Default, Serialize, Deserialize)]
19275pub struct GetTextEntities {
19276 #[doc(hidden)]
19277 #[serde(rename(serialize = "@type", deserialize = "@type"))]
19278 td_name: String,
19279 #[doc(hidden)]
19280 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
19281 extra: Option<String>,
19282 text: String,
19284
19285}
19286
19287impl RObject for GetTextEntities {
19288 #[doc(hidden)] fn td_name(&self) -> &'static str { "getTextEntities" }
19289 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
19290 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
19291}
19292
19293
19294
19295
19296impl RFunction for GetTextEntities {}
19297
19298impl GetTextEntities {
19299 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
19300 pub fn builder() -> RTDGetTextEntitiesBuilder {
19301 let mut inner = GetTextEntities::default();
19302 inner.td_name = "getTextEntities".to_string();
19303 inner.extra = Some(Uuid::new_v4().to_string());
19304 RTDGetTextEntitiesBuilder { inner }
19305 }
19306
19307 pub fn text(&self) -> &String { &self.text }
19308
19309}
19310
19311#[doc(hidden)]
19312pub struct RTDGetTextEntitiesBuilder {
19313 inner: GetTextEntities
19314}
19315
19316impl RTDGetTextEntitiesBuilder {
19317 pub fn build(&self) -> GetTextEntities { self.inner.clone() }
19318
19319
19320 pub fn text<T: AsRef<str>>(&mut self, text: T) -> &mut Self {
19321 self.inner.text = text.as_ref().to_string();
19322 self
19323 }
19324
19325}
19326
19327impl AsRef<GetTextEntities> for GetTextEntities {
19328 fn as_ref(&self) -> &GetTextEntities { self }
19329}
19330
19331impl AsRef<GetTextEntities> for RTDGetTextEntitiesBuilder {
19332 fn as_ref(&self) -> &GetTextEntities { &self.inner }
19333}
19334
19335
19336
19337
19338
19339
19340
19341#[derive(Debug, Clone, Default, Serialize, Deserialize)]
19343pub struct GetTopChats {
19344 #[doc(hidden)]
19345 #[serde(rename(serialize = "@type", deserialize = "@type"))]
19346 td_name: String,
19347 #[doc(hidden)]
19348 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
19349 extra: Option<String>,
19350 category: TopChatCategory,
19352 limit: i64,
19354
19355}
19356
19357impl RObject for GetTopChats {
19358 #[doc(hidden)] fn td_name(&self) -> &'static str { "getTopChats" }
19359 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
19360 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
19361}
19362
19363
19364
19365
19366impl RFunction for GetTopChats {}
19367
19368impl GetTopChats {
19369 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
19370 pub fn builder() -> RTDGetTopChatsBuilder {
19371 let mut inner = GetTopChats::default();
19372 inner.td_name = "getTopChats".to_string();
19373 inner.extra = Some(Uuid::new_v4().to_string());
19374 RTDGetTopChatsBuilder { inner }
19375 }
19376
19377 pub fn category(&self) -> &TopChatCategory { &self.category }
19378
19379 pub fn limit(&self) -> i64 { self.limit }
19380
19381}
19382
19383#[doc(hidden)]
19384pub struct RTDGetTopChatsBuilder {
19385 inner: GetTopChats
19386}
19387
19388impl RTDGetTopChatsBuilder {
19389 pub fn build(&self) -> GetTopChats { self.inner.clone() }
19390
19391
19392 pub fn category<T: AsRef<TopChatCategory>>(&mut self, category: T) -> &mut Self {
19393 self.inner.category = category.as_ref().clone();
19394 self
19395 }
19396
19397
19398 pub fn limit(&mut self, limit: i64) -> &mut Self {
19399 self.inner.limit = limit;
19400 self
19401 }
19402
19403}
19404
19405impl AsRef<GetTopChats> for GetTopChats {
19406 fn as_ref(&self) -> &GetTopChats { self }
19407}
19408
19409impl AsRef<GetTopChats> for RTDGetTopChatsBuilder {
19410 fn as_ref(&self) -> &GetTopChats { &self.inner }
19411}
19412
19413
19414
19415
19416
19417
19418
19419#[derive(Debug, Clone, Default, Serialize, Deserialize)]
19421pub struct GetTrendingStickerSets {
19422 #[doc(hidden)]
19423 #[serde(rename(serialize = "@type", deserialize = "@type"))]
19424 td_name: String,
19425 #[doc(hidden)]
19426 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
19427 extra: Option<String>,
19428 offset: i64,
19430 limit: i64,
19432
19433}
19434
19435impl RObject for GetTrendingStickerSets {
19436 #[doc(hidden)] fn td_name(&self) -> &'static str { "getTrendingStickerSets" }
19437 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
19438 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
19439}
19440
19441
19442
19443
19444impl RFunction for GetTrendingStickerSets {}
19445
19446impl GetTrendingStickerSets {
19447 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
19448 pub fn builder() -> RTDGetTrendingStickerSetsBuilder {
19449 let mut inner = GetTrendingStickerSets::default();
19450 inner.td_name = "getTrendingStickerSets".to_string();
19451 inner.extra = Some(Uuid::new_v4().to_string());
19452 RTDGetTrendingStickerSetsBuilder { inner }
19453 }
19454
19455 pub fn offset(&self) -> i64 { self.offset }
19456
19457 pub fn limit(&self) -> i64 { self.limit }
19458
19459}
19460
19461#[doc(hidden)]
19462pub struct RTDGetTrendingStickerSetsBuilder {
19463 inner: GetTrendingStickerSets
19464}
19465
19466impl RTDGetTrendingStickerSetsBuilder {
19467 pub fn build(&self) -> GetTrendingStickerSets { self.inner.clone() }
19468
19469
19470 pub fn offset(&mut self, offset: i64) -> &mut Self {
19471 self.inner.offset = offset;
19472 self
19473 }
19474
19475
19476 pub fn limit(&mut self, limit: i64) -> &mut Self {
19477 self.inner.limit = limit;
19478 self
19479 }
19480
19481}
19482
19483impl AsRef<GetTrendingStickerSets> for GetTrendingStickerSets {
19484 fn as_ref(&self) -> &GetTrendingStickerSets { self }
19485}
19486
19487impl AsRef<GetTrendingStickerSets> for RTDGetTrendingStickerSetsBuilder {
19488 fn as_ref(&self) -> &GetTrendingStickerSets { &self.inner }
19489}
19490
19491
19492
19493
19494
19495
19496
19497#[derive(Debug, Clone, Default, Serialize, Deserialize)]
19499pub struct GetUser {
19500 #[doc(hidden)]
19501 #[serde(rename(serialize = "@type", deserialize = "@type"))]
19502 td_name: String,
19503 #[doc(hidden)]
19504 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
19505 extra: Option<String>,
19506 user_id: i64,
19508
19509}
19510
19511impl RObject for GetUser {
19512 #[doc(hidden)] fn td_name(&self) -> &'static str { "getUser" }
19513 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
19514 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
19515}
19516
19517
19518
19519
19520impl RFunction for GetUser {}
19521
19522impl GetUser {
19523 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
19524 pub fn builder() -> RTDGetUserBuilder {
19525 let mut inner = GetUser::default();
19526 inner.td_name = "getUser".to_string();
19527 inner.extra = Some(Uuid::new_v4().to_string());
19528 RTDGetUserBuilder { inner }
19529 }
19530
19531 pub fn user_id(&self) -> i64 { self.user_id }
19532
19533}
19534
19535#[doc(hidden)]
19536pub struct RTDGetUserBuilder {
19537 inner: GetUser
19538}
19539
19540impl RTDGetUserBuilder {
19541 pub fn build(&self) -> GetUser { self.inner.clone() }
19542
19543
19544 pub fn user_id(&mut self, user_id: i64) -> &mut Self {
19545 self.inner.user_id = user_id;
19546 self
19547 }
19548
19549}
19550
19551impl AsRef<GetUser> for GetUser {
19552 fn as_ref(&self) -> &GetUser { self }
19553}
19554
19555impl AsRef<GetUser> for RTDGetUserBuilder {
19556 fn as_ref(&self) -> &GetUser { &self.inner }
19557}
19558
19559
19560
19561
19562
19563
19564
19565#[derive(Debug, Clone, Default, Serialize, Deserialize)]
19567pub struct GetUserFullInfo {
19568 #[doc(hidden)]
19569 #[serde(rename(serialize = "@type", deserialize = "@type"))]
19570 td_name: String,
19571 #[doc(hidden)]
19572 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
19573 extra: Option<String>,
19574 user_id: i64,
19576
19577}
19578
19579impl RObject for GetUserFullInfo {
19580 #[doc(hidden)] fn td_name(&self) -> &'static str { "getUserFullInfo" }
19581 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
19582 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
19583}
19584
19585
19586
19587
19588impl RFunction for GetUserFullInfo {}
19589
19590impl GetUserFullInfo {
19591 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
19592 pub fn builder() -> RTDGetUserFullInfoBuilder {
19593 let mut inner = GetUserFullInfo::default();
19594 inner.td_name = "getUserFullInfo".to_string();
19595 inner.extra = Some(Uuid::new_v4().to_string());
19596 RTDGetUserFullInfoBuilder { inner }
19597 }
19598
19599 pub fn user_id(&self) -> i64 { self.user_id }
19600
19601}
19602
19603#[doc(hidden)]
19604pub struct RTDGetUserFullInfoBuilder {
19605 inner: GetUserFullInfo
19606}
19607
19608impl RTDGetUserFullInfoBuilder {
19609 pub fn build(&self) -> GetUserFullInfo { self.inner.clone() }
19610
19611
19612 pub fn user_id(&mut self, user_id: i64) -> &mut Self {
19613 self.inner.user_id = user_id;
19614 self
19615 }
19616
19617}
19618
19619impl AsRef<GetUserFullInfo> for GetUserFullInfo {
19620 fn as_ref(&self) -> &GetUserFullInfo { self }
19621}
19622
19623impl AsRef<GetUserFullInfo> for RTDGetUserFullInfoBuilder {
19624 fn as_ref(&self) -> &GetUserFullInfo { &self.inner }
19625}
19626
19627
19628
19629
19630
19631
19632
19633#[derive(Debug, Clone, Default, Serialize, Deserialize)]
19635pub struct GetUserPrivacySettingRules {
19636 #[doc(hidden)]
19637 #[serde(rename(serialize = "@type", deserialize = "@type"))]
19638 td_name: String,
19639 #[doc(hidden)]
19640 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
19641 extra: Option<String>,
19642 setting: UserPrivacySetting,
19644
19645}
19646
19647impl RObject for GetUserPrivacySettingRules {
19648 #[doc(hidden)] fn td_name(&self) -> &'static str { "getUserPrivacySettingRules" }
19649 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
19650 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
19651}
19652
19653
19654
19655
19656impl RFunction for GetUserPrivacySettingRules {}
19657
19658impl GetUserPrivacySettingRules {
19659 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
19660 pub fn builder() -> RTDGetUserPrivacySettingRulesBuilder {
19661 let mut inner = GetUserPrivacySettingRules::default();
19662 inner.td_name = "getUserPrivacySettingRules".to_string();
19663 inner.extra = Some(Uuid::new_v4().to_string());
19664 RTDGetUserPrivacySettingRulesBuilder { inner }
19665 }
19666
19667 pub fn setting(&self) -> &UserPrivacySetting { &self.setting }
19668
19669}
19670
19671#[doc(hidden)]
19672pub struct RTDGetUserPrivacySettingRulesBuilder {
19673 inner: GetUserPrivacySettingRules
19674}
19675
19676impl RTDGetUserPrivacySettingRulesBuilder {
19677 pub fn build(&self) -> GetUserPrivacySettingRules { self.inner.clone() }
19678
19679
19680 pub fn setting<T: AsRef<UserPrivacySetting>>(&mut self, setting: T) -> &mut Self {
19681 self.inner.setting = setting.as_ref().clone();
19682 self
19683 }
19684
19685}
19686
19687impl AsRef<GetUserPrivacySettingRules> for GetUserPrivacySettingRules {
19688 fn as_ref(&self) -> &GetUserPrivacySettingRules { self }
19689}
19690
19691impl AsRef<GetUserPrivacySettingRules> for RTDGetUserPrivacySettingRulesBuilder {
19692 fn as_ref(&self) -> &GetUserPrivacySettingRules { &self.inner }
19693}
19694
19695
19696
19697
19698
19699
19700
19701#[derive(Debug, Clone, Default, Serialize, Deserialize)]
19703pub struct GetUserProfilePhotos {
19704 #[doc(hidden)]
19705 #[serde(rename(serialize = "@type", deserialize = "@type"))]
19706 td_name: String,
19707 #[doc(hidden)]
19708 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
19709 extra: Option<String>,
19710 user_id: i64,
19712 offset: i64,
19714 limit: i64,
19716
19717}
19718
19719impl RObject for GetUserProfilePhotos {
19720 #[doc(hidden)] fn td_name(&self) -> &'static str { "getUserProfilePhotos" }
19721 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
19722 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
19723}
19724
19725
19726
19727
19728impl RFunction for GetUserProfilePhotos {}
19729
19730impl GetUserProfilePhotos {
19731 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
19732 pub fn builder() -> RTDGetUserProfilePhotosBuilder {
19733 let mut inner = GetUserProfilePhotos::default();
19734 inner.td_name = "getUserProfilePhotos".to_string();
19735 inner.extra = Some(Uuid::new_v4().to_string());
19736 RTDGetUserProfilePhotosBuilder { inner }
19737 }
19738
19739 pub fn user_id(&self) -> i64 { self.user_id }
19740
19741 pub fn offset(&self) -> i64 { self.offset }
19742
19743 pub fn limit(&self) -> i64 { self.limit }
19744
19745}
19746
19747#[doc(hidden)]
19748pub struct RTDGetUserProfilePhotosBuilder {
19749 inner: GetUserProfilePhotos
19750}
19751
19752impl RTDGetUserProfilePhotosBuilder {
19753 pub fn build(&self) -> GetUserProfilePhotos { self.inner.clone() }
19754
19755
19756 pub fn user_id(&mut self, user_id: i64) -> &mut Self {
19757 self.inner.user_id = user_id;
19758 self
19759 }
19760
19761
19762 pub fn offset(&mut self, offset: i64) -> &mut Self {
19763 self.inner.offset = offset;
19764 self
19765 }
19766
19767
19768 pub fn limit(&mut self, limit: i64) -> &mut Self {
19769 self.inner.limit = limit;
19770 self
19771 }
19772
19773}
19774
19775impl AsRef<GetUserProfilePhotos> for GetUserProfilePhotos {
19776 fn as_ref(&self) -> &GetUserProfilePhotos { self }
19777}
19778
19779impl AsRef<GetUserProfilePhotos> for RTDGetUserProfilePhotosBuilder {
19780 fn as_ref(&self) -> &GetUserProfilePhotos { &self.inner }
19781}
19782
19783
19784
19785
19786
19787
19788
19789#[derive(Debug, Clone, Default, Serialize, Deserialize)]
19791pub struct GetVideoChatAvailableParticipants {
19792 #[doc(hidden)]
19793 #[serde(rename(serialize = "@type", deserialize = "@type"))]
19794 td_name: String,
19795 #[doc(hidden)]
19796 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
19797 extra: Option<String>,
19798 chat_id: i64,
19800
19801}
19802
19803impl RObject for GetVideoChatAvailableParticipants {
19804 #[doc(hidden)] fn td_name(&self) -> &'static str { "getVideoChatAvailableParticipants" }
19805 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
19806 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
19807}
19808
19809
19810
19811
19812impl RFunction for GetVideoChatAvailableParticipants {}
19813
19814impl GetVideoChatAvailableParticipants {
19815 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
19816 pub fn builder() -> RTDGetVideoChatAvailableParticipantsBuilder {
19817 let mut inner = GetVideoChatAvailableParticipants::default();
19818 inner.td_name = "getVideoChatAvailableParticipants".to_string();
19819 inner.extra = Some(Uuid::new_v4().to_string());
19820 RTDGetVideoChatAvailableParticipantsBuilder { inner }
19821 }
19822
19823 pub fn chat_id(&self) -> i64 { self.chat_id }
19824
19825}
19826
19827#[doc(hidden)]
19828pub struct RTDGetVideoChatAvailableParticipantsBuilder {
19829 inner: GetVideoChatAvailableParticipants
19830}
19831
19832impl RTDGetVideoChatAvailableParticipantsBuilder {
19833 pub fn build(&self) -> GetVideoChatAvailableParticipants { self.inner.clone() }
19834
19835
19836 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
19837 self.inner.chat_id = chat_id;
19838 self
19839 }
19840
19841}
19842
19843impl AsRef<GetVideoChatAvailableParticipants> for GetVideoChatAvailableParticipants {
19844 fn as_ref(&self) -> &GetVideoChatAvailableParticipants { self }
19845}
19846
19847impl AsRef<GetVideoChatAvailableParticipants> for RTDGetVideoChatAvailableParticipantsBuilder {
19848 fn as_ref(&self) -> &GetVideoChatAvailableParticipants { &self.inner }
19849}
19850
19851
19852
19853
19854
19855
19856
19857#[derive(Debug, Clone, Default, Serialize, Deserialize)]
19859pub struct GetWebPageInstantView {
19860 #[doc(hidden)]
19861 #[serde(rename(serialize = "@type", deserialize = "@type"))]
19862 td_name: String,
19863 #[doc(hidden)]
19864 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
19865 extra: Option<String>,
19866 url: String,
19868 force_full: bool,
19870
19871}
19872
19873impl RObject for GetWebPageInstantView {
19874 #[doc(hidden)] fn td_name(&self) -> &'static str { "getWebPageInstantView" }
19875 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
19876 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
19877}
19878
19879
19880
19881
19882impl RFunction for GetWebPageInstantView {}
19883
19884impl GetWebPageInstantView {
19885 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
19886 pub fn builder() -> RTDGetWebPageInstantViewBuilder {
19887 let mut inner = GetWebPageInstantView::default();
19888 inner.td_name = "getWebPageInstantView".to_string();
19889 inner.extra = Some(Uuid::new_v4().to_string());
19890 RTDGetWebPageInstantViewBuilder { inner }
19891 }
19892
19893 pub fn url(&self) -> &String { &self.url }
19894
19895 pub fn force_full(&self) -> bool { self.force_full }
19896
19897}
19898
19899#[doc(hidden)]
19900pub struct RTDGetWebPageInstantViewBuilder {
19901 inner: GetWebPageInstantView
19902}
19903
19904impl RTDGetWebPageInstantViewBuilder {
19905 pub fn build(&self) -> GetWebPageInstantView { self.inner.clone() }
19906
19907
19908 pub fn url<T: AsRef<str>>(&mut self, url: T) -> &mut Self {
19909 self.inner.url = url.as_ref().to_string();
19910 self
19911 }
19912
19913
19914 pub fn force_full(&mut self, force_full: bool) -> &mut Self {
19915 self.inner.force_full = force_full;
19916 self
19917 }
19918
19919}
19920
19921impl AsRef<GetWebPageInstantView> for GetWebPageInstantView {
19922 fn as_ref(&self) -> &GetWebPageInstantView { self }
19923}
19924
19925impl AsRef<GetWebPageInstantView> for RTDGetWebPageInstantViewBuilder {
19926 fn as_ref(&self) -> &GetWebPageInstantView { &self.inner }
19927}
19928
19929
19930
19931
19932
19933
19934
19935#[derive(Debug, Clone, Default, Serialize, Deserialize)]
19937pub struct GetWebPagePreview {
19938 #[doc(hidden)]
19939 #[serde(rename(serialize = "@type", deserialize = "@type"))]
19940 td_name: String,
19941 #[doc(hidden)]
19942 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
19943 extra: Option<String>,
19944 text: FormattedText,
19946
19947}
19948
19949impl RObject for GetWebPagePreview {
19950 #[doc(hidden)] fn td_name(&self) -> &'static str { "getWebPagePreview" }
19951 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
19952 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
19953}
19954
19955
19956
19957
19958impl RFunction for GetWebPagePreview {}
19959
19960impl GetWebPagePreview {
19961 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
19962 pub fn builder() -> RTDGetWebPagePreviewBuilder {
19963 let mut inner = GetWebPagePreview::default();
19964 inner.td_name = "getWebPagePreview".to_string();
19965 inner.extra = Some(Uuid::new_v4().to_string());
19966 RTDGetWebPagePreviewBuilder { inner }
19967 }
19968
19969 pub fn text(&self) -> &FormattedText { &self.text }
19970
19971}
19972
19973#[doc(hidden)]
19974pub struct RTDGetWebPagePreviewBuilder {
19975 inner: GetWebPagePreview
19976}
19977
19978impl RTDGetWebPagePreviewBuilder {
19979 pub fn build(&self) -> GetWebPagePreview { self.inner.clone() }
19980
19981
19982 pub fn text<T: AsRef<FormattedText>>(&mut self, text: T) -> &mut Self {
19983 self.inner.text = text.as_ref().clone();
19984 self
19985 }
19986
19987}
19988
19989impl AsRef<GetWebPagePreview> for GetWebPagePreview {
19990 fn as_ref(&self) -> &GetWebPagePreview { self }
19991}
19992
19993impl AsRef<GetWebPagePreview> for RTDGetWebPagePreviewBuilder {
19994 fn as_ref(&self) -> &GetWebPagePreview { &self.inner }
19995}
19996
19997
19998
19999
20000
20001
20002
20003#[derive(Debug, Clone, Default, Serialize, Deserialize)]
20005pub struct HideSuggestedAction {
20006 #[doc(hidden)]
20007 #[serde(rename(serialize = "@type", deserialize = "@type"))]
20008 td_name: String,
20009 #[doc(hidden)]
20010 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
20011 extra: Option<String>,
20012 action: SuggestedAction,
20014
20015}
20016
20017impl RObject for HideSuggestedAction {
20018 #[doc(hidden)] fn td_name(&self) -> &'static str { "hideSuggestedAction" }
20019 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
20020 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
20021}
20022
20023
20024
20025
20026impl RFunction for HideSuggestedAction {}
20027
20028impl HideSuggestedAction {
20029 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
20030 pub fn builder() -> RTDHideSuggestedActionBuilder {
20031 let mut inner = HideSuggestedAction::default();
20032 inner.td_name = "hideSuggestedAction".to_string();
20033 inner.extra = Some(Uuid::new_v4().to_string());
20034 RTDHideSuggestedActionBuilder { inner }
20035 }
20036
20037 pub fn action(&self) -> &SuggestedAction { &self.action }
20038
20039}
20040
20041#[doc(hidden)]
20042pub struct RTDHideSuggestedActionBuilder {
20043 inner: HideSuggestedAction
20044}
20045
20046impl RTDHideSuggestedActionBuilder {
20047 pub fn build(&self) -> HideSuggestedAction { self.inner.clone() }
20048
20049
20050 pub fn action<T: AsRef<SuggestedAction>>(&mut self, action: T) -> &mut Self {
20051 self.inner.action = action.as_ref().clone();
20052 self
20053 }
20054
20055}
20056
20057impl AsRef<HideSuggestedAction> for HideSuggestedAction {
20058 fn as_ref(&self) -> &HideSuggestedAction { self }
20059}
20060
20061impl AsRef<HideSuggestedAction> for RTDHideSuggestedActionBuilder {
20062 fn as_ref(&self) -> &HideSuggestedAction { &self.inner }
20063}
20064
20065
20066
20067
20068
20069
20070
20071#[derive(Debug, Clone, Default, Serialize, Deserialize)]
20073pub struct ImportContacts {
20074 #[doc(hidden)]
20075 #[serde(rename(serialize = "@type", deserialize = "@type"))]
20076 td_name: String,
20077 #[doc(hidden)]
20078 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
20079 extra: Option<String>,
20080 contacts: Vec<Contact>,
20082
20083}
20084
20085impl RObject for ImportContacts {
20086 #[doc(hidden)] fn td_name(&self) -> &'static str { "importContacts" }
20087 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
20088 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
20089}
20090
20091
20092
20093
20094impl RFunction for ImportContacts {}
20095
20096impl ImportContacts {
20097 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
20098 pub fn builder() -> RTDImportContactsBuilder {
20099 let mut inner = ImportContacts::default();
20100 inner.td_name = "importContacts".to_string();
20101 inner.extra = Some(Uuid::new_v4().to_string());
20102 RTDImportContactsBuilder { inner }
20103 }
20104
20105 pub fn contacts(&self) -> &Vec<Contact> { &self.contacts }
20106
20107}
20108
20109#[doc(hidden)]
20110pub struct RTDImportContactsBuilder {
20111 inner: ImportContacts
20112}
20113
20114impl RTDImportContactsBuilder {
20115 pub fn build(&self) -> ImportContacts { self.inner.clone() }
20116
20117
20118 pub fn contacts(&mut self, contacts: Vec<Contact>) -> &mut Self {
20119 self.inner.contacts = contacts;
20120 self
20121 }
20122
20123}
20124
20125impl AsRef<ImportContacts> for ImportContacts {
20126 fn as_ref(&self) -> &ImportContacts { self }
20127}
20128
20129impl AsRef<ImportContacts> for RTDImportContactsBuilder {
20130 fn as_ref(&self) -> &ImportContacts { &self.inner }
20131}
20132
20133
20134
20135
20136
20137
20138
20139#[derive(Debug, Clone, Default, Serialize, Deserialize)]
20141pub struct ImportMessages {
20142 #[doc(hidden)]
20143 #[serde(rename(serialize = "@type", deserialize = "@type"))]
20144 td_name: String,
20145 #[doc(hidden)]
20146 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
20147 extra: Option<String>,
20148 chat_id: i64,
20150 message_file: InputFile,
20152 attached_files: Vec<InputFile>,
20154
20155}
20156
20157impl RObject for ImportMessages {
20158 #[doc(hidden)] fn td_name(&self) -> &'static str { "importMessages" }
20159 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
20160 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
20161}
20162
20163
20164
20165
20166impl RFunction for ImportMessages {}
20167
20168impl ImportMessages {
20169 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
20170 pub fn builder() -> RTDImportMessagesBuilder {
20171 let mut inner = ImportMessages::default();
20172 inner.td_name = "importMessages".to_string();
20173 inner.extra = Some(Uuid::new_v4().to_string());
20174 RTDImportMessagesBuilder { inner }
20175 }
20176
20177 pub fn chat_id(&self) -> i64 { self.chat_id }
20178
20179 pub fn message_file(&self) -> &InputFile { &self.message_file }
20180
20181 pub fn attached_files(&self) -> &Vec<InputFile> { &self.attached_files }
20182
20183}
20184
20185#[doc(hidden)]
20186pub struct RTDImportMessagesBuilder {
20187 inner: ImportMessages
20188}
20189
20190impl RTDImportMessagesBuilder {
20191 pub fn build(&self) -> ImportMessages { self.inner.clone() }
20192
20193
20194 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
20195 self.inner.chat_id = chat_id;
20196 self
20197 }
20198
20199
20200 pub fn message_file<T: AsRef<InputFile>>(&mut self, message_file: T) -> &mut Self {
20201 self.inner.message_file = message_file.as_ref().clone();
20202 self
20203 }
20204
20205
20206 pub fn attached_files(&mut self, attached_files: Vec<InputFile>) -> &mut Self {
20207 self.inner.attached_files = attached_files;
20208 self
20209 }
20210
20211}
20212
20213impl AsRef<ImportMessages> for ImportMessages {
20214 fn as_ref(&self) -> &ImportMessages { self }
20215}
20216
20217impl AsRef<ImportMessages> for RTDImportMessagesBuilder {
20218 fn as_ref(&self) -> &ImportMessages { &self.inner }
20219}
20220
20221
20222
20223
20224
20225
20226
20227#[derive(Debug, Clone, Default, Serialize, Deserialize)]
20229pub struct InviteGroupCallParticipants {
20230 #[doc(hidden)]
20231 #[serde(rename(serialize = "@type", deserialize = "@type"))]
20232 td_name: String,
20233 #[doc(hidden)]
20234 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
20235 extra: Option<String>,
20236 group_call_id: i64,
20238 user_ids: Vec<i64>,
20240
20241}
20242
20243impl RObject for InviteGroupCallParticipants {
20244 #[doc(hidden)] fn td_name(&self) -> &'static str { "inviteGroupCallParticipants" }
20245 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
20246 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
20247}
20248
20249
20250
20251
20252impl RFunction for InviteGroupCallParticipants {}
20253
20254impl InviteGroupCallParticipants {
20255 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
20256 pub fn builder() -> RTDInviteGroupCallParticipantsBuilder {
20257 let mut inner = InviteGroupCallParticipants::default();
20258 inner.td_name = "inviteGroupCallParticipants".to_string();
20259 inner.extra = Some(Uuid::new_v4().to_string());
20260 RTDInviteGroupCallParticipantsBuilder { inner }
20261 }
20262
20263 pub fn group_call_id(&self) -> i64 { self.group_call_id }
20264
20265 pub fn user_ids(&self) -> &Vec<i64> { &self.user_ids }
20266
20267}
20268
20269#[doc(hidden)]
20270pub struct RTDInviteGroupCallParticipantsBuilder {
20271 inner: InviteGroupCallParticipants
20272}
20273
20274impl RTDInviteGroupCallParticipantsBuilder {
20275 pub fn build(&self) -> InviteGroupCallParticipants { self.inner.clone() }
20276
20277
20278 pub fn group_call_id(&mut self, group_call_id: i64) -> &mut Self {
20279 self.inner.group_call_id = group_call_id;
20280 self
20281 }
20282
20283
20284 pub fn user_ids(&mut self, user_ids: Vec<i64>) -> &mut Self {
20285 self.inner.user_ids = user_ids;
20286 self
20287 }
20288
20289}
20290
20291impl AsRef<InviteGroupCallParticipants> for InviteGroupCallParticipants {
20292 fn as_ref(&self) -> &InviteGroupCallParticipants { self }
20293}
20294
20295impl AsRef<InviteGroupCallParticipants> for RTDInviteGroupCallParticipantsBuilder {
20296 fn as_ref(&self) -> &InviteGroupCallParticipants { &self.inner }
20297}
20298
20299
20300
20301
20302
20303
20304
20305#[derive(Debug, Clone, Default, Serialize, Deserialize)]
20307pub struct JoinChat {
20308 #[doc(hidden)]
20309 #[serde(rename(serialize = "@type", deserialize = "@type"))]
20310 td_name: String,
20311 #[doc(hidden)]
20312 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
20313 extra: Option<String>,
20314 chat_id: i64,
20316
20317}
20318
20319impl RObject for JoinChat {
20320 #[doc(hidden)] fn td_name(&self) -> &'static str { "joinChat" }
20321 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
20322 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
20323}
20324
20325
20326
20327
20328impl RFunction for JoinChat {}
20329
20330impl JoinChat {
20331 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
20332 pub fn builder() -> RTDJoinChatBuilder {
20333 let mut inner = JoinChat::default();
20334 inner.td_name = "joinChat".to_string();
20335 inner.extra = Some(Uuid::new_v4().to_string());
20336 RTDJoinChatBuilder { inner }
20337 }
20338
20339 pub fn chat_id(&self) -> i64 { self.chat_id }
20340
20341}
20342
20343#[doc(hidden)]
20344pub struct RTDJoinChatBuilder {
20345 inner: JoinChat
20346}
20347
20348impl RTDJoinChatBuilder {
20349 pub fn build(&self) -> JoinChat { self.inner.clone() }
20350
20351
20352 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
20353 self.inner.chat_id = chat_id;
20354 self
20355 }
20356
20357}
20358
20359impl AsRef<JoinChat> for JoinChat {
20360 fn as_ref(&self) -> &JoinChat { self }
20361}
20362
20363impl AsRef<JoinChat> for RTDJoinChatBuilder {
20364 fn as_ref(&self) -> &JoinChat { &self.inner }
20365}
20366
20367
20368
20369
20370
20371
20372
20373#[derive(Debug, Clone, Default, Serialize, Deserialize)]
20375pub struct JoinChatByInviteLink {
20376 #[doc(hidden)]
20377 #[serde(rename(serialize = "@type", deserialize = "@type"))]
20378 td_name: String,
20379 #[doc(hidden)]
20380 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
20381 extra: Option<String>,
20382 invite_link: String,
20384
20385}
20386
20387impl RObject for JoinChatByInviteLink {
20388 #[doc(hidden)] fn td_name(&self) -> &'static str { "joinChatByInviteLink" }
20389 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
20390 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
20391}
20392
20393
20394
20395
20396impl RFunction for JoinChatByInviteLink {}
20397
20398impl JoinChatByInviteLink {
20399 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
20400 pub fn builder() -> RTDJoinChatByInviteLinkBuilder {
20401 let mut inner = JoinChatByInviteLink::default();
20402 inner.td_name = "joinChatByInviteLink".to_string();
20403 inner.extra = Some(Uuid::new_v4().to_string());
20404 RTDJoinChatByInviteLinkBuilder { inner }
20405 }
20406
20407 pub fn invite_link(&self) -> &String { &self.invite_link }
20408
20409}
20410
20411#[doc(hidden)]
20412pub struct RTDJoinChatByInviteLinkBuilder {
20413 inner: JoinChatByInviteLink
20414}
20415
20416impl RTDJoinChatByInviteLinkBuilder {
20417 pub fn build(&self) -> JoinChatByInviteLink { self.inner.clone() }
20418
20419
20420 pub fn invite_link<T: AsRef<str>>(&mut self, invite_link: T) -> &mut Self {
20421 self.inner.invite_link = invite_link.as_ref().to_string();
20422 self
20423 }
20424
20425}
20426
20427impl AsRef<JoinChatByInviteLink> for JoinChatByInviteLink {
20428 fn as_ref(&self) -> &JoinChatByInviteLink { self }
20429}
20430
20431impl AsRef<JoinChatByInviteLink> for RTDJoinChatByInviteLinkBuilder {
20432 fn as_ref(&self) -> &JoinChatByInviteLink { &self.inner }
20433}
20434
20435
20436
20437
20438
20439
20440
20441#[derive(Debug, Clone, Default, Serialize, Deserialize)]
20443pub struct JoinGroupCall {
20444 #[doc(hidden)]
20445 #[serde(rename(serialize = "@type", deserialize = "@type"))]
20446 td_name: String,
20447 #[doc(hidden)]
20448 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
20449 extra: Option<String>,
20450 group_call_id: i64,
20452 participant_id: MessageSender,
20454 audio_source_id: i64,
20456 payload: String,
20458 is_muted: bool,
20460 is_my_video_enabled: bool,
20462 invite_hash: String,
20464
20465}
20466
20467impl RObject for JoinGroupCall {
20468 #[doc(hidden)] fn td_name(&self) -> &'static str { "joinGroupCall" }
20469 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
20470 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
20471}
20472
20473
20474
20475
20476impl RFunction for JoinGroupCall {}
20477
20478impl JoinGroupCall {
20479 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
20480 pub fn builder() -> RTDJoinGroupCallBuilder {
20481 let mut inner = JoinGroupCall::default();
20482 inner.td_name = "joinGroupCall".to_string();
20483 inner.extra = Some(Uuid::new_v4().to_string());
20484 RTDJoinGroupCallBuilder { inner }
20485 }
20486
20487 pub fn group_call_id(&self) -> i64 { self.group_call_id }
20488
20489 pub fn participant_id(&self) -> &MessageSender { &self.participant_id }
20490
20491 pub fn audio_source_id(&self) -> i64 { self.audio_source_id }
20492
20493 pub fn payload(&self) -> &String { &self.payload }
20494
20495 pub fn is_muted(&self) -> bool { self.is_muted }
20496
20497 pub fn is_my_video_enabled(&self) -> bool { self.is_my_video_enabled }
20498
20499 pub fn invite_hash(&self) -> &String { &self.invite_hash }
20500
20501}
20502
20503#[doc(hidden)]
20504pub struct RTDJoinGroupCallBuilder {
20505 inner: JoinGroupCall
20506}
20507
20508impl RTDJoinGroupCallBuilder {
20509 pub fn build(&self) -> JoinGroupCall { self.inner.clone() }
20510
20511
20512 pub fn group_call_id(&mut self, group_call_id: i64) -> &mut Self {
20513 self.inner.group_call_id = group_call_id;
20514 self
20515 }
20516
20517
20518 pub fn participant_id<T: AsRef<MessageSender>>(&mut self, participant_id: T) -> &mut Self {
20519 self.inner.participant_id = participant_id.as_ref().clone();
20520 self
20521 }
20522
20523
20524 pub fn audio_source_id(&mut self, audio_source_id: i64) -> &mut Self {
20525 self.inner.audio_source_id = audio_source_id;
20526 self
20527 }
20528
20529
20530 pub fn payload<T: AsRef<str>>(&mut self, payload: T) -> &mut Self {
20531 self.inner.payload = payload.as_ref().to_string();
20532 self
20533 }
20534
20535
20536 pub fn is_muted(&mut self, is_muted: bool) -> &mut Self {
20537 self.inner.is_muted = is_muted;
20538 self
20539 }
20540
20541
20542 pub fn is_my_video_enabled(&mut self, is_my_video_enabled: bool) -> &mut Self {
20543 self.inner.is_my_video_enabled = is_my_video_enabled;
20544 self
20545 }
20546
20547
20548 pub fn invite_hash<T: AsRef<str>>(&mut self, invite_hash: T) -> &mut Self {
20549 self.inner.invite_hash = invite_hash.as_ref().to_string();
20550 self
20551 }
20552
20553}
20554
20555impl AsRef<JoinGroupCall> for JoinGroupCall {
20556 fn as_ref(&self) -> &JoinGroupCall { self }
20557}
20558
20559impl AsRef<JoinGroupCall> for RTDJoinGroupCallBuilder {
20560 fn as_ref(&self) -> &JoinGroupCall { &self.inner }
20561}
20562
20563
20564
20565
20566
20567
20568
20569#[derive(Debug, Clone, Default, Serialize, Deserialize)]
20571pub struct LeaveChat {
20572 #[doc(hidden)]
20573 #[serde(rename(serialize = "@type", deserialize = "@type"))]
20574 td_name: String,
20575 #[doc(hidden)]
20576 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
20577 extra: Option<String>,
20578 chat_id: i64,
20580
20581}
20582
20583impl RObject for LeaveChat {
20584 #[doc(hidden)] fn td_name(&self) -> &'static str { "leaveChat" }
20585 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
20586 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
20587}
20588
20589
20590
20591
20592impl RFunction for LeaveChat {}
20593
20594impl LeaveChat {
20595 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
20596 pub fn builder() -> RTDLeaveChatBuilder {
20597 let mut inner = LeaveChat::default();
20598 inner.td_name = "leaveChat".to_string();
20599 inner.extra = Some(Uuid::new_v4().to_string());
20600 RTDLeaveChatBuilder { inner }
20601 }
20602
20603 pub fn chat_id(&self) -> i64 { self.chat_id }
20604
20605}
20606
20607#[doc(hidden)]
20608pub struct RTDLeaveChatBuilder {
20609 inner: LeaveChat
20610}
20611
20612impl RTDLeaveChatBuilder {
20613 pub fn build(&self) -> LeaveChat { self.inner.clone() }
20614
20615
20616 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
20617 self.inner.chat_id = chat_id;
20618 self
20619 }
20620
20621}
20622
20623impl AsRef<LeaveChat> for LeaveChat {
20624 fn as_ref(&self) -> &LeaveChat { self }
20625}
20626
20627impl AsRef<LeaveChat> for RTDLeaveChatBuilder {
20628 fn as_ref(&self) -> &LeaveChat { &self.inner }
20629}
20630
20631
20632
20633
20634
20635
20636
20637#[derive(Debug, Clone, Default, Serialize, Deserialize)]
20639pub struct LeaveGroupCall {
20640 #[doc(hidden)]
20641 #[serde(rename(serialize = "@type", deserialize = "@type"))]
20642 td_name: String,
20643 #[doc(hidden)]
20644 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
20645 extra: Option<String>,
20646 group_call_id: i64,
20648
20649}
20650
20651impl RObject for LeaveGroupCall {
20652 #[doc(hidden)] fn td_name(&self) -> &'static str { "leaveGroupCall" }
20653 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
20654 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
20655}
20656
20657
20658
20659
20660impl RFunction for LeaveGroupCall {}
20661
20662impl LeaveGroupCall {
20663 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
20664 pub fn builder() -> RTDLeaveGroupCallBuilder {
20665 let mut inner = LeaveGroupCall::default();
20666 inner.td_name = "leaveGroupCall".to_string();
20667 inner.extra = Some(Uuid::new_v4().to_string());
20668 RTDLeaveGroupCallBuilder { inner }
20669 }
20670
20671 pub fn group_call_id(&self) -> i64 { self.group_call_id }
20672
20673}
20674
20675#[doc(hidden)]
20676pub struct RTDLeaveGroupCallBuilder {
20677 inner: LeaveGroupCall
20678}
20679
20680impl RTDLeaveGroupCallBuilder {
20681 pub fn build(&self) -> LeaveGroupCall { self.inner.clone() }
20682
20683
20684 pub fn group_call_id(&mut self, group_call_id: i64) -> &mut Self {
20685 self.inner.group_call_id = group_call_id;
20686 self
20687 }
20688
20689}
20690
20691impl AsRef<LeaveGroupCall> for LeaveGroupCall {
20692 fn as_ref(&self) -> &LeaveGroupCall { self }
20693}
20694
20695impl AsRef<LeaveGroupCall> for RTDLeaveGroupCallBuilder {
20696 fn as_ref(&self) -> &LeaveGroupCall { &self.inner }
20697}
20698
20699
20700
20701
20702
20703
20704
20705#[derive(Debug, Clone, Default, Serialize, Deserialize)]
20707pub struct LoadChats {
20708 #[doc(hidden)]
20709 #[serde(rename(serialize = "@type", deserialize = "@type"))]
20710 td_name: String,
20711 #[doc(hidden)]
20712 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
20713 extra: Option<String>,
20714 chat_list: ChatList,
20716 limit: i64,
20718
20719}
20720
20721impl RObject for LoadChats {
20722 #[doc(hidden)] fn td_name(&self) -> &'static str { "loadChats" }
20723 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
20724 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
20725}
20726
20727
20728
20729
20730impl RFunction for LoadChats {}
20731
20732impl LoadChats {
20733 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
20734 pub fn builder() -> RTDLoadChatsBuilder {
20735 let mut inner = LoadChats::default();
20736 inner.td_name = "loadChats".to_string();
20737 inner.extra = Some(Uuid::new_v4().to_string());
20738 RTDLoadChatsBuilder { inner }
20739 }
20740
20741 pub fn chat_list(&self) -> &ChatList { &self.chat_list }
20742
20743 pub fn limit(&self) -> i64 { self.limit }
20744
20745}
20746
20747#[doc(hidden)]
20748pub struct RTDLoadChatsBuilder {
20749 inner: LoadChats
20750}
20751
20752impl RTDLoadChatsBuilder {
20753 pub fn build(&self) -> LoadChats { self.inner.clone() }
20754
20755
20756 pub fn chat_list<T: AsRef<ChatList>>(&mut self, chat_list: T) -> &mut Self {
20757 self.inner.chat_list = chat_list.as_ref().clone();
20758 self
20759 }
20760
20761
20762 pub fn limit(&mut self, limit: i64) -> &mut Self {
20763 self.inner.limit = limit;
20764 self
20765 }
20766
20767}
20768
20769impl AsRef<LoadChats> for LoadChats {
20770 fn as_ref(&self) -> &LoadChats { self }
20771}
20772
20773impl AsRef<LoadChats> for RTDLoadChatsBuilder {
20774 fn as_ref(&self) -> &LoadChats { &self.inner }
20775}
20776
20777
20778
20779
20780
20781
20782
20783#[derive(Debug, Clone, Default, Serialize, Deserialize)]
20785pub struct LoadGroupCallParticipants {
20786 #[doc(hidden)]
20787 #[serde(rename(serialize = "@type", deserialize = "@type"))]
20788 td_name: String,
20789 #[doc(hidden)]
20790 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
20791 extra: Option<String>,
20792 group_call_id: i64,
20794 limit: i64,
20796
20797}
20798
20799impl RObject for LoadGroupCallParticipants {
20800 #[doc(hidden)] fn td_name(&self) -> &'static str { "loadGroupCallParticipants" }
20801 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
20802 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
20803}
20804
20805
20806
20807
20808impl RFunction for LoadGroupCallParticipants {}
20809
20810impl LoadGroupCallParticipants {
20811 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
20812 pub fn builder() -> RTDLoadGroupCallParticipantsBuilder {
20813 let mut inner = LoadGroupCallParticipants::default();
20814 inner.td_name = "loadGroupCallParticipants".to_string();
20815 inner.extra = Some(Uuid::new_v4().to_string());
20816 RTDLoadGroupCallParticipantsBuilder { inner }
20817 }
20818
20819 pub fn group_call_id(&self) -> i64 { self.group_call_id }
20820
20821 pub fn limit(&self) -> i64 { self.limit }
20822
20823}
20824
20825#[doc(hidden)]
20826pub struct RTDLoadGroupCallParticipantsBuilder {
20827 inner: LoadGroupCallParticipants
20828}
20829
20830impl RTDLoadGroupCallParticipantsBuilder {
20831 pub fn build(&self) -> LoadGroupCallParticipants { self.inner.clone() }
20832
20833
20834 pub fn group_call_id(&mut self, group_call_id: i64) -> &mut Self {
20835 self.inner.group_call_id = group_call_id;
20836 self
20837 }
20838
20839
20840 pub fn limit(&mut self, limit: i64) -> &mut Self {
20841 self.inner.limit = limit;
20842 self
20843 }
20844
20845}
20846
20847impl AsRef<LoadGroupCallParticipants> for LoadGroupCallParticipants {
20848 fn as_ref(&self) -> &LoadGroupCallParticipants { self }
20849}
20850
20851impl AsRef<LoadGroupCallParticipants> for RTDLoadGroupCallParticipantsBuilder {
20852 fn as_ref(&self) -> &LoadGroupCallParticipants { &self.inner }
20853}
20854
20855
20856
20857
20858
20859
20860
20861#[derive(Debug, Clone, Default, Serialize, Deserialize)]
20863pub struct LogOut {
20864 #[doc(hidden)]
20865 #[serde(rename(serialize = "@type", deserialize = "@type"))]
20866 td_name: String,
20867 #[doc(hidden)]
20868 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
20869 extra: Option<String>,
20870
20871}
20872
20873impl RObject for LogOut {
20874 #[doc(hidden)] fn td_name(&self) -> &'static str { "logOut" }
20875 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
20876 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
20877}
20878
20879
20880
20881
20882impl RFunction for LogOut {}
20883
20884impl LogOut {
20885 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
20886 pub fn builder() -> RTDLogOutBuilder {
20887 let mut inner = LogOut::default();
20888 inner.td_name = "logOut".to_string();
20889 inner.extra = Some(Uuid::new_v4().to_string());
20890 RTDLogOutBuilder { inner }
20891 }
20892
20893}
20894
20895#[doc(hidden)]
20896pub struct RTDLogOutBuilder {
20897 inner: LogOut
20898}
20899
20900impl RTDLogOutBuilder {
20901 pub fn build(&self) -> LogOut { self.inner.clone() }
20902
20903}
20904
20905impl AsRef<LogOut> for LogOut {
20906 fn as_ref(&self) -> &LogOut { self }
20907}
20908
20909impl AsRef<LogOut> for RTDLogOutBuilder {
20910 fn as_ref(&self) -> &LogOut { &self.inner }
20911}
20912
20913
20914
20915
20916
20917
20918
20919#[derive(Debug, Clone, Default, Serialize, Deserialize)]
20921pub struct OpenChat {
20922 #[doc(hidden)]
20923 #[serde(rename(serialize = "@type", deserialize = "@type"))]
20924 td_name: String,
20925 #[doc(hidden)]
20926 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
20927 extra: Option<String>,
20928 chat_id: i64,
20930
20931}
20932
20933impl RObject for OpenChat {
20934 #[doc(hidden)] fn td_name(&self) -> &'static str { "openChat" }
20935 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
20936 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
20937}
20938
20939
20940
20941
20942impl RFunction for OpenChat {}
20943
20944impl OpenChat {
20945 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
20946 pub fn builder() -> RTDOpenChatBuilder {
20947 let mut inner = OpenChat::default();
20948 inner.td_name = "openChat".to_string();
20949 inner.extra = Some(Uuid::new_v4().to_string());
20950 RTDOpenChatBuilder { inner }
20951 }
20952
20953 pub fn chat_id(&self) -> i64 { self.chat_id }
20954
20955}
20956
20957#[doc(hidden)]
20958pub struct RTDOpenChatBuilder {
20959 inner: OpenChat
20960}
20961
20962impl RTDOpenChatBuilder {
20963 pub fn build(&self) -> OpenChat { self.inner.clone() }
20964
20965
20966 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
20967 self.inner.chat_id = chat_id;
20968 self
20969 }
20970
20971}
20972
20973impl AsRef<OpenChat> for OpenChat {
20974 fn as_ref(&self) -> &OpenChat { self }
20975}
20976
20977impl AsRef<OpenChat> for RTDOpenChatBuilder {
20978 fn as_ref(&self) -> &OpenChat { &self.inner }
20979}
20980
20981
20982
20983
20984
20985
20986
20987#[derive(Debug, Clone, Default, Serialize, Deserialize)]
20989pub struct OpenMessageContent {
20990 #[doc(hidden)]
20991 #[serde(rename(serialize = "@type", deserialize = "@type"))]
20992 td_name: String,
20993 #[doc(hidden)]
20994 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
20995 extra: Option<String>,
20996 chat_id: i64,
20998 message_id: i64,
21000
21001}
21002
21003impl RObject for OpenMessageContent {
21004 #[doc(hidden)] fn td_name(&self) -> &'static str { "openMessageContent" }
21005 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
21006 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
21007}
21008
21009
21010
21011
21012impl RFunction for OpenMessageContent {}
21013
21014impl OpenMessageContent {
21015 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
21016 pub fn builder() -> RTDOpenMessageContentBuilder {
21017 let mut inner = OpenMessageContent::default();
21018 inner.td_name = "openMessageContent".to_string();
21019 inner.extra = Some(Uuid::new_v4().to_string());
21020 RTDOpenMessageContentBuilder { inner }
21021 }
21022
21023 pub fn chat_id(&self) -> i64 { self.chat_id }
21024
21025 pub fn message_id(&self) -> i64 { self.message_id }
21026
21027}
21028
21029#[doc(hidden)]
21030pub struct RTDOpenMessageContentBuilder {
21031 inner: OpenMessageContent
21032}
21033
21034impl RTDOpenMessageContentBuilder {
21035 pub fn build(&self) -> OpenMessageContent { self.inner.clone() }
21036
21037
21038 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
21039 self.inner.chat_id = chat_id;
21040 self
21041 }
21042
21043
21044 pub fn message_id(&mut self, message_id: i64) -> &mut Self {
21045 self.inner.message_id = message_id;
21046 self
21047 }
21048
21049}
21050
21051impl AsRef<OpenMessageContent> for OpenMessageContent {
21052 fn as_ref(&self) -> &OpenMessageContent { self }
21053}
21054
21055impl AsRef<OpenMessageContent> for RTDOpenMessageContentBuilder {
21056 fn as_ref(&self) -> &OpenMessageContent { &self.inner }
21057}
21058
21059
21060
21061
21062
21063
21064
21065#[derive(Debug, Clone, Default, Serialize, Deserialize)]
21067pub struct OptimizeStorage {
21068 #[doc(hidden)]
21069 #[serde(rename(serialize = "@type", deserialize = "@type"))]
21070 td_name: String,
21071 #[doc(hidden)]
21072 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
21073 extra: Option<String>,
21074 size: i64,
21076 ttl: i64,
21078 count: i64,
21080 immunity_delay: i64,
21082 file_types: Vec<FileType>,
21084 chat_ids: Vec<i64>,
21086 exclude_chat_ids: Vec<i64>,
21088 return_deleted_file_statistics: bool,
21090 chat_limit: i64,
21092
21093}
21094
21095impl RObject for OptimizeStorage {
21096 #[doc(hidden)] fn td_name(&self) -> &'static str { "optimizeStorage" }
21097 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
21098 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
21099}
21100
21101
21102
21103
21104impl RFunction for OptimizeStorage {}
21105
21106impl OptimizeStorage {
21107 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
21108 pub fn builder() -> RTDOptimizeStorageBuilder {
21109 let mut inner = OptimizeStorage::default();
21110 inner.td_name = "optimizeStorage".to_string();
21111 inner.extra = Some(Uuid::new_v4().to_string());
21112 RTDOptimizeStorageBuilder { inner }
21113 }
21114
21115 pub fn size(&self) -> i64 { self.size }
21116
21117 pub fn ttl(&self) -> i64 { self.ttl }
21118
21119 pub fn count(&self) -> i64 { self.count }
21120
21121 pub fn immunity_delay(&self) -> i64 { self.immunity_delay }
21122
21123 pub fn file_types(&self) -> &Vec<FileType> { &self.file_types }
21124
21125 pub fn chat_ids(&self) -> &Vec<i64> { &self.chat_ids }
21126
21127 pub fn exclude_chat_ids(&self) -> &Vec<i64> { &self.exclude_chat_ids }
21128
21129 pub fn return_deleted_file_statistics(&self) -> bool { self.return_deleted_file_statistics }
21130
21131 pub fn chat_limit(&self) -> i64 { self.chat_limit }
21132
21133}
21134
21135#[doc(hidden)]
21136pub struct RTDOptimizeStorageBuilder {
21137 inner: OptimizeStorage
21138}
21139
21140impl RTDOptimizeStorageBuilder {
21141 pub fn build(&self) -> OptimizeStorage { self.inner.clone() }
21142
21143
21144 pub fn size(&mut self, size: i64) -> &mut Self {
21145 self.inner.size = size;
21146 self
21147 }
21148
21149
21150 pub fn ttl(&mut self, ttl: i64) -> &mut Self {
21151 self.inner.ttl = ttl;
21152 self
21153 }
21154
21155
21156 pub fn count(&mut self, count: i64) -> &mut Self {
21157 self.inner.count = count;
21158 self
21159 }
21160
21161
21162 pub fn immunity_delay(&mut self, immunity_delay: i64) -> &mut Self {
21163 self.inner.immunity_delay = immunity_delay;
21164 self
21165 }
21166
21167
21168 pub fn file_types(&mut self, file_types: Vec<FileType>) -> &mut Self {
21169 self.inner.file_types = file_types;
21170 self
21171 }
21172
21173
21174 pub fn chat_ids(&mut self, chat_ids: Vec<i64>) -> &mut Self {
21175 self.inner.chat_ids = chat_ids;
21176 self
21177 }
21178
21179
21180 pub fn exclude_chat_ids(&mut self, exclude_chat_ids: Vec<i64>) -> &mut Self {
21181 self.inner.exclude_chat_ids = exclude_chat_ids;
21182 self
21183 }
21184
21185
21186 pub fn return_deleted_file_statistics(&mut self, return_deleted_file_statistics: bool) -> &mut Self {
21187 self.inner.return_deleted_file_statistics = return_deleted_file_statistics;
21188 self
21189 }
21190
21191
21192 pub fn chat_limit(&mut self, chat_limit: i64) -> &mut Self {
21193 self.inner.chat_limit = chat_limit;
21194 self
21195 }
21196
21197}
21198
21199impl AsRef<OptimizeStorage> for OptimizeStorage {
21200 fn as_ref(&self) -> &OptimizeStorage { self }
21201}
21202
21203impl AsRef<OptimizeStorage> for RTDOptimizeStorageBuilder {
21204 fn as_ref(&self) -> &OptimizeStorage { &self.inner }
21205}
21206
21207
21208
21209
21210
21211
21212
21213#[derive(Debug, Clone, Default, Serialize, Deserialize)]
21215pub struct ParseMarkdown {
21216 #[doc(hidden)]
21217 #[serde(rename(serialize = "@type", deserialize = "@type"))]
21218 td_name: String,
21219 #[doc(hidden)]
21220 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
21221 extra: Option<String>,
21222 text: FormattedText,
21224
21225}
21226
21227impl RObject for ParseMarkdown {
21228 #[doc(hidden)] fn td_name(&self) -> &'static str { "parseMarkdown" }
21229 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
21230 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
21231}
21232
21233
21234
21235
21236impl RFunction for ParseMarkdown {}
21237
21238impl ParseMarkdown {
21239 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
21240 pub fn builder() -> RTDParseMarkdownBuilder {
21241 let mut inner = ParseMarkdown::default();
21242 inner.td_name = "parseMarkdown".to_string();
21243 inner.extra = Some(Uuid::new_v4().to_string());
21244 RTDParseMarkdownBuilder { inner }
21245 }
21246
21247 pub fn text(&self) -> &FormattedText { &self.text }
21248
21249}
21250
21251#[doc(hidden)]
21252pub struct RTDParseMarkdownBuilder {
21253 inner: ParseMarkdown
21254}
21255
21256impl RTDParseMarkdownBuilder {
21257 pub fn build(&self) -> ParseMarkdown { self.inner.clone() }
21258
21259
21260 pub fn text<T: AsRef<FormattedText>>(&mut self, text: T) -> &mut Self {
21261 self.inner.text = text.as_ref().clone();
21262 self
21263 }
21264
21265}
21266
21267impl AsRef<ParseMarkdown> for ParseMarkdown {
21268 fn as_ref(&self) -> &ParseMarkdown { self }
21269}
21270
21271impl AsRef<ParseMarkdown> for RTDParseMarkdownBuilder {
21272 fn as_ref(&self) -> &ParseMarkdown { &self.inner }
21273}
21274
21275
21276
21277
21278
21279
21280
21281#[derive(Debug, Clone, Default, Serialize, Deserialize)]
21283pub struct ParseTextEntities {
21284 #[doc(hidden)]
21285 #[serde(rename(serialize = "@type", deserialize = "@type"))]
21286 td_name: String,
21287 #[doc(hidden)]
21288 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
21289 extra: Option<String>,
21290 text: String,
21292 parse_mode: TextParseMode,
21294
21295}
21296
21297impl RObject for ParseTextEntities {
21298 #[doc(hidden)] fn td_name(&self) -> &'static str { "parseTextEntities" }
21299 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
21300 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
21301}
21302
21303
21304
21305
21306impl RFunction for ParseTextEntities {}
21307
21308impl ParseTextEntities {
21309 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
21310 pub fn builder() -> RTDParseTextEntitiesBuilder {
21311 let mut inner = ParseTextEntities::default();
21312 inner.td_name = "parseTextEntities".to_string();
21313 inner.extra = Some(Uuid::new_v4().to_string());
21314 RTDParseTextEntitiesBuilder { inner }
21315 }
21316
21317 pub fn text(&self) -> &String { &self.text }
21318
21319 pub fn parse_mode(&self) -> &TextParseMode { &self.parse_mode }
21320
21321}
21322
21323#[doc(hidden)]
21324pub struct RTDParseTextEntitiesBuilder {
21325 inner: ParseTextEntities
21326}
21327
21328impl RTDParseTextEntitiesBuilder {
21329 pub fn build(&self) -> ParseTextEntities { self.inner.clone() }
21330
21331
21332 pub fn text<T: AsRef<str>>(&mut self, text: T) -> &mut Self {
21333 self.inner.text = text.as_ref().to_string();
21334 self
21335 }
21336
21337
21338 pub fn parse_mode<T: AsRef<TextParseMode>>(&mut self, parse_mode: T) -> &mut Self {
21339 self.inner.parse_mode = parse_mode.as_ref().clone();
21340 self
21341 }
21342
21343}
21344
21345impl AsRef<ParseTextEntities> for ParseTextEntities {
21346 fn as_ref(&self) -> &ParseTextEntities { self }
21347}
21348
21349impl AsRef<ParseTextEntities> for RTDParseTextEntitiesBuilder {
21350 fn as_ref(&self) -> &ParseTextEntities { &self.inner }
21351}
21352
21353
21354
21355
21356
21357
21358
21359#[derive(Debug, Clone, Default, Serialize, Deserialize)]
21361pub struct PinChatMessage {
21362 #[doc(hidden)]
21363 #[serde(rename(serialize = "@type", deserialize = "@type"))]
21364 td_name: String,
21365 #[doc(hidden)]
21366 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
21367 extra: Option<String>,
21368 chat_id: i64,
21370 message_id: i64,
21372 disable_notification: bool,
21374 only_for_self: bool,
21376
21377}
21378
21379impl RObject for PinChatMessage {
21380 #[doc(hidden)] fn td_name(&self) -> &'static str { "pinChatMessage" }
21381 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
21382 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
21383}
21384
21385
21386
21387
21388impl RFunction for PinChatMessage {}
21389
21390impl PinChatMessage {
21391 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
21392 pub fn builder() -> RTDPinChatMessageBuilder {
21393 let mut inner = PinChatMessage::default();
21394 inner.td_name = "pinChatMessage".to_string();
21395 inner.extra = Some(Uuid::new_v4().to_string());
21396 RTDPinChatMessageBuilder { inner }
21397 }
21398
21399 pub fn chat_id(&self) -> i64 { self.chat_id }
21400
21401 pub fn message_id(&self) -> i64 { self.message_id }
21402
21403 pub fn disable_notification(&self) -> bool { self.disable_notification }
21404
21405 pub fn only_for_self(&self) -> bool { self.only_for_self }
21406
21407}
21408
21409#[doc(hidden)]
21410pub struct RTDPinChatMessageBuilder {
21411 inner: PinChatMessage
21412}
21413
21414impl RTDPinChatMessageBuilder {
21415 pub fn build(&self) -> PinChatMessage { self.inner.clone() }
21416
21417
21418 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
21419 self.inner.chat_id = chat_id;
21420 self
21421 }
21422
21423
21424 pub fn message_id(&mut self, message_id: i64) -> &mut Self {
21425 self.inner.message_id = message_id;
21426 self
21427 }
21428
21429
21430 pub fn disable_notification(&mut self, disable_notification: bool) -> &mut Self {
21431 self.inner.disable_notification = disable_notification;
21432 self
21433 }
21434
21435
21436 pub fn only_for_self(&mut self, only_for_self: bool) -> &mut Self {
21437 self.inner.only_for_self = only_for_self;
21438 self
21439 }
21440
21441}
21442
21443impl AsRef<PinChatMessage> for PinChatMessage {
21444 fn as_ref(&self) -> &PinChatMessage { self }
21445}
21446
21447impl AsRef<PinChatMessage> for RTDPinChatMessageBuilder {
21448 fn as_ref(&self) -> &PinChatMessage { &self.inner }
21449}
21450
21451
21452
21453
21454
21455
21456
21457#[derive(Debug, Clone, Default, Serialize, Deserialize)]
21459pub struct PingProxy {
21460 #[doc(hidden)]
21461 #[serde(rename(serialize = "@type", deserialize = "@type"))]
21462 td_name: String,
21463 #[doc(hidden)]
21464 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
21465 extra: Option<String>,
21466 proxy_id: i64,
21468
21469}
21470
21471impl RObject for PingProxy {
21472 #[doc(hidden)] fn td_name(&self) -> &'static str { "pingProxy" }
21473 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
21474 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
21475}
21476
21477
21478
21479
21480impl RFunction for PingProxy {}
21481
21482impl PingProxy {
21483 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
21484 pub fn builder() -> RTDPingProxyBuilder {
21485 let mut inner = PingProxy::default();
21486 inner.td_name = "pingProxy".to_string();
21487 inner.extra = Some(Uuid::new_v4().to_string());
21488 RTDPingProxyBuilder { inner }
21489 }
21490
21491 pub fn proxy_id(&self) -> i64 { self.proxy_id }
21492
21493}
21494
21495#[doc(hidden)]
21496pub struct RTDPingProxyBuilder {
21497 inner: PingProxy
21498}
21499
21500impl RTDPingProxyBuilder {
21501 pub fn build(&self) -> PingProxy { self.inner.clone() }
21502
21503
21504 pub fn proxy_id(&mut self, proxy_id: i64) -> &mut Self {
21505 self.inner.proxy_id = proxy_id;
21506 self
21507 }
21508
21509}
21510
21511impl AsRef<PingProxy> for PingProxy {
21512 fn as_ref(&self) -> &PingProxy { self }
21513}
21514
21515impl AsRef<PingProxy> for RTDPingProxyBuilder {
21516 fn as_ref(&self) -> &PingProxy { &self.inner }
21517}
21518
21519
21520
21521
21522
21523
21524
21525#[derive(Debug, Clone, Default, Serialize, Deserialize)]
21527pub struct ProcessChatJoinRequest {
21528 #[doc(hidden)]
21529 #[serde(rename(serialize = "@type", deserialize = "@type"))]
21530 td_name: String,
21531 #[doc(hidden)]
21532 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
21533 extra: Option<String>,
21534 chat_id: i64,
21536 user_id: i64,
21538 approve: bool,
21540
21541}
21542
21543impl RObject for ProcessChatJoinRequest {
21544 #[doc(hidden)] fn td_name(&self) -> &'static str { "processChatJoinRequest" }
21545 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
21546 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
21547}
21548
21549
21550
21551
21552impl RFunction for ProcessChatJoinRequest {}
21553
21554impl ProcessChatJoinRequest {
21555 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
21556 pub fn builder() -> RTDProcessChatJoinRequestBuilder {
21557 let mut inner = ProcessChatJoinRequest::default();
21558 inner.td_name = "processChatJoinRequest".to_string();
21559 inner.extra = Some(Uuid::new_v4().to_string());
21560 RTDProcessChatJoinRequestBuilder { inner }
21561 }
21562
21563 pub fn chat_id(&self) -> i64 { self.chat_id }
21564
21565 pub fn user_id(&self) -> i64 { self.user_id }
21566
21567 pub fn approve(&self) -> bool { self.approve }
21568
21569}
21570
21571#[doc(hidden)]
21572pub struct RTDProcessChatJoinRequestBuilder {
21573 inner: ProcessChatJoinRequest
21574}
21575
21576impl RTDProcessChatJoinRequestBuilder {
21577 pub fn build(&self) -> ProcessChatJoinRequest { self.inner.clone() }
21578
21579
21580 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
21581 self.inner.chat_id = chat_id;
21582 self
21583 }
21584
21585
21586 pub fn user_id(&mut self, user_id: i64) -> &mut Self {
21587 self.inner.user_id = user_id;
21588 self
21589 }
21590
21591
21592 pub fn approve(&mut self, approve: bool) -> &mut Self {
21593 self.inner.approve = approve;
21594 self
21595 }
21596
21597}
21598
21599impl AsRef<ProcessChatJoinRequest> for ProcessChatJoinRequest {
21600 fn as_ref(&self) -> &ProcessChatJoinRequest { self }
21601}
21602
21603impl AsRef<ProcessChatJoinRequest> for RTDProcessChatJoinRequestBuilder {
21604 fn as_ref(&self) -> &ProcessChatJoinRequest { &self.inner }
21605}
21606
21607
21608
21609
21610
21611
21612
21613#[derive(Debug, Clone, Default, Serialize, Deserialize)]
21615pub struct ProcessChatJoinRequests {
21616 #[doc(hidden)]
21617 #[serde(rename(serialize = "@type", deserialize = "@type"))]
21618 td_name: String,
21619 #[doc(hidden)]
21620 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
21621 extra: Option<String>,
21622 chat_id: i64,
21624 invite_link: String,
21626 approve: bool,
21628
21629}
21630
21631impl RObject for ProcessChatJoinRequests {
21632 #[doc(hidden)] fn td_name(&self) -> &'static str { "processChatJoinRequests" }
21633 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
21634 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
21635}
21636
21637
21638
21639
21640impl RFunction for ProcessChatJoinRequests {}
21641
21642impl ProcessChatJoinRequests {
21643 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
21644 pub fn builder() -> RTDProcessChatJoinRequestsBuilder {
21645 let mut inner = ProcessChatJoinRequests::default();
21646 inner.td_name = "processChatJoinRequests".to_string();
21647 inner.extra = Some(Uuid::new_v4().to_string());
21648 RTDProcessChatJoinRequestsBuilder { inner }
21649 }
21650
21651 pub fn chat_id(&self) -> i64 { self.chat_id }
21652
21653 pub fn invite_link(&self) -> &String { &self.invite_link }
21654
21655 pub fn approve(&self) -> bool { self.approve }
21656
21657}
21658
21659#[doc(hidden)]
21660pub struct RTDProcessChatJoinRequestsBuilder {
21661 inner: ProcessChatJoinRequests
21662}
21663
21664impl RTDProcessChatJoinRequestsBuilder {
21665 pub fn build(&self) -> ProcessChatJoinRequests { self.inner.clone() }
21666
21667
21668 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
21669 self.inner.chat_id = chat_id;
21670 self
21671 }
21672
21673
21674 pub fn invite_link<T: AsRef<str>>(&mut self, invite_link: T) -> &mut Self {
21675 self.inner.invite_link = invite_link.as_ref().to_string();
21676 self
21677 }
21678
21679
21680 pub fn approve(&mut self, approve: bool) -> &mut Self {
21681 self.inner.approve = approve;
21682 self
21683 }
21684
21685}
21686
21687impl AsRef<ProcessChatJoinRequests> for ProcessChatJoinRequests {
21688 fn as_ref(&self) -> &ProcessChatJoinRequests { self }
21689}
21690
21691impl AsRef<ProcessChatJoinRequests> for RTDProcessChatJoinRequestsBuilder {
21692 fn as_ref(&self) -> &ProcessChatJoinRequests { &self.inner }
21693}
21694
21695
21696
21697
21698
21699
21700
21701#[derive(Debug, Clone, Default, Serialize, Deserialize)]
21703pub struct ProcessPushNotification {
21704 #[doc(hidden)]
21705 #[serde(rename(serialize = "@type", deserialize = "@type"))]
21706 td_name: String,
21707 #[doc(hidden)]
21708 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
21709 extra: Option<String>,
21710 payload: String,
21712
21713}
21714
21715impl RObject for ProcessPushNotification {
21716 #[doc(hidden)] fn td_name(&self) -> &'static str { "processPushNotification" }
21717 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
21718 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
21719}
21720
21721
21722
21723
21724impl RFunction for ProcessPushNotification {}
21725
21726impl ProcessPushNotification {
21727 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
21728 pub fn builder() -> RTDProcessPushNotificationBuilder {
21729 let mut inner = ProcessPushNotification::default();
21730 inner.td_name = "processPushNotification".to_string();
21731 inner.extra = Some(Uuid::new_v4().to_string());
21732 RTDProcessPushNotificationBuilder { inner }
21733 }
21734
21735 pub fn payload(&self) -> &String { &self.payload }
21736
21737}
21738
21739#[doc(hidden)]
21740pub struct RTDProcessPushNotificationBuilder {
21741 inner: ProcessPushNotification
21742}
21743
21744impl RTDProcessPushNotificationBuilder {
21745 pub fn build(&self) -> ProcessPushNotification { self.inner.clone() }
21746
21747
21748 pub fn payload<T: AsRef<str>>(&mut self, payload: T) -> &mut Self {
21749 self.inner.payload = payload.as_ref().to_string();
21750 self
21751 }
21752
21753}
21754
21755impl AsRef<ProcessPushNotification> for ProcessPushNotification {
21756 fn as_ref(&self) -> &ProcessPushNotification { self }
21757}
21758
21759impl AsRef<ProcessPushNotification> for RTDProcessPushNotificationBuilder {
21760 fn as_ref(&self) -> &ProcessPushNotification { &self.inner }
21761}
21762
21763
21764
21765
21766
21767
21768
21769#[derive(Debug, Clone, Default, Serialize, Deserialize)]
21771pub struct ReadAllChatMentions {
21772 #[doc(hidden)]
21773 #[serde(rename(serialize = "@type", deserialize = "@type"))]
21774 td_name: String,
21775 #[doc(hidden)]
21776 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
21777 extra: Option<String>,
21778 chat_id: i64,
21780
21781}
21782
21783impl RObject for ReadAllChatMentions {
21784 #[doc(hidden)] fn td_name(&self) -> &'static str { "readAllChatMentions" }
21785 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
21786 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
21787}
21788
21789
21790
21791
21792impl RFunction for ReadAllChatMentions {}
21793
21794impl ReadAllChatMentions {
21795 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
21796 pub fn builder() -> RTDReadAllChatMentionsBuilder {
21797 let mut inner = ReadAllChatMentions::default();
21798 inner.td_name = "readAllChatMentions".to_string();
21799 inner.extra = Some(Uuid::new_v4().to_string());
21800 RTDReadAllChatMentionsBuilder { inner }
21801 }
21802
21803 pub fn chat_id(&self) -> i64 { self.chat_id }
21804
21805}
21806
21807#[doc(hidden)]
21808pub struct RTDReadAllChatMentionsBuilder {
21809 inner: ReadAllChatMentions
21810}
21811
21812impl RTDReadAllChatMentionsBuilder {
21813 pub fn build(&self) -> ReadAllChatMentions { self.inner.clone() }
21814
21815
21816 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
21817 self.inner.chat_id = chat_id;
21818 self
21819 }
21820
21821}
21822
21823impl AsRef<ReadAllChatMentions> for ReadAllChatMentions {
21824 fn as_ref(&self) -> &ReadAllChatMentions { self }
21825}
21826
21827impl AsRef<ReadAllChatMentions> for RTDReadAllChatMentionsBuilder {
21828 fn as_ref(&self) -> &ReadAllChatMentions { &self.inner }
21829}
21830
21831
21832
21833
21834
21835
21836
21837#[derive(Debug, Clone, Default, Serialize, Deserialize)]
21839pub struct ReadFilePart {
21840 #[doc(hidden)]
21841 #[serde(rename(serialize = "@type", deserialize = "@type"))]
21842 td_name: String,
21843 #[doc(hidden)]
21844 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
21845 extra: Option<String>,
21846 file_id: i64,
21848 offset: i64,
21850 count: i64,
21852
21853}
21854
21855impl RObject for ReadFilePart {
21856 #[doc(hidden)] fn td_name(&self) -> &'static str { "readFilePart" }
21857 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
21858 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
21859}
21860
21861
21862
21863
21864impl RFunction for ReadFilePart {}
21865
21866impl ReadFilePart {
21867 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
21868 pub fn builder() -> RTDReadFilePartBuilder {
21869 let mut inner = ReadFilePart::default();
21870 inner.td_name = "readFilePart".to_string();
21871 inner.extra = Some(Uuid::new_v4().to_string());
21872 RTDReadFilePartBuilder { inner }
21873 }
21874
21875 pub fn file_id(&self) -> i64 { self.file_id }
21876
21877 pub fn offset(&self) -> i64 { self.offset }
21878
21879 pub fn count(&self) -> i64 { self.count }
21880
21881}
21882
21883#[doc(hidden)]
21884pub struct RTDReadFilePartBuilder {
21885 inner: ReadFilePart
21886}
21887
21888impl RTDReadFilePartBuilder {
21889 pub fn build(&self) -> ReadFilePart { self.inner.clone() }
21890
21891
21892 pub fn file_id(&mut self, file_id: i64) -> &mut Self {
21893 self.inner.file_id = file_id;
21894 self
21895 }
21896
21897
21898 pub fn offset(&mut self, offset: i64) -> &mut Self {
21899 self.inner.offset = offset;
21900 self
21901 }
21902
21903
21904 pub fn count(&mut self, count: i64) -> &mut Self {
21905 self.inner.count = count;
21906 self
21907 }
21908
21909}
21910
21911impl AsRef<ReadFilePart> for ReadFilePart {
21912 fn as_ref(&self) -> &ReadFilePart { self }
21913}
21914
21915impl AsRef<ReadFilePart> for RTDReadFilePartBuilder {
21916 fn as_ref(&self) -> &ReadFilePart { &self.inner }
21917}
21918
21919
21920
21921
21922
21923
21924
21925#[derive(Debug, Clone, Default, Serialize, Deserialize)]
21927pub struct RecoverAuthenticationPassword {
21928 #[doc(hidden)]
21929 #[serde(rename(serialize = "@type", deserialize = "@type"))]
21930 td_name: String,
21931 #[doc(hidden)]
21932 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
21933 extra: Option<String>,
21934 recovery_code: String,
21936 new_password: String,
21938 new_hint: String,
21940
21941}
21942
21943impl RObject for RecoverAuthenticationPassword {
21944 #[doc(hidden)] fn td_name(&self) -> &'static str { "recoverAuthenticationPassword" }
21945 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
21946 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
21947}
21948
21949
21950
21951
21952impl RFunction for RecoverAuthenticationPassword {}
21953
21954impl RecoverAuthenticationPassword {
21955 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
21956 pub fn builder() -> RTDRecoverAuthenticationPasswordBuilder {
21957 let mut inner = RecoverAuthenticationPassword::default();
21958 inner.td_name = "recoverAuthenticationPassword".to_string();
21959 inner.extra = Some(Uuid::new_v4().to_string());
21960 RTDRecoverAuthenticationPasswordBuilder { inner }
21961 }
21962
21963 pub fn recovery_code(&self) -> &String { &self.recovery_code }
21964
21965 pub fn new_password(&self) -> &String { &self.new_password }
21966
21967 pub fn new_hint(&self) -> &String { &self.new_hint }
21968
21969}
21970
21971#[doc(hidden)]
21972pub struct RTDRecoverAuthenticationPasswordBuilder {
21973 inner: RecoverAuthenticationPassword
21974}
21975
21976impl RTDRecoverAuthenticationPasswordBuilder {
21977 pub fn build(&self) -> RecoverAuthenticationPassword { self.inner.clone() }
21978
21979
21980 pub fn recovery_code<T: AsRef<str>>(&mut self, recovery_code: T) -> &mut Self {
21981 self.inner.recovery_code = recovery_code.as_ref().to_string();
21982 self
21983 }
21984
21985
21986 pub fn new_password<T: AsRef<str>>(&mut self, new_password: T) -> &mut Self {
21987 self.inner.new_password = new_password.as_ref().to_string();
21988 self
21989 }
21990
21991
21992 pub fn new_hint<T: AsRef<str>>(&mut self, new_hint: T) -> &mut Self {
21993 self.inner.new_hint = new_hint.as_ref().to_string();
21994 self
21995 }
21996
21997}
21998
21999impl AsRef<RecoverAuthenticationPassword> for RecoverAuthenticationPassword {
22000 fn as_ref(&self) -> &RecoverAuthenticationPassword { self }
22001}
22002
22003impl AsRef<RecoverAuthenticationPassword> for RTDRecoverAuthenticationPasswordBuilder {
22004 fn as_ref(&self) -> &RecoverAuthenticationPassword { &self.inner }
22005}
22006
22007
22008
22009
22010
22011
22012
22013#[derive(Debug, Clone, Default, Serialize, Deserialize)]
22015pub struct RecoverPassword {
22016 #[doc(hidden)]
22017 #[serde(rename(serialize = "@type", deserialize = "@type"))]
22018 td_name: String,
22019 #[doc(hidden)]
22020 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
22021 extra: Option<String>,
22022 recovery_code: String,
22024 new_password: String,
22026 new_hint: String,
22028
22029}
22030
22031impl RObject for RecoverPassword {
22032 #[doc(hidden)] fn td_name(&self) -> &'static str { "recoverPassword" }
22033 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
22034 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
22035}
22036
22037
22038
22039
22040impl RFunction for RecoverPassword {}
22041
22042impl RecoverPassword {
22043 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
22044 pub fn builder() -> RTDRecoverPasswordBuilder {
22045 let mut inner = RecoverPassword::default();
22046 inner.td_name = "recoverPassword".to_string();
22047 inner.extra = Some(Uuid::new_v4().to_string());
22048 RTDRecoverPasswordBuilder { inner }
22049 }
22050
22051 pub fn recovery_code(&self) -> &String { &self.recovery_code }
22052
22053 pub fn new_password(&self) -> &String { &self.new_password }
22054
22055 pub fn new_hint(&self) -> &String { &self.new_hint }
22056
22057}
22058
22059#[doc(hidden)]
22060pub struct RTDRecoverPasswordBuilder {
22061 inner: RecoverPassword
22062}
22063
22064impl RTDRecoverPasswordBuilder {
22065 pub fn build(&self) -> RecoverPassword { self.inner.clone() }
22066
22067
22068 pub fn recovery_code<T: AsRef<str>>(&mut self, recovery_code: T) -> &mut Self {
22069 self.inner.recovery_code = recovery_code.as_ref().to_string();
22070 self
22071 }
22072
22073
22074 pub fn new_password<T: AsRef<str>>(&mut self, new_password: T) -> &mut Self {
22075 self.inner.new_password = new_password.as_ref().to_string();
22076 self
22077 }
22078
22079
22080 pub fn new_hint<T: AsRef<str>>(&mut self, new_hint: T) -> &mut Self {
22081 self.inner.new_hint = new_hint.as_ref().to_string();
22082 self
22083 }
22084
22085}
22086
22087impl AsRef<RecoverPassword> for RecoverPassword {
22088 fn as_ref(&self) -> &RecoverPassword { self }
22089}
22090
22091impl AsRef<RecoverPassword> for RTDRecoverPasswordBuilder {
22092 fn as_ref(&self) -> &RecoverPassword { &self.inner }
22093}
22094
22095
22096
22097
22098
22099
22100
22101#[derive(Debug, Clone, Default, Serialize, Deserialize)]
22103pub struct RegisterDevice {
22104 #[doc(hidden)]
22105 #[serde(rename(serialize = "@type", deserialize = "@type"))]
22106 td_name: String,
22107 #[doc(hidden)]
22108 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
22109 extra: Option<String>,
22110 device_token: DeviceToken,
22112 other_user_ids: Vec<i64>,
22114
22115}
22116
22117impl RObject for RegisterDevice {
22118 #[doc(hidden)] fn td_name(&self) -> &'static str { "registerDevice" }
22119 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
22120 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
22121}
22122
22123
22124
22125
22126impl RFunction for RegisterDevice {}
22127
22128impl RegisterDevice {
22129 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
22130 pub fn builder() -> RTDRegisterDeviceBuilder {
22131 let mut inner = RegisterDevice::default();
22132 inner.td_name = "registerDevice".to_string();
22133 inner.extra = Some(Uuid::new_v4().to_string());
22134 RTDRegisterDeviceBuilder { inner }
22135 }
22136
22137 pub fn device_token(&self) -> &DeviceToken { &self.device_token }
22138
22139 pub fn other_user_ids(&self) -> &Vec<i64> { &self.other_user_ids }
22140
22141}
22142
22143#[doc(hidden)]
22144pub struct RTDRegisterDeviceBuilder {
22145 inner: RegisterDevice
22146}
22147
22148impl RTDRegisterDeviceBuilder {
22149 pub fn build(&self) -> RegisterDevice { self.inner.clone() }
22150
22151
22152 pub fn device_token<T: AsRef<DeviceToken>>(&mut self, device_token: T) -> &mut Self {
22153 self.inner.device_token = device_token.as_ref().clone();
22154 self
22155 }
22156
22157
22158 pub fn other_user_ids(&mut self, other_user_ids: Vec<i64>) -> &mut Self {
22159 self.inner.other_user_ids = other_user_ids;
22160 self
22161 }
22162
22163}
22164
22165impl AsRef<RegisterDevice> for RegisterDevice {
22166 fn as_ref(&self) -> &RegisterDevice { self }
22167}
22168
22169impl AsRef<RegisterDevice> for RTDRegisterDeviceBuilder {
22170 fn as_ref(&self) -> &RegisterDevice { &self.inner }
22171}
22172
22173
22174
22175
22176
22177
22178
22179#[derive(Debug, Clone, Default, Serialize, Deserialize)]
22181pub struct RegisterUser {
22182 #[doc(hidden)]
22183 #[serde(rename(serialize = "@type", deserialize = "@type"))]
22184 td_name: String,
22185 #[doc(hidden)]
22186 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
22187 extra: Option<String>,
22188 first_name: String,
22190 last_name: String,
22192
22193}
22194
22195impl RObject for RegisterUser {
22196 #[doc(hidden)] fn td_name(&self) -> &'static str { "registerUser" }
22197 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
22198 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
22199}
22200
22201
22202
22203
22204impl RFunction for RegisterUser {}
22205
22206impl RegisterUser {
22207 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
22208 pub fn builder() -> RTDRegisterUserBuilder {
22209 let mut inner = RegisterUser::default();
22210 inner.td_name = "registerUser".to_string();
22211 inner.extra = Some(Uuid::new_v4().to_string());
22212 RTDRegisterUserBuilder { inner }
22213 }
22214
22215 pub fn first_name(&self) -> &String { &self.first_name }
22216
22217 pub fn last_name(&self) -> &String { &self.last_name }
22218
22219}
22220
22221#[doc(hidden)]
22222pub struct RTDRegisterUserBuilder {
22223 inner: RegisterUser
22224}
22225
22226impl RTDRegisterUserBuilder {
22227 pub fn build(&self) -> RegisterUser { self.inner.clone() }
22228
22229
22230 pub fn first_name<T: AsRef<str>>(&mut self, first_name: T) -> &mut Self {
22231 self.inner.first_name = first_name.as_ref().to_string();
22232 self
22233 }
22234
22235
22236 pub fn last_name<T: AsRef<str>>(&mut self, last_name: T) -> &mut Self {
22237 self.inner.last_name = last_name.as_ref().to_string();
22238 self
22239 }
22240
22241}
22242
22243impl AsRef<RegisterUser> for RegisterUser {
22244 fn as_ref(&self) -> &RegisterUser { self }
22245}
22246
22247impl AsRef<RegisterUser> for RTDRegisterUserBuilder {
22248 fn as_ref(&self) -> &RegisterUser { &self.inner }
22249}
22250
22251
22252
22253
22254
22255
22256
22257#[derive(Debug, Clone, Default, Serialize, Deserialize)]
22259pub struct RemoveBackground {
22260 #[doc(hidden)]
22261 #[serde(rename(serialize = "@type", deserialize = "@type"))]
22262 td_name: String,
22263 #[doc(hidden)]
22264 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
22265 extra: Option<String>,
22266 background_id: isize,
22268
22269}
22270
22271impl RObject for RemoveBackground {
22272 #[doc(hidden)] fn td_name(&self) -> &'static str { "removeBackground" }
22273 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
22274 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
22275}
22276
22277
22278
22279
22280impl RFunction for RemoveBackground {}
22281
22282impl RemoveBackground {
22283 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
22284 pub fn builder() -> RTDRemoveBackgroundBuilder {
22285 let mut inner = RemoveBackground::default();
22286 inner.td_name = "removeBackground".to_string();
22287 inner.extra = Some(Uuid::new_v4().to_string());
22288 RTDRemoveBackgroundBuilder { inner }
22289 }
22290
22291 pub fn background_id(&self) -> isize { self.background_id }
22292
22293}
22294
22295#[doc(hidden)]
22296pub struct RTDRemoveBackgroundBuilder {
22297 inner: RemoveBackground
22298}
22299
22300impl RTDRemoveBackgroundBuilder {
22301 pub fn build(&self) -> RemoveBackground { self.inner.clone() }
22302
22303
22304 pub fn background_id(&mut self, background_id: isize) -> &mut Self {
22305 self.inner.background_id = background_id;
22306 self
22307 }
22308
22309}
22310
22311impl AsRef<RemoveBackground> for RemoveBackground {
22312 fn as_ref(&self) -> &RemoveBackground { self }
22313}
22314
22315impl AsRef<RemoveBackground> for RTDRemoveBackgroundBuilder {
22316 fn as_ref(&self) -> &RemoveBackground { &self.inner }
22317}
22318
22319
22320
22321
22322
22323
22324
22325#[derive(Debug, Clone, Default, Serialize, Deserialize)]
22327pub struct RemoveChatActionBar {
22328 #[doc(hidden)]
22329 #[serde(rename(serialize = "@type", deserialize = "@type"))]
22330 td_name: String,
22331 #[doc(hidden)]
22332 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
22333 extra: Option<String>,
22334 chat_id: i64,
22336
22337}
22338
22339impl RObject for RemoveChatActionBar {
22340 #[doc(hidden)] fn td_name(&self) -> &'static str { "removeChatActionBar" }
22341 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
22342 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
22343}
22344
22345
22346
22347
22348impl RFunction for RemoveChatActionBar {}
22349
22350impl RemoveChatActionBar {
22351 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
22352 pub fn builder() -> RTDRemoveChatActionBarBuilder {
22353 let mut inner = RemoveChatActionBar::default();
22354 inner.td_name = "removeChatActionBar".to_string();
22355 inner.extra = Some(Uuid::new_v4().to_string());
22356 RTDRemoveChatActionBarBuilder { inner }
22357 }
22358
22359 pub fn chat_id(&self) -> i64 { self.chat_id }
22360
22361}
22362
22363#[doc(hidden)]
22364pub struct RTDRemoveChatActionBarBuilder {
22365 inner: RemoveChatActionBar
22366}
22367
22368impl RTDRemoveChatActionBarBuilder {
22369 pub fn build(&self) -> RemoveChatActionBar { self.inner.clone() }
22370
22371
22372 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
22373 self.inner.chat_id = chat_id;
22374 self
22375 }
22376
22377}
22378
22379impl AsRef<RemoveChatActionBar> for RemoveChatActionBar {
22380 fn as_ref(&self) -> &RemoveChatActionBar { self }
22381}
22382
22383impl AsRef<RemoveChatActionBar> for RTDRemoveChatActionBarBuilder {
22384 fn as_ref(&self) -> &RemoveChatActionBar { &self.inner }
22385}
22386
22387
22388
22389
22390
22391
22392
22393#[derive(Debug, Clone, Default, Serialize, Deserialize)]
22395pub struct RemoveContacts {
22396 #[doc(hidden)]
22397 #[serde(rename(serialize = "@type", deserialize = "@type"))]
22398 td_name: String,
22399 #[doc(hidden)]
22400 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
22401 extra: Option<String>,
22402 user_ids: Vec<i64>,
22404
22405}
22406
22407impl RObject for RemoveContacts {
22408 #[doc(hidden)] fn td_name(&self) -> &'static str { "removeContacts" }
22409 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
22410 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
22411}
22412
22413
22414
22415
22416impl RFunction for RemoveContacts {}
22417
22418impl RemoveContacts {
22419 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
22420 pub fn builder() -> RTDRemoveContactsBuilder {
22421 let mut inner = RemoveContacts::default();
22422 inner.td_name = "removeContacts".to_string();
22423 inner.extra = Some(Uuid::new_v4().to_string());
22424 RTDRemoveContactsBuilder { inner }
22425 }
22426
22427 pub fn user_ids(&self) -> &Vec<i64> { &self.user_ids }
22428
22429}
22430
22431#[doc(hidden)]
22432pub struct RTDRemoveContactsBuilder {
22433 inner: RemoveContacts
22434}
22435
22436impl RTDRemoveContactsBuilder {
22437 pub fn build(&self) -> RemoveContacts { self.inner.clone() }
22438
22439
22440 pub fn user_ids(&mut self, user_ids: Vec<i64>) -> &mut Self {
22441 self.inner.user_ids = user_ids;
22442 self
22443 }
22444
22445}
22446
22447impl AsRef<RemoveContacts> for RemoveContacts {
22448 fn as_ref(&self) -> &RemoveContacts { self }
22449}
22450
22451impl AsRef<RemoveContacts> for RTDRemoveContactsBuilder {
22452 fn as_ref(&self) -> &RemoveContacts { &self.inner }
22453}
22454
22455
22456
22457
22458
22459
22460
22461#[derive(Debug, Clone, Default, Serialize, Deserialize)]
22463pub struct RemoveFavoriteSticker {
22464 #[doc(hidden)]
22465 #[serde(rename(serialize = "@type", deserialize = "@type"))]
22466 td_name: String,
22467 #[doc(hidden)]
22468 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
22469 extra: Option<String>,
22470 sticker: InputFile,
22472
22473}
22474
22475impl RObject for RemoveFavoriteSticker {
22476 #[doc(hidden)] fn td_name(&self) -> &'static str { "removeFavoriteSticker" }
22477 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
22478 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
22479}
22480
22481
22482
22483
22484impl RFunction for RemoveFavoriteSticker {}
22485
22486impl RemoveFavoriteSticker {
22487 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
22488 pub fn builder() -> RTDRemoveFavoriteStickerBuilder {
22489 let mut inner = RemoveFavoriteSticker::default();
22490 inner.td_name = "removeFavoriteSticker".to_string();
22491 inner.extra = Some(Uuid::new_v4().to_string());
22492 RTDRemoveFavoriteStickerBuilder { inner }
22493 }
22494
22495 pub fn sticker(&self) -> &InputFile { &self.sticker }
22496
22497}
22498
22499#[doc(hidden)]
22500pub struct RTDRemoveFavoriteStickerBuilder {
22501 inner: RemoveFavoriteSticker
22502}
22503
22504impl RTDRemoveFavoriteStickerBuilder {
22505 pub fn build(&self) -> RemoveFavoriteSticker { self.inner.clone() }
22506
22507
22508 pub fn sticker<T: AsRef<InputFile>>(&mut self, sticker: T) -> &mut Self {
22509 self.inner.sticker = sticker.as_ref().clone();
22510 self
22511 }
22512
22513}
22514
22515impl AsRef<RemoveFavoriteSticker> for RemoveFavoriteSticker {
22516 fn as_ref(&self) -> &RemoveFavoriteSticker { self }
22517}
22518
22519impl AsRef<RemoveFavoriteSticker> for RTDRemoveFavoriteStickerBuilder {
22520 fn as_ref(&self) -> &RemoveFavoriteSticker { &self.inner }
22521}
22522
22523
22524
22525
22526
22527
22528
22529#[derive(Debug, Clone, Default, Serialize, Deserialize)]
22531pub struct RemoveNotification {
22532 #[doc(hidden)]
22533 #[serde(rename(serialize = "@type", deserialize = "@type"))]
22534 td_name: String,
22535 #[doc(hidden)]
22536 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
22537 extra: Option<String>,
22538 notification_group_id: i64,
22540 notification_id: i64,
22542
22543}
22544
22545impl RObject for RemoveNotification {
22546 #[doc(hidden)] fn td_name(&self) -> &'static str { "removeNotification" }
22547 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
22548 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
22549}
22550
22551
22552
22553
22554impl RFunction for RemoveNotification {}
22555
22556impl RemoveNotification {
22557 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
22558 pub fn builder() -> RTDRemoveNotificationBuilder {
22559 let mut inner = RemoveNotification::default();
22560 inner.td_name = "removeNotification".to_string();
22561 inner.extra = Some(Uuid::new_v4().to_string());
22562 RTDRemoveNotificationBuilder { inner }
22563 }
22564
22565 pub fn notification_group_id(&self) -> i64 { self.notification_group_id }
22566
22567 pub fn notification_id(&self) -> i64 { self.notification_id }
22568
22569}
22570
22571#[doc(hidden)]
22572pub struct RTDRemoveNotificationBuilder {
22573 inner: RemoveNotification
22574}
22575
22576impl RTDRemoveNotificationBuilder {
22577 pub fn build(&self) -> RemoveNotification { self.inner.clone() }
22578
22579
22580 pub fn notification_group_id(&mut self, notification_group_id: i64) -> &mut Self {
22581 self.inner.notification_group_id = notification_group_id;
22582 self
22583 }
22584
22585
22586 pub fn notification_id(&mut self, notification_id: i64) -> &mut Self {
22587 self.inner.notification_id = notification_id;
22588 self
22589 }
22590
22591}
22592
22593impl AsRef<RemoveNotification> for RemoveNotification {
22594 fn as_ref(&self) -> &RemoveNotification { self }
22595}
22596
22597impl AsRef<RemoveNotification> for RTDRemoveNotificationBuilder {
22598 fn as_ref(&self) -> &RemoveNotification { &self.inner }
22599}
22600
22601
22602
22603
22604
22605
22606
22607#[derive(Debug, Clone, Default, Serialize, Deserialize)]
22609pub struct RemoveNotificationGroup {
22610 #[doc(hidden)]
22611 #[serde(rename(serialize = "@type", deserialize = "@type"))]
22612 td_name: String,
22613 #[doc(hidden)]
22614 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
22615 extra: Option<String>,
22616 notification_group_id: i64,
22618 max_notification_id: i64,
22620
22621}
22622
22623impl RObject for RemoveNotificationGroup {
22624 #[doc(hidden)] fn td_name(&self) -> &'static str { "removeNotificationGroup" }
22625 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
22626 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
22627}
22628
22629
22630
22631
22632impl RFunction for RemoveNotificationGroup {}
22633
22634impl RemoveNotificationGroup {
22635 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
22636 pub fn builder() -> RTDRemoveNotificationGroupBuilder {
22637 let mut inner = RemoveNotificationGroup::default();
22638 inner.td_name = "removeNotificationGroup".to_string();
22639 inner.extra = Some(Uuid::new_v4().to_string());
22640 RTDRemoveNotificationGroupBuilder { inner }
22641 }
22642
22643 pub fn notification_group_id(&self) -> i64 { self.notification_group_id }
22644
22645 pub fn max_notification_id(&self) -> i64 { self.max_notification_id }
22646
22647}
22648
22649#[doc(hidden)]
22650pub struct RTDRemoveNotificationGroupBuilder {
22651 inner: RemoveNotificationGroup
22652}
22653
22654impl RTDRemoveNotificationGroupBuilder {
22655 pub fn build(&self) -> RemoveNotificationGroup { self.inner.clone() }
22656
22657
22658 pub fn notification_group_id(&mut self, notification_group_id: i64) -> &mut Self {
22659 self.inner.notification_group_id = notification_group_id;
22660 self
22661 }
22662
22663
22664 pub fn max_notification_id(&mut self, max_notification_id: i64) -> &mut Self {
22665 self.inner.max_notification_id = max_notification_id;
22666 self
22667 }
22668
22669}
22670
22671impl AsRef<RemoveNotificationGroup> for RemoveNotificationGroup {
22672 fn as_ref(&self) -> &RemoveNotificationGroup { self }
22673}
22674
22675impl AsRef<RemoveNotificationGroup> for RTDRemoveNotificationGroupBuilder {
22676 fn as_ref(&self) -> &RemoveNotificationGroup { &self.inner }
22677}
22678
22679
22680
22681
22682
22683
22684
22685#[derive(Debug, Clone, Default, Serialize, Deserialize)]
22687pub struct RemoveProxy {
22688 #[doc(hidden)]
22689 #[serde(rename(serialize = "@type", deserialize = "@type"))]
22690 td_name: String,
22691 #[doc(hidden)]
22692 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
22693 extra: Option<String>,
22694 proxy_id: i64,
22696
22697}
22698
22699impl RObject for RemoveProxy {
22700 #[doc(hidden)] fn td_name(&self) -> &'static str { "removeProxy" }
22701 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
22702 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
22703}
22704
22705
22706
22707
22708impl RFunction for RemoveProxy {}
22709
22710impl RemoveProxy {
22711 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
22712 pub fn builder() -> RTDRemoveProxyBuilder {
22713 let mut inner = RemoveProxy::default();
22714 inner.td_name = "removeProxy".to_string();
22715 inner.extra = Some(Uuid::new_v4().to_string());
22716 RTDRemoveProxyBuilder { inner }
22717 }
22718
22719 pub fn proxy_id(&self) -> i64 { self.proxy_id }
22720
22721}
22722
22723#[doc(hidden)]
22724pub struct RTDRemoveProxyBuilder {
22725 inner: RemoveProxy
22726}
22727
22728impl RTDRemoveProxyBuilder {
22729 pub fn build(&self) -> RemoveProxy { self.inner.clone() }
22730
22731
22732 pub fn proxy_id(&mut self, proxy_id: i64) -> &mut Self {
22733 self.inner.proxy_id = proxy_id;
22734 self
22735 }
22736
22737}
22738
22739impl AsRef<RemoveProxy> for RemoveProxy {
22740 fn as_ref(&self) -> &RemoveProxy { self }
22741}
22742
22743impl AsRef<RemoveProxy> for RTDRemoveProxyBuilder {
22744 fn as_ref(&self) -> &RemoveProxy { &self.inner }
22745}
22746
22747
22748
22749
22750
22751
22752
22753#[derive(Debug, Clone, Default, Serialize, Deserialize)]
22755pub struct RemoveRecentHashtag {
22756 #[doc(hidden)]
22757 #[serde(rename(serialize = "@type", deserialize = "@type"))]
22758 td_name: String,
22759 #[doc(hidden)]
22760 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
22761 extra: Option<String>,
22762 hashtag: String,
22764
22765}
22766
22767impl RObject for RemoveRecentHashtag {
22768 #[doc(hidden)] fn td_name(&self) -> &'static str { "removeRecentHashtag" }
22769 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
22770 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
22771}
22772
22773
22774
22775
22776impl RFunction for RemoveRecentHashtag {}
22777
22778impl RemoveRecentHashtag {
22779 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
22780 pub fn builder() -> RTDRemoveRecentHashtagBuilder {
22781 let mut inner = RemoveRecentHashtag::default();
22782 inner.td_name = "removeRecentHashtag".to_string();
22783 inner.extra = Some(Uuid::new_v4().to_string());
22784 RTDRemoveRecentHashtagBuilder { inner }
22785 }
22786
22787 pub fn hashtag(&self) -> &String { &self.hashtag }
22788
22789}
22790
22791#[doc(hidden)]
22792pub struct RTDRemoveRecentHashtagBuilder {
22793 inner: RemoveRecentHashtag
22794}
22795
22796impl RTDRemoveRecentHashtagBuilder {
22797 pub fn build(&self) -> RemoveRecentHashtag { self.inner.clone() }
22798
22799
22800 pub fn hashtag<T: AsRef<str>>(&mut self, hashtag: T) -> &mut Self {
22801 self.inner.hashtag = hashtag.as_ref().to_string();
22802 self
22803 }
22804
22805}
22806
22807impl AsRef<RemoveRecentHashtag> for RemoveRecentHashtag {
22808 fn as_ref(&self) -> &RemoveRecentHashtag { self }
22809}
22810
22811impl AsRef<RemoveRecentHashtag> for RTDRemoveRecentHashtagBuilder {
22812 fn as_ref(&self) -> &RemoveRecentHashtag { &self.inner }
22813}
22814
22815
22816
22817
22818
22819
22820
22821#[derive(Debug, Clone, Default, Serialize, Deserialize)]
22823pub struct RemoveRecentSticker {
22824 #[doc(hidden)]
22825 #[serde(rename(serialize = "@type", deserialize = "@type"))]
22826 td_name: String,
22827 #[doc(hidden)]
22828 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
22829 extra: Option<String>,
22830 is_attached: bool,
22832 sticker: InputFile,
22834
22835}
22836
22837impl RObject for RemoveRecentSticker {
22838 #[doc(hidden)] fn td_name(&self) -> &'static str { "removeRecentSticker" }
22839 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
22840 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
22841}
22842
22843
22844
22845
22846impl RFunction for RemoveRecentSticker {}
22847
22848impl RemoveRecentSticker {
22849 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
22850 pub fn builder() -> RTDRemoveRecentStickerBuilder {
22851 let mut inner = RemoveRecentSticker::default();
22852 inner.td_name = "removeRecentSticker".to_string();
22853 inner.extra = Some(Uuid::new_v4().to_string());
22854 RTDRemoveRecentStickerBuilder { inner }
22855 }
22856
22857 pub fn is_attached(&self) -> bool { self.is_attached }
22858
22859 pub fn sticker(&self) -> &InputFile { &self.sticker }
22860
22861}
22862
22863#[doc(hidden)]
22864pub struct RTDRemoveRecentStickerBuilder {
22865 inner: RemoveRecentSticker
22866}
22867
22868impl RTDRemoveRecentStickerBuilder {
22869 pub fn build(&self) -> RemoveRecentSticker { self.inner.clone() }
22870
22871
22872 pub fn is_attached(&mut self, is_attached: bool) -> &mut Self {
22873 self.inner.is_attached = is_attached;
22874 self
22875 }
22876
22877
22878 pub fn sticker<T: AsRef<InputFile>>(&mut self, sticker: T) -> &mut Self {
22879 self.inner.sticker = sticker.as_ref().clone();
22880 self
22881 }
22882
22883}
22884
22885impl AsRef<RemoveRecentSticker> for RemoveRecentSticker {
22886 fn as_ref(&self) -> &RemoveRecentSticker { self }
22887}
22888
22889impl AsRef<RemoveRecentSticker> for RTDRemoveRecentStickerBuilder {
22890 fn as_ref(&self) -> &RemoveRecentSticker { &self.inner }
22891}
22892
22893
22894
22895
22896
22897
22898
22899#[derive(Debug, Clone, Default, Serialize, Deserialize)]
22901pub struct RemoveRecentlyFoundChat {
22902 #[doc(hidden)]
22903 #[serde(rename(serialize = "@type", deserialize = "@type"))]
22904 td_name: String,
22905 #[doc(hidden)]
22906 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
22907 extra: Option<String>,
22908 chat_id: i64,
22910
22911}
22912
22913impl RObject for RemoveRecentlyFoundChat {
22914 #[doc(hidden)] fn td_name(&self) -> &'static str { "removeRecentlyFoundChat" }
22915 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
22916 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
22917}
22918
22919
22920
22921
22922impl RFunction for RemoveRecentlyFoundChat {}
22923
22924impl RemoveRecentlyFoundChat {
22925 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
22926 pub fn builder() -> RTDRemoveRecentlyFoundChatBuilder {
22927 let mut inner = RemoveRecentlyFoundChat::default();
22928 inner.td_name = "removeRecentlyFoundChat".to_string();
22929 inner.extra = Some(Uuid::new_v4().to_string());
22930 RTDRemoveRecentlyFoundChatBuilder { inner }
22931 }
22932
22933 pub fn chat_id(&self) -> i64 { self.chat_id }
22934
22935}
22936
22937#[doc(hidden)]
22938pub struct RTDRemoveRecentlyFoundChatBuilder {
22939 inner: RemoveRecentlyFoundChat
22940}
22941
22942impl RTDRemoveRecentlyFoundChatBuilder {
22943 pub fn build(&self) -> RemoveRecentlyFoundChat { self.inner.clone() }
22944
22945
22946 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
22947 self.inner.chat_id = chat_id;
22948 self
22949 }
22950
22951}
22952
22953impl AsRef<RemoveRecentlyFoundChat> for RemoveRecentlyFoundChat {
22954 fn as_ref(&self) -> &RemoveRecentlyFoundChat { self }
22955}
22956
22957impl AsRef<RemoveRecentlyFoundChat> for RTDRemoveRecentlyFoundChatBuilder {
22958 fn as_ref(&self) -> &RemoveRecentlyFoundChat { &self.inner }
22959}
22960
22961
22962
22963
22964
22965
22966
22967#[derive(Debug, Clone, Default, Serialize, Deserialize)]
22969pub struct RemoveSavedAnimation {
22970 #[doc(hidden)]
22971 #[serde(rename(serialize = "@type", deserialize = "@type"))]
22972 td_name: String,
22973 #[doc(hidden)]
22974 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
22975 extra: Option<String>,
22976 animation: InputFile,
22978
22979}
22980
22981impl RObject for RemoveSavedAnimation {
22982 #[doc(hidden)] fn td_name(&self) -> &'static str { "removeSavedAnimation" }
22983 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
22984 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
22985}
22986
22987
22988
22989
22990impl RFunction for RemoveSavedAnimation {}
22991
22992impl RemoveSavedAnimation {
22993 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
22994 pub fn builder() -> RTDRemoveSavedAnimationBuilder {
22995 let mut inner = RemoveSavedAnimation::default();
22996 inner.td_name = "removeSavedAnimation".to_string();
22997 inner.extra = Some(Uuid::new_v4().to_string());
22998 RTDRemoveSavedAnimationBuilder { inner }
22999 }
23000
23001 pub fn animation(&self) -> &InputFile { &self.animation }
23002
23003}
23004
23005#[doc(hidden)]
23006pub struct RTDRemoveSavedAnimationBuilder {
23007 inner: RemoveSavedAnimation
23008}
23009
23010impl RTDRemoveSavedAnimationBuilder {
23011 pub fn build(&self) -> RemoveSavedAnimation { self.inner.clone() }
23012
23013
23014 pub fn animation<T: AsRef<InputFile>>(&mut self, animation: T) -> &mut Self {
23015 self.inner.animation = animation.as_ref().clone();
23016 self
23017 }
23018
23019}
23020
23021impl AsRef<RemoveSavedAnimation> for RemoveSavedAnimation {
23022 fn as_ref(&self) -> &RemoveSavedAnimation { self }
23023}
23024
23025impl AsRef<RemoveSavedAnimation> for RTDRemoveSavedAnimationBuilder {
23026 fn as_ref(&self) -> &RemoveSavedAnimation { &self.inner }
23027}
23028
23029
23030
23031
23032
23033
23034
23035#[derive(Debug, Clone, Default, Serialize, Deserialize)]
23037pub struct RemoveStickerFromSet {
23038 #[doc(hidden)]
23039 #[serde(rename(serialize = "@type", deserialize = "@type"))]
23040 td_name: String,
23041 #[doc(hidden)]
23042 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
23043 extra: Option<String>,
23044 sticker: InputFile,
23046
23047}
23048
23049impl RObject for RemoveStickerFromSet {
23050 #[doc(hidden)] fn td_name(&self) -> &'static str { "removeStickerFromSet" }
23051 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
23052 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
23053}
23054
23055
23056
23057
23058impl RFunction for RemoveStickerFromSet {}
23059
23060impl RemoveStickerFromSet {
23061 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
23062 pub fn builder() -> RTDRemoveStickerFromSetBuilder {
23063 let mut inner = RemoveStickerFromSet::default();
23064 inner.td_name = "removeStickerFromSet".to_string();
23065 inner.extra = Some(Uuid::new_v4().to_string());
23066 RTDRemoveStickerFromSetBuilder { inner }
23067 }
23068
23069 pub fn sticker(&self) -> &InputFile { &self.sticker }
23070
23071}
23072
23073#[doc(hidden)]
23074pub struct RTDRemoveStickerFromSetBuilder {
23075 inner: RemoveStickerFromSet
23076}
23077
23078impl RTDRemoveStickerFromSetBuilder {
23079 pub fn build(&self) -> RemoveStickerFromSet { self.inner.clone() }
23080
23081
23082 pub fn sticker<T: AsRef<InputFile>>(&mut self, sticker: T) -> &mut Self {
23083 self.inner.sticker = sticker.as_ref().clone();
23084 self
23085 }
23086
23087}
23088
23089impl AsRef<RemoveStickerFromSet> for RemoveStickerFromSet {
23090 fn as_ref(&self) -> &RemoveStickerFromSet { self }
23091}
23092
23093impl AsRef<RemoveStickerFromSet> for RTDRemoveStickerFromSetBuilder {
23094 fn as_ref(&self) -> &RemoveStickerFromSet { &self.inner }
23095}
23096
23097
23098
23099
23100
23101
23102
23103#[derive(Debug, Clone, Default, Serialize, Deserialize)]
23105pub struct RemoveTopChat {
23106 #[doc(hidden)]
23107 #[serde(rename(serialize = "@type", deserialize = "@type"))]
23108 td_name: String,
23109 #[doc(hidden)]
23110 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
23111 extra: Option<String>,
23112 category: TopChatCategory,
23114 chat_id: i64,
23116
23117}
23118
23119impl RObject for RemoveTopChat {
23120 #[doc(hidden)] fn td_name(&self) -> &'static str { "removeTopChat" }
23121 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
23122 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
23123}
23124
23125
23126
23127
23128impl RFunction for RemoveTopChat {}
23129
23130impl RemoveTopChat {
23131 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
23132 pub fn builder() -> RTDRemoveTopChatBuilder {
23133 let mut inner = RemoveTopChat::default();
23134 inner.td_name = "removeTopChat".to_string();
23135 inner.extra = Some(Uuid::new_v4().to_string());
23136 RTDRemoveTopChatBuilder { inner }
23137 }
23138
23139 pub fn category(&self) -> &TopChatCategory { &self.category }
23140
23141 pub fn chat_id(&self) -> i64 { self.chat_id }
23142
23143}
23144
23145#[doc(hidden)]
23146pub struct RTDRemoveTopChatBuilder {
23147 inner: RemoveTopChat
23148}
23149
23150impl RTDRemoveTopChatBuilder {
23151 pub fn build(&self) -> RemoveTopChat { self.inner.clone() }
23152
23153
23154 pub fn category<T: AsRef<TopChatCategory>>(&mut self, category: T) -> &mut Self {
23155 self.inner.category = category.as_ref().clone();
23156 self
23157 }
23158
23159
23160 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
23161 self.inner.chat_id = chat_id;
23162 self
23163 }
23164
23165}
23166
23167impl AsRef<RemoveTopChat> for RemoveTopChat {
23168 fn as_ref(&self) -> &RemoveTopChat { self }
23169}
23170
23171impl AsRef<RemoveTopChat> for RTDRemoveTopChatBuilder {
23172 fn as_ref(&self) -> &RemoveTopChat { &self.inner }
23173}
23174
23175
23176
23177
23178
23179
23180
23181#[derive(Debug, Clone, Default, Serialize, Deserialize)]
23183pub struct ReorderChatFilters {
23184 #[doc(hidden)]
23185 #[serde(rename(serialize = "@type", deserialize = "@type"))]
23186 td_name: String,
23187 #[doc(hidden)]
23188 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
23189 extra: Option<String>,
23190 chat_filter_ids: Vec<i64>,
23192
23193}
23194
23195impl RObject for ReorderChatFilters {
23196 #[doc(hidden)] fn td_name(&self) -> &'static str { "reorderChatFilters" }
23197 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
23198 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
23199}
23200
23201
23202
23203
23204impl RFunction for ReorderChatFilters {}
23205
23206impl ReorderChatFilters {
23207 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
23208 pub fn builder() -> RTDReorderChatFiltersBuilder {
23209 let mut inner = ReorderChatFilters::default();
23210 inner.td_name = "reorderChatFilters".to_string();
23211 inner.extra = Some(Uuid::new_v4().to_string());
23212 RTDReorderChatFiltersBuilder { inner }
23213 }
23214
23215 pub fn chat_filter_ids(&self) -> &Vec<i64> { &self.chat_filter_ids }
23216
23217}
23218
23219#[doc(hidden)]
23220pub struct RTDReorderChatFiltersBuilder {
23221 inner: ReorderChatFilters
23222}
23223
23224impl RTDReorderChatFiltersBuilder {
23225 pub fn build(&self) -> ReorderChatFilters { self.inner.clone() }
23226
23227
23228 pub fn chat_filter_ids(&mut self, chat_filter_ids: Vec<i64>) -> &mut Self {
23229 self.inner.chat_filter_ids = chat_filter_ids;
23230 self
23231 }
23232
23233}
23234
23235impl AsRef<ReorderChatFilters> for ReorderChatFilters {
23236 fn as_ref(&self) -> &ReorderChatFilters { self }
23237}
23238
23239impl AsRef<ReorderChatFilters> for RTDReorderChatFiltersBuilder {
23240 fn as_ref(&self) -> &ReorderChatFilters { &self.inner }
23241}
23242
23243
23244
23245
23246
23247
23248
23249#[derive(Debug, Clone, Default, Serialize, Deserialize)]
23251pub struct ReorderInstalledStickerSets {
23252 #[doc(hidden)]
23253 #[serde(rename(serialize = "@type", deserialize = "@type"))]
23254 td_name: String,
23255 #[doc(hidden)]
23256 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
23257 extra: Option<String>,
23258 is_masks: bool,
23260 sticker_set_ids: Vec<isize>,
23262
23263}
23264
23265impl RObject for ReorderInstalledStickerSets {
23266 #[doc(hidden)] fn td_name(&self) -> &'static str { "reorderInstalledStickerSets" }
23267 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
23268 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
23269}
23270
23271
23272
23273
23274impl RFunction for ReorderInstalledStickerSets {}
23275
23276impl ReorderInstalledStickerSets {
23277 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
23278 pub fn builder() -> RTDReorderInstalledStickerSetsBuilder {
23279 let mut inner = ReorderInstalledStickerSets::default();
23280 inner.td_name = "reorderInstalledStickerSets".to_string();
23281 inner.extra = Some(Uuid::new_v4().to_string());
23282 RTDReorderInstalledStickerSetsBuilder { inner }
23283 }
23284
23285 pub fn is_masks(&self) -> bool { self.is_masks }
23286
23287 pub fn sticker_set_ids(&self) -> &Vec<isize> { &self.sticker_set_ids }
23288
23289}
23290
23291#[doc(hidden)]
23292pub struct RTDReorderInstalledStickerSetsBuilder {
23293 inner: ReorderInstalledStickerSets
23294}
23295
23296impl RTDReorderInstalledStickerSetsBuilder {
23297 pub fn build(&self) -> ReorderInstalledStickerSets { self.inner.clone() }
23298
23299
23300 pub fn is_masks(&mut self, is_masks: bool) -> &mut Self {
23301 self.inner.is_masks = is_masks;
23302 self
23303 }
23304
23305
23306 pub fn sticker_set_ids(&mut self, sticker_set_ids: Vec<isize>) -> &mut Self {
23307 self.inner.sticker_set_ids = sticker_set_ids;
23308 self
23309 }
23310
23311}
23312
23313impl AsRef<ReorderInstalledStickerSets> for ReorderInstalledStickerSets {
23314 fn as_ref(&self) -> &ReorderInstalledStickerSets { self }
23315}
23316
23317impl AsRef<ReorderInstalledStickerSets> for RTDReorderInstalledStickerSetsBuilder {
23318 fn as_ref(&self) -> &ReorderInstalledStickerSets { &self.inner }
23319}
23320
23321
23322
23323
23324
23325
23326
23327#[derive(Debug, Clone, Default, Serialize, Deserialize)]
23329pub struct ReplacePrimaryChatInviteLink {
23330 #[doc(hidden)]
23331 #[serde(rename(serialize = "@type", deserialize = "@type"))]
23332 td_name: String,
23333 #[doc(hidden)]
23334 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
23335 extra: Option<String>,
23336 chat_id: i64,
23338
23339}
23340
23341impl RObject for ReplacePrimaryChatInviteLink {
23342 #[doc(hidden)] fn td_name(&self) -> &'static str { "replacePrimaryChatInviteLink" }
23343 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
23344 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
23345}
23346
23347
23348
23349
23350impl RFunction for ReplacePrimaryChatInviteLink {}
23351
23352impl ReplacePrimaryChatInviteLink {
23353 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
23354 pub fn builder() -> RTDReplacePrimaryChatInviteLinkBuilder {
23355 let mut inner = ReplacePrimaryChatInviteLink::default();
23356 inner.td_name = "replacePrimaryChatInviteLink".to_string();
23357 inner.extra = Some(Uuid::new_v4().to_string());
23358 RTDReplacePrimaryChatInviteLinkBuilder { inner }
23359 }
23360
23361 pub fn chat_id(&self) -> i64 { self.chat_id }
23362
23363}
23364
23365#[doc(hidden)]
23366pub struct RTDReplacePrimaryChatInviteLinkBuilder {
23367 inner: ReplacePrimaryChatInviteLink
23368}
23369
23370impl RTDReplacePrimaryChatInviteLinkBuilder {
23371 pub fn build(&self) -> ReplacePrimaryChatInviteLink { self.inner.clone() }
23372
23373
23374 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
23375 self.inner.chat_id = chat_id;
23376 self
23377 }
23378
23379}
23380
23381impl AsRef<ReplacePrimaryChatInviteLink> for ReplacePrimaryChatInviteLink {
23382 fn as_ref(&self) -> &ReplacePrimaryChatInviteLink { self }
23383}
23384
23385impl AsRef<ReplacePrimaryChatInviteLink> for RTDReplacePrimaryChatInviteLinkBuilder {
23386 fn as_ref(&self) -> &ReplacePrimaryChatInviteLink { &self.inner }
23387}
23388
23389
23390
23391
23392
23393
23394
23395#[derive(Debug, Clone, Default, Serialize, Deserialize)]
23397pub struct ReportChat {
23398 #[doc(hidden)]
23399 #[serde(rename(serialize = "@type", deserialize = "@type"))]
23400 td_name: String,
23401 #[doc(hidden)]
23402 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
23403 extra: Option<String>,
23404 chat_id: i64,
23406 message_ids: Vec<i64>,
23408 reason: ChatReportReason,
23410 text: String,
23412
23413}
23414
23415impl RObject for ReportChat {
23416 #[doc(hidden)] fn td_name(&self) -> &'static str { "reportChat" }
23417 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
23418 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
23419}
23420
23421
23422
23423
23424impl RFunction for ReportChat {}
23425
23426impl ReportChat {
23427 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
23428 pub fn builder() -> RTDReportChatBuilder {
23429 let mut inner = ReportChat::default();
23430 inner.td_name = "reportChat".to_string();
23431 inner.extra = Some(Uuid::new_v4().to_string());
23432 RTDReportChatBuilder { inner }
23433 }
23434
23435 pub fn chat_id(&self) -> i64 { self.chat_id }
23436
23437 pub fn message_ids(&self) -> &Vec<i64> { &self.message_ids }
23438
23439 pub fn reason(&self) -> &ChatReportReason { &self.reason }
23440
23441 pub fn text(&self) -> &String { &self.text }
23442
23443}
23444
23445#[doc(hidden)]
23446pub struct RTDReportChatBuilder {
23447 inner: ReportChat
23448}
23449
23450impl RTDReportChatBuilder {
23451 pub fn build(&self) -> ReportChat { self.inner.clone() }
23452
23453
23454 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
23455 self.inner.chat_id = chat_id;
23456 self
23457 }
23458
23459
23460 pub fn message_ids(&mut self, message_ids: Vec<i64>) -> &mut Self {
23461 self.inner.message_ids = message_ids;
23462 self
23463 }
23464
23465
23466 pub fn reason<T: AsRef<ChatReportReason>>(&mut self, reason: T) -> &mut Self {
23467 self.inner.reason = reason.as_ref().clone();
23468 self
23469 }
23470
23471
23472 pub fn text<T: AsRef<str>>(&mut self, text: T) -> &mut Self {
23473 self.inner.text = text.as_ref().to_string();
23474 self
23475 }
23476
23477}
23478
23479impl AsRef<ReportChat> for ReportChat {
23480 fn as_ref(&self) -> &ReportChat { self }
23481}
23482
23483impl AsRef<ReportChat> for RTDReportChatBuilder {
23484 fn as_ref(&self) -> &ReportChat { &self.inner }
23485}
23486
23487
23488
23489
23490
23491
23492
23493#[derive(Debug, Clone, Default, Serialize, Deserialize)]
23495pub struct ReportChatPhoto {
23496 #[doc(hidden)]
23497 #[serde(rename(serialize = "@type", deserialize = "@type"))]
23498 td_name: String,
23499 #[doc(hidden)]
23500 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
23501 extra: Option<String>,
23502 chat_id: i64,
23504 file_id: i64,
23506 reason: ChatReportReason,
23508 text: String,
23510
23511}
23512
23513impl RObject for ReportChatPhoto {
23514 #[doc(hidden)] fn td_name(&self) -> &'static str { "reportChatPhoto" }
23515 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
23516 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
23517}
23518
23519
23520
23521
23522impl RFunction for ReportChatPhoto {}
23523
23524impl ReportChatPhoto {
23525 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
23526 pub fn builder() -> RTDReportChatPhotoBuilder {
23527 let mut inner = ReportChatPhoto::default();
23528 inner.td_name = "reportChatPhoto".to_string();
23529 inner.extra = Some(Uuid::new_v4().to_string());
23530 RTDReportChatPhotoBuilder { inner }
23531 }
23532
23533 pub fn chat_id(&self) -> i64 { self.chat_id }
23534
23535 pub fn file_id(&self) -> i64 { self.file_id }
23536
23537 pub fn reason(&self) -> &ChatReportReason { &self.reason }
23538
23539 pub fn text(&self) -> &String { &self.text }
23540
23541}
23542
23543#[doc(hidden)]
23544pub struct RTDReportChatPhotoBuilder {
23545 inner: ReportChatPhoto
23546}
23547
23548impl RTDReportChatPhotoBuilder {
23549 pub fn build(&self) -> ReportChatPhoto { self.inner.clone() }
23550
23551
23552 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
23553 self.inner.chat_id = chat_id;
23554 self
23555 }
23556
23557
23558 pub fn file_id(&mut self, file_id: i64) -> &mut Self {
23559 self.inner.file_id = file_id;
23560 self
23561 }
23562
23563
23564 pub fn reason<T: AsRef<ChatReportReason>>(&mut self, reason: T) -> &mut Self {
23565 self.inner.reason = reason.as_ref().clone();
23566 self
23567 }
23568
23569
23570 pub fn text<T: AsRef<str>>(&mut self, text: T) -> &mut Self {
23571 self.inner.text = text.as_ref().to_string();
23572 self
23573 }
23574
23575}
23576
23577impl AsRef<ReportChatPhoto> for ReportChatPhoto {
23578 fn as_ref(&self) -> &ReportChatPhoto { self }
23579}
23580
23581impl AsRef<ReportChatPhoto> for RTDReportChatPhotoBuilder {
23582 fn as_ref(&self) -> &ReportChatPhoto { &self.inner }
23583}
23584
23585
23586
23587
23588
23589
23590
23591#[derive(Debug, Clone, Default, Serialize, Deserialize)]
23593pub struct ReportSupergroupSpam {
23594 #[doc(hidden)]
23595 #[serde(rename(serialize = "@type", deserialize = "@type"))]
23596 td_name: String,
23597 #[doc(hidden)]
23598 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
23599 extra: Option<String>,
23600 supergroup_id: i64,
23602 message_ids: Vec<i64>,
23604
23605}
23606
23607impl RObject for ReportSupergroupSpam {
23608 #[doc(hidden)] fn td_name(&self) -> &'static str { "reportSupergroupSpam" }
23609 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
23610 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
23611}
23612
23613
23614
23615
23616impl RFunction for ReportSupergroupSpam {}
23617
23618impl ReportSupergroupSpam {
23619 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
23620 pub fn builder() -> RTDReportSupergroupSpamBuilder {
23621 let mut inner = ReportSupergroupSpam::default();
23622 inner.td_name = "reportSupergroupSpam".to_string();
23623 inner.extra = Some(Uuid::new_v4().to_string());
23624 RTDReportSupergroupSpamBuilder { inner }
23625 }
23626
23627 pub fn supergroup_id(&self) -> i64 { self.supergroup_id }
23628
23629 pub fn message_ids(&self) -> &Vec<i64> { &self.message_ids }
23630
23631}
23632
23633#[doc(hidden)]
23634pub struct RTDReportSupergroupSpamBuilder {
23635 inner: ReportSupergroupSpam
23636}
23637
23638impl RTDReportSupergroupSpamBuilder {
23639 pub fn build(&self) -> ReportSupergroupSpam { self.inner.clone() }
23640
23641
23642 pub fn supergroup_id(&mut self, supergroup_id: i64) -> &mut Self {
23643 self.inner.supergroup_id = supergroup_id;
23644 self
23645 }
23646
23647
23648 pub fn message_ids(&mut self, message_ids: Vec<i64>) -> &mut Self {
23649 self.inner.message_ids = message_ids;
23650 self
23651 }
23652
23653}
23654
23655impl AsRef<ReportSupergroupSpam> for ReportSupergroupSpam {
23656 fn as_ref(&self) -> &ReportSupergroupSpam { self }
23657}
23658
23659impl AsRef<ReportSupergroupSpam> for RTDReportSupergroupSpamBuilder {
23660 fn as_ref(&self) -> &ReportSupergroupSpam { &self.inner }
23661}
23662
23663
23664
23665
23666
23667
23668
23669#[derive(Debug, Clone, Default, Serialize, Deserialize)]
23671pub struct RequestAuthenticationPasswordRecovery {
23672 #[doc(hidden)]
23673 #[serde(rename(serialize = "@type", deserialize = "@type"))]
23674 td_name: String,
23675 #[doc(hidden)]
23676 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
23677 extra: Option<String>,
23678
23679}
23680
23681impl RObject for RequestAuthenticationPasswordRecovery {
23682 #[doc(hidden)] fn td_name(&self) -> &'static str { "requestAuthenticationPasswordRecovery" }
23683 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
23684 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
23685}
23686
23687
23688
23689
23690impl RFunction for RequestAuthenticationPasswordRecovery {}
23691
23692impl RequestAuthenticationPasswordRecovery {
23693 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
23694 pub fn builder() -> RTDRequestAuthenticationPasswordRecoveryBuilder {
23695 let mut inner = RequestAuthenticationPasswordRecovery::default();
23696 inner.td_name = "requestAuthenticationPasswordRecovery".to_string();
23697 inner.extra = Some(Uuid::new_v4().to_string());
23698 RTDRequestAuthenticationPasswordRecoveryBuilder { inner }
23699 }
23700
23701}
23702
23703#[doc(hidden)]
23704pub struct RTDRequestAuthenticationPasswordRecoveryBuilder {
23705 inner: RequestAuthenticationPasswordRecovery
23706}
23707
23708impl RTDRequestAuthenticationPasswordRecoveryBuilder {
23709 pub fn build(&self) -> RequestAuthenticationPasswordRecovery { self.inner.clone() }
23710
23711}
23712
23713impl AsRef<RequestAuthenticationPasswordRecovery> for RequestAuthenticationPasswordRecovery {
23714 fn as_ref(&self) -> &RequestAuthenticationPasswordRecovery { self }
23715}
23716
23717impl AsRef<RequestAuthenticationPasswordRecovery> for RTDRequestAuthenticationPasswordRecoveryBuilder {
23718 fn as_ref(&self) -> &RequestAuthenticationPasswordRecovery { &self.inner }
23719}
23720
23721
23722
23723
23724
23725
23726
23727#[derive(Debug, Clone, Default, Serialize, Deserialize)]
23729pub struct RequestPasswordRecovery {
23730 #[doc(hidden)]
23731 #[serde(rename(serialize = "@type", deserialize = "@type"))]
23732 td_name: String,
23733 #[doc(hidden)]
23734 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
23735 extra: Option<String>,
23736
23737}
23738
23739impl RObject for RequestPasswordRecovery {
23740 #[doc(hidden)] fn td_name(&self) -> &'static str { "requestPasswordRecovery" }
23741 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
23742 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
23743}
23744
23745
23746
23747
23748impl RFunction for RequestPasswordRecovery {}
23749
23750impl RequestPasswordRecovery {
23751 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
23752 pub fn builder() -> RTDRequestPasswordRecoveryBuilder {
23753 let mut inner = RequestPasswordRecovery::default();
23754 inner.td_name = "requestPasswordRecovery".to_string();
23755 inner.extra = Some(Uuid::new_v4().to_string());
23756 RTDRequestPasswordRecoveryBuilder { inner }
23757 }
23758
23759}
23760
23761#[doc(hidden)]
23762pub struct RTDRequestPasswordRecoveryBuilder {
23763 inner: RequestPasswordRecovery
23764}
23765
23766impl RTDRequestPasswordRecoveryBuilder {
23767 pub fn build(&self) -> RequestPasswordRecovery { self.inner.clone() }
23768
23769}
23770
23771impl AsRef<RequestPasswordRecovery> for RequestPasswordRecovery {
23772 fn as_ref(&self) -> &RequestPasswordRecovery { self }
23773}
23774
23775impl AsRef<RequestPasswordRecovery> for RTDRequestPasswordRecoveryBuilder {
23776 fn as_ref(&self) -> &RequestPasswordRecovery { &self.inner }
23777}
23778
23779
23780
23781
23782
23783
23784
23785#[derive(Debug, Clone, Default, Serialize, Deserialize)]
23787pub struct RequestQrCodeAuthentication {
23788 #[doc(hidden)]
23789 #[serde(rename(serialize = "@type", deserialize = "@type"))]
23790 td_name: String,
23791 #[doc(hidden)]
23792 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
23793 extra: Option<String>,
23794 other_user_ids: Vec<i64>,
23796
23797}
23798
23799impl RObject for RequestQrCodeAuthentication {
23800 #[doc(hidden)] fn td_name(&self) -> &'static str { "requestQrCodeAuthentication" }
23801 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
23802 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
23803}
23804
23805
23806
23807
23808impl RFunction for RequestQrCodeAuthentication {}
23809
23810impl RequestQrCodeAuthentication {
23811 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
23812 pub fn builder() -> RTDRequestQrCodeAuthenticationBuilder {
23813 let mut inner = RequestQrCodeAuthentication::default();
23814 inner.td_name = "requestQrCodeAuthentication".to_string();
23815 inner.extra = Some(Uuid::new_v4().to_string());
23816 RTDRequestQrCodeAuthenticationBuilder { inner }
23817 }
23818
23819 pub fn other_user_ids(&self) -> &Vec<i64> { &self.other_user_ids }
23820
23821}
23822
23823#[doc(hidden)]
23824pub struct RTDRequestQrCodeAuthenticationBuilder {
23825 inner: RequestQrCodeAuthentication
23826}
23827
23828impl RTDRequestQrCodeAuthenticationBuilder {
23829 pub fn build(&self) -> RequestQrCodeAuthentication { self.inner.clone() }
23830
23831
23832 pub fn other_user_ids(&mut self, other_user_ids: Vec<i64>) -> &mut Self {
23833 self.inner.other_user_ids = other_user_ids;
23834 self
23835 }
23836
23837}
23838
23839impl AsRef<RequestQrCodeAuthentication> for RequestQrCodeAuthentication {
23840 fn as_ref(&self) -> &RequestQrCodeAuthentication { self }
23841}
23842
23843impl AsRef<RequestQrCodeAuthentication> for RTDRequestQrCodeAuthenticationBuilder {
23844 fn as_ref(&self) -> &RequestQrCodeAuthentication { &self.inner }
23845}
23846
23847
23848
23849
23850
23851
23852
23853#[derive(Debug, Clone, Default, Serialize, Deserialize)]
23855pub struct ResendAuthenticationCode {
23856 #[doc(hidden)]
23857 #[serde(rename(serialize = "@type", deserialize = "@type"))]
23858 td_name: String,
23859 #[doc(hidden)]
23860 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
23861 extra: Option<String>,
23862
23863}
23864
23865impl RObject for ResendAuthenticationCode {
23866 #[doc(hidden)] fn td_name(&self) -> &'static str { "resendAuthenticationCode" }
23867 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
23868 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
23869}
23870
23871
23872
23873
23874impl RFunction for ResendAuthenticationCode {}
23875
23876impl ResendAuthenticationCode {
23877 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
23878 pub fn builder() -> RTDResendAuthenticationCodeBuilder {
23879 let mut inner = ResendAuthenticationCode::default();
23880 inner.td_name = "resendAuthenticationCode".to_string();
23881 inner.extra = Some(Uuid::new_v4().to_string());
23882 RTDResendAuthenticationCodeBuilder { inner }
23883 }
23884
23885}
23886
23887#[doc(hidden)]
23888pub struct RTDResendAuthenticationCodeBuilder {
23889 inner: ResendAuthenticationCode
23890}
23891
23892impl RTDResendAuthenticationCodeBuilder {
23893 pub fn build(&self) -> ResendAuthenticationCode { self.inner.clone() }
23894
23895}
23896
23897impl AsRef<ResendAuthenticationCode> for ResendAuthenticationCode {
23898 fn as_ref(&self) -> &ResendAuthenticationCode { self }
23899}
23900
23901impl AsRef<ResendAuthenticationCode> for RTDResendAuthenticationCodeBuilder {
23902 fn as_ref(&self) -> &ResendAuthenticationCode { &self.inner }
23903}
23904
23905
23906
23907
23908
23909
23910
23911#[derive(Debug, Clone, Default, Serialize, Deserialize)]
23913pub struct ResendChangePhoneNumberCode {
23914 #[doc(hidden)]
23915 #[serde(rename(serialize = "@type", deserialize = "@type"))]
23916 td_name: String,
23917 #[doc(hidden)]
23918 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
23919 extra: Option<String>,
23920
23921}
23922
23923impl RObject for ResendChangePhoneNumberCode {
23924 #[doc(hidden)] fn td_name(&self) -> &'static str { "resendChangePhoneNumberCode" }
23925 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
23926 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
23927}
23928
23929
23930
23931
23932impl RFunction for ResendChangePhoneNumberCode {}
23933
23934impl ResendChangePhoneNumberCode {
23935 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
23936 pub fn builder() -> RTDResendChangePhoneNumberCodeBuilder {
23937 let mut inner = ResendChangePhoneNumberCode::default();
23938 inner.td_name = "resendChangePhoneNumberCode".to_string();
23939 inner.extra = Some(Uuid::new_v4().to_string());
23940 RTDResendChangePhoneNumberCodeBuilder { inner }
23941 }
23942
23943}
23944
23945#[doc(hidden)]
23946pub struct RTDResendChangePhoneNumberCodeBuilder {
23947 inner: ResendChangePhoneNumberCode
23948}
23949
23950impl RTDResendChangePhoneNumberCodeBuilder {
23951 pub fn build(&self) -> ResendChangePhoneNumberCode { self.inner.clone() }
23952
23953}
23954
23955impl AsRef<ResendChangePhoneNumberCode> for ResendChangePhoneNumberCode {
23956 fn as_ref(&self) -> &ResendChangePhoneNumberCode { self }
23957}
23958
23959impl AsRef<ResendChangePhoneNumberCode> for RTDResendChangePhoneNumberCodeBuilder {
23960 fn as_ref(&self) -> &ResendChangePhoneNumberCode { &self.inner }
23961}
23962
23963
23964
23965
23966
23967
23968
23969#[derive(Debug, Clone, Default, Serialize, Deserialize)]
23971pub struct ResendEmailAddressVerificationCode {
23972 #[doc(hidden)]
23973 #[serde(rename(serialize = "@type", deserialize = "@type"))]
23974 td_name: String,
23975 #[doc(hidden)]
23976 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
23977 extra: Option<String>,
23978
23979}
23980
23981impl RObject for ResendEmailAddressVerificationCode {
23982 #[doc(hidden)] fn td_name(&self) -> &'static str { "resendEmailAddressVerificationCode" }
23983 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
23984 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
23985}
23986
23987
23988
23989
23990impl RFunction for ResendEmailAddressVerificationCode {}
23991
23992impl ResendEmailAddressVerificationCode {
23993 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
23994 pub fn builder() -> RTDResendEmailAddressVerificationCodeBuilder {
23995 let mut inner = ResendEmailAddressVerificationCode::default();
23996 inner.td_name = "resendEmailAddressVerificationCode".to_string();
23997 inner.extra = Some(Uuid::new_v4().to_string());
23998 RTDResendEmailAddressVerificationCodeBuilder { inner }
23999 }
24000
24001}
24002
24003#[doc(hidden)]
24004pub struct RTDResendEmailAddressVerificationCodeBuilder {
24005 inner: ResendEmailAddressVerificationCode
24006}
24007
24008impl RTDResendEmailAddressVerificationCodeBuilder {
24009 pub fn build(&self) -> ResendEmailAddressVerificationCode { self.inner.clone() }
24010
24011}
24012
24013impl AsRef<ResendEmailAddressVerificationCode> for ResendEmailAddressVerificationCode {
24014 fn as_ref(&self) -> &ResendEmailAddressVerificationCode { self }
24015}
24016
24017impl AsRef<ResendEmailAddressVerificationCode> for RTDResendEmailAddressVerificationCodeBuilder {
24018 fn as_ref(&self) -> &ResendEmailAddressVerificationCode { &self.inner }
24019}
24020
24021
24022
24023
24024
24025
24026
24027#[derive(Debug, Clone, Default, Serialize, Deserialize)]
24029pub struct ResendMessages {
24030 #[doc(hidden)]
24031 #[serde(rename(serialize = "@type", deserialize = "@type"))]
24032 td_name: String,
24033 #[doc(hidden)]
24034 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
24035 extra: Option<String>,
24036 chat_id: i64,
24038 message_ids: Vec<i64>,
24040
24041}
24042
24043impl RObject for ResendMessages {
24044 #[doc(hidden)] fn td_name(&self) -> &'static str { "resendMessages" }
24045 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
24046 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
24047}
24048
24049
24050
24051
24052impl RFunction for ResendMessages {}
24053
24054impl ResendMessages {
24055 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
24056 pub fn builder() -> RTDResendMessagesBuilder {
24057 let mut inner = ResendMessages::default();
24058 inner.td_name = "resendMessages".to_string();
24059 inner.extra = Some(Uuid::new_v4().to_string());
24060 RTDResendMessagesBuilder { inner }
24061 }
24062
24063 pub fn chat_id(&self) -> i64 { self.chat_id }
24064
24065 pub fn message_ids(&self) -> &Vec<i64> { &self.message_ids }
24066
24067}
24068
24069#[doc(hidden)]
24070pub struct RTDResendMessagesBuilder {
24071 inner: ResendMessages
24072}
24073
24074impl RTDResendMessagesBuilder {
24075 pub fn build(&self) -> ResendMessages { self.inner.clone() }
24076
24077
24078 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
24079 self.inner.chat_id = chat_id;
24080 self
24081 }
24082
24083
24084 pub fn message_ids(&mut self, message_ids: Vec<i64>) -> &mut Self {
24085 self.inner.message_ids = message_ids;
24086 self
24087 }
24088
24089}
24090
24091impl AsRef<ResendMessages> for ResendMessages {
24092 fn as_ref(&self) -> &ResendMessages { self }
24093}
24094
24095impl AsRef<ResendMessages> for RTDResendMessagesBuilder {
24096 fn as_ref(&self) -> &ResendMessages { &self.inner }
24097}
24098
24099
24100
24101
24102
24103
24104
24105#[derive(Debug, Clone, Default, Serialize, Deserialize)]
24107pub struct ResendPhoneNumberConfirmationCode {
24108 #[doc(hidden)]
24109 #[serde(rename(serialize = "@type", deserialize = "@type"))]
24110 td_name: String,
24111 #[doc(hidden)]
24112 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
24113 extra: Option<String>,
24114
24115}
24116
24117impl RObject for ResendPhoneNumberConfirmationCode {
24118 #[doc(hidden)] fn td_name(&self) -> &'static str { "resendPhoneNumberConfirmationCode" }
24119 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
24120 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
24121}
24122
24123
24124
24125
24126impl RFunction for ResendPhoneNumberConfirmationCode {}
24127
24128impl ResendPhoneNumberConfirmationCode {
24129 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
24130 pub fn builder() -> RTDResendPhoneNumberConfirmationCodeBuilder {
24131 let mut inner = ResendPhoneNumberConfirmationCode::default();
24132 inner.td_name = "resendPhoneNumberConfirmationCode".to_string();
24133 inner.extra = Some(Uuid::new_v4().to_string());
24134 RTDResendPhoneNumberConfirmationCodeBuilder { inner }
24135 }
24136
24137}
24138
24139#[doc(hidden)]
24140pub struct RTDResendPhoneNumberConfirmationCodeBuilder {
24141 inner: ResendPhoneNumberConfirmationCode
24142}
24143
24144impl RTDResendPhoneNumberConfirmationCodeBuilder {
24145 pub fn build(&self) -> ResendPhoneNumberConfirmationCode { self.inner.clone() }
24146
24147}
24148
24149impl AsRef<ResendPhoneNumberConfirmationCode> for ResendPhoneNumberConfirmationCode {
24150 fn as_ref(&self) -> &ResendPhoneNumberConfirmationCode { self }
24151}
24152
24153impl AsRef<ResendPhoneNumberConfirmationCode> for RTDResendPhoneNumberConfirmationCodeBuilder {
24154 fn as_ref(&self) -> &ResendPhoneNumberConfirmationCode { &self.inner }
24155}
24156
24157
24158
24159
24160
24161
24162
24163#[derive(Debug, Clone, Default, Serialize, Deserialize)]
24165pub struct ResendPhoneNumberVerificationCode {
24166 #[doc(hidden)]
24167 #[serde(rename(serialize = "@type", deserialize = "@type"))]
24168 td_name: String,
24169 #[doc(hidden)]
24170 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
24171 extra: Option<String>,
24172
24173}
24174
24175impl RObject for ResendPhoneNumberVerificationCode {
24176 #[doc(hidden)] fn td_name(&self) -> &'static str { "resendPhoneNumberVerificationCode" }
24177 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
24178 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
24179}
24180
24181
24182
24183
24184impl RFunction for ResendPhoneNumberVerificationCode {}
24185
24186impl ResendPhoneNumberVerificationCode {
24187 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
24188 pub fn builder() -> RTDResendPhoneNumberVerificationCodeBuilder {
24189 let mut inner = ResendPhoneNumberVerificationCode::default();
24190 inner.td_name = "resendPhoneNumberVerificationCode".to_string();
24191 inner.extra = Some(Uuid::new_v4().to_string());
24192 RTDResendPhoneNumberVerificationCodeBuilder { inner }
24193 }
24194
24195}
24196
24197#[doc(hidden)]
24198pub struct RTDResendPhoneNumberVerificationCodeBuilder {
24199 inner: ResendPhoneNumberVerificationCode
24200}
24201
24202impl RTDResendPhoneNumberVerificationCodeBuilder {
24203 pub fn build(&self) -> ResendPhoneNumberVerificationCode { self.inner.clone() }
24204
24205}
24206
24207impl AsRef<ResendPhoneNumberVerificationCode> for ResendPhoneNumberVerificationCode {
24208 fn as_ref(&self) -> &ResendPhoneNumberVerificationCode { self }
24209}
24210
24211impl AsRef<ResendPhoneNumberVerificationCode> for RTDResendPhoneNumberVerificationCodeBuilder {
24212 fn as_ref(&self) -> &ResendPhoneNumberVerificationCode { &self.inner }
24213}
24214
24215
24216
24217
24218
24219
24220
24221#[derive(Debug, Clone, Default, Serialize, Deserialize)]
24223pub struct ResendRecoveryEmailAddressCode {
24224 #[doc(hidden)]
24225 #[serde(rename(serialize = "@type", deserialize = "@type"))]
24226 td_name: String,
24227 #[doc(hidden)]
24228 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
24229 extra: Option<String>,
24230
24231}
24232
24233impl RObject for ResendRecoveryEmailAddressCode {
24234 #[doc(hidden)] fn td_name(&self) -> &'static str { "resendRecoveryEmailAddressCode" }
24235 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
24236 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
24237}
24238
24239
24240
24241
24242impl RFunction for ResendRecoveryEmailAddressCode {}
24243
24244impl ResendRecoveryEmailAddressCode {
24245 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
24246 pub fn builder() -> RTDResendRecoveryEmailAddressCodeBuilder {
24247 let mut inner = ResendRecoveryEmailAddressCode::default();
24248 inner.td_name = "resendRecoveryEmailAddressCode".to_string();
24249 inner.extra = Some(Uuid::new_v4().to_string());
24250 RTDResendRecoveryEmailAddressCodeBuilder { inner }
24251 }
24252
24253}
24254
24255#[doc(hidden)]
24256pub struct RTDResendRecoveryEmailAddressCodeBuilder {
24257 inner: ResendRecoveryEmailAddressCode
24258}
24259
24260impl RTDResendRecoveryEmailAddressCodeBuilder {
24261 pub fn build(&self) -> ResendRecoveryEmailAddressCode { self.inner.clone() }
24262
24263}
24264
24265impl AsRef<ResendRecoveryEmailAddressCode> for ResendRecoveryEmailAddressCode {
24266 fn as_ref(&self) -> &ResendRecoveryEmailAddressCode { self }
24267}
24268
24269impl AsRef<ResendRecoveryEmailAddressCode> for RTDResendRecoveryEmailAddressCodeBuilder {
24270 fn as_ref(&self) -> &ResendRecoveryEmailAddressCode { &self.inner }
24271}
24272
24273
24274
24275
24276
24277
24278
24279#[derive(Debug, Clone, Default, Serialize, Deserialize)]
24281pub struct ResetAllNotificationSettings {
24282 #[doc(hidden)]
24283 #[serde(rename(serialize = "@type", deserialize = "@type"))]
24284 td_name: String,
24285 #[doc(hidden)]
24286 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
24287 extra: Option<String>,
24288
24289}
24290
24291impl RObject for ResetAllNotificationSettings {
24292 #[doc(hidden)] fn td_name(&self) -> &'static str { "resetAllNotificationSettings" }
24293 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
24294 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
24295}
24296
24297
24298
24299
24300impl RFunction for ResetAllNotificationSettings {}
24301
24302impl ResetAllNotificationSettings {
24303 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
24304 pub fn builder() -> RTDResetAllNotificationSettingsBuilder {
24305 let mut inner = ResetAllNotificationSettings::default();
24306 inner.td_name = "resetAllNotificationSettings".to_string();
24307 inner.extra = Some(Uuid::new_v4().to_string());
24308 RTDResetAllNotificationSettingsBuilder { inner }
24309 }
24310
24311}
24312
24313#[doc(hidden)]
24314pub struct RTDResetAllNotificationSettingsBuilder {
24315 inner: ResetAllNotificationSettings
24316}
24317
24318impl RTDResetAllNotificationSettingsBuilder {
24319 pub fn build(&self) -> ResetAllNotificationSettings { self.inner.clone() }
24320
24321}
24322
24323impl AsRef<ResetAllNotificationSettings> for ResetAllNotificationSettings {
24324 fn as_ref(&self) -> &ResetAllNotificationSettings { self }
24325}
24326
24327impl AsRef<ResetAllNotificationSettings> for RTDResetAllNotificationSettingsBuilder {
24328 fn as_ref(&self) -> &ResetAllNotificationSettings { &self.inner }
24329}
24330
24331
24332
24333
24334
24335
24336
24337#[derive(Debug, Clone, Default, Serialize, Deserialize)]
24339pub struct ResetBackgrounds {
24340 #[doc(hidden)]
24341 #[serde(rename(serialize = "@type", deserialize = "@type"))]
24342 td_name: String,
24343 #[doc(hidden)]
24344 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
24345 extra: Option<String>,
24346
24347}
24348
24349impl RObject for ResetBackgrounds {
24350 #[doc(hidden)] fn td_name(&self) -> &'static str { "resetBackgrounds" }
24351 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
24352 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
24353}
24354
24355
24356
24357
24358impl RFunction for ResetBackgrounds {}
24359
24360impl ResetBackgrounds {
24361 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
24362 pub fn builder() -> RTDResetBackgroundsBuilder {
24363 let mut inner = ResetBackgrounds::default();
24364 inner.td_name = "resetBackgrounds".to_string();
24365 inner.extra = Some(Uuid::new_v4().to_string());
24366 RTDResetBackgroundsBuilder { inner }
24367 }
24368
24369}
24370
24371#[doc(hidden)]
24372pub struct RTDResetBackgroundsBuilder {
24373 inner: ResetBackgrounds
24374}
24375
24376impl RTDResetBackgroundsBuilder {
24377 pub fn build(&self) -> ResetBackgrounds { self.inner.clone() }
24378
24379}
24380
24381impl AsRef<ResetBackgrounds> for ResetBackgrounds {
24382 fn as_ref(&self) -> &ResetBackgrounds { self }
24383}
24384
24385impl AsRef<ResetBackgrounds> for RTDResetBackgroundsBuilder {
24386 fn as_ref(&self) -> &ResetBackgrounds { &self.inner }
24387}
24388
24389
24390
24391
24392
24393
24394
24395#[derive(Debug, Clone, Default, Serialize, Deserialize)]
24397pub struct ResetNetworkStatistics {
24398 #[doc(hidden)]
24399 #[serde(rename(serialize = "@type", deserialize = "@type"))]
24400 td_name: String,
24401 #[doc(hidden)]
24402 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
24403 extra: Option<String>,
24404
24405}
24406
24407impl RObject for ResetNetworkStatistics {
24408 #[doc(hidden)] fn td_name(&self) -> &'static str { "resetNetworkStatistics" }
24409 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
24410 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
24411}
24412
24413
24414
24415
24416impl RFunction for ResetNetworkStatistics {}
24417
24418impl ResetNetworkStatistics {
24419 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
24420 pub fn builder() -> RTDResetNetworkStatisticsBuilder {
24421 let mut inner = ResetNetworkStatistics::default();
24422 inner.td_name = "resetNetworkStatistics".to_string();
24423 inner.extra = Some(Uuid::new_v4().to_string());
24424 RTDResetNetworkStatisticsBuilder { inner }
24425 }
24426
24427}
24428
24429#[doc(hidden)]
24430pub struct RTDResetNetworkStatisticsBuilder {
24431 inner: ResetNetworkStatistics
24432}
24433
24434impl RTDResetNetworkStatisticsBuilder {
24435 pub fn build(&self) -> ResetNetworkStatistics { self.inner.clone() }
24436
24437}
24438
24439impl AsRef<ResetNetworkStatistics> for ResetNetworkStatistics {
24440 fn as_ref(&self) -> &ResetNetworkStatistics { self }
24441}
24442
24443impl AsRef<ResetNetworkStatistics> for RTDResetNetworkStatisticsBuilder {
24444 fn as_ref(&self) -> &ResetNetworkStatistics { &self.inner }
24445}
24446
24447
24448
24449
24450
24451
24452
24453#[derive(Debug, Clone, Default, Serialize, Deserialize)]
24455pub struct ResetPassword {
24456 #[doc(hidden)]
24457 #[serde(rename(serialize = "@type", deserialize = "@type"))]
24458 td_name: String,
24459 #[doc(hidden)]
24460 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
24461 extra: Option<String>,
24462
24463}
24464
24465impl RObject for ResetPassword {
24466 #[doc(hidden)] fn td_name(&self) -> &'static str { "resetPassword" }
24467 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
24468 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
24469}
24470
24471
24472impl TDResetPasswordResult for ResetPassword {}
24473
24474impl RFunction for ResetPassword {}
24475
24476impl ResetPassword {
24477 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
24478 pub fn builder() -> RTDResetPasswordBuilder {
24479 let mut inner = ResetPassword::default();
24480 inner.td_name = "resetPassword".to_string();
24481 inner.extra = Some(Uuid::new_v4().to_string());
24482 RTDResetPasswordBuilder { inner }
24483 }
24484
24485}
24486
24487#[doc(hidden)]
24488pub struct RTDResetPasswordBuilder {
24489 inner: ResetPassword
24490}
24491
24492impl RTDResetPasswordBuilder {
24493 pub fn build(&self) -> ResetPassword { self.inner.clone() }
24494
24495}
24496
24497impl AsRef<ResetPassword> for ResetPassword {
24498 fn as_ref(&self) -> &ResetPassword { self }
24499}
24500
24501impl AsRef<ResetPassword> for RTDResetPasswordBuilder {
24502 fn as_ref(&self) -> &ResetPassword { &self.inner }
24503}
24504
24505
24506
24507
24508
24509
24510
24511#[derive(Debug, Clone, Default, Serialize, Deserialize)]
24513pub struct RevokeChatInviteLink {
24514 #[doc(hidden)]
24515 #[serde(rename(serialize = "@type", deserialize = "@type"))]
24516 td_name: String,
24517 #[doc(hidden)]
24518 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
24519 extra: Option<String>,
24520 chat_id: i64,
24522 invite_link: String,
24524
24525}
24526
24527impl RObject for RevokeChatInviteLink {
24528 #[doc(hidden)] fn td_name(&self) -> &'static str { "revokeChatInviteLink" }
24529 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
24530 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
24531}
24532
24533
24534
24535
24536impl RFunction for RevokeChatInviteLink {}
24537
24538impl RevokeChatInviteLink {
24539 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
24540 pub fn builder() -> RTDRevokeChatInviteLinkBuilder {
24541 let mut inner = RevokeChatInviteLink::default();
24542 inner.td_name = "revokeChatInviteLink".to_string();
24543 inner.extra = Some(Uuid::new_v4().to_string());
24544 RTDRevokeChatInviteLinkBuilder { inner }
24545 }
24546
24547 pub fn chat_id(&self) -> i64 { self.chat_id }
24548
24549 pub fn invite_link(&self) -> &String { &self.invite_link }
24550
24551}
24552
24553#[doc(hidden)]
24554pub struct RTDRevokeChatInviteLinkBuilder {
24555 inner: RevokeChatInviteLink
24556}
24557
24558impl RTDRevokeChatInviteLinkBuilder {
24559 pub fn build(&self) -> RevokeChatInviteLink { self.inner.clone() }
24560
24561
24562 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
24563 self.inner.chat_id = chat_id;
24564 self
24565 }
24566
24567
24568 pub fn invite_link<T: AsRef<str>>(&mut self, invite_link: T) -> &mut Self {
24569 self.inner.invite_link = invite_link.as_ref().to_string();
24570 self
24571 }
24572
24573}
24574
24575impl AsRef<RevokeChatInviteLink> for RevokeChatInviteLink {
24576 fn as_ref(&self) -> &RevokeChatInviteLink { self }
24577}
24578
24579impl AsRef<RevokeChatInviteLink> for RTDRevokeChatInviteLinkBuilder {
24580 fn as_ref(&self) -> &RevokeChatInviteLink { &self.inner }
24581}
24582
24583
24584
24585
24586
24587
24588
24589#[derive(Debug, Clone, Default, Serialize, Deserialize)]
24591pub struct RevokeGroupCallInviteLink {
24592 #[doc(hidden)]
24593 #[serde(rename(serialize = "@type", deserialize = "@type"))]
24594 td_name: String,
24595 #[doc(hidden)]
24596 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
24597 extra: Option<String>,
24598 group_call_id: i64,
24600
24601}
24602
24603impl RObject for RevokeGroupCallInviteLink {
24604 #[doc(hidden)] fn td_name(&self) -> &'static str { "revokeGroupCallInviteLink" }
24605 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
24606 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
24607}
24608
24609
24610
24611
24612impl RFunction for RevokeGroupCallInviteLink {}
24613
24614impl RevokeGroupCallInviteLink {
24615 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
24616 pub fn builder() -> RTDRevokeGroupCallInviteLinkBuilder {
24617 let mut inner = RevokeGroupCallInviteLink::default();
24618 inner.td_name = "revokeGroupCallInviteLink".to_string();
24619 inner.extra = Some(Uuid::new_v4().to_string());
24620 RTDRevokeGroupCallInviteLinkBuilder { inner }
24621 }
24622
24623 pub fn group_call_id(&self) -> i64 { self.group_call_id }
24624
24625}
24626
24627#[doc(hidden)]
24628pub struct RTDRevokeGroupCallInviteLinkBuilder {
24629 inner: RevokeGroupCallInviteLink
24630}
24631
24632impl RTDRevokeGroupCallInviteLinkBuilder {
24633 pub fn build(&self) -> RevokeGroupCallInviteLink { self.inner.clone() }
24634
24635
24636 pub fn group_call_id(&mut self, group_call_id: i64) -> &mut Self {
24637 self.inner.group_call_id = group_call_id;
24638 self
24639 }
24640
24641}
24642
24643impl AsRef<RevokeGroupCallInviteLink> for RevokeGroupCallInviteLink {
24644 fn as_ref(&self) -> &RevokeGroupCallInviteLink { self }
24645}
24646
24647impl AsRef<RevokeGroupCallInviteLink> for RTDRevokeGroupCallInviteLinkBuilder {
24648 fn as_ref(&self) -> &RevokeGroupCallInviteLink { &self.inner }
24649}
24650
24651
24652
24653
24654
24655
24656
24657#[derive(Debug, Clone, Default, Serialize, Deserialize)]
24659pub struct SaveApplicationLogEvent {
24660 #[doc(hidden)]
24661 #[serde(rename(serialize = "@type", deserialize = "@type"))]
24662 td_name: String,
24663 #[doc(hidden)]
24664 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
24665 extra: Option<String>,
24666 #[serde(rename(serialize = "type", deserialize = "type"))] type_: String,
24668 chat_id: i64,
24670 data: JsonValue,
24672
24673}
24674
24675impl RObject for SaveApplicationLogEvent {
24676 #[doc(hidden)] fn td_name(&self) -> &'static str { "saveApplicationLogEvent" }
24677 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
24678 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
24679}
24680
24681
24682
24683
24684impl RFunction for SaveApplicationLogEvent {}
24685
24686impl SaveApplicationLogEvent {
24687 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
24688 pub fn builder() -> RTDSaveApplicationLogEventBuilder {
24689 let mut inner = SaveApplicationLogEvent::default();
24690 inner.td_name = "saveApplicationLogEvent".to_string();
24691 inner.extra = Some(Uuid::new_v4().to_string());
24692 RTDSaveApplicationLogEventBuilder { inner }
24693 }
24694
24695 pub fn type_(&self) -> &String { &self.type_ }
24696
24697 pub fn chat_id(&self) -> i64 { self.chat_id }
24698
24699 pub fn data(&self) -> &JsonValue { &self.data }
24700
24701}
24702
24703#[doc(hidden)]
24704pub struct RTDSaveApplicationLogEventBuilder {
24705 inner: SaveApplicationLogEvent
24706}
24707
24708impl RTDSaveApplicationLogEventBuilder {
24709 pub fn build(&self) -> SaveApplicationLogEvent { self.inner.clone() }
24710
24711
24712 pub fn type_<T: AsRef<str>>(&mut self, type_: T) -> &mut Self {
24713 self.inner.type_ = type_.as_ref().to_string();
24714 self
24715 }
24716
24717
24718 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
24719 self.inner.chat_id = chat_id;
24720 self
24721 }
24722
24723
24724 pub fn data<T: AsRef<JsonValue>>(&mut self, data: T) -> &mut Self {
24725 self.inner.data = data.as_ref().clone();
24726 self
24727 }
24728
24729}
24730
24731impl AsRef<SaveApplicationLogEvent> for SaveApplicationLogEvent {
24732 fn as_ref(&self) -> &SaveApplicationLogEvent { self }
24733}
24734
24735impl AsRef<SaveApplicationLogEvent> for RTDSaveApplicationLogEventBuilder {
24736 fn as_ref(&self) -> &SaveApplicationLogEvent { &self.inner }
24737}
24738
24739
24740
24741
24742
24743
24744
24745#[derive(Debug, Clone, Default, Serialize, Deserialize)]
24747pub struct SearchBackground {
24748 #[doc(hidden)]
24749 #[serde(rename(serialize = "@type", deserialize = "@type"))]
24750 td_name: String,
24751 #[doc(hidden)]
24752 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
24753 extra: Option<String>,
24754 name: String,
24756
24757}
24758
24759impl RObject for SearchBackground {
24760 #[doc(hidden)] fn td_name(&self) -> &'static str { "searchBackground" }
24761 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
24762 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
24763}
24764
24765
24766
24767
24768impl RFunction for SearchBackground {}
24769
24770impl SearchBackground {
24771 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
24772 pub fn builder() -> RTDSearchBackgroundBuilder {
24773 let mut inner = SearchBackground::default();
24774 inner.td_name = "searchBackground".to_string();
24775 inner.extra = Some(Uuid::new_v4().to_string());
24776 RTDSearchBackgroundBuilder { inner }
24777 }
24778
24779 pub fn name(&self) -> &String { &self.name }
24780
24781}
24782
24783#[doc(hidden)]
24784pub struct RTDSearchBackgroundBuilder {
24785 inner: SearchBackground
24786}
24787
24788impl RTDSearchBackgroundBuilder {
24789 pub fn build(&self) -> SearchBackground { self.inner.clone() }
24790
24791
24792 pub fn name<T: AsRef<str>>(&mut self, name: T) -> &mut Self {
24793 self.inner.name = name.as_ref().to_string();
24794 self
24795 }
24796
24797}
24798
24799impl AsRef<SearchBackground> for SearchBackground {
24800 fn as_ref(&self) -> &SearchBackground { self }
24801}
24802
24803impl AsRef<SearchBackground> for RTDSearchBackgroundBuilder {
24804 fn as_ref(&self) -> &SearchBackground { &self.inner }
24805}
24806
24807
24808
24809
24810
24811
24812
24813#[derive(Debug, Clone, Default, Serialize, Deserialize)]
24815pub struct SearchCallMessages {
24816 #[doc(hidden)]
24817 #[serde(rename(serialize = "@type", deserialize = "@type"))]
24818 td_name: String,
24819 #[doc(hidden)]
24820 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
24821 extra: Option<String>,
24822 from_message_id: i64,
24824 limit: i64,
24826 only_missed: bool,
24828
24829}
24830
24831impl RObject for SearchCallMessages {
24832 #[doc(hidden)] fn td_name(&self) -> &'static str { "searchCallMessages" }
24833 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
24834 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
24835}
24836
24837
24838
24839
24840impl RFunction for SearchCallMessages {}
24841
24842impl SearchCallMessages {
24843 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
24844 pub fn builder() -> RTDSearchCallMessagesBuilder {
24845 let mut inner = SearchCallMessages::default();
24846 inner.td_name = "searchCallMessages".to_string();
24847 inner.extra = Some(Uuid::new_v4().to_string());
24848 RTDSearchCallMessagesBuilder { inner }
24849 }
24850
24851 pub fn from_message_id(&self) -> i64 { self.from_message_id }
24852
24853 pub fn limit(&self) -> i64 { self.limit }
24854
24855 pub fn only_missed(&self) -> bool { self.only_missed }
24856
24857}
24858
24859#[doc(hidden)]
24860pub struct RTDSearchCallMessagesBuilder {
24861 inner: SearchCallMessages
24862}
24863
24864impl RTDSearchCallMessagesBuilder {
24865 pub fn build(&self) -> SearchCallMessages { self.inner.clone() }
24866
24867
24868 pub fn from_message_id(&mut self, from_message_id: i64) -> &mut Self {
24869 self.inner.from_message_id = from_message_id;
24870 self
24871 }
24872
24873
24874 pub fn limit(&mut self, limit: i64) -> &mut Self {
24875 self.inner.limit = limit;
24876 self
24877 }
24878
24879
24880 pub fn only_missed(&mut self, only_missed: bool) -> &mut Self {
24881 self.inner.only_missed = only_missed;
24882 self
24883 }
24884
24885}
24886
24887impl AsRef<SearchCallMessages> for SearchCallMessages {
24888 fn as_ref(&self) -> &SearchCallMessages { self }
24889}
24890
24891impl AsRef<SearchCallMessages> for RTDSearchCallMessagesBuilder {
24892 fn as_ref(&self) -> &SearchCallMessages { &self.inner }
24893}
24894
24895
24896
24897
24898
24899
24900
24901#[derive(Debug, Clone, Default, Serialize, Deserialize)]
24903pub struct SearchChatMembers {
24904 #[doc(hidden)]
24905 #[serde(rename(serialize = "@type", deserialize = "@type"))]
24906 td_name: String,
24907 #[doc(hidden)]
24908 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
24909 extra: Option<String>,
24910 chat_id: i64,
24912 query: String,
24914 limit: i64,
24916 filter: ChatMembersFilter,
24918
24919}
24920
24921impl RObject for SearchChatMembers {
24922 #[doc(hidden)] fn td_name(&self) -> &'static str { "searchChatMembers" }
24923 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
24924 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
24925}
24926
24927
24928
24929
24930impl RFunction for SearchChatMembers {}
24931
24932impl SearchChatMembers {
24933 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
24934 pub fn builder() -> RTDSearchChatMembersBuilder {
24935 let mut inner = SearchChatMembers::default();
24936 inner.td_name = "searchChatMembers".to_string();
24937 inner.extra = Some(Uuid::new_v4().to_string());
24938 RTDSearchChatMembersBuilder { inner }
24939 }
24940
24941 pub fn chat_id(&self) -> i64 { self.chat_id }
24942
24943 pub fn query(&self) -> &String { &self.query }
24944
24945 pub fn limit(&self) -> i64 { self.limit }
24946
24947 pub fn filter(&self) -> &ChatMembersFilter { &self.filter }
24948
24949}
24950
24951#[doc(hidden)]
24952pub struct RTDSearchChatMembersBuilder {
24953 inner: SearchChatMembers
24954}
24955
24956impl RTDSearchChatMembersBuilder {
24957 pub fn build(&self) -> SearchChatMembers { self.inner.clone() }
24958
24959
24960 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
24961 self.inner.chat_id = chat_id;
24962 self
24963 }
24964
24965
24966 pub fn query<T: AsRef<str>>(&mut self, query: T) -> &mut Self {
24967 self.inner.query = query.as_ref().to_string();
24968 self
24969 }
24970
24971
24972 pub fn limit(&mut self, limit: i64) -> &mut Self {
24973 self.inner.limit = limit;
24974 self
24975 }
24976
24977
24978 pub fn filter<T: AsRef<ChatMembersFilter>>(&mut self, filter: T) -> &mut Self {
24979 self.inner.filter = filter.as_ref().clone();
24980 self
24981 }
24982
24983}
24984
24985impl AsRef<SearchChatMembers> for SearchChatMembers {
24986 fn as_ref(&self) -> &SearchChatMembers { self }
24987}
24988
24989impl AsRef<SearchChatMembers> for RTDSearchChatMembersBuilder {
24990 fn as_ref(&self) -> &SearchChatMembers { &self.inner }
24991}
24992
24993
24994
24995
24996
24997
24998
24999#[derive(Debug, Clone, Default, Serialize, Deserialize)]
25001pub struct SearchChatMessages {
25002 #[doc(hidden)]
25003 #[serde(rename(serialize = "@type", deserialize = "@type"))]
25004 td_name: String,
25005 #[doc(hidden)]
25006 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
25007 extra: Option<String>,
25008 chat_id: i64,
25010 query: String,
25012 sender_id: MessageSender,
25014 from_message_id: i64,
25016 offset: i64,
25018 limit: i64,
25020 filter: SearchMessagesFilter,
25022 message_thread_id: i64,
25024
25025}
25026
25027impl RObject for SearchChatMessages {
25028 #[doc(hidden)] fn td_name(&self) -> &'static str { "searchChatMessages" }
25029 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
25030 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
25031}
25032
25033
25034
25035
25036impl RFunction for SearchChatMessages {}
25037
25038impl SearchChatMessages {
25039 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
25040 pub fn builder() -> RTDSearchChatMessagesBuilder {
25041 let mut inner = SearchChatMessages::default();
25042 inner.td_name = "searchChatMessages".to_string();
25043 inner.extra = Some(Uuid::new_v4().to_string());
25044 RTDSearchChatMessagesBuilder { inner }
25045 }
25046
25047 pub fn chat_id(&self) -> i64 { self.chat_id }
25048
25049 pub fn query(&self) -> &String { &self.query }
25050
25051 pub fn sender_id(&self) -> &MessageSender { &self.sender_id }
25052
25053 pub fn from_message_id(&self) -> i64 { self.from_message_id }
25054
25055 pub fn offset(&self) -> i64 { self.offset }
25056
25057 pub fn limit(&self) -> i64 { self.limit }
25058
25059 pub fn filter(&self) -> &SearchMessagesFilter { &self.filter }
25060
25061 pub fn message_thread_id(&self) -> i64 { self.message_thread_id }
25062
25063}
25064
25065#[doc(hidden)]
25066pub struct RTDSearchChatMessagesBuilder {
25067 inner: SearchChatMessages
25068}
25069
25070impl RTDSearchChatMessagesBuilder {
25071 pub fn build(&self) -> SearchChatMessages { self.inner.clone() }
25072
25073
25074 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
25075 self.inner.chat_id = chat_id;
25076 self
25077 }
25078
25079
25080 pub fn query<T: AsRef<str>>(&mut self, query: T) -> &mut Self {
25081 self.inner.query = query.as_ref().to_string();
25082 self
25083 }
25084
25085
25086 pub fn sender_id<T: AsRef<MessageSender>>(&mut self, sender_id: T) -> &mut Self {
25087 self.inner.sender_id = sender_id.as_ref().clone();
25088 self
25089 }
25090
25091
25092 pub fn from_message_id(&mut self, from_message_id: i64) -> &mut Self {
25093 self.inner.from_message_id = from_message_id;
25094 self
25095 }
25096
25097
25098 pub fn offset(&mut self, offset: i64) -> &mut Self {
25099 self.inner.offset = offset;
25100 self
25101 }
25102
25103
25104 pub fn limit(&mut self, limit: i64) -> &mut Self {
25105 self.inner.limit = limit;
25106 self
25107 }
25108
25109
25110 pub fn filter<T: AsRef<SearchMessagesFilter>>(&mut self, filter: T) -> &mut Self {
25111 self.inner.filter = filter.as_ref().clone();
25112 self
25113 }
25114
25115
25116 pub fn message_thread_id(&mut self, message_thread_id: i64) -> &mut Self {
25117 self.inner.message_thread_id = message_thread_id;
25118 self
25119 }
25120
25121}
25122
25123impl AsRef<SearchChatMessages> for SearchChatMessages {
25124 fn as_ref(&self) -> &SearchChatMessages { self }
25125}
25126
25127impl AsRef<SearchChatMessages> for RTDSearchChatMessagesBuilder {
25128 fn as_ref(&self) -> &SearchChatMessages { &self.inner }
25129}
25130
25131
25132
25133
25134
25135
25136
25137#[derive(Debug, Clone, Default, Serialize, Deserialize)]
25139pub struct SearchChatRecentLocationMessages {
25140 #[doc(hidden)]
25141 #[serde(rename(serialize = "@type", deserialize = "@type"))]
25142 td_name: String,
25143 #[doc(hidden)]
25144 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
25145 extra: Option<String>,
25146 chat_id: i64,
25148 limit: i64,
25150
25151}
25152
25153impl RObject for SearchChatRecentLocationMessages {
25154 #[doc(hidden)] fn td_name(&self) -> &'static str { "searchChatRecentLocationMessages" }
25155 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
25156 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
25157}
25158
25159
25160
25161
25162impl RFunction for SearchChatRecentLocationMessages {}
25163
25164impl SearchChatRecentLocationMessages {
25165 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
25166 pub fn builder() -> RTDSearchChatRecentLocationMessagesBuilder {
25167 let mut inner = SearchChatRecentLocationMessages::default();
25168 inner.td_name = "searchChatRecentLocationMessages".to_string();
25169 inner.extra = Some(Uuid::new_v4().to_string());
25170 RTDSearchChatRecentLocationMessagesBuilder { inner }
25171 }
25172
25173 pub fn chat_id(&self) -> i64 { self.chat_id }
25174
25175 pub fn limit(&self) -> i64 { self.limit }
25176
25177}
25178
25179#[doc(hidden)]
25180pub struct RTDSearchChatRecentLocationMessagesBuilder {
25181 inner: SearchChatRecentLocationMessages
25182}
25183
25184impl RTDSearchChatRecentLocationMessagesBuilder {
25185 pub fn build(&self) -> SearchChatRecentLocationMessages { self.inner.clone() }
25186
25187
25188 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
25189 self.inner.chat_id = chat_id;
25190 self
25191 }
25192
25193
25194 pub fn limit(&mut self, limit: i64) -> &mut Self {
25195 self.inner.limit = limit;
25196 self
25197 }
25198
25199}
25200
25201impl AsRef<SearchChatRecentLocationMessages> for SearchChatRecentLocationMessages {
25202 fn as_ref(&self) -> &SearchChatRecentLocationMessages { self }
25203}
25204
25205impl AsRef<SearchChatRecentLocationMessages> for RTDSearchChatRecentLocationMessagesBuilder {
25206 fn as_ref(&self) -> &SearchChatRecentLocationMessages { &self.inner }
25207}
25208
25209
25210
25211
25212
25213
25214
25215#[derive(Debug, Clone, Default, Serialize, Deserialize)]
25217pub struct SearchChats {
25218 #[doc(hidden)]
25219 #[serde(rename(serialize = "@type", deserialize = "@type"))]
25220 td_name: String,
25221 #[doc(hidden)]
25222 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
25223 extra: Option<String>,
25224 query: String,
25226 limit: i64,
25228
25229}
25230
25231impl RObject for SearchChats {
25232 #[doc(hidden)] fn td_name(&self) -> &'static str { "searchChats" }
25233 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
25234 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
25235}
25236
25237
25238
25239
25240impl RFunction for SearchChats {}
25241
25242impl SearchChats {
25243 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
25244 pub fn builder() -> RTDSearchChatsBuilder {
25245 let mut inner = SearchChats::default();
25246 inner.td_name = "searchChats".to_string();
25247 inner.extra = Some(Uuid::new_v4().to_string());
25248 RTDSearchChatsBuilder { inner }
25249 }
25250
25251 pub fn query(&self) -> &String { &self.query }
25252
25253 pub fn limit(&self) -> i64 { self.limit }
25254
25255}
25256
25257#[doc(hidden)]
25258pub struct RTDSearchChatsBuilder {
25259 inner: SearchChats
25260}
25261
25262impl RTDSearchChatsBuilder {
25263 pub fn build(&self) -> SearchChats { self.inner.clone() }
25264
25265
25266 pub fn query<T: AsRef<str>>(&mut self, query: T) -> &mut Self {
25267 self.inner.query = query.as_ref().to_string();
25268 self
25269 }
25270
25271
25272 pub fn limit(&mut self, limit: i64) -> &mut Self {
25273 self.inner.limit = limit;
25274 self
25275 }
25276
25277}
25278
25279impl AsRef<SearchChats> for SearchChats {
25280 fn as_ref(&self) -> &SearchChats { self }
25281}
25282
25283impl AsRef<SearchChats> for RTDSearchChatsBuilder {
25284 fn as_ref(&self) -> &SearchChats { &self.inner }
25285}
25286
25287
25288
25289
25290
25291
25292
25293#[derive(Debug, Clone, Default, Serialize, Deserialize)]
25295pub struct SearchChatsNearby {
25296 #[doc(hidden)]
25297 #[serde(rename(serialize = "@type", deserialize = "@type"))]
25298 td_name: String,
25299 #[doc(hidden)]
25300 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
25301 extra: Option<String>,
25302 location: Location,
25304
25305}
25306
25307impl RObject for SearchChatsNearby {
25308 #[doc(hidden)] fn td_name(&self) -> &'static str { "searchChatsNearby" }
25309 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
25310 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
25311}
25312
25313
25314
25315
25316impl RFunction for SearchChatsNearby {}
25317
25318impl SearchChatsNearby {
25319 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
25320 pub fn builder() -> RTDSearchChatsNearbyBuilder {
25321 let mut inner = SearchChatsNearby::default();
25322 inner.td_name = "searchChatsNearby".to_string();
25323 inner.extra = Some(Uuid::new_v4().to_string());
25324 RTDSearchChatsNearbyBuilder { inner }
25325 }
25326
25327 pub fn location(&self) -> &Location { &self.location }
25328
25329}
25330
25331#[doc(hidden)]
25332pub struct RTDSearchChatsNearbyBuilder {
25333 inner: SearchChatsNearby
25334}
25335
25336impl RTDSearchChatsNearbyBuilder {
25337 pub fn build(&self) -> SearchChatsNearby { self.inner.clone() }
25338
25339
25340 pub fn location<T: AsRef<Location>>(&mut self, location: T) -> &mut Self {
25341 self.inner.location = location.as_ref().clone();
25342 self
25343 }
25344
25345}
25346
25347impl AsRef<SearchChatsNearby> for SearchChatsNearby {
25348 fn as_ref(&self) -> &SearchChatsNearby { self }
25349}
25350
25351impl AsRef<SearchChatsNearby> for RTDSearchChatsNearbyBuilder {
25352 fn as_ref(&self) -> &SearchChatsNearby { &self.inner }
25353}
25354
25355
25356
25357
25358
25359
25360
25361#[derive(Debug, Clone, Default, Serialize, Deserialize)]
25363pub struct SearchChatsOnServer {
25364 #[doc(hidden)]
25365 #[serde(rename(serialize = "@type", deserialize = "@type"))]
25366 td_name: String,
25367 #[doc(hidden)]
25368 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
25369 extra: Option<String>,
25370 query: String,
25372 limit: i64,
25374
25375}
25376
25377impl RObject for SearchChatsOnServer {
25378 #[doc(hidden)] fn td_name(&self) -> &'static str { "searchChatsOnServer" }
25379 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
25380 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
25381}
25382
25383
25384
25385
25386impl RFunction for SearchChatsOnServer {}
25387
25388impl SearchChatsOnServer {
25389 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
25390 pub fn builder() -> RTDSearchChatsOnServerBuilder {
25391 let mut inner = SearchChatsOnServer::default();
25392 inner.td_name = "searchChatsOnServer".to_string();
25393 inner.extra = Some(Uuid::new_v4().to_string());
25394 RTDSearchChatsOnServerBuilder { inner }
25395 }
25396
25397 pub fn query(&self) -> &String { &self.query }
25398
25399 pub fn limit(&self) -> i64 { self.limit }
25400
25401}
25402
25403#[doc(hidden)]
25404pub struct RTDSearchChatsOnServerBuilder {
25405 inner: SearchChatsOnServer
25406}
25407
25408impl RTDSearchChatsOnServerBuilder {
25409 pub fn build(&self) -> SearchChatsOnServer { self.inner.clone() }
25410
25411
25412 pub fn query<T: AsRef<str>>(&mut self, query: T) -> &mut Self {
25413 self.inner.query = query.as_ref().to_string();
25414 self
25415 }
25416
25417
25418 pub fn limit(&mut self, limit: i64) -> &mut Self {
25419 self.inner.limit = limit;
25420 self
25421 }
25422
25423}
25424
25425impl AsRef<SearchChatsOnServer> for SearchChatsOnServer {
25426 fn as_ref(&self) -> &SearchChatsOnServer { self }
25427}
25428
25429impl AsRef<SearchChatsOnServer> for RTDSearchChatsOnServerBuilder {
25430 fn as_ref(&self) -> &SearchChatsOnServer { &self.inner }
25431}
25432
25433
25434
25435
25436
25437
25438
25439#[derive(Debug, Clone, Default, Serialize, Deserialize)]
25441pub struct SearchContacts {
25442 #[doc(hidden)]
25443 #[serde(rename(serialize = "@type", deserialize = "@type"))]
25444 td_name: String,
25445 #[doc(hidden)]
25446 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
25447 extra: Option<String>,
25448 query: String,
25450 limit: i64,
25452
25453}
25454
25455impl RObject for SearchContacts {
25456 #[doc(hidden)] fn td_name(&self) -> &'static str { "searchContacts" }
25457 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
25458 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
25459}
25460
25461
25462
25463
25464impl RFunction for SearchContacts {}
25465
25466impl SearchContacts {
25467 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
25468 pub fn builder() -> RTDSearchContactsBuilder {
25469 let mut inner = SearchContacts::default();
25470 inner.td_name = "searchContacts".to_string();
25471 inner.extra = Some(Uuid::new_v4().to_string());
25472 RTDSearchContactsBuilder { inner }
25473 }
25474
25475 pub fn query(&self) -> &String { &self.query }
25476
25477 pub fn limit(&self) -> i64 { self.limit }
25478
25479}
25480
25481#[doc(hidden)]
25482pub struct RTDSearchContactsBuilder {
25483 inner: SearchContacts
25484}
25485
25486impl RTDSearchContactsBuilder {
25487 pub fn build(&self) -> SearchContacts { self.inner.clone() }
25488
25489
25490 pub fn query<T: AsRef<str>>(&mut self, query: T) -> &mut Self {
25491 self.inner.query = query.as_ref().to_string();
25492 self
25493 }
25494
25495
25496 pub fn limit(&mut self, limit: i64) -> &mut Self {
25497 self.inner.limit = limit;
25498 self
25499 }
25500
25501}
25502
25503impl AsRef<SearchContacts> for SearchContacts {
25504 fn as_ref(&self) -> &SearchContacts { self }
25505}
25506
25507impl AsRef<SearchContacts> for RTDSearchContactsBuilder {
25508 fn as_ref(&self) -> &SearchContacts { &self.inner }
25509}
25510
25511
25512
25513
25514
25515
25516
25517#[derive(Debug, Clone, Default, Serialize, Deserialize)]
25519pub struct SearchEmojis {
25520 #[doc(hidden)]
25521 #[serde(rename(serialize = "@type", deserialize = "@type"))]
25522 td_name: String,
25523 #[doc(hidden)]
25524 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
25525 extra: Option<String>,
25526 text: String,
25528 exact_match: bool,
25530 input_language_codes: Vec<String>,
25532
25533}
25534
25535impl RObject for SearchEmojis {
25536 #[doc(hidden)] fn td_name(&self) -> &'static str { "searchEmojis" }
25537 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
25538 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
25539}
25540
25541
25542
25543
25544impl RFunction for SearchEmojis {}
25545
25546impl SearchEmojis {
25547 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
25548 pub fn builder() -> RTDSearchEmojisBuilder {
25549 let mut inner = SearchEmojis::default();
25550 inner.td_name = "searchEmojis".to_string();
25551 inner.extra = Some(Uuid::new_v4().to_string());
25552 RTDSearchEmojisBuilder { inner }
25553 }
25554
25555 pub fn text(&self) -> &String { &self.text }
25556
25557 pub fn exact_match(&self) -> bool { self.exact_match }
25558
25559 pub fn input_language_codes(&self) -> &Vec<String> { &self.input_language_codes }
25560
25561}
25562
25563#[doc(hidden)]
25564pub struct RTDSearchEmojisBuilder {
25565 inner: SearchEmojis
25566}
25567
25568impl RTDSearchEmojisBuilder {
25569 pub fn build(&self) -> SearchEmojis { self.inner.clone() }
25570
25571
25572 pub fn text<T: AsRef<str>>(&mut self, text: T) -> &mut Self {
25573 self.inner.text = text.as_ref().to_string();
25574 self
25575 }
25576
25577
25578 pub fn exact_match(&mut self, exact_match: bool) -> &mut Self {
25579 self.inner.exact_match = exact_match;
25580 self
25581 }
25582
25583
25584 pub fn input_language_codes(&mut self, input_language_codes: Vec<String>) -> &mut Self {
25585 self.inner.input_language_codes = input_language_codes;
25586 self
25587 }
25588
25589}
25590
25591impl AsRef<SearchEmojis> for SearchEmojis {
25592 fn as_ref(&self) -> &SearchEmojis { self }
25593}
25594
25595impl AsRef<SearchEmojis> for RTDSearchEmojisBuilder {
25596 fn as_ref(&self) -> &SearchEmojis { &self.inner }
25597}
25598
25599
25600
25601
25602
25603
25604
25605#[derive(Debug, Clone, Default, Serialize, Deserialize)]
25607pub struct SearchHashtags {
25608 #[doc(hidden)]
25609 #[serde(rename(serialize = "@type", deserialize = "@type"))]
25610 td_name: String,
25611 #[doc(hidden)]
25612 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
25613 extra: Option<String>,
25614 prefix: String,
25616 limit: i64,
25618
25619}
25620
25621impl RObject for SearchHashtags {
25622 #[doc(hidden)] fn td_name(&self) -> &'static str { "searchHashtags" }
25623 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
25624 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
25625}
25626
25627
25628
25629
25630impl RFunction for SearchHashtags {}
25631
25632impl SearchHashtags {
25633 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
25634 pub fn builder() -> RTDSearchHashtagsBuilder {
25635 let mut inner = SearchHashtags::default();
25636 inner.td_name = "searchHashtags".to_string();
25637 inner.extra = Some(Uuid::new_v4().to_string());
25638 RTDSearchHashtagsBuilder { inner }
25639 }
25640
25641 pub fn prefix(&self) -> &String { &self.prefix }
25642
25643 pub fn limit(&self) -> i64 { self.limit }
25644
25645}
25646
25647#[doc(hidden)]
25648pub struct RTDSearchHashtagsBuilder {
25649 inner: SearchHashtags
25650}
25651
25652impl RTDSearchHashtagsBuilder {
25653 pub fn build(&self) -> SearchHashtags { self.inner.clone() }
25654
25655
25656 pub fn prefix<T: AsRef<str>>(&mut self, prefix: T) -> &mut Self {
25657 self.inner.prefix = prefix.as_ref().to_string();
25658 self
25659 }
25660
25661
25662 pub fn limit(&mut self, limit: i64) -> &mut Self {
25663 self.inner.limit = limit;
25664 self
25665 }
25666
25667}
25668
25669impl AsRef<SearchHashtags> for SearchHashtags {
25670 fn as_ref(&self) -> &SearchHashtags { self }
25671}
25672
25673impl AsRef<SearchHashtags> for RTDSearchHashtagsBuilder {
25674 fn as_ref(&self) -> &SearchHashtags { &self.inner }
25675}
25676
25677
25678
25679
25680
25681
25682
25683#[derive(Debug, Clone, Default, Serialize, Deserialize)]
25685pub struct SearchInstalledStickerSets {
25686 #[doc(hidden)]
25687 #[serde(rename(serialize = "@type", deserialize = "@type"))]
25688 td_name: String,
25689 #[doc(hidden)]
25690 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
25691 extra: Option<String>,
25692 is_masks: bool,
25694 query: String,
25696 limit: i64,
25698
25699}
25700
25701impl RObject for SearchInstalledStickerSets {
25702 #[doc(hidden)] fn td_name(&self) -> &'static str { "searchInstalledStickerSets" }
25703 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
25704 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
25705}
25706
25707
25708
25709
25710impl RFunction for SearchInstalledStickerSets {}
25711
25712impl SearchInstalledStickerSets {
25713 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
25714 pub fn builder() -> RTDSearchInstalledStickerSetsBuilder {
25715 let mut inner = SearchInstalledStickerSets::default();
25716 inner.td_name = "searchInstalledStickerSets".to_string();
25717 inner.extra = Some(Uuid::new_v4().to_string());
25718 RTDSearchInstalledStickerSetsBuilder { inner }
25719 }
25720
25721 pub fn is_masks(&self) -> bool { self.is_masks }
25722
25723 pub fn query(&self) -> &String { &self.query }
25724
25725 pub fn limit(&self) -> i64 { self.limit }
25726
25727}
25728
25729#[doc(hidden)]
25730pub struct RTDSearchInstalledStickerSetsBuilder {
25731 inner: SearchInstalledStickerSets
25732}
25733
25734impl RTDSearchInstalledStickerSetsBuilder {
25735 pub fn build(&self) -> SearchInstalledStickerSets { self.inner.clone() }
25736
25737
25738 pub fn is_masks(&mut self, is_masks: bool) -> &mut Self {
25739 self.inner.is_masks = is_masks;
25740 self
25741 }
25742
25743
25744 pub fn query<T: AsRef<str>>(&mut self, query: T) -> &mut Self {
25745 self.inner.query = query.as_ref().to_string();
25746 self
25747 }
25748
25749
25750 pub fn limit(&mut self, limit: i64) -> &mut Self {
25751 self.inner.limit = limit;
25752 self
25753 }
25754
25755}
25756
25757impl AsRef<SearchInstalledStickerSets> for SearchInstalledStickerSets {
25758 fn as_ref(&self) -> &SearchInstalledStickerSets { self }
25759}
25760
25761impl AsRef<SearchInstalledStickerSets> for RTDSearchInstalledStickerSetsBuilder {
25762 fn as_ref(&self) -> &SearchInstalledStickerSets { &self.inner }
25763}
25764
25765
25766
25767
25768
25769
25770
25771#[derive(Debug, Clone, Default, Serialize, Deserialize)]
25773pub struct SearchMessages {
25774 #[doc(hidden)]
25775 #[serde(rename(serialize = "@type", deserialize = "@type"))]
25776 td_name: String,
25777 #[doc(hidden)]
25778 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
25779 extra: Option<String>,
25780 chat_list: ChatList,
25782 query: String,
25784 offset_date: i64,
25786 offset_chat_id: i64,
25788 offset_message_id: i64,
25790 limit: i64,
25792 filter: SearchMessagesFilter,
25794 min_date: i64,
25796 max_date: i64,
25798
25799}
25800
25801impl RObject for SearchMessages {
25802 #[doc(hidden)] fn td_name(&self) -> &'static str { "searchMessages" }
25803 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
25804 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
25805}
25806
25807
25808
25809
25810impl RFunction for SearchMessages {}
25811
25812impl SearchMessages {
25813 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
25814 pub fn builder() -> RTDSearchMessagesBuilder {
25815 let mut inner = SearchMessages::default();
25816 inner.td_name = "searchMessages".to_string();
25817 inner.extra = Some(Uuid::new_v4().to_string());
25818 RTDSearchMessagesBuilder { inner }
25819 }
25820
25821 pub fn chat_list(&self) -> &ChatList { &self.chat_list }
25822
25823 pub fn query(&self) -> &String { &self.query }
25824
25825 pub fn offset_date(&self) -> i64 { self.offset_date }
25826
25827 pub fn offset_chat_id(&self) -> i64 { self.offset_chat_id }
25828
25829 pub fn offset_message_id(&self) -> i64 { self.offset_message_id }
25830
25831 pub fn limit(&self) -> i64 { self.limit }
25832
25833 pub fn filter(&self) -> &SearchMessagesFilter { &self.filter }
25834
25835 pub fn min_date(&self) -> i64 { self.min_date }
25836
25837 pub fn max_date(&self) -> i64 { self.max_date }
25838
25839}
25840
25841#[doc(hidden)]
25842pub struct RTDSearchMessagesBuilder {
25843 inner: SearchMessages
25844}
25845
25846impl RTDSearchMessagesBuilder {
25847 pub fn build(&self) -> SearchMessages { self.inner.clone() }
25848
25849
25850 pub fn chat_list<T: AsRef<ChatList>>(&mut self, chat_list: T) -> &mut Self {
25851 self.inner.chat_list = chat_list.as_ref().clone();
25852 self
25853 }
25854
25855
25856 pub fn query<T: AsRef<str>>(&mut self, query: T) -> &mut Self {
25857 self.inner.query = query.as_ref().to_string();
25858 self
25859 }
25860
25861
25862 pub fn offset_date(&mut self, offset_date: i64) -> &mut Self {
25863 self.inner.offset_date = offset_date;
25864 self
25865 }
25866
25867
25868 pub fn offset_chat_id(&mut self, offset_chat_id: i64) -> &mut Self {
25869 self.inner.offset_chat_id = offset_chat_id;
25870 self
25871 }
25872
25873
25874 pub fn offset_message_id(&mut self, offset_message_id: i64) -> &mut Self {
25875 self.inner.offset_message_id = offset_message_id;
25876 self
25877 }
25878
25879
25880 pub fn limit(&mut self, limit: i64) -> &mut Self {
25881 self.inner.limit = limit;
25882 self
25883 }
25884
25885
25886 pub fn filter<T: AsRef<SearchMessagesFilter>>(&mut self, filter: T) -> &mut Self {
25887 self.inner.filter = filter.as_ref().clone();
25888 self
25889 }
25890
25891
25892 pub fn min_date(&mut self, min_date: i64) -> &mut Self {
25893 self.inner.min_date = min_date;
25894 self
25895 }
25896
25897
25898 pub fn max_date(&mut self, max_date: i64) -> &mut Self {
25899 self.inner.max_date = max_date;
25900 self
25901 }
25902
25903}
25904
25905impl AsRef<SearchMessages> for SearchMessages {
25906 fn as_ref(&self) -> &SearchMessages { self }
25907}
25908
25909impl AsRef<SearchMessages> for RTDSearchMessagesBuilder {
25910 fn as_ref(&self) -> &SearchMessages { &self.inner }
25911}
25912
25913
25914
25915
25916
25917
25918
25919#[derive(Debug, Clone, Default, Serialize, Deserialize)]
25921pub struct SearchPublicChat {
25922 #[doc(hidden)]
25923 #[serde(rename(serialize = "@type", deserialize = "@type"))]
25924 td_name: String,
25925 #[doc(hidden)]
25926 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
25927 extra: Option<String>,
25928 username: String,
25930
25931}
25932
25933impl RObject for SearchPublicChat {
25934 #[doc(hidden)] fn td_name(&self) -> &'static str { "searchPublicChat" }
25935 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
25936 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
25937}
25938
25939
25940
25941
25942impl RFunction for SearchPublicChat {}
25943
25944impl SearchPublicChat {
25945 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
25946 pub fn builder() -> RTDSearchPublicChatBuilder {
25947 let mut inner = SearchPublicChat::default();
25948 inner.td_name = "searchPublicChat".to_string();
25949 inner.extra = Some(Uuid::new_v4().to_string());
25950 RTDSearchPublicChatBuilder { inner }
25951 }
25952
25953 pub fn username(&self) -> &String { &self.username }
25954
25955}
25956
25957#[doc(hidden)]
25958pub struct RTDSearchPublicChatBuilder {
25959 inner: SearchPublicChat
25960}
25961
25962impl RTDSearchPublicChatBuilder {
25963 pub fn build(&self) -> SearchPublicChat { self.inner.clone() }
25964
25965
25966 pub fn username<T: AsRef<str>>(&mut self, username: T) -> &mut Self {
25967 self.inner.username = username.as_ref().to_string();
25968 self
25969 }
25970
25971}
25972
25973impl AsRef<SearchPublicChat> for SearchPublicChat {
25974 fn as_ref(&self) -> &SearchPublicChat { self }
25975}
25976
25977impl AsRef<SearchPublicChat> for RTDSearchPublicChatBuilder {
25978 fn as_ref(&self) -> &SearchPublicChat { &self.inner }
25979}
25980
25981
25982
25983
25984
25985
25986
25987#[derive(Debug, Clone, Default, Serialize, Deserialize)]
25989pub struct SearchPublicChats {
25990 #[doc(hidden)]
25991 #[serde(rename(serialize = "@type", deserialize = "@type"))]
25992 td_name: String,
25993 #[doc(hidden)]
25994 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
25995 extra: Option<String>,
25996 query: String,
25998
25999}
26000
26001impl RObject for SearchPublicChats {
26002 #[doc(hidden)] fn td_name(&self) -> &'static str { "searchPublicChats" }
26003 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
26004 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
26005}
26006
26007
26008
26009
26010impl RFunction for SearchPublicChats {}
26011
26012impl SearchPublicChats {
26013 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
26014 pub fn builder() -> RTDSearchPublicChatsBuilder {
26015 let mut inner = SearchPublicChats::default();
26016 inner.td_name = "searchPublicChats".to_string();
26017 inner.extra = Some(Uuid::new_v4().to_string());
26018 RTDSearchPublicChatsBuilder { inner }
26019 }
26020
26021 pub fn query(&self) -> &String { &self.query }
26022
26023}
26024
26025#[doc(hidden)]
26026pub struct RTDSearchPublicChatsBuilder {
26027 inner: SearchPublicChats
26028}
26029
26030impl RTDSearchPublicChatsBuilder {
26031 pub fn build(&self) -> SearchPublicChats { self.inner.clone() }
26032
26033
26034 pub fn query<T: AsRef<str>>(&mut self, query: T) -> &mut Self {
26035 self.inner.query = query.as_ref().to_string();
26036 self
26037 }
26038
26039}
26040
26041impl AsRef<SearchPublicChats> for SearchPublicChats {
26042 fn as_ref(&self) -> &SearchPublicChats { self }
26043}
26044
26045impl AsRef<SearchPublicChats> for RTDSearchPublicChatsBuilder {
26046 fn as_ref(&self) -> &SearchPublicChats { &self.inner }
26047}
26048
26049
26050
26051
26052
26053
26054
26055#[derive(Debug, Clone, Default, Serialize, Deserialize)]
26057pub struct SearchSecretMessages {
26058 #[doc(hidden)]
26059 #[serde(rename(serialize = "@type", deserialize = "@type"))]
26060 td_name: String,
26061 #[doc(hidden)]
26062 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
26063 extra: Option<String>,
26064 chat_id: i64,
26066 query: String,
26068 offset: String,
26070 limit: i64,
26072 filter: SearchMessagesFilter,
26074
26075}
26076
26077impl RObject for SearchSecretMessages {
26078 #[doc(hidden)] fn td_name(&self) -> &'static str { "searchSecretMessages" }
26079 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
26080 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
26081}
26082
26083
26084
26085
26086impl RFunction for SearchSecretMessages {}
26087
26088impl SearchSecretMessages {
26089 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
26090 pub fn builder() -> RTDSearchSecretMessagesBuilder {
26091 let mut inner = SearchSecretMessages::default();
26092 inner.td_name = "searchSecretMessages".to_string();
26093 inner.extra = Some(Uuid::new_v4().to_string());
26094 RTDSearchSecretMessagesBuilder { inner }
26095 }
26096
26097 pub fn chat_id(&self) -> i64 { self.chat_id }
26098
26099 pub fn query(&self) -> &String { &self.query }
26100
26101 pub fn offset(&self) -> &String { &self.offset }
26102
26103 pub fn limit(&self) -> i64 { self.limit }
26104
26105 pub fn filter(&self) -> &SearchMessagesFilter { &self.filter }
26106
26107}
26108
26109#[doc(hidden)]
26110pub struct RTDSearchSecretMessagesBuilder {
26111 inner: SearchSecretMessages
26112}
26113
26114impl RTDSearchSecretMessagesBuilder {
26115 pub fn build(&self) -> SearchSecretMessages { self.inner.clone() }
26116
26117
26118 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
26119 self.inner.chat_id = chat_id;
26120 self
26121 }
26122
26123
26124 pub fn query<T: AsRef<str>>(&mut self, query: T) -> &mut Self {
26125 self.inner.query = query.as_ref().to_string();
26126 self
26127 }
26128
26129
26130 pub fn offset<T: AsRef<str>>(&mut self, offset: T) -> &mut Self {
26131 self.inner.offset = offset.as_ref().to_string();
26132 self
26133 }
26134
26135
26136 pub fn limit(&mut self, limit: i64) -> &mut Self {
26137 self.inner.limit = limit;
26138 self
26139 }
26140
26141
26142 pub fn filter<T: AsRef<SearchMessagesFilter>>(&mut self, filter: T) -> &mut Self {
26143 self.inner.filter = filter.as_ref().clone();
26144 self
26145 }
26146
26147}
26148
26149impl AsRef<SearchSecretMessages> for SearchSecretMessages {
26150 fn as_ref(&self) -> &SearchSecretMessages { self }
26151}
26152
26153impl AsRef<SearchSecretMessages> for RTDSearchSecretMessagesBuilder {
26154 fn as_ref(&self) -> &SearchSecretMessages { &self.inner }
26155}
26156
26157
26158
26159
26160
26161
26162
26163#[derive(Debug, Clone, Default, Serialize, Deserialize)]
26165pub struct SearchStickerSet {
26166 #[doc(hidden)]
26167 #[serde(rename(serialize = "@type", deserialize = "@type"))]
26168 td_name: String,
26169 #[doc(hidden)]
26170 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
26171 extra: Option<String>,
26172 name: String,
26174
26175}
26176
26177impl RObject for SearchStickerSet {
26178 #[doc(hidden)] fn td_name(&self) -> &'static str { "searchStickerSet" }
26179 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
26180 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
26181}
26182
26183
26184
26185
26186impl RFunction for SearchStickerSet {}
26187
26188impl SearchStickerSet {
26189 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
26190 pub fn builder() -> RTDSearchStickerSetBuilder {
26191 let mut inner = SearchStickerSet::default();
26192 inner.td_name = "searchStickerSet".to_string();
26193 inner.extra = Some(Uuid::new_v4().to_string());
26194 RTDSearchStickerSetBuilder { inner }
26195 }
26196
26197 pub fn name(&self) -> &String { &self.name }
26198
26199}
26200
26201#[doc(hidden)]
26202pub struct RTDSearchStickerSetBuilder {
26203 inner: SearchStickerSet
26204}
26205
26206impl RTDSearchStickerSetBuilder {
26207 pub fn build(&self) -> SearchStickerSet { self.inner.clone() }
26208
26209
26210 pub fn name<T: AsRef<str>>(&mut self, name: T) -> &mut Self {
26211 self.inner.name = name.as_ref().to_string();
26212 self
26213 }
26214
26215}
26216
26217impl AsRef<SearchStickerSet> for SearchStickerSet {
26218 fn as_ref(&self) -> &SearchStickerSet { self }
26219}
26220
26221impl AsRef<SearchStickerSet> for RTDSearchStickerSetBuilder {
26222 fn as_ref(&self) -> &SearchStickerSet { &self.inner }
26223}
26224
26225
26226
26227
26228
26229
26230
26231#[derive(Debug, Clone, Default, Serialize, Deserialize)]
26233pub struct SearchStickerSets {
26234 #[doc(hidden)]
26235 #[serde(rename(serialize = "@type", deserialize = "@type"))]
26236 td_name: String,
26237 #[doc(hidden)]
26238 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
26239 extra: Option<String>,
26240 query: String,
26242
26243}
26244
26245impl RObject for SearchStickerSets {
26246 #[doc(hidden)] fn td_name(&self) -> &'static str { "searchStickerSets" }
26247 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
26248 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
26249}
26250
26251
26252
26253
26254impl RFunction for SearchStickerSets {}
26255
26256impl SearchStickerSets {
26257 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
26258 pub fn builder() -> RTDSearchStickerSetsBuilder {
26259 let mut inner = SearchStickerSets::default();
26260 inner.td_name = "searchStickerSets".to_string();
26261 inner.extra = Some(Uuid::new_v4().to_string());
26262 RTDSearchStickerSetsBuilder { inner }
26263 }
26264
26265 pub fn query(&self) -> &String { &self.query }
26266
26267}
26268
26269#[doc(hidden)]
26270pub struct RTDSearchStickerSetsBuilder {
26271 inner: SearchStickerSets
26272}
26273
26274impl RTDSearchStickerSetsBuilder {
26275 pub fn build(&self) -> SearchStickerSets { self.inner.clone() }
26276
26277
26278 pub fn query<T: AsRef<str>>(&mut self, query: T) -> &mut Self {
26279 self.inner.query = query.as_ref().to_string();
26280 self
26281 }
26282
26283}
26284
26285impl AsRef<SearchStickerSets> for SearchStickerSets {
26286 fn as_ref(&self) -> &SearchStickerSets { self }
26287}
26288
26289impl AsRef<SearchStickerSets> for RTDSearchStickerSetsBuilder {
26290 fn as_ref(&self) -> &SearchStickerSets { &self.inner }
26291}
26292
26293
26294
26295
26296
26297
26298
26299#[derive(Debug, Clone, Default, Serialize, Deserialize)]
26301pub struct SearchStickers {
26302 #[doc(hidden)]
26303 #[serde(rename(serialize = "@type", deserialize = "@type"))]
26304 td_name: String,
26305 #[doc(hidden)]
26306 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
26307 extra: Option<String>,
26308 emoji: String,
26310 limit: i64,
26312
26313}
26314
26315impl RObject for SearchStickers {
26316 #[doc(hidden)] fn td_name(&self) -> &'static str { "searchStickers" }
26317 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
26318 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
26319}
26320
26321
26322
26323
26324impl RFunction for SearchStickers {}
26325
26326impl SearchStickers {
26327 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
26328 pub fn builder() -> RTDSearchStickersBuilder {
26329 let mut inner = SearchStickers::default();
26330 inner.td_name = "searchStickers".to_string();
26331 inner.extra = Some(Uuid::new_v4().to_string());
26332 RTDSearchStickersBuilder { inner }
26333 }
26334
26335 pub fn emoji(&self) -> &String { &self.emoji }
26336
26337 pub fn limit(&self) -> i64 { self.limit }
26338
26339}
26340
26341#[doc(hidden)]
26342pub struct RTDSearchStickersBuilder {
26343 inner: SearchStickers
26344}
26345
26346impl RTDSearchStickersBuilder {
26347 pub fn build(&self) -> SearchStickers { self.inner.clone() }
26348
26349
26350 pub fn emoji<T: AsRef<str>>(&mut self, emoji: T) -> &mut Self {
26351 self.inner.emoji = emoji.as_ref().to_string();
26352 self
26353 }
26354
26355
26356 pub fn limit(&mut self, limit: i64) -> &mut Self {
26357 self.inner.limit = limit;
26358 self
26359 }
26360
26361}
26362
26363impl AsRef<SearchStickers> for SearchStickers {
26364 fn as_ref(&self) -> &SearchStickers { self }
26365}
26366
26367impl AsRef<SearchStickers> for RTDSearchStickersBuilder {
26368 fn as_ref(&self) -> &SearchStickers { &self.inner }
26369}
26370
26371
26372
26373
26374
26375
26376
26377#[derive(Debug, Clone, Default, Serialize, Deserialize)]
26379pub struct SendBotStartMessage {
26380 #[doc(hidden)]
26381 #[serde(rename(serialize = "@type", deserialize = "@type"))]
26382 td_name: String,
26383 #[doc(hidden)]
26384 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
26385 extra: Option<String>,
26386 bot_user_id: i64,
26388 chat_id: i64,
26390 parameter: String,
26392
26393}
26394
26395impl RObject for SendBotStartMessage {
26396 #[doc(hidden)] fn td_name(&self) -> &'static str { "sendBotStartMessage" }
26397 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
26398 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
26399}
26400
26401
26402
26403
26404impl RFunction for SendBotStartMessage {}
26405
26406impl SendBotStartMessage {
26407 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
26408 pub fn builder() -> RTDSendBotStartMessageBuilder {
26409 let mut inner = SendBotStartMessage::default();
26410 inner.td_name = "sendBotStartMessage".to_string();
26411 inner.extra = Some(Uuid::new_v4().to_string());
26412 RTDSendBotStartMessageBuilder { inner }
26413 }
26414
26415 pub fn bot_user_id(&self) -> i64 { self.bot_user_id }
26416
26417 pub fn chat_id(&self) -> i64 { self.chat_id }
26418
26419 pub fn parameter(&self) -> &String { &self.parameter }
26420
26421}
26422
26423#[doc(hidden)]
26424pub struct RTDSendBotStartMessageBuilder {
26425 inner: SendBotStartMessage
26426}
26427
26428impl RTDSendBotStartMessageBuilder {
26429 pub fn build(&self) -> SendBotStartMessage { self.inner.clone() }
26430
26431
26432 pub fn bot_user_id(&mut self, bot_user_id: i64) -> &mut Self {
26433 self.inner.bot_user_id = bot_user_id;
26434 self
26435 }
26436
26437
26438 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
26439 self.inner.chat_id = chat_id;
26440 self
26441 }
26442
26443
26444 pub fn parameter<T: AsRef<str>>(&mut self, parameter: T) -> &mut Self {
26445 self.inner.parameter = parameter.as_ref().to_string();
26446 self
26447 }
26448
26449}
26450
26451impl AsRef<SendBotStartMessage> for SendBotStartMessage {
26452 fn as_ref(&self) -> &SendBotStartMessage { self }
26453}
26454
26455impl AsRef<SendBotStartMessage> for RTDSendBotStartMessageBuilder {
26456 fn as_ref(&self) -> &SendBotStartMessage { &self.inner }
26457}
26458
26459
26460
26461
26462
26463
26464
26465#[derive(Debug, Clone, Default, Serialize, Deserialize)]
26467pub struct SendCallDebugInformation {
26468 #[doc(hidden)]
26469 #[serde(rename(serialize = "@type", deserialize = "@type"))]
26470 td_name: String,
26471 #[doc(hidden)]
26472 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
26473 extra: Option<String>,
26474 call_id: i64,
26476 debug_information: String,
26478
26479}
26480
26481impl RObject for SendCallDebugInformation {
26482 #[doc(hidden)] fn td_name(&self) -> &'static str { "sendCallDebugInformation" }
26483 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
26484 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
26485}
26486
26487
26488
26489
26490impl RFunction for SendCallDebugInformation {}
26491
26492impl SendCallDebugInformation {
26493 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
26494 pub fn builder() -> RTDSendCallDebugInformationBuilder {
26495 let mut inner = SendCallDebugInformation::default();
26496 inner.td_name = "sendCallDebugInformation".to_string();
26497 inner.extra = Some(Uuid::new_v4().to_string());
26498 RTDSendCallDebugInformationBuilder { inner }
26499 }
26500
26501 pub fn call_id(&self) -> i64 { self.call_id }
26502
26503 pub fn debug_information(&self) -> &String { &self.debug_information }
26504
26505}
26506
26507#[doc(hidden)]
26508pub struct RTDSendCallDebugInformationBuilder {
26509 inner: SendCallDebugInformation
26510}
26511
26512impl RTDSendCallDebugInformationBuilder {
26513 pub fn build(&self) -> SendCallDebugInformation { self.inner.clone() }
26514
26515
26516 pub fn call_id(&mut self, call_id: i64) -> &mut Self {
26517 self.inner.call_id = call_id;
26518 self
26519 }
26520
26521
26522 pub fn debug_information<T: AsRef<str>>(&mut self, debug_information: T) -> &mut Self {
26523 self.inner.debug_information = debug_information.as_ref().to_string();
26524 self
26525 }
26526
26527}
26528
26529impl AsRef<SendCallDebugInformation> for SendCallDebugInformation {
26530 fn as_ref(&self) -> &SendCallDebugInformation { self }
26531}
26532
26533impl AsRef<SendCallDebugInformation> for RTDSendCallDebugInformationBuilder {
26534 fn as_ref(&self) -> &SendCallDebugInformation { &self.inner }
26535}
26536
26537
26538
26539
26540
26541
26542
26543#[derive(Debug, Clone, Default, Serialize, Deserialize)]
26545pub struct SendCallRating {
26546 #[doc(hidden)]
26547 #[serde(rename(serialize = "@type", deserialize = "@type"))]
26548 td_name: String,
26549 #[doc(hidden)]
26550 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
26551 extra: Option<String>,
26552 call_id: i64,
26554 rating: i64,
26556 comment: String,
26558 problems: Vec<CallProblem>,
26560
26561}
26562
26563impl RObject for SendCallRating {
26564 #[doc(hidden)] fn td_name(&self) -> &'static str { "sendCallRating" }
26565 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
26566 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
26567}
26568
26569
26570
26571
26572impl RFunction for SendCallRating {}
26573
26574impl SendCallRating {
26575 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
26576 pub fn builder() -> RTDSendCallRatingBuilder {
26577 let mut inner = SendCallRating::default();
26578 inner.td_name = "sendCallRating".to_string();
26579 inner.extra = Some(Uuid::new_v4().to_string());
26580 RTDSendCallRatingBuilder { inner }
26581 }
26582
26583 pub fn call_id(&self) -> i64 { self.call_id }
26584
26585 pub fn rating(&self) -> i64 { self.rating }
26586
26587 pub fn comment(&self) -> &String { &self.comment }
26588
26589 pub fn problems(&self) -> &Vec<CallProblem> { &self.problems }
26590
26591}
26592
26593#[doc(hidden)]
26594pub struct RTDSendCallRatingBuilder {
26595 inner: SendCallRating
26596}
26597
26598impl RTDSendCallRatingBuilder {
26599 pub fn build(&self) -> SendCallRating { self.inner.clone() }
26600
26601
26602 pub fn call_id(&mut self, call_id: i64) -> &mut Self {
26603 self.inner.call_id = call_id;
26604 self
26605 }
26606
26607
26608 pub fn rating(&mut self, rating: i64) -> &mut Self {
26609 self.inner.rating = rating;
26610 self
26611 }
26612
26613
26614 pub fn comment<T: AsRef<str>>(&mut self, comment: T) -> &mut Self {
26615 self.inner.comment = comment.as_ref().to_string();
26616 self
26617 }
26618
26619
26620 pub fn problems(&mut self, problems: Vec<CallProblem>) -> &mut Self {
26621 self.inner.problems = problems;
26622 self
26623 }
26624
26625}
26626
26627impl AsRef<SendCallRating> for SendCallRating {
26628 fn as_ref(&self) -> &SendCallRating { self }
26629}
26630
26631impl AsRef<SendCallRating> for RTDSendCallRatingBuilder {
26632 fn as_ref(&self) -> &SendCallRating { &self.inner }
26633}
26634
26635
26636
26637
26638
26639
26640
26641#[derive(Debug, Clone, Default, Serialize, Deserialize)]
26643pub struct SendCallSignalingData {
26644 #[doc(hidden)]
26645 #[serde(rename(serialize = "@type", deserialize = "@type"))]
26646 td_name: String,
26647 #[doc(hidden)]
26648 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
26649 extra: Option<String>,
26650 call_id: i64,
26652 data: String,
26654
26655}
26656
26657impl RObject for SendCallSignalingData {
26658 #[doc(hidden)] fn td_name(&self) -> &'static str { "sendCallSignalingData" }
26659 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
26660 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
26661}
26662
26663
26664
26665
26666impl RFunction for SendCallSignalingData {}
26667
26668impl SendCallSignalingData {
26669 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
26670 pub fn builder() -> RTDSendCallSignalingDataBuilder {
26671 let mut inner = SendCallSignalingData::default();
26672 inner.td_name = "sendCallSignalingData".to_string();
26673 inner.extra = Some(Uuid::new_v4().to_string());
26674 RTDSendCallSignalingDataBuilder { inner }
26675 }
26676
26677 pub fn call_id(&self) -> i64 { self.call_id }
26678
26679 pub fn data(&self) -> &String { &self.data }
26680
26681}
26682
26683#[doc(hidden)]
26684pub struct RTDSendCallSignalingDataBuilder {
26685 inner: SendCallSignalingData
26686}
26687
26688impl RTDSendCallSignalingDataBuilder {
26689 pub fn build(&self) -> SendCallSignalingData { self.inner.clone() }
26690
26691
26692 pub fn call_id(&mut self, call_id: i64) -> &mut Self {
26693 self.inner.call_id = call_id;
26694 self
26695 }
26696
26697
26698 pub fn data<T: AsRef<str>>(&mut self, data: T) -> &mut Self {
26699 self.inner.data = data.as_ref().to_string();
26700 self
26701 }
26702
26703}
26704
26705impl AsRef<SendCallSignalingData> for SendCallSignalingData {
26706 fn as_ref(&self) -> &SendCallSignalingData { self }
26707}
26708
26709impl AsRef<SendCallSignalingData> for RTDSendCallSignalingDataBuilder {
26710 fn as_ref(&self) -> &SendCallSignalingData { &self.inner }
26711}
26712
26713
26714
26715
26716
26717
26718
26719#[derive(Debug, Clone, Default, Serialize, Deserialize)]
26721pub struct SendChatAction {
26722 #[doc(hidden)]
26723 #[serde(rename(serialize = "@type", deserialize = "@type"))]
26724 td_name: String,
26725 #[doc(hidden)]
26726 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
26727 extra: Option<String>,
26728 chat_id: i64,
26730 message_thread_id: i64,
26732 action: ChatAction,
26734
26735}
26736
26737impl RObject for SendChatAction {
26738 #[doc(hidden)] fn td_name(&self) -> &'static str { "sendChatAction" }
26739 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
26740 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
26741}
26742
26743
26744
26745
26746impl RFunction for SendChatAction {}
26747
26748impl SendChatAction {
26749 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
26750 pub fn builder() -> RTDSendChatActionBuilder {
26751 let mut inner = SendChatAction::default();
26752 inner.td_name = "sendChatAction".to_string();
26753 inner.extra = Some(Uuid::new_v4().to_string());
26754 RTDSendChatActionBuilder { inner }
26755 }
26756
26757 pub fn chat_id(&self) -> i64 { self.chat_id }
26758
26759 pub fn message_thread_id(&self) -> i64 { self.message_thread_id }
26760
26761 pub fn action(&self) -> &ChatAction { &self.action }
26762
26763}
26764
26765#[doc(hidden)]
26766pub struct RTDSendChatActionBuilder {
26767 inner: SendChatAction
26768}
26769
26770impl RTDSendChatActionBuilder {
26771 pub fn build(&self) -> SendChatAction { self.inner.clone() }
26772
26773
26774 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
26775 self.inner.chat_id = chat_id;
26776 self
26777 }
26778
26779
26780 pub fn message_thread_id(&mut self, message_thread_id: i64) -> &mut Self {
26781 self.inner.message_thread_id = message_thread_id;
26782 self
26783 }
26784
26785
26786 pub fn action<T: AsRef<ChatAction>>(&mut self, action: T) -> &mut Self {
26787 self.inner.action = action.as_ref().clone();
26788 self
26789 }
26790
26791}
26792
26793impl AsRef<SendChatAction> for SendChatAction {
26794 fn as_ref(&self) -> &SendChatAction { self }
26795}
26796
26797impl AsRef<SendChatAction> for RTDSendChatActionBuilder {
26798 fn as_ref(&self) -> &SendChatAction { &self.inner }
26799}
26800
26801
26802
26803
26804
26805
26806
26807#[derive(Debug, Clone, Default, Serialize, Deserialize)]
26809pub struct SendChatScreenshotTakenNotification {
26810 #[doc(hidden)]
26811 #[serde(rename(serialize = "@type", deserialize = "@type"))]
26812 td_name: String,
26813 #[doc(hidden)]
26814 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
26815 extra: Option<String>,
26816 chat_id: i64,
26818
26819}
26820
26821impl RObject for SendChatScreenshotTakenNotification {
26822 #[doc(hidden)] fn td_name(&self) -> &'static str { "sendChatScreenshotTakenNotification" }
26823 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
26824 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
26825}
26826
26827
26828
26829
26830impl RFunction for SendChatScreenshotTakenNotification {}
26831
26832impl SendChatScreenshotTakenNotification {
26833 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
26834 pub fn builder() -> RTDSendChatScreenshotTakenNotificationBuilder {
26835 let mut inner = SendChatScreenshotTakenNotification::default();
26836 inner.td_name = "sendChatScreenshotTakenNotification".to_string();
26837 inner.extra = Some(Uuid::new_v4().to_string());
26838 RTDSendChatScreenshotTakenNotificationBuilder { inner }
26839 }
26840
26841 pub fn chat_id(&self) -> i64 { self.chat_id }
26842
26843}
26844
26845#[doc(hidden)]
26846pub struct RTDSendChatScreenshotTakenNotificationBuilder {
26847 inner: SendChatScreenshotTakenNotification
26848}
26849
26850impl RTDSendChatScreenshotTakenNotificationBuilder {
26851 pub fn build(&self) -> SendChatScreenshotTakenNotification { self.inner.clone() }
26852
26853
26854 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
26855 self.inner.chat_id = chat_id;
26856 self
26857 }
26858
26859}
26860
26861impl AsRef<SendChatScreenshotTakenNotification> for SendChatScreenshotTakenNotification {
26862 fn as_ref(&self) -> &SendChatScreenshotTakenNotification { self }
26863}
26864
26865impl AsRef<SendChatScreenshotTakenNotification> for RTDSendChatScreenshotTakenNotificationBuilder {
26866 fn as_ref(&self) -> &SendChatScreenshotTakenNotification { &self.inner }
26867}
26868
26869
26870
26871
26872
26873
26874
26875#[derive(Debug, Clone, Default, Serialize, Deserialize)]
26877pub struct SendCustomRequest {
26878 #[doc(hidden)]
26879 #[serde(rename(serialize = "@type", deserialize = "@type"))]
26880 td_name: String,
26881 #[doc(hidden)]
26882 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
26883 extra: Option<String>,
26884 method: String,
26886 parameters: String,
26888
26889}
26890
26891impl RObject for SendCustomRequest {
26892 #[doc(hidden)] fn td_name(&self) -> &'static str { "sendCustomRequest" }
26893 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
26894 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
26895}
26896
26897
26898
26899
26900impl RFunction for SendCustomRequest {}
26901
26902impl SendCustomRequest {
26903 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
26904 pub fn builder() -> RTDSendCustomRequestBuilder {
26905 let mut inner = SendCustomRequest::default();
26906 inner.td_name = "sendCustomRequest".to_string();
26907 inner.extra = Some(Uuid::new_v4().to_string());
26908 RTDSendCustomRequestBuilder { inner }
26909 }
26910
26911 pub fn method(&self) -> &String { &self.method }
26912
26913 pub fn parameters(&self) -> &String { &self.parameters }
26914
26915}
26916
26917#[doc(hidden)]
26918pub struct RTDSendCustomRequestBuilder {
26919 inner: SendCustomRequest
26920}
26921
26922impl RTDSendCustomRequestBuilder {
26923 pub fn build(&self) -> SendCustomRequest { self.inner.clone() }
26924
26925
26926 pub fn method<T: AsRef<str>>(&mut self, method: T) -> &mut Self {
26927 self.inner.method = method.as_ref().to_string();
26928 self
26929 }
26930
26931
26932 pub fn parameters<T: AsRef<str>>(&mut self, parameters: T) -> &mut Self {
26933 self.inner.parameters = parameters.as_ref().to_string();
26934 self
26935 }
26936
26937}
26938
26939impl AsRef<SendCustomRequest> for SendCustomRequest {
26940 fn as_ref(&self) -> &SendCustomRequest { self }
26941}
26942
26943impl AsRef<SendCustomRequest> for RTDSendCustomRequestBuilder {
26944 fn as_ref(&self) -> &SendCustomRequest { &self.inner }
26945}
26946
26947
26948
26949
26950
26951
26952
26953#[derive(Debug, Clone, Default, Serialize, Deserialize)]
26955pub struct SendEmailAddressVerificationCode {
26956 #[doc(hidden)]
26957 #[serde(rename(serialize = "@type", deserialize = "@type"))]
26958 td_name: String,
26959 #[doc(hidden)]
26960 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
26961 extra: Option<String>,
26962 email_address: String,
26964
26965}
26966
26967impl RObject for SendEmailAddressVerificationCode {
26968 #[doc(hidden)] fn td_name(&self) -> &'static str { "sendEmailAddressVerificationCode" }
26969 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
26970 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
26971}
26972
26973
26974
26975
26976impl RFunction for SendEmailAddressVerificationCode {}
26977
26978impl SendEmailAddressVerificationCode {
26979 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
26980 pub fn builder() -> RTDSendEmailAddressVerificationCodeBuilder {
26981 let mut inner = SendEmailAddressVerificationCode::default();
26982 inner.td_name = "sendEmailAddressVerificationCode".to_string();
26983 inner.extra = Some(Uuid::new_v4().to_string());
26984 RTDSendEmailAddressVerificationCodeBuilder { inner }
26985 }
26986
26987 pub fn email_address(&self) -> &String { &self.email_address }
26988
26989}
26990
26991#[doc(hidden)]
26992pub struct RTDSendEmailAddressVerificationCodeBuilder {
26993 inner: SendEmailAddressVerificationCode
26994}
26995
26996impl RTDSendEmailAddressVerificationCodeBuilder {
26997 pub fn build(&self) -> SendEmailAddressVerificationCode { self.inner.clone() }
26998
26999
27000 pub fn email_address<T: AsRef<str>>(&mut self, email_address: T) -> &mut Self {
27001 self.inner.email_address = email_address.as_ref().to_string();
27002 self
27003 }
27004
27005}
27006
27007impl AsRef<SendEmailAddressVerificationCode> for SendEmailAddressVerificationCode {
27008 fn as_ref(&self) -> &SendEmailAddressVerificationCode { self }
27009}
27010
27011impl AsRef<SendEmailAddressVerificationCode> for RTDSendEmailAddressVerificationCodeBuilder {
27012 fn as_ref(&self) -> &SendEmailAddressVerificationCode { &self.inner }
27013}
27014
27015
27016
27017
27018
27019
27020
27021#[derive(Debug, Clone, Default, Serialize, Deserialize)]
27023pub struct SendInlineQueryResultMessage {
27024 #[doc(hidden)]
27025 #[serde(rename(serialize = "@type", deserialize = "@type"))]
27026 td_name: String,
27027 #[doc(hidden)]
27028 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
27029 extra: Option<String>,
27030 chat_id: i64,
27032 message_thread_id: i64,
27034 reply_to_message_id: i64,
27036 options: MessageSendOptions,
27038 query_id: isize,
27040 result_id: String,
27042 hide_via_bot: bool,
27044
27045}
27046
27047impl RObject for SendInlineQueryResultMessage {
27048 #[doc(hidden)] fn td_name(&self) -> &'static str { "sendInlineQueryResultMessage" }
27049 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
27050 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
27051}
27052
27053
27054
27055
27056impl RFunction for SendInlineQueryResultMessage {}
27057
27058impl SendInlineQueryResultMessage {
27059 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
27060 pub fn builder() -> RTDSendInlineQueryResultMessageBuilder {
27061 let mut inner = SendInlineQueryResultMessage::default();
27062 inner.td_name = "sendInlineQueryResultMessage".to_string();
27063 inner.extra = Some(Uuid::new_v4().to_string());
27064 RTDSendInlineQueryResultMessageBuilder { inner }
27065 }
27066
27067 pub fn chat_id(&self) -> i64 { self.chat_id }
27068
27069 pub fn message_thread_id(&self) -> i64 { self.message_thread_id }
27070
27071 pub fn reply_to_message_id(&self) -> i64 { self.reply_to_message_id }
27072
27073 pub fn options(&self) -> &MessageSendOptions { &self.options }
27074
27075 pub fn query_id(&self) -> isize { self.query_id }
27076
27077 pub fn result_id(&self) -> &String { &self.result_id }
27078
27079 pub fn hide_via_bot(&self) -> bool { self.hide_via_bot }
27080
27081}
27082
27083#[doc(hidden)]
27084pub struct RTDSendInlineQueryResultMessageBuilder {
27085 inner: SendInlineQueryResultMessage
27086}
27087
27088impl RTDSendInlineQueryResultMessageBuilder {
27089 pub fn build(&self) -> SendInlineQueryResultMessage { self.inner.clone() }
27090
27091
27092 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
27093 self.inner.chat_id = chat_id;
27094 self
27095 }
27096
27097
27098 pub fn message_thread_id(&mut self, message_thread_id: i64) -> &mut Self {
27099 self.inner.message_thread_id = message_thread_id;
27100 self
27101 }
27102
27103
27104 pub fn reply_to_message_id(&mut self, reply_to_message_id: i64) -> &mut Self {
27105 self.inner.reply_to_message_id = reply_to_message_id;
27106 self
27107 }
27108
27109
27110 pub fn options<T: AsRef<MessageSendOptions>>(&mut self, options: T) -> &mut Self {
27111 self.inner.options = options.as_ref().clone();
27112 self
27113 }
27114
27115
27116 pub fn query_id(&mut self, query_id: isize) -> &mut Self {
27117 self.inner.query_id = query_id;
27118 self
27119 }
27120
27121
27122 pub fn result_id<T: AsRef<str>>(&mut self, result_id: T) -> &mut Self {
27123 self.inner.result_id = result_id.as_ref().to_string();
27124 self
27125 }
27126
27127
27128 pub fn hide_via_bot(&mut self, hide_via_bot: bool) -> &mut Self {
27129 self.inner.hide_via_bot = hide_via_bot;
27130 self
27131 }
27132
27133}
27134
27135impl AsRef<SendInlineQueryResultMessage> for SendInlineQueryResultMessage {
27136 fn as_ref(&self) -> &SendInlineQueryResultMessage { self }
27137}
27138
27139impl AsRef<SendInlineQueryResultMessage> for RTDSendInlineQueryResultMessageBuilder {
27140 fn as_ref(&self) -> &SendInlineQueryResultMessage { &self.inner }
27141}
27142
27143
27144
27145
27146
27147
27148
27149#[derive(Debug, Clone, Default, Serialize, Deserialize)]
27151pub struct SendMessage {
27152 #[doc(hidden)]
27153 #[serde(rename(serialize = "@type", deserialize = "@type"))]
27154 td_name: String,
27155 #[doc(hidden)]
27156 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
27157 extra: Option<String>,
27158 chat_id: i64,
27160 message_thread_id: i64,
27162 reply_to_message_id: i64,
27164 options: MessageSendOptions,
27166 reply_markup: ReplyMarkup,
27168 input_message_content: InputMessageContent,
27170
27171}
27172
27173impl RObject for SendMessage {
27174 #[doc(hidden)] fn td_name(&self) -> &'static str { "sendMessage" }
27175 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
27176 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
27177}
27178
27179
27180
27181
27182impl RFunction for SendMessage {}
27183
27184impl SendMessage {
27185 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
27186 pub fn builder() -> RTDSendMessageBuilder {
27187 let mut inner = SendMessage::default();
27188 inner.td_name = "sendMessage".to_string();
27189 inner.extra = Some(Uuid::new_v4().to_string());
27190 RTDSendMessageBuilder { inner }
27191 }
27192
27193 pub fn chat_id(&self) -> i64 { self.chat_id }
27194
27195 pub fn message_thread_id(&self) -> i64 { self.message_thread_id }
27196
27197 pub fn reply_to_message_id(&self) -> i64 { self.reply_to_message_id }
27198
27199 pub fn options(&self) -> &MessageSendOptions { &self.options }
27200
27201 pub fn reply_markup(&self) -> &ReplyMarkup { &self.reply_markup }
27202
27203 pub fn input_message_content(&self) -> &InputMessageContent { &self.input_message_content }
27204
27205}
27206
27207#[doc(hidden)]
27208pub struct RTDSendMessageBuilder {
27209 inner: SendMessage
27210}
27211
27212impl RTDSendMessageBuilder {
27213 pub fn build(&self) -> SendMessage { self.inner.clone() }
27214
27215
27216 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
27217 self.inner.chat_id = chat_id;
27218 self
27219 }
27220
27221
27222 pub fn message_thread_id(&mut self, message_thread_id: i64) -> &mut Self {
27223 self.inner.message_thread_id = message_thread_id;
27224 self
27225 }
27226
27227
27228 pub fn reply_to_message_id(&mut self, reply_to_message_id: i64) -> &mut Self {
27229 self.inner.reply_to_message_id = reply_to_message_id;
27230 self
27231 }
27232
27233
27234 pub fn options<T: AsRef<MessageSendOptions>>(&mut self, options: T) -> &mut Self {
27235 self.inner.options = options.as_ref().clone();
27236 self
27237 }
27238
27239
27240 pub fn reply_markup<T: AsRef<ReplyMarkup>>(&mut self, reply_markup: T) -> &mut Self {
27241 self.inner.reply_markup = reply_markup.as_ref().clone();
27242 self
27243 }
27244
27245
27246 pub fn input_message_content<T: AsRef<InputMessageContent>>(&mut self, input_message_content: T) -> &mut Self {
27247 self.inner.input_message_content = input_message_content.as_ref().clone();
27248 self
27249 }
27250
27251}
27252
27253impl AsRef<SendMessage> for SendMessage {
27254 fn as_ref(&self) -> &SendMessage { self }
27255}
27256
27257impl AsRef<SendMessage> for RTDSendMessageBuilder {
27258 fn as_ref(&self) -> &SendMessage { &self.inner }
27259}
27260
27261
27262
27263
27264
27265
27266
27267#[derive(Debug, Clone, Default, Serialize, Deserialize)]
27269pub struct SendMessageAlbum {
27270 #[doc(hidden)]
27271 #[serde(rename(serialize = "@type", deserialize = "@type"))]
27272 td_name: String,
27273 #[doc(hidden)]
27274 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
27275 extra: Option<String>,
27276 chat_id: i64,
27278 message_thread_id: i64,
27280 reply_to_message_id: i64,
27282 options: MessageSendOptions,
27284 input_message_contents: Vec<InputMessageContent>,
27286
27287}
27288
27289impl RObject for SendMessageAlbum {
27290 #[doc(hidden)] fn td_name(&self) -> &'static str { "sendMessageAlbum" }
27291 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
27292 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
27293}
27294
27295
27296
27297
27298impl RFunction for SendMessageAlbum {}
27299
27300impl SendMessageAlbum {
27301 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
27302 pub fn builder() -> RTDSendMessageAlbumBuilder {
27303 let mut inner = SendMessageAlbum::default();
27304 inner.td_name = "sendMessageAlbum".to_string();
27305 inner.extra = Some(Uuid::new_v4().to_string());
27306 RTDSendMessageAlbumBuilder { inner }
27307 }
27308
27309 pub fn chat_id(&self) -> i64 { self.chat_id }
27310
27311 pub fn message_thread_id(&self) -> i64 { self.message_thread_id }
27312
27313 pub fn reply_to_message_id(&self) -> i64 { self.reply_to_message_id }
27314
27315 pub fn options(&self) -> &MessageSendOptions { &self.options }
27316
27317 pub fn input_message_contents(&self) -> &Vec<InputMessageContent> { &self.input_message_contents }
27318
27319}
27320
27321#[doc(hidden)]
27322pub struct RTDSendMessageAlbumBuilder {
27323 inner: SendMessageAlbum
27324}
27325
27326impl RTDSendMessageAlbumBuilder {
27327 pub fn build(&self) -> SendMessageAlbum { self.inner.clone() }
27328
27329
27330 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
27331 self.inner.chat_id = chat_id;
27332 self
27333 }
27334
27335
27336 pub fn message_thread_id(&mut self, message_thread_id: i64) -> &mut Self {
27337 self.inner.message_thread_id = message_thread_id;
27338 self
27339 }
27340
27341
27342 pub fn reply_to_message_id(&mut self, reply_to_message_id: i64) -> &mut Self {
27343 self.inner.reply_to_message_id = reply_to_message_id;
27344 self
27345 }
27346
27347
27348 pub fn options<T: AsRef<MessageSendOptions>>(&mut self, options: T) -> &mut Self {
27349 self.inner.options = options.as_ref().clone();
27350 self
27351 }
27352
27353
27354 pub fn input_message_contents(&mut self, input_message_contents: Vec<InputMessageContent>) -> &mut Self {
27355 self.inner.input_message_contents = input_message_contents;
27356 self
27357 }
27358
27359}
27360
27361impl AsRef<SendMessageAlbum> for SendMessageAlbum {
27362 fn as_ref(&self) -> &SendMessageAlbum { self }
27363}
27364
27365impl AsRef<SendMessageAlbum> for RTDSendMessageAlbumBuilder {
27366 fn as_ref(&self) -> &SendMessageAlbum { &self.inner }
27367}
27368
27369
27370
27371
27372
27373
27374
27375#[derive(Debug, Clone, Default, Serialize, Deserialize)]
27377pub struct SendPassportAuthorizationForm {
27378 #[doc(hidden)]
27379 #[serde(rename(serialize = "@type", deserialize = "@type"))]
27380 td_name: String,
27381 #[doc(hidden)]
27382 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
27383 extra: Option<String>,
27384 autorization_form_id: i64,
27386 types: Vec<PassportElementType>,
27388
27389}
27390
27391impl RObject for SendPassportAuthorizationForm {
27392 #[doc(hidden)] fn td_name(&self) -> &'static str { "sendPassportAuthorizationForm" }
27393 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
27394 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
27395}
27396
27397
27398
27399
27400impl RFunction for SendPassportAuthorizationForm {}
27401
27402impl SendPassportAuthorizationForm {
27403 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
27404 pub fn builder() -> RTDSendPassportAuthorizationFormBuilder {
27405 let mut inner = SendPassportAuthorizationForm::default();
27406 inner.td_name = "sendPassportAuthorizationForm".to_string();
27407 inner.extra = Some(Uuid::new_v4().to_string());
27408 RTDSendPassportAuthorizationFormBuilder { inner }
27409 }
27410
27411 pub fn autorization_form_id(&self) -> i64 { self.autorization_form_id }
27412
27413 pub fn types(&self) -> &Vec<PassportElementType> { &self.types }
27414
27415}
27416
27417#[doc(hidden)]
27418pub struct RTDSendPassportAuthorizationFormBuilder {
27419 inner: SendPassportAuthorizationForm
27420}
27421
27422impl RTDSendPassportAuthorizationFormBuilder {
27423 pub fn build(&self) -> SendPassportAuthorizationForm { self.inner.clone() }
27424
27425
27426 pub fn autorization_form_id(&mut self, autorization_form_id: i64) -> &mut Self {
27427 self.inner.autorization_form_id = autorization_form_id;
27428 self
27429 }
27430
27431
27432 pub fn types(&mut self, types: Vec<PassportElementType>) -> &mut Self {
27433 self.inner.types = types;
27434 self
27435 }
27436
27437}
27438
27439impl AsRef<SendPassportAuthorizationForm> for SendPassportAuthorizationForm {
27440 fn as_ref(&self) -> &SendPassportAuthorizationForm { self }
27441}
27442
27443impl AsRef<SendPassportAuthorizationForm> for RTDSendPassportAuthorizationFormBuilder {
27444 fn as_ref(&self) -> &SendPassportAuthorizationForm { &self.inner }
27445}
27446
27447
27448
27449
27450
27451
27452
27453#[derive(Debug, Clone, Default, Serialize, Deserialize)]
27455pub struct SendPaymentForm {
27456 #[doc(hidden)]
27457 #[serde(rename(serialize = "@type", deserialize = "@type"))]
27458 td_name: String,
27459 #[doc(hidden)]
27460 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
27461 extra: Option<String>,
27462 chat_id: i64,
27464 message_id: i64,
27466 payment_form_id: isize,
27468 order_info_id: String,
27470 shipping_option_id: String,
27472 credentials: InputCredentials,
27474 tip_amount: i64,
27476
27477}
27478
27479impl RObject for SendPaymentForm {
27480 #[doc(hidden)] fn td_name(&self) -> &'static str { "sendPaymentForm" }
27481 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
27482 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
27483}
27484
27485
27486
27487
27488impl RFunction for SendPaymentForm {}
27489
27490impl SendPaymentForm {
27491 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
27492 pub fn builder() -> RTDSendPaymentFormBuilder {
27493 let mut inner = SendPaymentForm::default();
27494 inner.td_name = "sendPaymentForm".to_string();
27495 inner.extra = Some(Uuid::new_v4().to_string());
27496 RTDSendPaymentFormBuilder { inner }
27497 }
27498
27499 pub fn chat_id(&self) -> i64 { self.chat_id }
27500
27501 pub fn message_id(&self) -> i64 { self.message_id }
27502
27503 pub fn payment_form_id(&self) -> isize { self.payment_form_id }
27504
27505 pub fn order_info_id(&self) -> &String { &self.order_info_id }
27506
27507 pub fn shipping_option_id(&self) -> &String { &self.shipping_option_id }
27508
27509 pub fn credentials(&self) -> &InputCredentials { &self.credentials }
27510
27511 pub fn tip_amount(&self) -> i64 { self.tip_amount }
27512
27513}
27514
27515#[doc(hidden)]
27516pub struct RTDSendPaymentFormBuilder {
27517 inner: SendPaymentForm
27518}
27519
27520impl RTDSendPaymentFormBuilder {
27521 pub fn build(&self) -> SendPaymentForm { self.inner.clone() }
27522
27523
27524 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
27525 self.inner.chat_id = chat_id;
27526 self
27527 }
27528
27529
27530 pub fn message_id(&mut self, message_id: i64) -> &mut Self {
27531 self.inner.message_id = message_id;
27532 self
27533 }
27534
27535
27536 pub fn payment_form_id(&mut self, payment_form_id: isize) -> &mut Self {
27537 self.inner.payment_form_id = payment_form_id;
27538 self
27539 }
27540
27541
27542 pub fn order_info_id<T: AsRef<str>>(&mut self, order_info_id: T) -> &mut Self {
27543 self.inner.order_info_id = order_info_id.as_ref().to_string();
27544 self
27545 }
27546
27547
27548 pub fn shipping_option_id<T: AsRef<str>>(&mut self, shipping_option_id: T) -> &mut Self {
27549 self.inner.shipping_option_id = shipping_option_id.as_ref().to_string();
27550 self
27551 }
27552
27553
27554 pub fn credentials<T: AsRef<InputCredentials>>(&mut self, credentials: T) -> &mut Self {
27555 self.inner.credentials = credentials.as_ref().clone();
27556 self
27557 }
27558
27559
27560 pub fn tip_amount(&mut self, tip_amount: i64) -> &mut Self {
27561 self.inner.tip_amount = tip_amount;
27562 self
27563 }
27564
27565}
27566
27567impl AsRef<SendPaymentForm> for SendPaymentForm {
27568 fn as_ref(&self) -> &SendPaymentForm { self }
27569}
27570
27571impl AsRef<SendPaymentForm> for RTDSendPaymentFormBuilder {
27572 fn as_ref(&self) -> &SendPaymentForm { &self.inner }
27573}
27574
27575
27576
27577
27578
27579
27580
27581#[derive(Debug, Clone, Default, Serialize, Deserialize)]
27583pub struct SendPhoneNumberConfirmationCode {
27584 #[doc(hidden)]
27585 #[serde(rename(serialize = "@type", deserialize = "@type"))]
27586 td_name: String,
27587 #[doc(hidden)]
27588 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
27589 extra: Option<String>,
27590 hash: String,
27592 phone_number: String,
27594 settings: PhoneNumberAuthenticationSettings,
27596
27597}
27598
27599impl RObject for SendPhoneNumberConfirmationCode {
27600 #[doc(hidden)] fn td_name(&self) -> &'static str { "sendPhoneNumberConfirmationCode" }
27601 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
27602 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
27603}
27604
27605
27606
27607
27608impl RFunction for SendPhoneNumberConfirmationCode {}
27609
27610impl SendPhoneNumberConfirmationCode {
27611 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
27612 pub fn builder() -> RTDSendPhoneNumberConfirmationCodeBuilder {
27613 let mut inner = SendPhoneNumberConfirmationCode::default();
27614 inner.td_name = "sendPhoneNumberConfirmationCode".to_string();
27615 inner.extra = Some(Uuid::new_v4().to_string());
27616 RTDSendPhoneNumberConfirmationCodeBuilder { inner }
27617 }
27618
27619 pub fn hash(&self) -> &String { &self.hash }
27620
27621 pub fn phone_number(&self) -> &String { &self.phone_number }
27622
27623 pub fn settings(&self) -> &PhoneNumberAuthenticationSettings { &self.settings }
27624
27625}
27626
27627#[doc(hidden)]
27628pub struct RTDSendPhoneNumberConfirmationCodeBuilder {
27629 inner: SendPhoneNumberConfirmationCode
27630}
27631
27632impl RTDSendPhoneNumberConfirmationCodeBuilder {
27633 pub fn build(&self) -> SendPhoneNumberConfirmationCode { self.inner.clone() }
27634
27635
27636 pub fn hash<T: AsRef<str>>(&mut self, hash: T) -> &mut Self {
27637 self.inner.hash = hash.as_ref().to_string();
27638 self
27639 }
27640
27641
27642 pub fn phone_number<T: AsRef<str>>(&mut self, phone_number: T) -> &mut Self {
27643 self.inner.phone_number = phone_number.as_ref().to_string();
27644 self
27645 }
27646
27647
27648 pub fn settings<T: AsRef<PhoneNumberAuthenticationSettings>>(&mut self, settings: T) -> &mut Self {
27649 self.inner.settings = settings.as_ref().clone();
27650 self
27651 }
27652
27653}
27654
27655impl AsRef<SendPhoneNumberConfirmationCode> for SendPhoneNumberConfirmationCode {
27656 fn as_ref(&self) -> &SendPhoneNumberConfirmationCode { self }
27657}
27658
27659impl AsRef<SendPhoneNumberConfirmationCode> for RTDSendPhoneNumberConfirmationCodeBuilder {
27660 fn as_ref(&self) -> &SendPhoneNumberConfirmationCode { &self.inner }
27661}
27662
27663
27664
27665
27666
27667
27668
27669#[derive(Debug, Clone, Default, Serialize, Deserialize)]
27671pub struct SendPhoneNumberVerificationCode {
27672 #[doc(hidden)]
27673 #[serde(rename(serialize = "@type", deserialize = "@type"))]
27674 td_name: String,
27675 #[doc(hidden)]
27676 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
27677 extra: Option<String>,
27678 phone_number: String,
27680 settings: PhoneNumberAuthenticationSettings,
27682
27683}
27684
27685impl RObject for SendPhoneNumberVerificationCode {
27686 #[doc(hidden)] fn td_name(&self) -> &'static str { "sendPhoneNumberVerificationCode" }
27687 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
27688 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
27689}
27690
27691
27692
27693
27694impl RFunction for SendPhoneNumberVerificationCode {}
27695
27696impl SendPhoneNumberVerificationCode {
27697 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
27698 pub fn builder() -> RTDSendPhoneNumberVerificationCodeBuilder {
27699 let mut inner = SendPhoneNumberVerificationCode::default();
27700 inner.td_name = "sendPhoneNumberVerificationCode".to_string();
27701 inner.extra = Some(Uuid::new_v4().to_string());
27702 RTDSendPhoneNumberVerificationCodeBuilder { inner }
27703 }
27704
27705 pub fn phone_number(&self) -> &String { &self.phone_number }
27706
27707 pub fn settings(&self) -> &PhoneNumberAuthenticationSettings { &self.settings }
27708
27709}
27710
27711#[doc(hidden)]
27712pub struct RTDSendPhoneNumberVerificationCodeBuilder {
27713 inner: SendPhoneNumberVerificationCode
27714}
27715
27716impl RTDSendPhoneNumberVerificationCodeBuilder {
27717 pub fn build(&self) -> SendPhoneNumberVerificationCode { self.inner.clone() }
27718
27719
27720 pub fn phone_number<T: AsRef<str>>(&mut self, phone_number: T) -> &mut Self {
27721 self.inner.phone_number = phone_number.as_ref().to_string();
27722 self
27723 }
27724
27725
27726 pub fn settings<T: AsRef<PhoneNumberAuthenticationSettings>>(&mut self, settings: T) -> &mut Self {
27727 self.inner.settings = settings.as_ref().clone();
27728 self
27729 }
27730
27731}
27732
27733impl AsRef<SendPhoneNumberVerificationCode> for SendPhoneNumberVerificationCode {
27734 fn as_ref(&self) -> &SendPhoneNumberVerificationCode { self }
27735}
27736
27737impl AsRef<SendPhoneNumberVerificationCode> for RTDSendPhoneNumberVerificationCodeBuilder {
27738 fn as_ref(&self) -> &SendPhoneNumberVerificationCode { &self.inner }
27739}
27740
27741
27742
27743
27744
27745
27746
27747#[derive(Debug, Clone, Default, Serialize, Deserialize)]
27749pub struct SetAccountTtl {
27750 #[doc(hidden)]
27751 #[serde(rename(serialize = "@type", deserialize = "@type"))]
27752 td_name: String,
27753 #[doc(hidden)]
27754 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
27755 extra: Option<String>,
27756 ttl: AccountTtl,
27758
27759}
27760
27761impl RObject for SetAccountTtl {
27762 #[doc(hidden)] fn td_name(&self) -> &'static str { "setAccountTtl" }
27763 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
27764 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
27765}
27766
27767
27768
27769
27770impl RFunction for SetAccountTtl {}
27771
27772impl SetAccountTtl {
27773 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
27774 pub fn builder() -> RTDSetAccountTtlBuilder {
27775 let mut inner = SetAccountTtl::default();
27776 inner.td_name = "setAccountTtl".to_string();
27777 inner.extra = Some(Uuid::new_v4().to_string());
27778 RTDSetAccountTtlBuilder { inner }
27779 }
27780
27781 pub fn ttl(&self) -> &AccountTtl { &self.ttl }
27782
27783}
27784
27785#[doc(hidden)]
27786pub struct RTDSetAccountTtlBuilder {
27787 inner: SetAccountTtl
27788}
27789
27790impl RTDSetAccountTtlBuilder {
27791 pub fn build(&self) -> SetAccountTtl { self.inner.clone() }
27792
27793
27794 pub fn ttl<T: AsRef<AccountTtl>>(&mut self, ttl: T) -> &mut Self {
27795 self.inner.ttl = ttl.as_ref().clone();
27796 self
27797 }
27798
27799}
27800
27801impl AsRef<SetAccountTtl> for SetAccountTtl {
27802 fn as_ref(&self) -> &SetAccountTtl { self }
27803}
27804
27805impl AsRef<SetAccountTtl> for RTDSetAccountTtlBuilder {
27806 fn as_ref(&self) -> &SetAccountTtl { &self.inner }
27807}
27808
27809
27810
27811
27812
27813
27814
27815#[derive(Debug, Clone, Default, Serialize, Deserialize)]
27817pub struct SetAlarm {
27818 #[doc(hidden)]
27819 #[serde(rename(serialize = "@type", deserialize = "@type"))]
27820 td_name: String,
27821 #[doc(hidden)]
27822 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
27823 extra: Option<String>,
27824 seconds: f32,
27826
27827}
27828
27829impl RObject for SetAlarm {
27830 #[doc(hidden)] fn td_name(&self) -> &'static str { "setAlarm" }
27831 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
27832 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
27833}
27834
27835
27836
27837
27838impl RFunction for SetAlarm {}
27839
27840impl SetAlarm {
27841 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
27842 pub fn builder() -> RTDSetAlarmBuilder {
27843 let mut inner = SetAlarm::default();
27844 inner.td_name = "setAlarm".to_string();
27845 inner.extra = Some(Uuid::new_v4().to_string());
27846 RTDSetAlarmBuilder { inner }
27847 }
27848
27849 pub fn seconds(&self) -> f32 { self.seconds }
27850
27851}
27852
27853#[doc(hidden)]
27854pub struct RTDSetAlarmBuilder {
27855 inner: SetAlarm
27856}
27857
27858impl RTDSetAlarmBuilder {
27859 pub fn build(&self) -> SetAlarm { self.inner.clone() }
27860
27861
27862 pub fn seconds(&mut self, seconds: f32) -> &mut Self {
27863 self.inner.seconds = seconds;
27864 self
27865 }
27866
27867}
27868
27869impl AsRef<SetAlarm> for SetAlarm {
27870 fn as_ref(&self) -> &SetAlarm { self }
27871}
27872
27873impl AsRef<SetAlarm> for RTDSetAlarmBuilder {
27874 fn as_ref(&self) -> &SetAlarm { &self.inner }
27875}
27876
27877
27878
27879
27880
27881
27882
27883#[derive(Debug, Clone, Default, Serialize, Deserialize)]
27885pub struct SetAuthenticationPhoneNumber {
27886 #[doc(hidden)]
27887 #[serde(rename(serialize = "@type", deserialize = "@type"))]
27888 td_name: String,
27889 #[doc(hidden)]
27890 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
27891 extra: Option<String>,
27892 phone_number: String,
27894 settings: PhoneNumberAuthenticationSettings,
27896
27897}
27898
27899impl RObject for SetAuthenticationPhoneNumber {
27900 #[doc(hidden)] fn td_name(&self) -> &'static str { "setAuthenticationPhoneNumber" }
27901 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
27902 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
27903}
27904
27905
27906
27907
27908impl RFunction for SetAuthenticationPhoneNumber {}
27909
27910impl SetAuthenticationPhoneNumber {
27911 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
27912 pub fn builder() -> RTDSetAuthenticationPhoneNumberBuilder {
27913 let mut inner = SetAuthenticationPhoneNumber::default();
27914 inner.td_name = "setAuthenticationPhoneNumber".to_string();
27915 inner.extra = Some(Uuid::new_v4().to_string());
27916 RTDSetAuthenticationPhoneNumberBuilder { inner }
27917 }
27918
27919 pub fn phone_number(&self) -> &String { &self.phone_number }
27920
27921 pub fn settings(&self) -> &PhoneNumberAuthenticationSettings { &self.settings }
27922
27923}
27924
27925#[doc(hidden)]
27926pub struct RTDSetAuthenticationPhoneNumberBuilder {
27927 inner: SetAuthenticationPhoneNumber
27928}
27929
27930impl RTDSetAuthenticationPhoneNumberBuilder {
27931 pub fn build(&self) -> SetAuthenticationPhoneNumber { self.inner.clone() }
27932
27933
27934 pub fn phone_number<T: AsRef<str>>(&mut self, phone_number: T) -> &mut Self {
27935 self.inner.phone_number = phone_number.as_ref().to_string();
27936 self
27937 }
27938
27939
27940 pub fn settings<T: AsRef<PhoneNumberAuthenticationSettings>>(&mut self, settings: T) -> &mut Self {
27941 self.inner.settings = settings.as_ref().clone();
27942 self
27943 }
27944
27945}
27946
27947impl AsRef<SetAuthenticationPhoneNumber> for SetAuthenticationPhoneNumber {
27948 fn as_ref(&self) -> &SetAuthenticationPhoneNumber { self }
27949}
27950
27951impl AsRef<SetAuthenticationPhoneNumber> for RTDSetAuthenticationPhoneNumberBuilder {
27952 fn as_ref(&self) -> &SetAuthenticationPhoneNumber { &self.inner }
27953}
27954
27955
27956
27957
27958
27959
27960
27961#[derive(Debug, Clone, Default, Serialize, Deserialize)]
27963pub struct SetAutoDownloadSettings {
27964 #[doc(hidden)]
27965 #[serde(rename(serialize = "@type", deserialize = "@type"))]
27966 td_name: String,
27967 #[doc(hidden)]
27968 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
27969 extra: Option<String>,
27970 settings: AutoDownloadSettings,
27972 #[serde(rename(serialize = "type", deserialize = "type"))] type_: NetworkType,
27974
27975}
27976
27977impl RObject for SetAutoDownloadSettings {
27978 #[doc(hidden)] fn td_name(&self) -> &'static str { "setAutoDownloadSettings" }
27979 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
27980 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
27981}
27982
27983
27984
27985
27986impl RFunction for SetAutoDownloadSettings {}
27987
27988impl SetAutoDownloadSettings {
27989 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
27990 pub fn builder() -> RTDSetAutoDownloadSettingsBuilder {
27991 let mut inner = SetAutoDownloadSettings::default();
27992 inner.td_name = "setAutoDownloadSettings".to_string();
27993 inner.extra = Some(Uuid::new_v4().to_string());
27994 RTDSetAutoDownloadSettingsBuilder { inner }
27995 }
27996
27997 pub fn settings(&self) -> &AutoDownloadSettings { &self.settings }
27998
27999 pub fn type_(&self) -> &NetworkType { &self.type_ }
28000
28001}
28002
28003#[doc(hidden)]
28004pub struct RTDSetAutoDownloadSettingsBuilder {
28005 inner: SetAutoDownloadSettings
28006}
28007
28008impl RTDSetAutoDownloadSettingsBuilder {
28009 pub fn build(&self) -> SetAutoDownloadSettings { self.inner.clone() }
28010
28011
28012 pub fn settings<T: AsRef<AutoDownloadSettings>>(&mut self, settings: T) -> &mut Self {
28013 self.inner.settings = settings.as_ref().clone();
28014 self
28015 }
28016
28017
28018 pub fn type_<T: AsRef<NetworkType>>(&mut self, type_: T) -> &mut Self {
28019 self.inner.type_ = type_.as_ref().clone();
28020 self
28021 }
28022
28023}
28024
28025impl AsRef<SetAutoDownloadSettings> for SetAutoDownloadSettings {
28026 fn as_ref(&self) -> &SetAutoDownloadSettings { self }
28027}
28028
28029impl AsRef<SetAutoDownloadSettings> for RTDSetAutoDownloadSettingsBuilder {
28030 fn as_ref(&self) -> &SetAutoDownloadSettings { &self.inner }
28031}
28032
28033
28034
28035
28036
28037
28038
28039#[derive(Debug, Clone, Default, Serialize, Deserialize)]
28041pub struct SetBackground {
28042 #[doc(hidden)]
28043 #[serde(rename(serialize = "@type", deserialize = "@type"))]
28044 td_name: String,
28045 #[doc(hidden)]
28046 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
28047 extra: Option<String>,
28048 background: InputBackground,
28050 #[serde(rename(serialize = "type", deserialize = "type"))] type_: BackgroundType,
28052 for_dark_theme: bool,
28054
28055}
28056
28057impl RObject for SetBackground {
28058 #[doc(hidden)] fn td_name(&self) -> &'static str { "setBackground" }
28059 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
28060 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
28061}
28062
28063
28064
28065
28066impl RFunction for SetBackground {}
28067
28068impl SetBackground {
28069 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
28070 pub fn builder() -> RTDSetBackgroundBuilder {
28071 let mut inner = SetBackground::default();
28072 inner.td_name = "setBackground".to_string();
28073 inner.extra = Some(Uuid::new_v4().to_string());
28074 RTDSetBackgroundBuilder { inner }
28075 }
28076
28077 pub fn background(&self) -> &InputBackground { &self.background }
28078
28079 pub fn type_(&self) -> &BackgroundType { &self.type_ }
28080
28081 pub fn for_dark_theme(&self) -> bool { self.for_dark_theme }
28082
28083}
28084
28085#[doc(hidden)]
28086pub struct RTDSetBackgroundBuilder {
28087 inner: SetBackground
28088}
28089
28090impl RTDSetBackgroundBuilder {
28091 pub fn build(&self) -> SetBackground { self.inner.clone() }
28092
28093
28094 pub fn background<T: AsRef<InputBackground>>(&mut self, background: T) -> &mut Self {
28095 self.inner.background = background.as_ref().clone();
28096 self
28097 }
28098
28099
28100 pub fn type_<T: AsRef<BackgroundType>>(&mut self, type_: T) -> &mut Self {
28101 self.inner.type_ = type_.as_ref().clone();
28102 self
28103 }
28104
28105
28106 pub fn for_dark_theme(&mut self, for_dark_theme: bool) -> &mut Self {
28107 self.inner.for_dark_theme = for_dark_theme;
28108 self
28109 }
28110
28111}
28112
28113impl AsRef<SetBackground> for SetBackground {
28114 fn as_ref(&self) -> &SetBackground { self }
28115}
28116
28117impl AsRef<SetBackground> for RTDSetBackgroundBuilder {
28118 fn as_ref(&self) -> &SetBackground { &self.inner }
28119}
28120
28121
28122
28123
28124
28125
28126
28127#[derive(Debug, Clone, Default, Serialize, Deserialize)]
28129pub struct SetBio {
28130 #[doc(hidden)]
28131 #[serde(rename(serialize = "@type", deserialize = "@type"))]
28132 td_name: String,
28133 #[doc(hidden)]
28134 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
28135 extra: Option<String>,
28136 bio: String,
28138
28139}
28140
28141impl RObject for SetBio {
28142 #[doc(hidden)] fn td_name(&self) -> &'static str { "setBio" }
28143 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
28144 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
28145}
28146
28147
28148
28149
28150impl RFunction for SetBio {}
28151
28152impl SetBio {
28153 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
28154 pub fn builder() -> RTDSetBioBuilder {
28155 let mut inner = SetBio::default();
28156 inner.td_name = "setBio".to_string();
28157 inner.extra = Some(Uuid::new_v4().to_string());
28158 RTDSetBioBuilder { inner }
28159 }
28160
28161 pub fn bio(&self) -> &String { &self.bio }
28162
28163}
28164
28165#[doc(hidden)]
28166pub struct RTDSetBioBuilder {
28167 inner: SetBio
28168}
28169
28170impl RTDSetBioBuilder {
28171 pub fn build(&self) -> SetBio { self.inner.clone() }
28172
28173
28174 pub fn bio<T: AsRef<str>>(&mut self, bio: T) -> &mut Self {
28175 self.inner.bio = bio.as_ref().to_string();
28176 self
28177 }
28178
28179}
28180
28181impl AsRef<SetBio> for SetBio {
28182 fn as_ref(&self) -> &SetBio { self }
28183}
28184
28185impl AsRef<SetBio> for RTDSetBioBuilder {
28186 fn as_ref(&self) -> &SetBio { &self.inner }
28187}
28188
28189
28190
28191
28192
28193
28194
28195#[derive(Debug, Clone, Default, Serialize, Deserialize)]
28197pub struct SetBotUpdatesStatus {
28198 #[doc(hidden)]
28199 #[serde(rename(serialize = "@type", deserialize = "@type"))]
28200 td_name: String,
28201 #[doc(hidden)]
28202 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
28203 extra: Option<String>,
28204 pending_update_count: i64,
28206 error_message: String,
28208
28209}
28210
28211impl RObject for SetBotUpdatesStatus {
28212 #[doc(hidden)] fn td_name(&self) -> &'static str { "setBotUpdatesStatus" }
28213 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
28214 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
28215}
28216
28217
28218
28219
28220impl RFunction for SetBotUpdatesStatus {}
28221
28222impl SetBotUpdatesStatus {
28223 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
28224 pub fn builder() -> RTDSetBotUpdatesStatusBuilder {
28225 let mut inner = SetBotUpdatesStatus::default();
28226 inner.td_name = "setBotUpdatesStatus".to_string();
28227 inner.extra = Some(Uuid::new_v4().to_string());
28228 RTDSetBotUpdatesStatusBuilder { inner }
28229 }
28230
28231 pub fn pending_update_count(&self) -> i64 { self.pending_update_count }
28232
28233 pub fn error_message(&self) -> &String { &self.error_message }
28234
28235}
28236
28237#[doc(hidden)]
28238pub struct RTDSetBotUpdatesStatusBuilder {
28239 inner: SetBotUpdatesStatus
28240}
28241
28242impl RTDSetBotUpdatesStatusBuilder {
28243 pub fn build(&self) -> SetBotUpdatesStatus { self.inner.clone() }
28244
28245
28246 pub fn pending_update_count(&mut self, pending_update_count: i64) -> &mut Self {
28247 self.inner.pending_update_count = pending_update_count;
28248 self
28249 }
28250
28251
28252 pub fn error_message<T: AsRef<str>>(&mut self, error_message: T) -> &mut Self {
28253 self.inner.error_message = error_message.as_ref().to_string();
28254 self
28255 }
28256
28257}
28258
28259impl AsRef<SetBotUpdatesStatus> for SetBotUpdatesStatus {
28260 fn as_ref(&self) -> &SetBotUpdatesStatus { self }
28261}
28262
28263impl AsRef<SetBotUpdatesStatus> for RTDSetBotUpdatesStatusBuilder {
28264 fn as_ref(&self) -> &SetBotUpdatesStatus { &self.inner }
28265}
28266
28267
28268
28269
28270
28271
28272
28273#[derive(Debug, Clone, Default, Serialize, Deserialize)]
28275pub struct SetChatClientData {
28276 #[doc(hidden)]
28277 #[serde(rename(serialize = "@type", deserialize = "@type"))]
28278 td_name: String,
28279 #[doc(hidden)]
28280 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
28281 extra: Option<String>,
28282 chat_id: i64,
28284 client_data: String,
28286
28287}
28288
28289impl RObject for SetChatClientData {
28290 #[doc(hidden)] fn td_name(&self) -> &'static str { "setChatClientData" }
28291 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
28292 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
28293}
28294
28295
28296
28297
28298impl RFunction for SetChatClientData {}
28299
28300impl SetChatClientData {
28301 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
28302 pub fn builder() -> RTDSetChatClientDataBuilder {
28303 let mut inner = SetChatClientData::default();
28304 inner.td_name = "setChatClientData".to_string();
28305 inner.extra = Some(Uuid::new_v4().to_string());
28306 RTDSetChatClientDataBuilder { inner }
28307 }
28308
28309 pub fn chat_id(&self) -> i64 { self.chat_id }
28310
28311 pub fn client_data(&self) -> &String { &self.client_data }
28312
28313}
28314
28315#[doc(hidden)]
28316pub struct RTDSetChatClientDataBuilder {
28317 inner: SetChatClientData
28318}
28319
28320impl RTDSetChatClientDataBuilder {
28321 pub fn build(&self) -> SetChatClientData { self.inner.clone() }
28322
28323
28324 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
28325 self.inner.chat_id = chat_id;
28326 self
28327 }
28328
28329
28330 pub fn client_data<T: AsRef<str>>(&mut self, client_data: T) -> &mut Self {
28331 self.inner.client_data = client_data.as_ref().to_string();
28332 self
28333 }
28334
28335}
28336
28337impl AsRef<SetChatClientData> for SetChatClientData {
28338 fn as_ref(&self) -> &SetChatClientData { self }
28339}
28340
28341impl AsRef<SetChatClientData> for RTDSetChatClientDataBuilder {
28342 fn as_ref(&self) -> &SetChatClientData { &self.inner }
28343}
28344
28345
28346
28347
28348
28349
28350
28351#[derive(Debug, Clone, Default, Serialize, Deserialize)]
28353pub struct SetChatDescription {
28354 #[doc(hidden)]
28355 #[serde(rename(serialize = "@type", deserialize = "@type"))]
28356 td_name: String,
28357 #[doc(hidden)]
28358 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
28359 extra: Option<String>,
28360 chat_id: i64,
28362 description: String,
28364
28365}
28366
28367impl RObject for SetChatDescription {
28368 #[doc(hidden)] fn td_name(&self) -> &'static str { "setChatDescription" }
28369 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
28370 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
28371}
28372
28373
28374
28375
28376impl RFunction for SetChatDescription {}
28377
28378impl SetChatDescription {
28379 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
28380 pub fn builder() -> RTDSetChatDescriptionBuilder {
28381 let mut inner = SetChatDescription::default();
28382 inner.td_name = "setChatDescription".to_string();
28383 inner.extra = Some(Uuid::new_v4().to_string());
28384 RTDSetChatDescriptionBuilder { inner }
28385 }
28386
28387 pub fn chat_id(&self) -> i64 { self.chat_id }
28388
28389 pub fn description(&self) -> &String { &self.description }
28390
28391}
28392
28393#[doc(hidden)]
28394pub struct RTDSetChatDescriptionBuilder {
28395 inner: SetChatDescription
28396}
28397
28398impl RTDSetChatDescriptionBuilder {
28399 pub fn build(&self) -> SetChatDescription { self.inner.clone() }
28400
28401
28402 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
28403 self.inner.chat_id = chat_id;
28404 self
28405 }
28406
28407
28408 pub fn description<T: AsRef<str>>(&mut self, description: T) -> &mut Self {
28409 self.inner.description = description.as_ref().to_string();
28410 self
28411 }
28412
28413}
28414
28415impl AsRef<SetChatDescription> for SetChatDescription {
28416 fn as_ref(&self) -> &SetChatDescription { self }
28417}
28418
28419impl AsRef<SetChatDescription> for RTDSetChatDescriptionBuilder {
28420 fn as_ref(&self) -> &SetChatDescription { &self.inner }
28421}
28422
28423
28424
28425
28426
28427
28428
28429#[derive(Debug, Clone, Default, Serialize, Deserialize)]
28431pub struct SetChatDiscussionGroup {
28432 #[doc(hidden)]
28433 #[serde(rename(serialize = "@type", deserialize = "@type"))]
28434 td_name: String,
28435 #[doc(hidden)]
28436 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
28437 extra: Option<String>,
28438 chat_id: i64,
28440 discussion_chat_id: i64,
28442
28443}
28444
28445impl RObject for SetChatDiscussionGroup {
28446 #[doc(hidden)] fn td_name(&self) -> &'static str { "setChatDiscussionGroup" }
28447 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
28448 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
28449}
28450
28451
28452
28453
28454impl RFunction for SetChatDiscussionGroup {}
28455
28456impl SetChatDiscussionGroup {
28457 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
28458 pub fn builder() -> RTDSetChatDiscussionGroupBuilder {
28459 let mut inner = SetChatDiscussionGroup::default();
28460 inner.td_name = "setChatDiscussionGroup".to_string();
28461 inner.extra = Some(Uuid::new_v4().to_string());
28462 RTDSetChatDiscussionGroupBuilder { inner }
28463 }
28464
28465 pub fn chat_id(&self) -> i64 { self.chat_id }
28466
28467 pub fn discussion_chat_id(&self) -> i64 { self.discussion_chat_id }
28468
28469}
28470
28471#[doc(hidden)]
28472pub struct RTDSetChatDiscussionGroupBuilder {
28473 inner: SetChatDiscussionGroup
28474}
28475
28476impl RTDSetChatDiscussionGroupBuilder {
28477 pub fn build(&self) -> SetChatDiscussionGroup { self.inner.clone() }
28478
28479
28480 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
28481 self.inner.chat_id = chat_id;
28482 self
28483 }
28484
28485
28486 pub fn discussion_chat_id(&mut self, discussion_chat_id: i64) -> &mut Self {
28487 self.inner.discussion_chat_id = discussion_chat_id;
28488 self
28489 }
28490
28491}
28492
28493impl AsRef<SetChatDiscussionGroup> for SetChatDiscussionGroup {
28494 fn as_ref(&self) -> &SetChatDiscussionGroup { self }
28495}
28496
28497impl AsRef<SetChatDiscussionGroup> for RTDSetChatDiscussionGroupBuilder {
28498 fn as_ref(&self) -> &SetChatDiscussionGroup { &self.inner }
28499}
28500
28501
28502
28503
28504
28505
28506
28507#[derive(Debug, Clone, Default, Serialize, Deserialize)]
28509pub struct SetChatDraftMessage {
28510 #[doc(hidden)]
28511 #[serde(rename(serialize = "@type", deserialize = "@type"))]
28512 td_name: String,
28513 #[doc(hidden)]
28514 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
28515 extra: Option<String>,
28516 chat_id: i64,
28518 message_thread_id: i64,
28520 draft_message: DraftMessage,
28522
28523}
28524
28525impl RObject for SetChatDraftMessage {
28526 #[doc(hidden)] fn td_name(&self) -> &'static str { "setChatDraftMessage" }
28527 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
28528 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
28529}
28530
28531
28532
28533
28534impl RFunction for SetChatDraftMessage {}
28535
28536impl SetChatDraftMessage {
28537 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
28538 pub fn builder() -> RTDSetChatDraftMessageBuilder {
28539 let mut inner = SetChatDraftMessage::default();
28540 inner.td_name = "setChatDraftMessage".to_string();
28541 inner.extra = Some(Uuid::new_v4().to_string());
28542 RTDSetChatDraftMessageBuilder { inner }
28543 }
28544
28545 pub fn chat_id(&self) -> i64 { self.chat_id }
28546
28547 pub fn message_thread_id(&self) -> i64 { self.message_thread_id }
28548
28549 pub fn draft_message(&self) -> &DraftMessage { &self.draft_message }
28550
28551}
28552
28553#[doc(hidden)]
28554pub struct RTDSetChatDraftMessageBuilder {
28555 inner: SetChatDraftMessage
28556}
28557
28558impl RTDSetChatDraftMessageBuilder {
28559 pub fn build(&self) -> SetChatDraftMessage { self.inner.clone() }
28560
28561
28562 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
28563 self.inner.chat_id = chat_id;
28564 self
28565 }
28566
28567
28568 pub fn message_thread_id(&mut self, message_thread_id: i64) -> &mut Self {
28569 self.inner.message_thread_id = message_thread_id;
28570 self
28571 }
28572
28573
28574 pub fn draft_message<T: AsRef<DraftMessage>>(&mut self, draft_message: T) -> &mut Self {
28575 self.inner.draft_message = draft_message.as_ref().clone();
28576 self
28577 }
28578
28579}
28580
28581impl AsRef<SetChatDraftMessage> for SetChatDraftMessage {
28582 fn as_ref(&self) -> &SetChatDraftMessage { self }
28583}
28584
28585impl AsRef<SetChatDraftMessage> for RTDSetChatDraftMessageBuilder {
28586 fn as_ref(&self) -> &SetChatDraftMessage { &self.inner }
28587}
28588
28589
28590
28591
28592
28593
28594
28595#[derive(Debug, Clone, Default, Serialize, Deserialize)]
28597pub struct SetChatLocation {
28598 #[doc(hidden)]
28599 #[serde(rename(serialize = "@type", deserialize = "@type"))]
28600 td_name: String,
28601 #[doc(hidden)]
28602 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
28603 extra: Option<String>,
28604 chat_id: i64,
28606 location: ChatLocation,
28608
28609}
28610
28611impl RObject for SetChatLocation {
28612 #[doc(hidden)] fn td_name(&self) -> &'static str { "setChatLocation" }
28613 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
28614 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
28615}
28616
28617
28618
28619
28620impl RFunction for SetChatLocation {}
28621
28622impl SetChatLocation {
28623 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
28624 pub fn builder() -> RTDSetChatLocationBuilder {
28625 let mut inner = SetChatLocation::default();
28626 inner.td_name = "setChatLocation".to_string();
28627 inner.extra = Some(Uuid::new_v4().to_string());
28628 RTDSetChatLocationBuilder { inner }
28629 }
28630
28631 pub fn chat_id(&self) -> i64 { self.chat_id }
28632
28633 pub fn location(&self) -> &ChatLocation { &self.location }
28634
28635}
28636
28637#[doc(hidden)]
28638pub struct RTDSetChatLocationBuilder {
28639 inner: SetChatLocation
28640}
28641
28642impl RTDSetChatLocationBuilder {
28643 pub fn build(&self) -> SetChatLocation { self.inner.clone() }
28644
28645
28646 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
28647 self.inner.chat_id = chat_id;
28648 self
28649 }
28650
28651
28652 pub fn location<T: AsRef<ChatLocation>>(&mut self, location: T) -> &mut Self {
28653 self.inner.location = location.as_ref().clone();
28654 self
28655 }
28656
28657}
28658
28659impl AsRef<SetChatLocation> for SetChatLocation {
28660 fn as_ref(&self) -> &SetChatLocation { self }
28661}
28662
28663impl AsRef<SetChatLocation> for RTDSetChatLocationBuilder {
28664 fn as_ref(&self) -> &SetChatLocation { &self.inner }
28665}
28666
28667
28668
28669
28670
28671
28672
28673#[derive(Debug, Clone, Default, Serialize, Deserialize)]
28675pub struct SetChatMemberStatus {
28676 #[doc(hidden)]
28677 #[serde(rename(serialize = "@type", deserialize = "@type"))]
28678 td_name: String,
28679 #[doc(hidden)]
28680 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
28681 extra: Option<String>,
28682 chat_id: i64,
28684 member_id: MessageSender,
28686 status: ChatMemberStatus,
28688
28689}
28690
28691impl RObject for SetChatMemberStatus {
28692 #[doc(hidden)] fn td_name(&self) -> &'static str { "setChatMemberStatus" }
28693 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
28694 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
28695}
28696
28697
28698
28699
28700impl RFunction for SetChatMemberStatus {}
28701
28702impl SetChatMemberStatus {
28703 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
28704 pub fn builder() -> RTDSetChatMemberStatusBuilder {
28705 let mut inner = SetChatMemberStatus::default();
28706 inner.td_name = "setChatMemberStatus".to_string();
28707 inner.extra = Some(Uuid::new_v4().to_string());
28708 RTDSetChatMemberStatusBuilder { inner }
28709 }
28710
28711 pub fn chat_id(&self) -> i64 { self.chat_id }
28712
28713 pub fn member_id(&self) -> &MessageSender { &self.member_id }
28714
28715 pub fn status(&self) -> &ChatMemberStatus { &self.status }
28716
28717}
28718
28719#[doc(hidden)]
28720pub struct RTDSetChatMemberStatusBuilder {
28721 inner: SetChatMemberStatus
28722}
28723
28724impl RTDSetChatMemberStatusBuilder {
28725 pub fn build(&self) -> SetChatMemberStatus { self.inner.clone() }
28726
28727
28728 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
28729 self.inner.chat_id = chat_id;
28730 self
28731 }
28732
28733
28734 pub fn member_id<T: AsRef<MessageSender>>(&mut self, member_id: T) -> &mut Self {
28735 self.inner.member_id = member_id.as_ref().clone();
28736 self
28737 }
28738
28739
28740 pub fn status<T: AsRef<ChatMemberStatus>>(&mut self, status: T) -> &mut Self {
28741 self.inner.status = status.as_ref().clone();
28742 self
28743 }
28744
28745}
28746
28747impl AsRef<SetChatMemberStatus> for SetChatMemberStatus {
28748 fn as_ref(&self) -> &SetChatMemberStatus { self }
28749}
28750
28751impl AsRef<SetChatMemberStatus> for RTDSetChatMemberStatusBuilder {
28752 fn as_ref(&self) -> &SetChatMemberStatus { &self.inner }
28753}
28754
28755
28756
28757
28758
28759
28760
28761#[derive(Debug, Clone, Default, Serialize, Deserialize)]
28763pub struct SetChatMessageSender {
28764 #[doc(hidden)]
28765 #[serde(rename(serialize = "@type", deserialize = "@type"))]
28766 td_name: String,
28767 #[doc(hidden)]
28768 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
28769 extra: Option<String>,
28770 chat_id: i64,
28772 message_sender_id: MessageSender,
28774
28775}
28776
28777impl RObject for SetChatMessageSender {
28778 #[doc(hidden)] fn td_name(&self) -> &'static str { "setChatMessageSender" }
28779 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
28780 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
28781}
28782
28783
28784
28785
28786impl RFunction for SetChatMessageSender {}
28787
28788impl SetChatMessageSender {
28789 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
28790 pub fn builder() -> RTDSetChatMessageSenderBuilder {
28791 let mut inner = SetChatMessageSender::default();
28792 inner.td_name = "setChatMessageSender".to_string();
28793 inner.extra = Some(Uuid::new_v4().to_string());
28794 RTDSetChatMessageSenderBuilder { inner }
28795 }
28796
28797 pub fn chat_id(&self) -> i64 { self.chat_id }
28798
28799 pub fn message_sender_id(&self) -> &MessageSender { &self.message_sender_id }
28800
28801}
28802
28803#[doc(hidden)]
28804pub struct RTDSetChatMessageSenderBuilder {
28805 inner: SetChatMessageSender
28806}
28807
28808impl RTDSetChatMessageSenderBuilder {
28809 pub fn build(&self) -> SetChatMessageSender { self.inner.clone() }
28810
28811
28812 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
28813 self.inner.chat_id = chat_id;
28814 self
28815 }
28816
28817
28818 pub fn message_sender_id<T: AsRef<MessageSender>>(&mut self, message_sender_id: T) -> &mut Self {
28819 self.inner.message_sender_id = message_sender_id.as_ref().clone();
28820 self
28821 }
28822
28823}
28824
28825impl AsRef<SetChatMessageSender> for SetChatMessageSender {
28826 fn as_ref(&self) -> &SetChatMessageSender { self }
28827}
28828
28829impl AsRef<SetChatMessageSender> for RTDSetChatMessageSenderBuilder {
28830 fn as_ref(&self) -> &SetChatMessageSender { &self.inner }
28831}
28832
28833
28834
28835
28836
28837
28838
28839#[derive(Debug, Clone, Default, Serialize, Deserialize)]
28841pub struct SetChatMessageTtl {
28842 #[doc(hidden)]
28843 #[serde(rename(serialize = "@type", deserialize = "@type"))]
28844 td_name: String,
28845 #[doc(hidden)]
28846 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
28847 extra: Option<String>,
28848 chat_id: i64,
28850 ttl: i64,
28852
28853}
28854
28855impl RObject for SetChatMessageTtl {
28856 #[doc(hidden)] fn td_name(&self) -> &'static str { "setChatMessageTtl" }
28857 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
28858 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
28859}
28860
28861
28862
28863
28864impl RFunction for SetChatMessageTtl {}
28865
28866impl SetChatMessageTtl {
28867 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
28868 pub fn builder() -> RTDSetChatMessageTtlBuilder {
28869 let mut inner = SetChatMessageTtl::default();
28870 inner.td_name = "setChatMessageTtl".to_string();
28871 inner.extra = Some(Uuid::new_v4().to_string());
28872 RTDSetChatMessageTtlBuilder { inner }
28873 }
28874
28875 pub fn chat_id(&self) -> i64 { self.chat_id }
28876
28877 pub fn ttl(&self) -> i64 { self.ttl }
28878
28879}
28880
28881#[doc(hidden)]
28882pub struct RTDSetChatMessageTtlBuilder {
28883 inner: SetChatMessageTtl
28884}
28885
28886impl RTDSetChatMessageTtlBuilder {
28887 pub fn build(&self) -> SetChatMessageTtl { self.inner.clone() }
28888
28889
28890 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
28891 self.inner.chat_id = chat_id;
28892 self
28893 }
28894
28895
28896 pub fn ttl(&mut self, ttl: i64) -> &mut Self {
28897 self.inner.ttl = ttl;
28898 self
28899 }
28900
28901}
28902
28903impl AsRef<SetChatMessageTtl> for SetChatMessageTtl {
28904 fn as_ref(&self) -> &SetChatMessageTtl { self }
28905}
28906
28907impl AsRef<SetChatMessageTtl> for RTDSetChatMessageTtlBuilder {
28908 fn as_ref(&self) -> &SetChatMessageTtl { &self.inner }
28909}
28910
28911
28912
28913
28914
28915
28916
28917#[derive(Debug, Clone, Default, Serialize, Deserialize)]
28919pub struct SetChatNotificationSettings {
28920 #[doc(hidden)]
28921 #[serde(rename(serialize = "@type", deserialize = "@type"))]
28922 td_name: String,
28923 #[doc(hidden)]
28924 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
28925 extra: Option<String>,
28926 chat_id: i64,
28928 notification_settings: ChatNotificationSettings,
28930
28931}
28932
28933impl RObject for SetChatNotificationSettings {
28934 #[doc(hidden)] fn td_name(&self) -> &'static str { "setChatNotificationSettings" }
28935 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
28936 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
28937}
28938
28939
28940
28941
28942impl RFunction for SetChatNotificationSettings {}
28943
28944impl SetChatNotificationSettings {
28945 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
28946 pub fn builder() -> RTDSetChatNotificationSettingsBuilder {
28947 let mut inner = SetChatNotificationSettings::default();
28948 inner.td_name = "setChatNotificationSettings".to_string();
28949 inner.extra = Some(Uuid::new_v4().to_string());
28950 RTDSetChatNotificationSettingsBuilder { inner }
28951 }
28952
28953 pub fn chat_id(&self) -> i64 { self.chat_id }
28954
28955 pub fn notification_settings(&self) -> &ChatNotificationSettings { &self.notification_settings }
28956
28957}
28958
28959#[doc(hidden)]
28960pub struct RTDSetChatNotificationSettingsBuilder {
28961 inner: SetChatNotificationSettings
28962}
28963
28964impl RTDSetChatNotificationSettingsBuilder {
28965 pub fn build(&self) -> SetChatNotificationSettings { self.inner.clone() }
28966
28967
28968 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
28969 self.inner.chat_id = chat_id;
28970 self
28971 }
28972
28973
28974 pub fn notification_settings<T: AsRef<ChatNotificationSettings>>(&mut self, notification_settings: T) -> &mut Self {
28975 self.inner.notification_settings = notification_settings.as_ref().clone();
28976 self
28977 }
28978
28979}
28980
28981impl AsRef<SetChatNotificationSettings> for SetChatNotificationSettings {
28982 fn as_ref(&self) -> &SetChatNotificationSettings { self }
28983}
28984
28985impl AsRef<SetChatNotificationSettings> for RTDSetChatNotificationSettingsBuilder {
28986 fn as_ref(&self) -> &SetChatNotificationSettings { &self.inner }
28987}
28988
28989
28990
28991
28992
28993
28994
28995#[derive(Debug, Clone, Default, Serialize, Deserialize)]
28997pub struct SetChatPermissions {
28998 #[doc(hidden)]
28999 #[serde(rename(serialize = "@type", deserialize = "@type"))]
29000 td_name: String,
29001 #[doc(hidden)]
29002 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
29003 extra: Option<String>,
29004 chat_id: i64,
29006 permissions: ChatPermissions,
29008
29009}
29010
29011impl RObject for SetChatPermissions {
29012 #[doc(hidden)] fn td_name(&self) -> &'static str { "setChatPermissions" }
29013 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
29014 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
29015}
29016
29017
29018
29019
29020impl RFunction for SetChatPermissions {}
29021
29022impl SetChatPermissions {
29023 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
29024 pub fn builder() -> RTDSetChatPermissionsBuilder {
29025 let mut inner = SetChatPermissions::default();
29026 inner.td_name = "setChatPermissions".to_string();
29027 inner.extra = Some(Uuid::new_v4().to_string());
29028 RTDSetChatPermissionsBuilder { inner }
29029 }
29030
29031 pub fn chat_id(&self) -> i64 { self.chat_id }
29032
29033 pub fn permissions(&self) -> &ChatPermissions { &self.permissions }
29034
29035}
29036
29037#[doc(hidden)]
29038pub struct RTDSetChatPermissionsBuilder {
29039 inner: SetChatPermissions
29040}
29041
29042impl RTDSetChatPermissionsBuilder {
29043 pub fn build(&self) -> SetChatPermissions { self.inner.clone() }
29044
29045
29046 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
29047 self.inner.chat_id = chat_id;
29048 self
29049 }
29050
29051
29052 pub fn permissions<T: AsRef<ChatPermissions>>(&mut self, permissions: T) -> &mut Self {
29053 self.inner.permissions = permissions.as_ref().clone();
29054 self
29055 }
29056
29057}
29058
29059impl AsRef<SetChatPermissions> for SetChatPermissions {
29060 fn as_ref(&self) -> &SetChatPermissions { self }
29061}
29062
29063impl AsRef<SetChatPermissions> for RTDSetChatPermissionsBuilder {
29064 fn as_ref(&self) -> &SetChatPermissions { &self.inner }
29065}
29066
29067
29068
29069
29070
29071
29072
29073#[derive(Debug, Clone, Default, Serialize, Deserialize)]
29075pub struct SetChatPhoto {
29076 #[doc(hidden)]
29077 #[serde(rename(serialize = "@type", deserialize = "@type"))]
29078 td_name: String,
29079 #[doc(hidden)]
29080 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
29081 extra: Option<String>,
29082 chat_id: i64,
29084 photo: InputChatPhoto,
29086
29087}
29088
29089impl RObject for SetChatPhoto {
29090 #[doc(hidden)] fn td_name(&self) -> &'static str { "setChatPhoto" }
29091 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
29092 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
29093}
29094
29095
29096
29097
29098impl RFunction for SetChatPhoto {}
29099
29100impl SetChatPhoto {
29101 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
29102 pub fn builder() -> RTDSetChatPhotoBuilder {
29103 let mut inner = SetChatPhoto::default();
29104 inner.td_name = "setChatPhoto".to_string();
29105 inner.extra = Some(Uuid::new_v4().to_string());
29106 RTDSetChatPhotoBuilder { inner }
29107 }
29108
29109 pub fn chat_id(&self) -> i64 { self.chat_id }
29110
29111 pub fn photo(&self) -> &InputChatPhoto { &self.photo }
29112
29113}
29114
29115#[doc(hidden)]
29116pub struct RTDSetChatPhotoBuilder {
29117 inner: SetChatPhoto
29118}
29119
29120impl RTDSetChatPhotoBuilder {
29121 pub fn build(&self) -> SetChatPhoto { self.inner.clone() }
29122
29123
29124 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
29125 self.inner.chat_id = chat_id;
29126 self
29127 }
29128
29129
29130 pub fn photo<T: AsRef<InputChatPhoto>>(&mut self, photo: T) -> &mut Self {
29131 self.inner.photo = photo.as_ref().clone();
29132 self
29133 }
29134
29135}
29136
29137impl AsRef<SetChatPhoto> for SetChatPhoto {
29138 fn as_ref(&self) -> &SetChatPhoto { self }
29139}
29140
29141impl AsRef<SetChatPhoto> for RTDSetChatPhotoBuilder {
29142 fn as_ref(&self) -> &SetChatPhoto { &self.inner }
29143}
29144
29145
29146
29147
29148
29149
29150
29151#[derive(Debug, Clone, Default, Serialize, Deserialize)]
29153pub struct SetChatSlowModeDelay {
29154 #[doc(hidden)]
29155 #[serde(rename(serialize = "@type", deserialize = "@type"))]
29156 td_name: String,
29157 #[doc(hidden)]
29158 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
29159 extra: Option<String>,
29160 chat_id: i64,
29162 slow_mode_delay: i64,
29164
29165}
29166
29167impl RObject for SetChatSlowModeDelay {
29168 #[doc(hidden)] fn td_name(&self) -> &'static str { "setChatSlowModeDelay" }
29169 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
29170 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
29171}
29172
29173
29174
29175
29176impl RFunction for SetChatSlowModeDelay {}
29177
29178impl SetChatSlowModeDelay {
29179 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
29180 pub fn builder() -> RTDSetChatSlowModeDelayBuilder {
29181 let mut inner = SetChatSlowModeDelay::default();
29182 inner.td_name = "setChatSlowModeDelay".to_string();
29183 inner.extra = Some(Uuid::new_v4().to_string());
29184 RTDSetChatSlowModeDelayBuilder { inner }
29185 }
29186
29187 pub fn chat_id(&self) -> i64 { self.chat_id }
29188
29189 pub fn slow_mode_delay(&self) -> i64 { self.slow_mode_delay }
29190
29191}
29192
29193#[doc(hidden)]
29194pub struct RTDSetChatSlowModeDelayBuilder {
29195 inner: SetChatSlowModeDelay
29196}
29197
29198impl RTDSetChatSlowModeDelayBuilder {
29199 pub fn build(&self) -> SetChatSlowModeDelay { self.inner.clone() }
29200
29201
29202 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
29203 self.inner.chat_id = chat_id;
29204 self
29205 }
29206
29207
29208 pub fn slow_mode_delay(&mut self, slow_mode_delay: i64) -> &mut Self {
29209 self.inner.slow_mode_delay = slow_mode_delay;
29210 self
29211 }
29212
29213}
29214
29215impl AsRef<SetChatSlowModeDelay> for SetChatSlowModeDelay {
29216 fn as_ref(&self) -> &SetChatSlowModeDelay { self }
29217}
29218
29219impl AsRef<SetChatSlowModeDelay> for RTDSetChatSlowModeDelayBuilder {
29220 fn as_ref(&self) -> &SetChatSlowModeDelay { &self.inner }
29221}
29222
29223
29224
29225
29226
29227
29228
29229#[derive(Debug, Clone, Default, Serialize, Deserialize)]
29231pub struct SetChatTheme {
29232 #[doc(hidden)]
29233 #[serde(rename(serialize = "@type", deserialize = "@type"))]
29234 td_name: String,
29235 #[doc(hidden)]
29236 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
29237 extra: Option<String>,
29238 chat_id: i64,
29240 theme_name: String,
29242
29243}
29244
29245impl RObject for SetChatTheme {
29246 #[doc(hidden)] fn td_name(&self) -> &'static str { "setChatTheme" }
29247 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
29248 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
29249}
29250
29251
29252
29253
29254impl RFunction for SetChatTheme {}
29255
29256impl SetChatTheme {
29257 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
29258 pub fn builder() -> RTDSetChatThemeBuilder {
29259 let mut inner = SetChatTheme::default();
29260 inner.td_name = "setChatTheme".to_string();
29261 inner.extra = Some(Uuid::new_v4().to_string());
29262 RTDSetChatThemeBuilder { inner }
29263 }
29264
29265 pub fn chat_id(&self) -> i64 { self.chat_id }
29266
29267 pub fn theme_name(&self) -> &String { &self.theme_name }
29268
29269}
29270
29271#[doc(hidden)]
29272pub struct RTDSetChatThemeBuilder {
29273 inner: SetChatTheme
29274}
29275
29276impl RTDSetChatThemeBuilder {
29277 pub fn build(&self) -> SetChatTheme { self.inner.clone() }
29278
29279
29280 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
29281 self.inner.chat_id = chat_id;
29282 self
29283 }
29284
29285
29286 pub fn theme_name<T: AsRef<str>>(&mut self, theme_name: T) -> &mut Self {
29287 self.inner.theme_name = theme_name.as_ref().to_string();
29288 self
29289 }
29290
29291}
29292
29293impl AsRef<SetChatTheme> for SetChatTheme {
29294 fn as_ref(&self) -> &SetChatTheme { self }
29295}
29296
29297impl AsRef<SetChatTheme> for RTDSetChatThemeBuilder {
29298 fn as_ref(&self) -> &SetChatTheme { &self.inner }
29299}
29300
29301
29302
29303
29304
29305
29306
29307#[derive(Debug, Clone, Default, Serialize, Deserialize)]
29309pub struct SetChatTitle {
29310 #[doc(hidden)]
29311 #[serde(rename(serialize = "@type", deserialize = "@type"))]
29312 td_name: String,
29313 #[doc(hidden)]
29314 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
29315 extra: Option<String>,
29316 chat_id: i64,
29318 title: String,
29320
29321}
29322
29323impl RObject for SetChatTitle {
29324 #[doc(hidden)] fn td_name(&self) -> &'static str { "setChatTitle" }
29325 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
29326 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
29327}
29328
29329
29330
29331
29332impl RFunction for SetChatTitle {}
29333
29334impl SetChatTitle {
29335 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
29336 pub fn builder() -> RTDSetChatTitleBuilder {
29337 let mut inner = SetChatTitle::default();
29338 inner.td_name = "setChatTitle".to_string();
29339 inner.extra = Some(Uuid::new_v4().to_string());
29340 RTDSetChatTitleBuilder { inner }
29341 }
29342
29343 pub fn chat_id(&self) -> i64 { self.chat_id }
29344
29345 pub fn title(&self) -> &String { &self.title }
29346
29347}
29348
29349#[doc(hidden)]
29350pub struct RTDSetChatTitleBuilder {
29351 inner: SetChatTitle
29352}
29353
29354impl RTDSetChatTitleBuilder {
29355 pub fn build(&self) -> SetChatTitle { self.inner.clone() }
29356
29357
29358 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
29359 self.inner.chat_id = chat_id;
29360 self
29361 }
29362
29363
29364 pub fn title<T: AsRef<str>>(&mut self, title: T) -> &mut Self {
29365 self.inner.title = title.as_ref().to_string();
29366 self
29367 }
29368
29369}
29370
29371impl AsRef<SetChatTitle> for SetChatTitle {
29372 fn as_ref(&self) -> &SetChatTitle { self }
29373}
29374
29375impl AsRef<SetChatTitle> for RTDSetChatTitleBuilder {
29376 fn as_ref(&self) -> &SetChatTitle { &self.inner }
29377}
29378
29379
29380
29381
29382
29383
29384
29385#[derive(Debug, Clone, Default, Serialize, Deserialize)]
29387pub struct SetCommands {
29388 #[doc(hidden)]
29389 #[serde(rename(serialize = "@type", deserialize = "@type"))]
29390 td_name: String,
29391 #[doc(hidden)]
29392 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
29393 extra: Option<String>,
29394 scope: BotCommandScope,
29396 language_code: String,
29398 commands: Vec<BotCommand>,
29400
29401}
29402
29403impl RObject for SetCommands {
29404 #[doc(hidden)] fn td_name(&self) -> &'static str { "setCommands" }
29405 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
29406 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
29407}
29408
29409
29410
29411
29412impl RFunction for SetCommands {}
29413
29414impl SetCommands {
29415 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
29416 pub fn builder() -> RTDSetCommandsBuilder {
29417 let mut inner = SetCommands::default();
29418 inner.td_name = "setCommands".to_string();
29419 inner.extra = Some(Uuid::new_v4().to_string());
29420 RTDSetCommandsBuilder { inner }
29421 }
29422
29423 pub fn scope(&self) -> &BotCommandScope { &self.scope }
29424
29425 pub fn language_code(&self) -> &String { &self.language_code }
29426
29427 pub fn commands(&self) -> &Vec<BotCommand> { &self.commands }
29428
29429}
29430
29431#[doc(hidden)]
29432pub struct RTDSetCommandsBuilder {
29433 inner: SetCommands
29434}
29435
29436impl RTDSetCommandsBuilder {
29437 pub fn build(&self) -> SetCommands { self.inner.clone() }
29438
29439
29440 pub fn scope<T: AsRef<BotCommandScope>>(&mut self, scope: T) -> &mut Self {
29441 self.inner.scope = scope.as_ref().clone();
29442 self
29443 }
29444
29445
29446 pub fn language_code<T: AsRef<str>>(&mut self, language_code: T) -> &mut Self {
29447 self.inner.language_code = language_code.as_ref().to_string();
29448 self
29449 }
29450
29451
29452 pub fn commands(&mut self, commands: Vec<BotCommand>) -> &mut Self {
29453 self.inner.commands = commands;
29454 self
29455 }
29456
29457}
29458
29459impl AsRef<SetCommands> for SetCommands {
29460 fn as_ref(&self) -> &SetCommands { self }
29461}
29462
29463impl AsRef<SetCommands> for RTDSetCommandsBuilder {
29464 fn as_ref(&self) -> &SetCommands { &self.inner }
29465}
29466
29467
29468
29469
29470
29471
29472
29473#[derive(Debug, Clone, Default, Serialize, Deserialize)]
29475pub struct SetCustomLanguagePack {
29476 #[doc(hidden)]
29477 #[serde(rename(serialize = "@type", deserialize = "@type"))]
29478 td_name: String,
29479 #[doc(hidden)]
29480 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
29481 extra: Option<String>,
29482 info: LanguagePackInfo,
29484 strings: Vec<LanguagePackString>,
29486
29487}
29488
29489impl RObject for SetCustomLanguagePack {
29490 #[doc(hidden)] fn td_name(&self) -> &'static str { "setCustomLanguagePack" }
29491 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
29492 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
29493}
29494
29495
29496
29497
29498impl RFunction for SetCustomLanguagePack {}
29499
29500impl SetCustomLanguagePack {
29501 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
29502 pub fn builder() -> RTDSetCustomLanguagePackBuilder {
29503 let mut inner = SetCustomLanguagePack::default();
29504 inner.td_name = "setCustomLanguagePack".to_string();
29505 inner.extra = Some(Uuid::new_v4().to_string());
29506 RTDSetCustomLanguagePackBuilder { inner }
29507 }
29508
29509 pub fn info(&self) -> &LanguagePackInfo { &self.info }
29510
29511 pub fn strings(&self) -> &Vec<LanguagePackString> { &self.strings }
29512
29513}
29514
29515#[doc(hidden)]
29516pub struct RTDSetCustomLanguagePackBuilder {
29517 inner: SetCustomLanguagePack
29518}
29519
29520impl RTDSetCustomLanguagePackBuilder {
29521 pub fn build(&self) -> SetCustomLanguagePack { self.inner.clone() }
29522
29523
29524 pub fn info<T: AsRef<LanguagePackInfo>>(&mut self, info: T) -> &mut Self {
29525 self.inner.info = info.as_ref().clone();
29526 self
29527 }
29528
29529
29530 pub fn strings(&mut self, strings: Vec<LanguagePackString>) -> &mut Self {
29531 self.inner.strings = strings;
29532 self
29533 }
29534
29535}
29536
29537impl AsRef<SetCustomLanguagePack> for SetCustomLanguagePack {
29538 fn as_ref(&self) -> &SetCustomLanguagePack { self }
29539}
29540
29541impl AsRef<SetCustomLanguagePack> for RTDSetCustomLanguagePackBuilder {
29542 fn as_ref(&self) -> &SetCustomLanguagePack { &self.inner }
29543}
29544
29545
29546
29547
29548
29549
29550
29551#[derive(Debug, Clone, Default, Serialize, Deserialize)]
29553pub struct SetCustomLanguagePackString {
29554 #[doc(hidden)]
29555 #[serde(rename(serialize = "@type", deserialize = "@type"))]
29556 td_name: String,
29557 #[doc(hidden)]
29558 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
29559 extra: Option<String>,
29560 language_pack_id: String,
29562 new_string: LanguagePackString,
29564
29565}
29566
29567impl RObject for SetCustomLanguagePackString {
29568 #[doc(hidden)] fn td_name(&self) -> &'static str { "setCustomLanguagePackString" }
29569 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
29570 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
29571}
29572
29573
29574
29575
29576impl RFunction for SetCustomLanguagePackString {}
29577
29578impl SetCustomLanguagePackString {
29579 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
29580 pub fn builder() -> RTDSetCustomLanguagePackStringBuilder {
29581 let mut inner = SetCustomLanguagePackString::default();
29582 inner.td_name = "setCustomLanguagePackString".to_string();
29583 inner.extra = Some(Uuid::new_v4().to_string());
29584 RTDSetCustomLanguagePackStringBuilder { inner }
29585 }
29586
29587 pub fn language_pack_id(&self) -> &String { &self.language_pack_id }
29588
29589 pub fn new_string(&self) -> &LanguagePackString { &self.new_string }
29590
29591}
29592
29593#[doc(hidden)]
29594pub struct RTDSetCustomLanguagePackStringBuilder {
29595 inner: SetCustomLanguagePackString
29596}
29597
29598impl RTDSetCustomLanguagePackStringBuilder {
29599 pub fn build(&self) -> SetCustomLanguagePackString { self.inner.clone() }
29600
29601
29602 pub fn language_pack_id<T: AsRef<str>>(&mut self, language_pack_id: T) -> &mut Self {
29603 self.inner.language_pack_id = language_pack_id.as_ref().to_string();
29604 self
29605 }
29606
29607
29608 pub fn new_string<T: AsRef<LanguagePackString>>(&mut self, new_string: T) -> &mut Self {
29609 self.inner.new_string = new_string.as_ref().clone();
29610 self
29611 }
29612
29613}
29614
29615impl AsRef<SetCustomLanguagePackString> for SetCustomLanguagePackString {
29616 fn as_ref(&self) -> &SetCustomLanguagePackString { self }
29617}
29618
29619impl AsRef<SetCustomLanguagePackString> for RTDSetCustomLanguagePackStringBuilder {
29620 fn as_ref(&self) -> &SetCustomLanguagePackString { &self.inner }
29621}
29622
29623
29624
29625
29626
29627
29628
29629#[derive(Debug, Clone, Default, Serialize, Deserialize)]
29631pub struct SetDatabaseEncryptionKey {
29632 #[doc(hidden)]
29633 #[serde(rename(serialize = "@type", deserialize = "@type"))]
29634 td_name: String,
29635 #[doc(hidden)]
29636 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
29637 extra: Option<String>,
29638 new_encryption_key: String,
29640
29641}
29642
29643impl RObject for SetDatabaseEncryptionKey {
29644 #[doc(hidden)] fn td_name(&self) -> &'static str { "setDatabaseEncryptionKey" }
29645 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
29646 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
29647}
29648
29649
29650
29651
29652impl RFunction for SetDatabaseEncryptionKey {}
29653
29654impl SetDatabaseEncryptionKey {
29655 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
29656 pub fn builder() -> RTDSetDatabaseEncryptionKeyBuilder {
29657 let mut inner = SetDatabaseEncryptionKey::default();
29658 inner.td_name = "setDatabaseEncryptionKey".to_string();
29659 inner.extra = Some(Uuid::new_v4().to_string());
29660 RTDSetDatabaseEncryptionKeyBuilder { inner }
29661 }
29662
29663 pub fn new_encryption_key(&self) -> &String { &self.new_encryption_key }
29664
29665}
29666
29667#[doc(hidden)]
29668pub struct RTDSetDatabaseEncryptionKeyBuilder {
29669 inner: SetDatabaseEncryptionKey
29670}
29671
29672impl RTDSetDatabaseEncryptionKeyBuilder {
29673 pub fn build(&self) -> SetDatabaseEncryptionKey { self.inner.clone() }
29674
29675
29676 pub fn new_encryption_key<T: AsRef<str>>(&mut self, new_encryption_key: T) -> &mut Self {
29677 self.inner.new_encryption_key = new_encryption_key.as_ref().to_string();
29678 self
29679 }
29680
29681}
29682
29683impl AsRef<SetDatabaseEncryptionKey> for SetDatabaseEncryptionKey {
29684 fn as_ref(&self) -> &SetDatabaseEncryptionKey { self }
29685}
29686
29687impl AsRef<SetDatabaseEncryptionKey> for RTDSetDatabaseEncryptionKeyBuilder {
29688 fn as_ref(&self) -> &SetDatabaseEncryptionKey { &self.inner }
29689}
29690
29691
29692
29693
29694
29695
29696
29697#[derive(Debug, Clone, Default, Serialize, Deserialize)]
29699pub struct SetFileGenerationProgress {
29700 #[doc(hidden)]
29701 #[serde(rename(serialize = "@type", deserialize = "@type"))]
29702 td_name: String,
29703 #[doc(hidden)]
29704 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
29705 extra: Option<String>,
29706 generation_id: isize,
29708 expected_size: i64,
29710 local_prefix_size: i64,
29712
29713}
29714
29715impl RObject for SetFileGenerationProgress {
29716 #[doc(hidden)] fn td_name(&self) -> &'static str { "setFileGenerationProgress" }
29717 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
29718 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
29719}
29720
29721
29722
29723
29724impl RFunction for SetFileGenerationProgress {}
29725
29726impl SetFileGenerationProgress {
29727 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
29728 pub fn builder() -> RTDSetFileGenerationProgressBuilder {
29729 let mut inner = SetFileGenerationProgress::default();
29730 inner.td_name = "setFileGenerationProgress".to_string();
29731 inner.extra = Some(Uuid::new_v4().to_string());
29732 RTDSetFileGenerationProgressBuilder { inner }
29733 }
29734
29735 pub fn generation_id(&self) -> isize { self.generation_id }
29736
29737 pub fn expected_size(&self) -> i64 { self.expected_size }
29738
29739 pub fn local_prefix_size(&self) -> i64 { self.local_prefix_size }
29740
29741}
29742
29743#[doc(hidden)]
29744pub struct RTDSetFileGenerationProgressBuilder {
29745 inner: SetFileGenerationProgress
29746}
29747
29748impl RTDSetFileGenerationProgressBuilder {
29749 pub fn build(&self) -> SetFileGenerationProgress { self.inner.clone() }
29750
29751
29752 pub fn generation_id(&mut self, generation_id: isize) -> &mut Self {
29753 self.inner.generation_id = generation_id;
29754 self
29755 }
29756
29757
29758 pub fn expected_size(&mut self, expected_size: i64) -> &mut Self {
29759 self.inner.expected_size = expected_size;
29760 self
29761 }
29762
29763
29764 pub fn local_prefix_size(&mut self, local_prefix_size: i64) -> &mut Self {
29765 self.inner.local_prefix_size = local_prefix_size;
29766 self
29767 }
29768
29769}
29770
29771impl AsRef<SetFileGenerationProgress> for SetFileGenerationProgress {
29772 fn as_ref(&self) -> &SetFileGenerationProgress { self }
29773}
29774
29775impl AsRef<SetFileGenerationProgress> for RTDSetFileGenerationProgressBuilder {
29776 fn as_ref(&self) -> &SetFileGenerationProgress { &self.inner }
29777}
29778
29779
29780
29781
29782
29783
29784
29785#[derive(Debug, Clone, Default, Serialize, Deserialize)]
29787pub struct SetGameScore {
29788 #[doc(hidden)]
29789 #[serde(rename(serialize = "@type", deserialize = "@type"))]
29790 td_name: String,
29791 #[doc(hidden)]
29792 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
29793 extra: Option<String>,
29794 chat_id: i64,
29796 message_id: i64,
29798 edit_message: bool,
29800 user_id: i64,
29802 score: i64,
29804 force: bool,
29806
29807}
29808
29809impl RObject for SetGameScore {
29810 #[doc(hidden)] fn td_name(&self) -> &'static str { "setGameScore" }
29811 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
29812 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
29813}
29814
29815
29816
29817
29818impl RFunction for SetGameScore {}
29819
29820impl SetGameScore {
29821 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
29822 pub fn builder() -> RTDSetGameScoreBuilder {
29823 let mut inner = SetGameScore::default();
29824 inner.td_name = "setGameScore".to_string();
29825 inner.extra = Some(Uuid::new_v4().to_string());
29826 RTDSetGameScoreBuilder { inner }
29827 }
29828
29829 pub fn chat_id(&self) -> i64 { self.chat_id }
29830
29831 pub fn message_id(&self) -> i64 { self.message_id }
29832
29833 pub fn edit_message(&self) -> bool { self.edit_message }
29834
29835 pub fn user_id(&self) -> i64 { self.user_id }
29836
29837 pub fn score(&self) -> i64 { self.score }
29838
29839 pub fn force(&self) -> bool { self.force }
29840
29841}
29842
29843#[doc(hidden)]
29844pub struct RTDSetGameScoreBuilder {
29845 inner: SetGameScore
29846}
29847
29848impl RTDSetGameScoreBuilder {
29849 pub fn build(&self) -> SetGameScore { self.inner.clone() }
29850
29851
29852 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
29853 self.inner.chat_id = chat_id;
29854 self
29855 }
29856
29857
29858 pub fn message_id(&mut self, message_id: i64) -> &mut Self {
29859 self.inner.message_id = message_id;
29860 self
29861 }
29862
29863
29864 pub fn edit_message(&mut self, edit_message: bool) -> &mut Self {
29865 self.inner.edit_message = edit_message;
29866 self
29867 }
29868
29869
29870 pub fn user_id(&mut self, user_id: i64) -> &mut Self {
29871 self.inner.user_id = user_id;
29872 self
29873 }
29874
29875
29876 pub fn score(&mut self, score: i64) -> &mut Self {
29877 self.inner.score = score;
29878 self
29879 }
29880
29881
29882 pub fn force(&mut self, force: bool) -> &mut Self {
29883 self.inner.force = force;
29884 self
29885 }
29886
29887}
29888
29889impl AsRef<SetGameScore> for SetGameScore {
29890 fn as_ref(&self) -> &SetGameScore { self }
29891}
29892
29893impl AsRef<SetGameScore> for RTDSetGameScoreBuilder {
29894 fn as_ref(&self) -> &SetGameScore { &self.inner }
29895}
29896
29897
29898
29899
29900
29901
29902
29903#[derive(Debug, Clone, Default, Serialize, Deserialize)]
29905pub struct SetGroupCallParticipantIsSpeaking {
29906 #[doc(hidden)]
29907 #[serde(rename(serialize = "@type", deserialize = "@type"))]
29908 td_name: String,
29909 #[doc(hidden)]
29910 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
29911 extra: Option<String>,
29912 group_call_id: i64,
29914 audio_source: i64,
29916 is_speaking: bool,
29918
29919}
29920
29921impl RObject for SetGroupCallParticipantIsSpeaking {
29922 #[doc(hidden)] fn td_name(&self) -> &'static str { "setGroupCallParticipantIsSpeaking" }
29923 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
29924 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
29925}
29926
29927
29928
29929
29930impl RFunction for SetGroupCallParticipantIsSpeaking {}
29931
29932impl SetGroupCallParticipantIsSpeaking {
29933 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
29934 pub fn builder() -> RTDSetGroupCallParticipantIsSpeakingBuilder {
29935 let mut inner = SetGroupCallParticipantIsSpeaking::default();
29936 inner.td_name = "setGroupCallParticipantIsSpeaking".to_string();
29937 inner.extra = Some(Uuid::new_v4().to_string());
29938 RTDSetGroupCallParticipantIsSpeakingBuilder { inner }
29939 }
29940
29941 pub fn group_call_id(&self) -> i64 { self.group_call_id }
29942
29943 pub fn audio_source(&self) -> i64 { self.audio_source }
29944
29945 pub fn is_speaking(&self) -> bool { self.is_speaking }
29946
29947}
29948
29949#[doc(hidden)]
29950pub struct RTDSetGroupCallParticipantIsSpeakingBuilder {
29951 inner: SetGroupCallParticipantIsSpeaking
29952}
29953
29954impl RTDSetGroupCallParticipantIsSpeakingBuilder {
29955 pub fn build(&self) -> SetGroupCallParticipantIsSpeaking { self.inner.clone() }
29956
29957
29958 pub fn group_call_id(&mut self, group_call_id: i64) -> &mut Self {
29959 self.inner.group_call_id = group_call_id;
29960 self
29961 }
29962
29963
29964 pub fn audio_source(&mut self, audio_source: i64) -> &mut Self {
29965 self.inner.audio_source = audio_source;
29966 self
29967 }
29968
29969
29970 pub fn is_speaking(&mut self, is_speaking: bool) -> &mut Self {
29971 self.inner.is_speaking = is_speaking;
29972 self
29973 }
29974
29975}
29976
29977impl AsRef<SetGroupCallParticipantIsSpeaking> for SetGroupCallParticipantIsSpeaking {
29978 fn as_ref(&self) -> &SetGroupCallParticipantIsSpeaking { self }
29979}
29980
29981impl AsRef<SetGroupCallParticipantIsSpeaking> for RTDSetGroupCallParticipantIsSpeakingBuilder {
29982 fn as_ref(&self) -> &SetGroupCallParticipantIsSpeaking { &self.inner }
29983}
29984
29985
29986
29987
29988
29989
29990
29991#[derive(Debug, Clone, Default, Serialize, Deserialize)]
29993pub struct SetGroupCallParticipantVolumeLevel {
29994 #[doc(hidden)]
29995 #[serde(rename(serialize = "@type", deserialize = "@type"))]
29996 td_name: String,
29997 #[doc(hidden)]
29998 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
29999 extra: Option<String>,
30000 group_call_id: i64,
30002 participant_id: MessageSender,
30004 volume_level: i64,
30006
30007}
30008
30009impl RObject for SetGroupCallParticipantVolumeLevel {
30010 #[doc(hidden)] fn td_name(&self) -> &'static str { "setGroupCallParticipantVolumeLevel" }
30011 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
30012 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
30013}
30014
30015
30016
30017
30018impl RFunction for SetGroupCallParticipantVolumeLevel {}
30019
30020impl SetGroupCallParticipantVolumeLevel {
30021 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
30022 pub fn builder() -> RTDSetGroupCallParticipantVolumeLevelBuilder {
30023 let mut inner = SetGroupCallParticipantVolumeLevel::default();
30024 inner.td_name = "setGroupCallParticipantVolumeLevel".to_string();
30025 inner.extra = Some(Uuid::new_v4().to_string());
30026 RTDSetGroupCallParticipantVolumeLevelBuilder { inner }
30027 }
30028
30029 pub fn group_call_id(&self) -> i64 { self.group_call_id }
30030
30031 pub fn participant_id(&self) -> &MessageSender { &self.participant_id }
30032
30033 pub fn volume_level(&self) -> i64 { self.volume_level }
30034
30035}
30036
30037#[doc(hidden)]
30038pub struct RTDSetGroupCallParticipantVolumeLevelBuilder {
30039 inner: SetGroupCallParticipantVolumeLevel
30040}
30041
30042impl RTDSetGroupCallParticipantVolumeLevelBuilder {
30043 pub fn build(&self) -> SetGroupCallParticipantVolumeLevel { self.inner.clone() }
30044
30045
30046 pub fn group_call_id(&mut self, group_call_id: i64) -> &mut Self {
30047 self.inner.group_call_id = group_call_id;
30048 self
30049 }
30050
30051
30052 pub fn participant_id<T: AsRef<MessageSender>>(&mut self, participant_id: T) -> &mut Self {
30053 self.inner.participant_id = participant_id.as_ref().clone();
30054 self
30055 }
30056
30057
30058 pub fn volume_level(&mut self, volume_level: i64) -> &mut Self {
30059 self.inner.volume_level = volume_level;
30060 self
30061 }
30062
30063}
30064
30065impl AsRef<SetGroupCallParticipantVolumeLevel> for SetGroupCallParticipantVolumeLevel {
30066 fn as_ref(&self) -> &SetGroupCallParticipantVolumeLevel { self }
30067}
30068
30069impl AsRef<SetGroupCallParticipantVolumeLevel> for RTDSetGroupCallParticipantVolumeLevelBuilder {
30070 fn as_ref(&self) -> &SetGroupCallParticipantVolumeLevel { &self.inner }
30071}
30072
30073
30074
30075
30076
30077
30078
30079#[derive(Debug, Clone, Default, Serialize, Deserialize)]
30081pub struct SetGroupCallTitle {
30082 #[doc(hidden)]
30083 #[serde(rename(serialize = "@type", deserialize = "@type"))]
30084 td_name: String,
30085 #[doc(hidden)]
30086 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
30087 extra: Option<String>,
30088 group_call_id: i64,
30090 title: String,
30092
30093}
30094
30095impl RObject for SetGroupCallTitle {
30096 #[doc(hidden)] fn td_name(&self) -> &'static str { "setGroupCallTitle" }
30097 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
30098 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
30099}
30100
30101
30102
30103
30104impl RFunction for SetGroupCallTitle {}
30105
30106impl SetGroupCallTitle {
30107 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
30108 pub fn builder() -> RTDSetGroupCallTitleBuilder {
30109 let mut inner = SetGroupCallTitle::default();
30110 inner.td_name = "setGroupCallTitle".to_string();
30111 inner.extra = Some(Uuid::new_v4().to_string());
30112 RTDSetGroupCallTitleBuilder { inner }
30113 }
30114
30115 pub fn group_call_id(&self) -> i64 { self.group_call_id }
30116
30117 pub fn title(&self) -> &String { &self.title }
30118
30119}
30120
30121#[doc(hidden)]
30122pub struct RTDSetGroupCallTitleBuilder {
30123 inner: SetGroupCallTitle
30124}
30125
30126impl RTDSetGroupCallTitleBuilder {
30127 pub fn build(&self) -> SetGroupCallTitle { self.inner.clone() }
30128
30129
30130 pub fn group_call_id(&mut self, group_call_id: i64) -> &mut Self {
30131 self.inner.group_call_id = group_call_id;
30132 self
30133 }
30134
30135
30136 pub fn title<T: AsRef<str>>(&mut self, title: T) -> &mut Self {
30137 self.inner.title = title.as_ref().to_string();
30138 self
30139 }
30140
30141}
30142
30143impl AsRef<SetGroupCallTitle> for SetGroupCallTitle {
30144 fn as_ref(&self) -> &SetGroupCallTitle { self }
30145}
30146
30147impl AsRef<SetGroupCallTitle> for RTDSetGroupCallTitleBuilder {
30148 fn as_ref(&self) -> &SetGroupCallTitle { &self.inner }
30149}
30150
30151
30152
30153
30154
30155
30156
30157#[derive(Debug, Clone, Default, Serialize, Deserialize)]
30159pub struct SetInactiveSessionTtl {
30160 #[doc(hidden)]
30161 #[serde(rename(serialize = "@type", deserialize = "@type"))]
30162 td_name: String,
30163 #[doc(hidden)]
30164 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
30165 extra: Option<String>,
30166 inactive_session_ttl_days: i64,
30168
30169}
30170
30171impl RObject for SetInactiveSessionTtl {
30172 #[doc(hidden)] fn td_name(&self) -> &'static str { "setInactiveSessionTtl" }
30173 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
30174 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
30175}
30176
30177
30178
30179
30180impl RFunction for SetInactiveSessionTtl {}
30181
30182impl SetInactiveSessionTtl {
30183 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
30184 pub fn builder() -> RTDSetInactiveSessionTtlBuilder {
30185 let mut inner = SetInactiveSessionTtl::default();
30186 inner.td_name = "setInactiveSessionTtl".to_string();
30187 inner.extra = Some(Uuid::new_v4().to_string());
30188 RTDSetInactiveSessionTtlBuilder { inner }
30189 }
30190
30191 pub fn inactive_session_ttl_days(&self) -> i64 { self.inactive_session_ttl_days }
30192
30193}
30194
30195#[doc(hidden)]
30196pub struct RTDSetInactiveSessionTtlBuilder {
30197 inner: SetInactiveSessionTtl
30198}
30199
30200impl RTDSetInactiveSessionTtlBuilder {
30201 pub fn build(&self) -> SetInactiveSessionTtl { self.inner.clone() }
30202
30203
30204 pub fn inactive_session_ttl_days(&mut self, inactive_session_ttl_days: i64) -> &mut Self {
30205 self.inner.inactive_session_ttl_days = inactive_session_ttl_days;
30206 self
30207 }
30208
30209}
30210
30211impl AsRef<SetInactiveSessionTtl> for SetInactiveSessionTtl {
30212 fn as_ref(&self) -> &SetInactiveSessionTtl { self }
30213}
30214
30215impl AsRef<SetInactiveSessionTtl> for RTDSetInactiveSessionTtlBuilder {
30216 fn as_ref(&self) -> &SetInactiveSessionTtl { &self.inner }
30217}
30218
30219
30220
30221
30222
30223
30224
30225#[derive(Debug, Clone, Default, Serialize, Deserialize)]
30227pub struct SetInlineGameScore {
30228 #[doc(hidden)]
30229 #[serde(rename(serialize = "@type", deserialize = "@type"))]
30230 td_name: String,
30231 #[doc(hidden)]
30232 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
30233 extra: Option<String>,
30234 inline_message_id: String,
30236 edit_message: bool,
30238 user_id: i64,
30240 score: i64,
30242 force: bool,
30244
30245}
30246
30247impl RObject for SetInlineGameScore {
30248 #[doc(hidden)] fn td_name(&self) -> &'static str { "setInlineGameScore" }
30249 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
30250 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
30251}
30252
30253
30254
30255
30256impl RFunction for SetInlineGameScore {}
30257
30258impl SetInlineGameScore {
30259 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
30260 pub fn builder() -> RTDSetInlineGameScoreBuilder {
30261 let mut inner = SetInlineGameScore::default();
30262 inner.td_name = "setInlineGameScore".to_string();
30263 inner.extra = Some(Uuid::new_v4().to_string());
30264 RTDSetInlineGameScoreBuilder { inner }
30265 }
30266
30267 pub fn inline_message_id(&self) -> &String { &self.inline_message_id }
30268
30269 pub fn edit_message(&self) -> bool { self.edit_message }
30270
30271 pub fn user_id(&self) -> i64 { self.user_id }
30272
30273 pub fn score(&self) -> i64 { self.score }
30274
30275 pub fn force(&self) -> bool { self.force }
30276
30277}
30278
30279#[doc(hidden)]
30280pub struct RTDSetInlineGameScoreBuilder {
30281 inner: SetInlineGameScore
30282}
30283
30284impl RTDSetInlineGameScoreBuilder {
30285 pub fn build(&self) -> SetInlineGameScore { self.inner.clone() }
30286
30287
30288 pub fn inline_message_id<T: AsRef<str>>(&mut self, inline_message_id: T) -> &mut Self {
30289 self.inner.inline_message_id = inline_message_id.as_ref().to_string();
30290 self
30291 }
30292
30293
30294 pub fn edit_message(&mut self, edit_message: bool) -> &mut Self {
30295 self.inner.edit_message = edit_message;
30296 self
30297 }
30298
30299
30300 pub fn user_id(&mut self, user_id: i64) -> &mut Self {
30301 self.inner.user_id = user_id;
30302 self
30303 }
30304
30305
30306 pub fn score(&mut self, score: i64) -> &mut Self {
30307 self.inner.score = score;
30308 self
30309 }
30310
30311
30312 pub fn force(&mut self, force: bool) -> &mut Self {
30313 self.inner.force = force;
30314 self
30315 }
30316
30317}
30318
30319impl AsRef<SetInlineGameScore> for SetInlineGameScore {
30320 fn as_ref(&self) -> &SetInlineGameScore { self }
30321}
30322
30323impl AsRef<SetInlineGameScore> for RTDSetInlineGameScoreBuilder {
30324 fn as_ref(&self) -> &SetInlineGameScore { &self.inner }
30325}
30326
30327
30328
30329
30330
30331
30332
30333#[derive(Debug, Clone, Default, Serialize, Deserialize)]
30335pub struct SetLocation {
30336 #[doc(hidden)]
30337 #[serde(rename(serialize = "@type", deserialize = "@type"))]
30338 td_name: String,
30339 #[doc(hidden)]
30340 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
30341 extra: Option<String>,
30342 location: Location,
30344
30345}
30346
30347impl RObject for SetLocation {
30348 #[doc(hidden)] fn td_name(&self) -> &'static str { "setLocation" }
30349 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
30350 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
30351}
30352
30353
30354
30355
30356impl RFunction for SetLocation {}
30357
30358impl SetLocation {
30359 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
30360 pub fn builder() -> RTDSetLocationBuilder {
30361 let mut inner = SetLocation::default();
30362 inner.td_name = "setLocation".to_string();
30363 inner.extra = Some(Uuid::new_v4().to_string());
30364 RTDSetLocationBuilder { inner }
30365 }
30366
30367 pub fn location(&self) -> &Location { &self.location }
30368
30369}
30370
30371#[doc(hidden)]
30372pub struct RTDSetLocationBuilder {
30373 inner: SetLocation
30374}
30375
30376impl RTDSetLocationBuilder {
30377 pub fn build(&self) -> SetLocation { self.inner.clone() }
30378
30379
30380 pub fn location<T: AsRef<Location>>(&mut self, location: T) -> &mut Self {
30381 self.inner.location = location.as_ref().clone();
30382 self
30383 }
30384
30385}
30386
30387impl AsRef<SetLocation> for SetLocation {
30388 fn as_ref(&self) -> &SetLocation { self }
30389}
30390
30391impl AsRef<SetLocation> for RTDSetLocationBuilder {
30392 fn as_ref(&self) -> &SetLocation { &self.inner }
30393}
30394
30395
30396
30397
30398
30399
30400
30401#[derive(Debug, Clone, Default, Serialize, Deserialize)]
30403pub struct SetLogStream {
30404 #[doc(hidden)]
30405 #[serde(rename(serialize = "@type", deserialize = "@type"))]
30406 td_name: String,
30407 #[doc(hidden)]
30408 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
30409 extra: Option<String>,
30410 log_stream: LogStream,
30412
30413}
30414
30415impl RObject for SetLogStream {
30416 #[doc(hidden)] fn td_name(&self) -> &'static str { "setLogStream" }
30417 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
30418 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
30419}
30420
30421
30422
30423
30424impl RFunction for SetLogStream {}
30425
30426impl SetLogStream {
30427 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
30428 pub fn builder() -> RTDSetLogStreamBuilder {
30429 let mut inner = SetLogStream::default();
30430 inner.td_name = "setLogStream".to_string();
30431 inner.extra = Some(Uuid::new_v4().to_string());
30432 RTDSetLogStreamBuilder { inner }
30433 }
30434
30435 pub fn log_stream(&self) -> &LogStream { &self.log_stream }
30436
30437}
30438
30439#[doc(hidden)]
30440pub struct RTDSetLogStreamBuilder {
30441 inner: SetLogStream
30442}
30443
30444impl RTDSetLogStreamBuilder {
30445 pub fn build(&self) -> SetLogStream { self.inner.clone() }
30446
30447
30448 pub fn log_stream<T: AsRef<LogStream>>(&mut self, log_stream: T) -> &mut Self {
30449 self.inner.log_stream = log_stream.as_ref().clone();
30450 self
30451 }
30452
30453}
30454
30455impl AsRef<SetLogStream> for SetLogStream {
30456 fn as_ref(&self) -> &SetLogStream { self }
30457}
30458
30459impl AsRef<SetLogStream> for RTDSetLogStreamBuilder {
30460 fn as_ref(&self) -> &SetLogStream { &self.inner }
30461}
30462
30463
30464
30465
30466
30467
30468
30469#[derive(Debug, Clone, Default, Serialize, Deserialize)]
30471pub struct SetLogTagVerbosityLevel {
30472 #[doc(hidden)]
30473 #[serde(rename(serialize = "@type", deserialize = "@type"))]
30474 td_name: String,
30475 #[doc(hidden)]
30476 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
30477 extra: Option<String>,
30478 tag: String,
30480 new_verbosity_level: i64,
30482
30483}
30484
30485impl RObject for SetLogTagVerbosityLevel {
30486 #[doc(hidden)] fn td_name(&self) -> &'static str { "setLogTagVerbosityLevel" }
30487 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
30488 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
30489}
30490
30491
30492
30493
30494impl RFunction for SetLogTagVerbosityLevel {}
30495
30496impl SetLogTagVerbosityLevel {
30497 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
30498 pub fn builder() -> RTDSetLogTagVerbosityLevelBuilder {
30499 let mut inner = SetLogTagVerbosityLevel::default();
30500 inner.td_name = "setLogTagVerbosityLevel".to_string();
30501 inner.extra = Some(Uuid::new_v4().to_string());
30502 RTDSetLogTagVerbosityLevelBuilder { inner }
30503 }
30504
30505 pub fn tag(&self) -> &String { &self.tag }
30506
30507 pub fn new_verbosity_level(&self) -> i64 { self.new_verbosity_level }
30508
30509}
30510
30511#[doc(hidden)]
30512pub struct RTDSetLogTagVerbosityLevelBuilder {
30513 inner: SetLogTagVerbosityLevel
30514}
30515
30516impl RTDSetLogTagVerbosityLevelBuilder {
30517 pub fn build(&self) -> SetLogTagVerbosityLevel { self.inner.clone() }
30518
30519
30520 pub fn tag<T: AsRef<str>>(&mut self, tag: T) -> &mut Self {
30521 self.inner.tag = tag.as_ref().to_string();
30522 self
30523 }
30524
30525
30526 pub fn new_verbosity_level(&mut self, new_verbosity_level: i64) -> &mut Self {
30527 self.inner.new_verbosity_level = new_verbosity_level;
30528 self
30529 }
30530
30531}
30532
30533impl AsRef<SetLogTagVerbosityLevel> for SetLogTagVerbosityLevel {
30534 fn as_ref(&self) -> &SetLogTagVerbosityLevel { self }
30535}
30536
30537impl AsRef<SetLogTagVerbosityLevel> for RTDSetLogTagVerbosityLevelBuilder {
30538 fn as_ref(&self) -> &SetLogTagVerbosityLevel { &self.inner }
30539}
30540
30541
30542
30543
30544
30545
30546
30547#[derive(Debug, Clone, Default, Serialize, Deserialize)]
30549pub struct SetLogVerbosityLevel {
30550 #[doc(hidden)]
30551 #[serde(rename(serialize = "@type", deserialize = "@type"))]
30552 td_name: String,
30553 #[doc(hidden)]
30554 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
30555 extra: Option<String>,
30556 new_verbosity_level: i64,
30558
30559}
30560
30561impl RObject for SetLogVerbosityLevel {
30562 #[doc(hidden)] fn td_name(&self) -> &'static str { "setLogVerbosityLevel" }
30563 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
30564 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
30565}
30566
30567
30568
30569
30570impl RFunction for SetLogVerbosityLevel {}
30571
30572impl SetLogVerbosityLevel {
30573 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
30574 pub fn builder() -> RTDSetLogVerbosityLevelBuilder {
30575 let mut inner = SetLogVerbosityLevel::default();
30576 inner.td_name = "setLogVerbosityLevel".to_string();
30577 inner.extra = Some(Uuid::new_v4().to_string());
30578 RTDSetLogVerbosityLevelBuilder { inner }
30579 }
30580
30581 pub fn new_verbosity_level(&self) -> i64 { self.new_verbosity_level }
30582
30583}
30584
30585#[doc(hidden)]
30586pub struct RTDSetLogVerbosityLevelBuilder {
30587 inner: SetLogVerbosityLevel
30588}
30589
30590impl RTDSetLogVerbosityLevelBuilder {
30591 pub fn build(&self) -> SetLogVerbosityLevel { self.inner.clone() }
30592
30593
30594 pub fn new_verbosity_level(&mut self, new_verbosity_level: i64) -> &mut Self {
30595 self.inner.new_verbosity_level = new_verbosity_level;
30596 self
30597 }
30598
30599}
30600
30601impl AsRef<SetLogVerbosityLevel> for SetLogVerbosityLevel {
30602 fn as_ref(&self) -> &SetLogVerbosityLevel { self }
30603}
30604
30605impl AsRef<SetLogVerbosityLevel> for RTDSetLogVerbosityLevelBuilder {
30606 fn as_ref(&self) -> &SetLogVerbosityLevel { &self.inner }
30607}
30608
30609
30610
30611
30612
30613
30614
30615#[derive(Debug, Clone, Default, Serialize, Deserialize)]
30617pub struct SetName {
30618 #[doc(hidden)]
30619 #[serde(rename(serialize = "@type", deserialize = "@type"))]
30620 td_name: String,
30621 #[doc(hidden)]
30622 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
30623 extra: Option<String>,
30624 first_name: String,
30626 last_name: String,
30628
30629}
30630
30631impl RObject for SetName {
30632 #[doc(hidden)] fn td_name(&self) -> &'static str { "setName" }
30633 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
30634 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
30635}
30636
30637
30638
30639
30640impl RFunction for SetName {}
30641
30642impl SetName {
30643 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
30644 pub fn builder() -> RTDSetNameBuilder {
30645 let mut inner = SetName::default();
30646 inner.td_name = "setName".to_string();
30647 inner.extra = Some(Uuid::new_v4().to_string());
30648 RTDSetNameBuilder { inner }
30649 }
30650
30651 pub fn first_name(&self) -> &String { &self.first_name }
30652
30653 pub fn last_name(&self) -> &String { &self.last_name }
30654
30655}
30656
30657#[doc(hidden)]
30658pub struct RTDSetNameBuilder {
30659 inner: SetName
30660}
30661
30662impl RTDSetNameBuilder {
30663 pub fn build(&self) -> SetName { self.inner.clone() }
30664
30665
30666 pub fn first_name<T: AsRef<str>>(&mut self, first_name: T) -> &mut Self {
30667 self.inner.first_name = first_name.as_ref().to_string();
30668 self
30669 }
30670
30671
30672 pub fn last_name<T: AsRef<str>>(&mut self, last_name: T) -> &mut Self {
30673 self.inner.last_name = last_name.as_ref().to_string();
30674 self
30675 }
30676
30677}
30678
30679impl AsRef<SetName> for SetName {
30680 fn as_ref(&self) -> &SetName { self }
30681}
30682
30683impl AsRef<SetName> for RTDSetNameBuilder {
30684 fn as_ref(&self) -> &SetName { &self.inner }
30685}
30686
30687
30688
30689
30690
30691
30692
30693#[derive(Debug, Clone, Default, Serialize, Deserialize)]
30695pub struct SetNetworkType {
30696 #[doc(hidden)]
30697 #[serde(rename(serialize = "@type", deserialize = "@type"))]
30698 td_name: String,
30699 #[doc(hidden)]
30700 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
30701 extra: Option<String>,
30702 #[serde(rename(serialize = "type", deserialize = "type"))] type_: NetworkType,
30704
30705}
30706
30707impl RObject for SetNetworkType {
30708 #[doc(hidden)] fn td_name(&self) -> &'static str { "setNetworkType" }
30709 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
30710 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
30711}
30712
30713
30714
30715
30716impl RFunction for SetNetworkType {}
30717
30718impl SetNetworkType {
30719 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
30720 pub fn builder() -> RTDSetNetworkTypeBuilder {
30721 let mut inner = SetNetworkType::default();
30722 inner.td_name = "setNetworkType".to_string();
30723 inner.extra = Some(Uuid::new_v4().to_string());
30724 RTDSetNetworkTypeBuilder { inner }
30725 }
30726
30727 pub fn type_(&self) -> &NetworkType { &self.type_ }
30728
30729}
30730
30731#[doc(hidden)]
30732pub struct RTDSetNetworkTypeBuilder {
30733 inner: SetNetworkType
30734}
30735
30736impl RTDSetNetworkTypeBuilder {
30737 pub fn build(&self) -> SetNetworkType { self.inner.clone() }
30738
30739
30740 pub fn type_<T: AsRef<NetworkType>>(&mut self, type_: T) -> &mut Self {
30741 self.inner.type_ = type_.as_ref().clone();
30742 self
30743 }
30744
30745}
30746
30747impl AsRef<SetNetworkType> for SetNetworkType {
30748 fn as_ref(&self) -> &SetNetworkType { self }
30749}
30750
30751impl AsRef<SetNetworkType> for RTDSetNetworkTypeBuilder {
30752 fn as_ref(&self) -> &SetNetworkType { &self.inner }
30753}
30754
30755
30756
30757
30758
30759
30760
30761#[derive(Debug, Clone, Default, Serialize, Deserialize)]
30763pub struct SetOption {
30764 #[doc(hidden)]
30765 #[serde(rename(serialize = "@type", deserialize = "@type"))]
30766 td_name: String,
30767 #[doc(hidden)]
30768 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
30769 extra: Option<String>,
30770 name: String,
30772 value: OptionValue,
30774
30775}
30776
30777impl RObject for SetOption {
30778 #[doc(hidden)] fn td_name(&self) -> &'static str { "setOption" }
30779 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
30780 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
30781}
30782
30783
30784
30785
30786impl RFunction for SetOption {}
30787
30788impl SetOption {
30789 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
30790 pub fn builder() -> RTDSetOptionBuilder {
30791 let mut inner = SetOption::default();
30792 inner.td_name = "setOption".to_string();
30793 inner.extra = Some(Uuid::new_v4().to_string());
30794 RTDSetOptionBuilder { inner }
30795 }
30796
30797 pub fn name(&self) -> &String { &self.name }
30798
30799 pub fn value(&self) -> &OptionValue { &self.value }
30800
30801}
30802
30803#[doc(hidden)]
30804pub struct RTDSetOptionBuilder {
30805 inner: SetOption
30806}
30807
30808impl RTDSetOptionBuilder {
30809 pub fn build(&self) -> SetOption { self.inner.clone() }
30810
30811
30812 pub fn name<T: AsRef<str>>(&mut self, name: T) -> &mut Self {
30813 self.inner.name = name.as_ref().to_string();
30814 self
30815 }
30816
30817
30818 pub fn value<T: AsRef<OptionValue>>(&mut self, value: T) -> &mut Self {
30819 self.inner.value = value.as_ref().clone();
30820 self
30821 }
30822
30823}
30824
30825impl AsRef<SetOption> for SetOption {
30826 fn as_ref(&self) -> &SetOption { self }
30827}
30828
30829impl AsRef<SetOption> for RTDSetOptionBuilder {
30830 fn as_ref(&self) -> &SetOption { &self.inner }
30831}
30832
30833
30834
30835
30836
30837
30838
30839#[derive(Debug, Clone, Default, Serialize, Deserialize)]
30841pub struct SetPassportElement {
30842 #[doc(hidden)]
30843 #[serde(rename(serialize = "@type", deserialize = "@type"))]
30844 td_name: String,
30845 #[doc(hidden)]
30846 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
30847 extra: Option<String>,
30848 element: InputPassportElement,
30850 password: String,
30852
30853}
30854
30855impl RObject for SetPassportElement {
30856 #[doc(hidden)] fn td_name(&self) -> &'static str { "setPassportElement" }
30857 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
30858 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
30859}
30860
30861
30862impl TDPassportElement for SetPassportElement {}
30863
30864impl RFunction for SetPassportElement {}
30865
30866impl SetPassportElement {
30867 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
30868 pub fn builder() -> RTDSetPassportElementBuilder {
30869 let mut inner = SetPassportElement::default();
30870 inner.td_name = "setPassportElement".to_string();
30871 inner.extra = Some(Uuid::new_v4().to_string());
30872 RTDSetPassportElementBuilder { inner }
30873 }
30874
30875 pub fn element(&self) -> &InputPassportElement { &self.element }
30876
30877 pub fn password(&self) -> &String { &self.password }
30878
30879}
30880
30881#[doc(hidden)]
30882pub struct RTDSetPassportElementBuilder {
30883 inner: SetPassportElement
30884}
30885
30886impl RTDSetPassportElementBuilder {
30887 pub fn build(&self) -> SetPassportElement { self.inner.clone() }
30888
30889
30890 pub fn element<T: AsRef<InputPassportElement>>(&mut self, element: T) -> &mut Self {
30891 self.inner.element = element.as_ref().clone();
30892 self
30893 }
30894
30895
30896 pub fn password<T: AsRef<str>>(&mut self, password: T) -> &mut Self {
30897 self.inner.password = password.as_ref().to_string();
30898 self
30899 }
30900
30901}
30902
30903impl AsRef<SetPassportElement> for SetPassportElement {
30904 fn as_ref(&self) -> &SetPassportElement { self }
30905}
30906
30907impl AsRef<SetPassportElement> for RTDSetPassportElementBuilder {
30908 fn as_ref(&self) -> &SetPassportElement { &self.inner }
30909}
30910
30911
30912
30913
30914
30915
30916
30917#[derive(Debug, Clone, Default, Serialize, Deserialize)]
30919pub struct SetPassportElementErrors {
30920 #[doc(hidden)]
30921 #[serde(rename(serialize = "@type", deserialize = "@type"))]
30922 td_name: String,
30923 #[doc(hidden)]
30924 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
30925 extra: Option<String>,
30926 user_id: i64,
30928 errors: Vec<InputPassportElementError>,
30930
30931}
30932
30933impl RObject for SetPassportElementErrors {
30934 #[doc(hidden)] fn td_name(&self) -> &'static str { "setPassportElementErrors" }
30935 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
30936 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
30937}
30938
30939
30940
30941
30942impl RFunction for SetPassportElementErrors {}
30943
30944impl SetPassportElementErrors {
30945 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
30946 pub fn builder() -> RTDSetPassportElementErrorsBuilder {
30947 let mut inner = SetPassportElementErrors::default();
30948 inner.td_name = "setPassportElementErrors".to_string();
30949 inner.extra = Some(Uuid::new_v4().to_string());
30950 RTDSetPassportElementErrorsBuilder { inner }
30951 }
30952
30953 pub fn user_id(&self) -> i64 { self.user_id }
30954
30955 pub fn errors(&self) -> &Vec<InputPassportElementError> { &self.errors }
30956
30957}
30958
30959#[doc(hidden)]
30960pub struct RTDSetPassportElementErrorsBuilder {
30961 inner: SetPassportElementErrors
30962}
30963
30964impl RTDSetPassportElementErrorsBuilder {
30965 pub fn build(&self) -> SetPassportElementErrors { self.inner.clone() }
30966
30967
30968 pub fn user_id(&mut self, user_id: i64) -> &mut Self {
30969 self.inner.user_id = user_id;
30970 self
30971 }
30972
30973
30974 pub fn errors(&mut self, errors: Vec<InputPassportElementError>) -> &mut Self {
30975 self.inner.errors = errors;
30976 self
30977 }
30978
30979}
30980
30981impl AsRef<SetPassportElementErrors> for SetPassportElementErrors {
30982 fn as_ref(&self) -> &SetPassportElementErrors { self }
30983}
30984
30985impl AsRef<SetPassportElementErrors> for RTDSetPassportElementErrorsBuilder {
30986 fn as_ref(&self) -> &SetPassportElementErrors { &self.inner }
30987}
30988
30989
30990
30991
30992
30993
30994
30995#[derive(Debug, Clone, Default, Serialize, Deserialize)]
30997pub struct SetPassword {
30998 #[doc(hidden)]
30999 #[serde(rename(serialize = "@type", deserialize = "@type"))]
31000 td_name: String,
31001 #[doc(hidden)]
31002 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
31003 extra: Option<String>,
31004 old_password: String,
31006 new_password: String,
31008 new_hint: String,
31010 set_recovery_email_address: bool,
31012 new_recovery_email_address: String,
31014
31015}
31016
31017impl RObject for SetPassword {
31018 #[doc(hidden)] fn td_name(&self) -> &'static str { "setPassword" }
31019 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
31020 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
31021}
31022
31023
31024
31025
31026impl RFunction for SetPassword {}
31027
31028impl SetPassword {
31029 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
31030 pub fn builder() -> RTDSetPasswordBuilder {
31031 let mut inner = SetPassword::default();
31032 inner.td_name = "setPassword".to_string();
31033 inner.extra = Some(Uuid::new_v4().to_string());
31034 RTDSetPasswordBuilder { inner }
31035 }
31036
31037 pub fn old_password(&self) -> &String { &self.old_password }
31038
31039 pub fn new_password(&self) -> &String { &self.new_password }
31040
31041 pub fn new_hint(&self) -> &String { &self.new_hint }
31042
31043 pub fn set_recovery_email_address(&self) -> bool { self.set_recovery_email_address }
31044
31045 pub fn new_recovery_email_address(&self) -> &String { &self.new_recovery_email_address }
31046
31047}
31048
31049#[doc(hidden)]
31050pub struct RTDSetPasswordBuilder {
31051 inner: SetPassword
31052}
31053
31054impl RTDSetPasswordBuilder {
31055 pub fn build(&self) -> SetPassword { self.inner.clone() }
31056
31057
31058 pub fn old_password<T: AsRef<str>>(&mut self, old_password: T) -> &mut Self {
31059 self.inner.old_password = old_password.as_ref().to_string();
31060 self
31061 }
31062
31063
31064 pub fn new_password<T: AsRef<str>>(&mut self, new_password: T) -> &mut Self {
31065 self.inner.new_password = new_password.as_ref().to_string();
31066 self
31067 }
31068
31069
31070 pub fn new_hint<T: AsRef<str>>(&mut self, new_hint: T) -> &mut Self {
31071 self.inner.new_hint = new_hint.as_ref().to_string();
31072 self
31073 }
31074
31075
31076 pub fn set_recovery_email_address(&mut self, set_recovery_email_address: bool) -> &mut Self {
31077 self.inner.set_recovery_email_address = set_recovery_email_address;
31078 self
31079 }
31080
31081
31082 pub fn new_recovery_email_address<T: AsRef<str>>(&mut self, new_recovery_email_address: T) -> &mut Self {
31083 self.inner.new_recovery_email_address = new_recovery_email_address.as_ref().to_string();
31084 self
31085 }
31086
31087}
31088
31089impl AsRef<SetPassword> for SetPassword {
31090 fn as_ref(&self) -> &SetPassword { self }
31091}
31092
31093impl AsRef<SetPassword> for RTDSetPasswordBuilder {
31094 fn as_ref(&self) -> &SetPassword { &self.inner }
31095}
31096
31097
31098
31099
31100
31101
31102
31103#[derive(Debug, Clone, Default, Serialize, Deserialize)]
31105pub struct SetPinnedChats {
31106 #[doc(hidden)]
31107 #[serde(rename(serialize = "@type", deserialize = "@type"))]
31108 td_name: String,
31109 #[doc(hidden)]
31110 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
31111 extra: Option<String>,
31112 chat_list: ChatList,
31114 chat_ids: Vec<i64>,
31116
31117}
31118
31119impl RObject for SetPinnedChats {
31120 #[doc(hidden)] fn td_name(&self) -> &'static str { "setPinnedChats" }
31121 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
31122 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
31123}
31124
31125
31126
31127
31128impl RFunction for SetPinnedChats {}
31129
31130impl SetPinnedChats {
31131 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
31132 pub fn builder() -> RTDSetPinnedChatsBuilder {
31133 let mut inner = SetPinnedChats::default();
31134 inner.td_name = "setPinnedChats".to_string();
31135 inner.extra = Some(Uuid::new_v4().to_string());
31136 RTDSetPinnedChatsBuilder { inner }
31137 }
31138
31139 pub fn chat_list(&self) -> &ChatList { &self.chat_list }
31140
31141 pub fn chat_ids(&self) -> &Vec<i64> { &self.chat_ids }
31142
31143}
31144
31145#[doc(hidden)]
31146pub struct RTDSetPinnedChatsBuilder {
31147 inner: SetPinnedChats
31148}
31149
31150impl RTDSetPinnedChatsBuilder {
31151 pub fn build(&self) -> SetPinnedChats { self.inner.clone() }
31152
31153
31154 pub fn chat_list<T: AsRef<ChatList>>(&mut self, chat_list: T) -> &mut Self {
31155 self.inner.chat_list = chat_list.as_ref().clone();
31156 self
31157 }
31158
31159
31160 pub fn chat_ids(&mut self, chat_ids: Vec<i64>) -> &mut Self {
31161 self.inner.chat_ids = chat_ids;
31162 self
31163 }
31164
31165}
31166
31167impl AsRef<SetPinnedChats> for SetPinnedChats {
31168 fn as_ref(&self) -> &SetPinnedChats { self }
31169}
31170
31171impl AsRef<SetPinnedChats> for RTDSetPinnedChatsBuilder {
31172 fn as_ref(&self) -> &SetPinnedChats { &self.inner }
31173}
31174
31175
31176
31177
31178
31179
31180
31181#[derive(Debug, Clone, Default, Serialize, Deserialize)]
31183pub struct SetPollAnswer {
31184 #[doc(hidden)]
31185 #[serde(rename(serialize = "@type", deserialize = "@type"))]
31186 td_name: String,
31187 #[doc(hidden)]
31188 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
31189 extra: Option<String>,
31190 chat_id: i64,
31192 message_id: i64,
31194 option_ids: Vec<i64>,
31196
31197}
31198
31199impl RObject for SetPollAnswer {
31200 #[doc(hidden)] fn td_name(&self) -> &'static str { "setPollAnswer" }
31201 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
31202 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
31203}
31204
31205
31206
31207
31208impl RFunction for SetPollAnswer {}
31209
31210impl SetPollAnswer {
31211 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
31212 pub fn builder() -> RTDSetPollAnswerBuilder {
31213 let mut inner = SetPollAnswer::default();
31214 inner.td_name = "setPollAnswer".to_string();
31215 inner.extra = Some(Uuid::new_v4().to_string());
31216 RTDSetPollAnswerBuilder { inner }
31217 }
31218
31219 pub fn chat_id(&self) -> i64 { self.chat_id }
31220
31221 pub fn message_id(&self) -> i64 { self.message_id }
31222
31223 pub fn option_ids(&self) -> &Vec<i64> { &self.option_ids }
31224
31225}
31226
31227#[doc(hidden)]
31228pub struct RTDSetPollAnswerBuilder {
31229 inner: SetPollAnswer
31230}
31231
31232impl RTDSetPollAnswerBuilder {
31233 pub fn build(&self) -> SetPollAnswer { self.inner.clone() }
31234
31235
31236 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
31237 self.inner.chat_id = chat_id;
31238 self
31239 }
31240
31241
31242 pub fn message_id(&mut self, message_id: i64) -> &mut Self {
31243 self.inner.message_id = message_id;
31244 self
31245 }
31246
31247
31248 pub fn option_ids(&mut self, option_ids: Vec<i64>) -> &mut Self {
31249 self.inner.option_ids = option_ids;
31250 self
31251 }
31252
31253}
31254
31255impl AsRef<SetPollAnswer> for SetPollAnswer {
31256 fn as_ref(&self) -> &SetPollAnswer { self }
31257}
31258
31259impl AsRef<SetPollAnswer> for RTDSetPollAnswerBuilder {
31260 fn as_ref(&self) -> &SetPollAnswer { &self.inner }
31261}
31262
31263
31264
31265
31266
31267
31268
31269#[derive(Debug, Clone, Default, Serialize, Deserialize)]
31271pub struct SetProfilePhoto {
31272 #[doc(hidden)]
31273 #[serde(rename(serialize = "@type", deserialize = "@type"))]
31274 td_name: String,
31275 #[doc(hidden)]
31276 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
31277 extra: Option<String>,
31278 photo: InputChatPhoto,
31280
31281}
31282
31283impl RObject for SetProfilePhoto {
31284 #[doc(hidden)] fn td_name(&self) -> &'static str { "setProfilePhoto" }
31285 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
31286 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
31287}
31288
31289
31290
31291
31292impl RFunction for SetProfilePhoto {}
31293
31294impl SetProfilePhoto {
31295 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
31296 pub fn builder() -> RTDSetProfilePhotoBuilder {
31297 let mut inner = SetProfilePhoto::default();
31298 inner.td_name = "setProfilePhoto".to_string();
31299 inner.extra = Some(Uuid::new_v4().to_string());
31300 RTDSetProfilePhotoBuilder { inner }
31301 }
31302
31303 pub fn photo(&self) -> &InputChatPhoto { &self.photo }
31304
31305}
31306
31307#[doc(hidden)]
31308pub struct RTDSetProfilePhotoBuilder {
31309 inner: SetProfilePhoto
31310}
31311
31312impl RTDSetProfilePhotoBuilder {
31313 pub fn build(&self) -> SetProfilePhoto { self.inner.clone() }
31314
31315
31316 pub fn photo<T: AsRef<InputChatPhoto>>(&mut self, photo: T) -> &mut Self {
31317 self.inner.photo = photo.as_ref().clone();
31318 self
31319 }
31320
31321}
31322
31323impl AsRef<SetProfilePhoto> for SetProfilePhoto {
31324 fn as_ref(&self) -> &SetProfilePhoto { self }
31325}
31326
31327impl AsRef<SetProfilePhoto> for RTDSetProfilePhotoBuilder {
31328 fn as_ref(&self) -> &SetProfilePhoto { &self.inner }
31329}
31330
31331
31332
31333
31334
31335
31336
31337#[derive(Debug, Clone, Default, Serialize, Deserialize)]
31339pub struct SetRecoveryEmailAddress {
31340 #[doc(hidden)]
31341 #[serde(rename(serialize = "@type", deserialize = "@type"))]
31342 td_name: String,
31343 #[doc(hidden)]
31344 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
31345 extra: Option<String>,
31346 password: String,
31348 new_recovery_email_address: String,
31350
31351}
31352
31353impl RObject for SetRecoveryEmailAddress {
31354 #[doc(hidden)] fn td_name(&self) -> &'static str { "setRecoveryEmailAddress" }
31355 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
31356 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
31357}
31358
31359
31360
31361
31362impl RFunction for SetRecoveryEmailAddress {}
31363
31364impl SetRecoveryEmailAddress {
31365 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
31366 pub fn builder() -> RTDSetRecoveryEmailAddressBuilder {
31367 let mut inner = SetRecoveryEmailAddress::default();
31368 inner.td_name = "setRecoveryEmailAddress".to_string();
31369 inner.extra = Some(Uuid::new_v4().to_string());
31370 RTDSetRecoveryEmailAddressBuilder { inner }
31371 }
31372
31373 pub fn password(&self) -> &String { &self.password }
31374
31375 pub fn new_recovery_email_address(&self) -> &String { &self.new_recovery_email_address }
31376
31377}
31378
31379#[doc(hidden)]
31380pub struct RTDSetRecoveryEmailAddressBuilder {
31381 inner: SetRecoveryEmailAddress
31382}
31383
31384impl RTDSetRecoveryEmailAddressBuilder {
31385 pub fn build(&self) -> SetRecoveryEmailAddress { self.inner.clone() }
31386
31387
31388 pub fn password<T: AsRef<str>>(&mut self, password: T) -> &mut Self {
31389 self.inner.password = password.as_ref().to_string();
31390 self
31391 }
31392
31393
31394 pub fn new_recovery_email_address<T: AsRef<str>>(&mut self, new_recovery_email_address: T) -> &mut Self {
31395 self.inner.new_recovery_email_address = new_recovery_email_address.as_ref().to_string();
31396 self
31397 }
31398
31399}
31400
31401impl AsRef<SetRecoveryEmailAddress> for SetRecoveryEmailAddress {
31402 fn as_ref(&self) -> &SetRecoveryEmailAddress { self }
31403}
31404
31405impl AsRef<SetRecoveryEmailAddress> for RTDSetRecoveryEmailAddressBuilder {
31406 fn as_ref(&self) -> &SetRecoveryEmailAddress { &self.inner }
31407}
31408
31409
31410
31411
31412
31413
31414
31415#[derive(Debug, Clone, Default, Serialize, Deserialize)]
31417pub struct SetScopeNotificationSettings {
31418 #[doc(hidden)]
31419 #[serde(rename(serialize = "@type", deserialize = "@type"))]
31420 td_name: String,
31421 #[doc(hidden)]
31422 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
31423 extra: Option<String>,
31424 scope: NotificationSettingsScope,
31426 notification_settings: ScopeNotificationSettings,
31428
31429}
31430
31431impl RObject for SetScopeNotificationSettings {
31432 #[doc(hidden)] fn td_name(&self) -> &'static str { "setScopeNotificationSettings" }
31433 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
31434 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
31435}
31436
31437
31438
31439
31440impl RFunction for SetScopeNotificationSettings {}
31441
31442impl SetScopeNotificationSettings {
31443 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
31444 pub fn builder() -> RTDSetScopeNotificationSettingsBuilder {
31445 let mut inner = SetScopeNotificationSettings::default();
31446 inner.td_name = "setScopeNotificationSettings".to_string();
31447 inner.extra = Some(Uuid::new_v4().to_string());
31448 RTDSetScopeNotificationSettingsBuilder { inner }
31449 }
31450
31451 pub fn scope(&self) -> &NotificationSettingsScope { &self.scope }
31452
31453 pub fn notification_settings(&self) -> &ScopeNotificationSettings { &self.notification_settings }
31454
31455}
31456
31457#[doc(hidden)]
31458pub struct RTDSetScopeNotificationSettingsBuilder {
31459 inner: SetScopeNotificationSettings
31460}
31461
31462impl RTDSetScopeNotificationSettingsBuilder {
31463 pub fn build(&self) -> SetScopeNotificationSettings { self.inner.clone() }
31464
31465
31466 pub fn scope<T: AsRef<NotificationSettingsScope>>(&mut self, scope: T) -> &mut Self {
31467 self.inner.scope = scope.as_ref().clone();
31468 self
31469 }
31470
31471
31472 pub fn notification_settings<T: AsRef<ScopeNotificationSettings>>(&mut self, notification_settings: T) -> &mut Self {
31473 self.inner.notification_settings = notification_settings.as_ref().clone();
31474 self
31475 }
31476
31477}
31478
31479impl AsRef<SetScopeNotificationSettings> for SetScopeNotificationSettings {
31480 fn as_ref(&self) -> &SetScopeNotificationSettings { self }
31481}
31482
31483impl AsRef<SetScopeNotificationSettings> for RTDSetScopeNotificationSettingsBuilder {
31484 fn as_ref(&self) -> &SetScopeNotificationSettings { &self.inner }
31485}
31486
31487
31488
31489
31490
31491
31492
31493#[derive(Debug, Clone, Default, Serialize, Deserialize)]
31495pub struct SetStickerPositionInSet {
31496 #[doc(hidden)]
31497 #[serde(rename(serialize = "@type", deserialize = "@type"))]
31498 td_name: String,
31499 #[doc(hidden)]
31500 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
31501 extra: Option<String>,
31502 sticker: InputFile,
31504 position: i64,
31506
31507}
31508
31509impl RObject for SetStickerPositionInSet {
31510 #[doc(hidden)] fn td_name(&self) -> &'static str { "setStickerPositionInSet" }
31511 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
31512 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
31513}
31514
31515
31516
31517
31518impl RFunction for SetStickerPositionInSet {}
31519
31520impl SetStickerPositionInSet {
31521 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
31522 pub fn builder() -> RTDSetStickerPositionInSetBuilder {
31523 let mut inner = SetStickerPositionInSet::default();
31524 inner.td_name = "setStickerPositionInSet".to_string();
31525 inner.extra = Some(Uuid::new_v4().to_string());
31526 RTDSetStickerPositionInSetBuilder { inner }
31527 }
31528
31529 pub fn sticker(&self) -> &InputFile { &self.sticker }
31530
31531 pub fn position(&self) -> i64 { self.position }
31532
31533}
31534
31535#[doc(hidden)]
31536pub struct RTDSetStickerPositionInSetBuilder {
31537 inner: SetStickerPositionInSet
31538}
31539
31540impl RTDSetStickerPositionInSetBuilder {
31541 pub fn build(&self) -> SetStickerPositionInSet { self.inner.clone() }
31542
31543
31544 pub fn sticker<T: AsRef<InputFile>>(&mut self, sticker: T) -> &mut Self {
31545 self.inner.sticker = sticker.as_ref().clone();
31546 self
31547 }
31548
31549
31550 pub fn position(&mut self, position: i64) -> &mut Self {
31551 self.inner.position = position;
31552 self
31553 }
31554
31555}
31556
31557impl AsRef<SetStickerPositionInSet> for SetStickerPositionInSet {
31558 fn as_ref(&self) -> &SetStickerPositionInSet { self }
31559}
31560
31561impl AsRef<SetStickerPositionInSet> for RTDSetStickerPositionInSetBuilder {
31562 fn as_ref(&self) -> &SetStickerPositionInSet { &self.inner }
31563}
31564
31565
31566
31567
31568
31569
31570
31571#[derive(Debug, Clone, Default, Serialize, Deserialize)]
31573pub struct SetStickerSetThumbnail {
31574 #[doc(hidden)]
31575 #[serde(rename(serialize = "@type", deserialize = "@type"))]
31576 td_name: String,
31577 #[doc(hidden)]
31578 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
31579 extra: Option<String>,
31580 user_id: i64,
31582 name: String,
31584 thumbnail: InputFile,
31586
31587}
31588
31589impl RObject for SetStickerSetThumbnail {
31590 #[doc(hidden)] fn td_name(&self) -> &'static str { "setStickerSetThumbnail" }
31591 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
31592 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
31593}
31594
31595
31596
31597
31598impl RFunction for SetStickerSetThumbnail {}
31599
31600impl SetStickerSetThumbnail {
31601 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
31602 pub fn builder() -> RTDSetStickerSetThumbnailBuilder {
31603 let mut inner = SetStickerSetThumbnail::default();
31604 inner.td_name = "setStickerSetThumbnail".to_string();
31605 inner.extra = Some(Uuid::new_v4().to_string());
31606 RTDSetStickerSetThumbnailBuilder { inner }
31607 }
31608
31609 pub fn user_id(&self) -> i64 { self.user_id }
31610
31611 pub fn name(&self) -> &String { &self.name }
31612
31613 pub fn thumbnail(&self) -> &InputFile { &self.thumbnail }
31614
31615}
31616
31617#[doc(hidden)]
31618pub struct RTDSetStickerSetThumbnailBuilder {
31619 inner: SetStickerSetThumbnail
31620}
31621
31622impl RTDSetStickerSetThumbnailBuilder {
31623 pub fn build(&self) -> SetStickerSetThumbnail { self.inner.clone() }
31624
31625
31626 pub fn user_id(&mut self, user_id: i64) -> &mut Self {
31627 self.inner.user_id = user_id;
31628 self
31629 }
31630
31631
31632 pub fn name<T: AsRef<str>>(&mut self, name: T) -> &mut Self {
31633 self.inner.name = name.as_ref().to_string();
31634 self
31635 }
31636
31637
31638 pub fn thumbnail<T: AsRef<InputFile>>(&mut self, thumbnail: T) -> &mut Self {
31639 self.inner.thumbnail = thumbnail.as_ref().clone();
31640 self
31641 }
31642
31643}
31644
31645impl AsRef<SetStickerSetThumbnail> for SetStickerSetThumbnail {
31646 fn as_ref(&self) -> &SetStickerSetThumbnail { self }
31647}
31648
31649impl AsRef<SetStickerSetThumbnail> for RTDSetStickerSetThumbnailBuilder {
31650 fn as_ref(&self) -> &SetStickerSetThumbnail { &self.inner }
31651}
31652
31653
31654
31655
31656
31657
31658
31659#[derive(Debug, Clone, Default, Serialize, Deserialize)]
31661pub struct SetSupergroupStickerSet {
31662 #[doc(hidden)]
31663 #[serde(rename(serialize = "@type", deserialize = "@type"))]
31664 td_name: String,
31665 #[doc(hidden)]
31666 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
31667 extra: Option<String>,
31668 supergroup_id: i64,
31670 sticker_set_id: isize,
31672
31673}
31674
31675impl RObject for SetSupergroupStickerSet {
31676 #[doc(hidden)] fn td_name(&self) -> &'static str { "setSupergroupStickerSet" }
31677 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
31678 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
31679}
31680
31681
31682
31683
31684impl RFunction for SetSupergroupStickerSet {}
31685
31686impl SetSupergroupStickerSet {
31687 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
31688 pub fn builder() -> RTDSetSupergroupStickerSetBuilder {
31689 let mut inner = SetSupergroupStickerSet::default();
31690 inner.td_name = "setSupergroupStickerSet".to_string();
31691 inner.extra = Some(Uuid::new_v4().to_string());
31692 RTDSetSupergroupStickerSetBuilder { inner }
31693 }
31694
31695 pub fn supergroup_id(&self) -> i64 { self.supergroup_id }
31696
31697 pub fn sticker_set_id(&self) -> isize { self.sticker_set_id }
31698
31699}
31700
31701#[doc(hidden)]
31702pub struct RTDSetSupergroupStickerSetBuilder {
31703 inner: SetSupergroupStickerSet
31704}
31705
31706impl RTDSetSupergroupStickerSetBuilder {
31707 pub fn build(&self) -> SetSupergroupStickerSet { self.inner.clone() }
31708
31709
31710 pub fn supergroup_id(&mut self, supergroup_id: i64) -> &mut Self {
31711 self.inner.supergroup_id = supergroup_id;
31712 self
31713 }
31714
31715
31716 pub fn sticker_set_id(&mut self, sticker_set_id: isize) -> &mut Self {
31717 self.inner.sticker_set_id = sticker_set_id;
31718 self
31719 }
31720
31721}
31722
31723impl AsRef<SetSupergroupStickerSet> for SetSupergroupStickerSet {
31724 fn as_ref(&self) -> &SetSupergroupStickerSet { self }
31725}
31726
31727impl AsRef<SetSupergroupStickerSet> for RTDSetSupergroupStickerSetBuilder {
31728 fn as_ref(&self) -> &SetSupergroupStickerSet { &self.inner }
31729}
31730
31731
31732
31733
31734
31735
31736
31737#[derive(Debug, Clone, Default, Serialize, Deserialize)]
31739pub struct SetSupergroupUsername {
31740 #[doc(hidden)]
31741 #[serde(rename(serialize = "@type", deserialize = "@type"))]
31742 td_name: String,
31743 #[doc(hidden)]
31744 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
31745 extra: Option<String>,
31746 supergroup_id: i64,
31748 username: String,
31750
31751}
31752
31753impl RObject for SetSupergroupUsername {
31754 #[doc(hidden)] fn td_name(&self) -> &'static str { "setSupergroupUsername" }
31755 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
31756 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
31757}
31758
31759
31760
31761
31762impl RFunction for SetSupergroupUsername {}
31763
31764impl SetSupergroupUsername {
31765 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
31766 pub fn builder() -> RTDSetSupergroupUsernameBuilder {
31767 let mut inner = SetSupergroupUsername::default();
31768 inner.td_name = "setSupergroupUsername".to_string();
31769 inner.extra = Some(Uuid::new_v4().to_string());
31770 RTDSetSupergroupUsernameBuilder { inner }
31771 }
31772
31773 pub fn supergroup_id(&self) -> i64 { self.supergroup_id }
31774
31775 pub fn username(&self) -> &String { &self.username }
31776
31777}
31778
31779#[doc(hidden)]
31780pub struct RTDSetSupergroupUsernameBuilder {
31781 inner: SetSupergroupUsername
31782}
31783
31784impl RTDSetSupergroupUsernameBuilder {
31785 pub fn build(&self) -> SetSupergroupUsername { self.inner.clone() }
31786
31787
31788 pub fn supergroup_id(&mut self, supergroup_id: i64) -> &mut Self {
31789 self.inner.supergroup_id = supergroup_id;
31790 self
31791 }
31792
31793
31794 pub fn username<T: AsRef<str>>(&mut self, username: T) -> &mut Self {
31795 self.inner.username = username.as_ref().to_string();
31796 self
31797 }
31798
31799}
31800
31801impl AsRef<SetSupergroupUsername> for SetSupergroupUsername {
31802 fn as_ref(&self) -> &SetSupergroupUsername { self }
31803}
31804
31805impl AsRef<SetSupergroupUsername> for RTDSetSupergroupUsernameBuilder {
31806 fn as_ref(&self) -> &SetSupergroupUsername { &self.inner }
31807}
31808
31809
31810
31811
31812
31813
31814
31815#[derive(Debug, Clone, Default, Serialize, Deserialize)]
31817pub struct SetTdlibParameters {
31818 #[doc(hidden)]
31819 #[serde(rename(serialize = "@type", deserialize = "@type"))]
31820 td_name: String,
31821 #[doc(hidden)]
31822 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
31823 extra: Option<String>,
31824 parameters: TdlibParameters,
31826
31827}
31828
31829impl RObject for SetTdlibParameters {
31830 #[doc(hidden)] fn td_name(&self) -> &'static str { "setTdlibParameters" }
31831 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
31832 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
31833}
31834
31835
31836
31837
31838impl RFunction for SetTdlibParameters {}
31839
31840impl SetTdlibParameters {
31841 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
31842 pub fn builder() -> RTDSetTdlibParametersBuilder {
31843 let mut inner = SetTdlibParameters::default();
31844 inner.td_name = "setTdlibParameters".to_string();
31845 inner.extra = Some(Uuid::new_v4().to_string());
31846 RTDSetTdlibParametersBuilder { inner }
31847 }
31848
31849 pub fn parameters(&self) -> &TdlibParameters { &self.parameters }
31850
31851}
31852
31853#[doc(hidden)]
31854pub struct RTDSetTdlibParametersBuilder {
31855 inner: SetTdlibParameters
31856}
31857
31858impl RTDSetTdlibParametersBuilder {
31859 pub fn build(&self) -> SetTdlibParameters { self.inner.clone() }
31860
31861
31862 pub fn parameters<T: AsRef<TdlibParameters>>(&mut self, parameters: T) -> &mut Self {
31863 self.inner.parameters = parameters.as_ref().clone();
31864 self
31865 }
31866
31867}
31868
31869impl AsRef<SetTdlibParameters> for SetTdlibParameters {
31870 fn as_ref(&self) -> &SetTdlibParameters { self }
31871}
31872
31873impl AsRef<SetTdlibParameters> for RTDSetTdlibParametersBuilder {
31874 fn as_ref(&self) -> &SetTdlibParameters { &self.inner }
31875}
31876
31877
31878
31879
31880
31881
31882
31883#[derive(Debug, Clone, Default, Serialize, Deserialize)]
31885pub struct SetUserPrivacySettingRules {
31886 #[doc(hidden)]
31887 #[serde(rename(serialize = "@type", deserialize = "@type"))]
31888 td_name: String,
31889 #[doc(hidden)]
31890 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
31891 extra: Option<String>,
31892 setting: UserPrivacySetting,
31894 rules: UserPrivacySettingRules,
31896
31897}
31898
31899impl RObject for SetUserPrivacySettingRules {
31900 #[doc(hidden)] fn td_name(&self) -> &'static str { "setUserPrivacySettingRules" }
31901 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
31902 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
31903}
31904
31905
31906
31907
31908impl RFunction for SetUserPrivacySettingRules {}
31909
31910impl SetUserPrivacySettingRules {
31911 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
31912 pub fn builder() -> RTDSetUserPrivacySettingRulesBuilder {
31913 let mut inner = SetUserPrivacySettingRules::default();
31914 inner.td_name = "setUserPrivacySettingRules".to_string();
31915 inner.extra = Some(Uuid::new_v4().to_string());
31916 RTDSetUserPrivacySettingRulesBuilder { inner }
31917 }
31918
31919 pub fn setting(&self) -> &UserPrivacySetting { &self.setting }
31920
31921 pub fn rules(&self) -> &UserPrivacySettingRules { &self.rules }
31922
31923}
31924
31925#[doc(hidden)]
31926pub struct RTDSetUserPrivacySettingRulesBuilder {
31927 inner: SetUserPrivacySettingRules
31928}
31929
31930impl RTDSetUserPrivacySettingRulesBuilder {
31931 pub fn build(&self) -> SetUserPrivacySettingRules { self.inner.clone() }
31932
31933
31934 pub fn setting<T: AsRef<UserPrivacySetting>>(&mut self, setting: T) -> &mut Self {
31935 self.inner.setting = setting.as_ref().clone();
31936 self
31937 }
31938
31939
31940 pub fn rules<T: AsRef<UserPrivacySettingRules>>(&mut self, rules: T) -> &mut Self {
31941 self.inner.rules = rules.as_ref().clone();
31942 self
31943 }
31944
31945}
31946
31947impl AsRef<SetUserPrivacySettingRules> for SetUserPrivacySettingRules {
31948 fn as_ref(&self) -> &SetUserPrivacySettingRules { self }
31949}
31950
31951impl AsRef<SetUserPrivacySettingRules> for RTDSetUserPrivacySettingRulesBuilder {
31952 fn as_ref(&self) -> &SetUserPrivacySettingRules { &self.inner }
31953}
31954
31955
31956
31957
31958
31959
31960
31961#[derive(Debug, Clone, Default, Serialize, Deserialize)]
31963pub struct SetUsername {
31964 #[doc(hidden)]
31965 #[serde(rename(serialize = "@type", deserialize = "@type"))]
31966 td_name: String,
31967 #[doc(hidden)]
31968 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
31969 extra: Option<String>,
31970 username: String,
31972
31973}
31974
31975impl RObject for SetUsername {
31976 #[doc(hidden)] fn td_name(&self) -> &'static str { "setUsername" }
31977 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
31978 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
31979}
31980
31981
31982
31983
31984impl RFunction for SetUsername {}
31985
31986impl SetUsername {
31987 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
31988 pub fn builder() -> RTDSetUsernameBuilder {
31989 let mut inner = SetUsername::default();
31990 inner.td_name = "setUsername".to_string();
31991 inner.extra = Some(Uuid::new_v4().to_string());
31992 RTDSetUsernameBuilder { inner }
31993 }
31994
31995 pub fn username(&self) -> &String { &self.username }
31996
31997}
31998
31999#[doc(hidden)]
32000pub struct RTDSetUsernameBuilder {
32001 inner: SetUsername
32002}
32003
32004impl RTDSetUsernameBuilder {
32005 pub fn build(&self) -> SetUsername { self.inner.clone() }
32006
32007
32008 pub fn username<T: AsRef<str>>(&mut self, username: T) -> &mut Self {
32009 self.inner.username = username.as_ref().to_string();
32010 self
32011 }
32012
32013}
32014
32015impl AsRef<SetUsername> for SetUsername {
32016 fn as_ref(&self) -> &SetUsername { self }
32017}
32018
32019impl AsRef<SetUsername> for RTDSetUsernameBuilder {
32020 fn as_ref(&self) -> &SetUsername { &self.inner }
32021}
32022
32023
32024
32025
32026
32027
32028
32029#[derive(Debug, Clone, Default, Serialize, Deserialize)]
32031pub struct SetVideoChatDefaultParticipant {
32032 #[doc(hidden)]
32033 #[serde(rename(serialize = "@type", deserialize = "@type"))]
32034 td_name: String,
32035 #[doc(hidden)]
32036 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
32037 extra: Option<String>,
32038 chat_id: i64,
32040 default_participant_id: MessageSender,
32042
32043}
32044
32045impl RObject for SetVideoChatDefaultParticipant {
32046 #[doc(hidden)] fn td_name(&self) -> &'static str { "setVideoChatDefaultParticipant" }
32047 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
32048 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
32049}
32050
32051
32052
32053
32054impl RFunction for SetVideoChatDefaultParticipant {}
32055
32056impl SetVideoChatDefaultParticipant {
32057 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
32058 pub fn builder() -> RTDSetVideoChatDefaultParticipantBuilder {
32059 let mut inner = SetVideoChatDefaultParticipant::default();
32060 inner.td_name = "setVideoChatDefaultParticipant".to_string();
32061 inner.extra = Some(Uuid::new_v4().to_string());
32062 RTDSetVideoChatDefaultParticipantBuilder { inner }
32063 }
32064
32065 pub fn chat_id(&self) -> i64 { self.chat_id }
32066
32067 pub fn default_participant_id(&self) -> &MessageSender { &self.default_participant_id }
32068
32069}
32070
32071#[doc(hidden)]
32072pub struct RTDSetVideoChatDefaultParticipantBuilder {
32073 inner: SetVideoChatDefaultParticipant
32074}
32075
32076impl RTDSetVideoChatDefaultParticipantBuilder {
32077 pub fn build(&self) -> SetVideoChatDefaultParticipant { self.inner.clone() }
32078
32079
32080 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
32081 self.inner.chat_id = chat_id;
32082 self
32083 }
32084
32085
32086 pub fn default_participant_id<T: AsRef<MessageSender>>(&mut self, default_participant_id: T) -> &mut Self {
32087 self.inner.default_participant_id = default_participant_id.as_ref().clone();
32088 self
32089 }
32090
32091}
32092
32093impl AsRef<SetVideoChatDefaultParticipant> for SetVideoChatDefaultParticipant {
32094 fn as_ref(&self) -> &SetVideoChatDefaultParticipant { self }
32095}
32096
32097impl AsRef<SetVideoChatDefaultParticipant> for RTDSetVideoChatDefaultParticipantBuilder {
32098 fn as_ref(&self) -> &SetVideoChatDefaultParticipant { &self.inner }
32099}
32100
32101
32102
32103
32104
32105
32106
32107#[derive(Debug, Clone, Default, Serialize, Deserialize)]
32109pub struct SharePhoneNumber {
32110 #[doc(hidden)]
32111 #[serde(rename(serialize = "@type", deserialize = "@type"))]
32112 td_name: String,
32113 #[doc(hidden)]
32114 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
32115 extra: Option<String>,
32116 user_id: i64,
32118
32119}
32120
32121impl RObject for SharePhoneNumber {
32122 #[doc(hidden)] fn td_name(&self) -> &'static str { "sharePhoneNumber" }
32123 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
32124 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
32125}
32126
32127
32128
32129
32130impl RFunction for SharePhoneNumber {}
32131
32132impl SharePhoneNumber {
32133 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
32134 pub fn builder() -> RTDSharePhoneNumberBuilder {
32135 let mut inner = SharePhoneNumber::default();
32136 inner.td_name = "sharePhoneNumber".to_string();
32137 inner.extra = Some(Uuid::new_v4().to_string());
32138 RTDSharePhoneNumberBuilder { inner }
32139 }
32140
32141 pub fn user_id(&self) -> i64 { self.user_id }
32142
32143}
32144
32145#[doc(hidden)]
32146pub struct RTDSharePhoneNumberBuilder {
32147 inner: SharePhoneNumber
32148}
32149
32150impl RTDSharePhoneNumberBuilder {
32151 pub fn build(&self) -> SharePhoneNumber { self.inner.clone() }
32152
32153
32154 pub fn user_id(&mut self, user_id: i64) -> &mut Self {
32155 self.inner.user_id = user_id;
32156 self
32157 }
32158
32159}
32160
32161impl AsRef<SharePhoneNumber> for SharePhoneNumber {
32162 fn as_ref(&self) -> &SharePhoneNumber { self }
32163}
32164
32165impl AsRef<SharePhoneNumber> for RTDSharePhoneNumberBuilder {
32166 fn as_ref(&self) -> &SharePhoneNumber { &self.inner }
32167}
32168
32169
32170
32171
32172
32173
32174
32175#[derive(Debug, Clone, Default, Serialize, Deserialize)]
32177pub struct StartGroupCallRecording {
32178 #[doc(hidden)]
32179 #[serde(rename(serialize = "@type", deserialize = "@type"))]
32180 td_name: String,
32181 #[doc(hidden)]
32182 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
32183 extra: Option<String>,
32184 group_call_id: i64,
32186 title: String,
32188 record_video: bool,
32190 use_portrait_orientation: bool,
32192
32193}
32194
32195impl RObject for StartGroupCallRecording {
32196 #[doc(hidden)] fn td_name(&self) -> &'static str { "startGroupCallRecording" }
32197 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
32198 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
32199}
32200
32201
32202
32203
32204impl RFunction for StartGroupCallRecording {}
32205
32206impl StartGroupCallRecording {
32207 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
32208 pub fn builder() -> RTDStartGroupCallRecordingBuilder {
32209 let mut inner = StartGroupCallRecording::default();
32210 inner.td_name = "startGroupCallRecording".to_string();
32211 inner.extra = Some(Uuid::new_v4().to_string());
32212 RTDStartGroupCallRecordingBuilder { inner }
32213 }
32214
32215 pub fn group_call_id(&self) -> i64 { self.group_call_id }
32216
32217 pub fn title(&self) -> &String { &self.title }
32218
32219 pub fn record_video(&self) -> bool { self.record_video }
32220
32221 pub fn use_portrait_orientation(&self) -> bool { self.use_portrait_orientation }
32222
32223}
32224
32225#[doc(hidden)]
32226pub struct RTDStartGroupCallRecordingBuilder {
32227 inner: StartGroupCallRecording
32228}
32229
32230impl RTDStartGroupCallRecordingBuilder {
32231 pub fn build(&self) -> StartGroupCallRecording { self.inner.clone() }
32232
32233
32234 pub fn group_call_id(&mut self, group_call_id: i64) -> &mut Self {
32235 self.inner.group_call_id = group_call_id;
32236 self
32237 }
32238
32239
32240 pub fn title<T: AsRef<str>>(&mut self, title: T) -> &mut Self {
32241 self.inner.title = title.as_ref().to_string();
32242 self
32243 }
32244
32245
32246 pub fn record_video(&mut self, record_video: bool) -> &mut Self {
32247 self.inner.record_video = record_video;
32248 self
32249 }
32250
32251
32252 pub fn use_portrait_orientation(&mut self, use_portrait_orientation: bool) -> &mut Self {
32253 self.inner.use_portrait_orientation = use_portrait_orientation;
32254 self
32255 }
32256
32257}
32258
32259impl AsRef<StartGroupCallRecording> for StartGroupCallRecording {
32260 fn as_ref(&self) -> &StartGroupCallRecording { self }
32261}
32262
32263impl AsRef<StartGroupCallRecording> for RTDStartGroupCallRecordingBuilder {
32264 fn as_ref(&self) -> &StartGroupCallRecording { &self.inner }
32265}
32266
32267
32268
32269
32270
32271
32272
32273#[derive(Debug, Clone, Default, Serialize, Deserialize)]
32275pub struct StartGroupCallScreenSharing {
32276 #[doc(hidden)]
32277 #[serde(rename(serialize = "@type", deserialize = "@type"))]
32278 td_name: String,
32279 #[doc(hidden)]
32280 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
32281 extra: Option<String>,
32282 group_call_id: i64,
32284 audio_source_id: i64,
32286 payload: String,
32288
32289}
32290
32291impl RObject for StartGroupCallScreenSharing {
32292 #[doc(hidden)] fn td_name(&self) -> &'static str { "startGroupCallScreenSharing" }
32293 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
32294 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
32295}
32296
32297
32298
32299
32300impl RFunction for StartGroupCallScreenSharing {}
32301
32302impl StartGroupCallScreenSharing {
32303 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
32304 pub fn builder() -> RTDStartGroupCallScreenSharingBuilder {
32305 let mut inner = StartGroupCallScreenSharing::default();
32306 inner.td_name = "startGroupCallScreenSharing".to_string();
32307 inner.extra = Some(Uuid::new_v4().to_string());
32308 RTDStartGroupCallScreenSharingBuilder { inner }
32309 }
32310
32311 pub fn group_call_id(&self) -> i64 { self.group_call_id }
32312
32313 pub fn audio_source_id(&self) -> i64 { self.audio_source_id }
32314
32315 pub fn payload(&self) -> &String { &self.payload }
32316
32317}
32318
32319#[doc(hidden)]
32320pub struct RTDStartGroupCallScreenSharingBuilder {
32321 inner: StartGroupCallScreenSharing
32322}
32323
32324impl RTDStartGroupCallScreenSharingBuilder {
32325 pub fn build(&self) -> StartGroupCallScreenSharing { self.inner.clone() }
32326
32327
32328 pub fn group_call_id(&mut self, group_call_id: i64) -> &mut Self {
32329 self.inner.group_call_id = group_call_id;
32330 self
32331 }
32332
32333
32334 pub fn audio_source_id(&mut self, audio_source_id: i64) -> &mut Self {
32335 self.inner.audio_source_id = audio_source_id;
32336 self
32337 }
32338
32339
32340 pub fn payload<T: AsRef<str>>(&mut self, payload: T) -> &mut Self {
32341 self.inner.payload = payload.as_ref().to_string();
32342 self
32343 }
32344
32345}
32346
32347impl AsRef<StartGroupCallScreenSharing> for StartGroupCallScreenSharing {
32348 fn as_ref(&self) -> &StartGroupCallScreenSharing { self }
32349}
32350
32351impl AsRef<StartGroupCallScreenSharing> for RTDStartGroupCallScreenSharingBuilder {
32352 fn as_ref(&self) -> &StartGroupCallScreenSharing { &self.inner }
32353}
32354
32355
32356
32357
32358
32359
32360
32361#[derive(Debug, Clone, Default, Serialize, Deserialize)]
32363pub struct StartScheduledGroupCall {
32364 #[doc(hidden)]
32365 #[serde(rename(serialize = "@type", deserialize = "@type"))]
32366 td_name: String,
32367 #[doc(hidden)]
32368 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
32369 extra: Option<String>,
32370 group_call_id: i64,
32372
32373}
32374
32375impl RObject for StartScheduledGroupCall {
32376 #[doc(hidden)] fn td_name(&self) -> &'static str { "startScheduledGroupCall" }
32377 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
32378 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
32379}
32380
32381
32382
32383
32384impl RFunction for StartScheduledGroupCall {}
32385
32386impl StartScheduledGroupCall {
32387 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
32388 pub fn builder() -> RTDStartScheduledGroupCallBuilder {
32389 let mut inner = StartScheduledGroupCall::default();
32390 inner.td_name = "startScheduledGroupCall".to_string();
32391 inner.extra = Some(Uuid::new_v4().to_string());
32392 RTDStartScheduledGroupCallBuilder { inner }
32393 }
32394
32395 pub fn group_call_id(&self) -> i64 { self.group_call_id }
32396
32397}
32398
32399#[doc(hidden)]
32400pub struct RTDStartScheduledGroupCallBuilder {
32401 inner: StartScheduledGroupCall
32402}
32403
32404impl RTDStartScheduledGroupCallBuilder {
32405 pub fn build(&self) -> StartScheduledGroupCall { self.inner.clone() }
32406
32407
32408 pub fn group_call_id(&mut self, group_call_id: i64) -> &mut Self {
32409 self.inner.group_call_id = group_call_id;
32410 self
32411 }
32412
32413}
32414
32415impl AsRef<StartScheduledGroupCall> for StartScheduledGroupCall {
32416 fn as_ref(&self) -> &StartScheduledGroupCall { self }
32417}
32418
32419impl AsRef<StartScheduledGroupCall> for RTDStartScheduledGroupCallBuilder {
32420 fn as_ref(&self) -> &StartScheduledGroupCall { &self.inner }
32421}
32422
32423
32424
32425
32426
32427
32428
32429#[derive(Debug, Clone, Default, Serialize, Deserialize)]
32431pub struct StopPoll {
32432 #[doc(hidden)]
32433 #[serde(rename(serialize = "@type", deserialize = "@type"))]
32434 td_name: String,
32435 #[doc(hidden)]
32436 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
32437 extra: Option<String>,
32438 chat_id: i64,
32440 message_id: i64,
32442 reply_markup: ReplyMarkup,
32444
32445}
32446
32447impl RObject for StopPoll {
32448 #[doc(hidden)] fn td_name(&self) -> &'static str { "stopPoll" }
32449 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
32450 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
32451}
32452
32453
32454
32455
32456impl RFunction for StopPoll {}
32457
32458impl StopPoll {
32459 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
32460 pub fn builder() -> RTDStopPollBuilder {
32461 let mut inner = StopPoll::default();
32462 inner.td_name = "stopPoll".to_string();
32463 inner.extra = Some(Uuid::new_v4().to_string());
32464 RTDStopPollBuilder { inner }
32465 }
32466
32467 pub fn chat_id(&self) -> i64 { self.chat_id }
32468
32469 pub fn message_id(&self) -> i64 { self.message_id }
32470
32471 pub fn reply_markup(&self) -> &ReplyMarkup { &self.reply_markup }
32472
32473}
32474
32475#[doc(hidden)]
32476pub struct RTDStopPollBuilder {
32477 inner: StopPoll
32478}
32479
32480impl RTDStopPollBuilder {
32481 pub fn build(&self) -> StopPoll { self.inner.clone() }
32482
32483
32484 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
32485 self.inner.chat_id = chat_id;
32486 self
32487 }
32488
32489
32490 pub fn message_id(&mut self, message_id: i64) -> &mut Self {
32491 self.inner.message_id = message_id;
32492 self
32493 }
32494
32495
32496 pub fn reply_markup<T: AsRef<ReplyMarkup>>(&mut self, reply_markup: T) -> &mut Self {
32497 self.inner.reply_markup = reply_markup.as_ref().clone();
32498 self
32499 }
32500
32501}
32502
32503impl AsRef<StopPoll> for StopPoll {
32504 fn as_ref(&self) -> &StopPoll { self }
32505}
32506
32507impl AsRef<StopPoll> for RTDStopPollBuilder {
32508 fn as_ref(&self) -> &StopPoll { &self.inner }
32509}
32510
32511
32512
32513
32514
32515
32516
32517#[derive(Debug, Clone, Default, Serialize, Deserialize)]
32519pub struct SynchronizeLanguagePack {
32520 #[doc(hidden)]
32521 #[serde(rename(serialize = "@type", deserialize = "@type"))]
32522 td_name: String,
32523 #[doc(hidden)]
32524 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
32525 extra: Option<String>,
32526 language_pack_id: String,
32528
32529}
32530
32531impl RObject for SynchronizeLanguagePack {
32532 #[doc(hidden)] fn td_name(&self) -> &'static str { "synchronizeLanguagePack" }
32533 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
32534 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
32535}
32536
32537
32538
32539
32540impl RFunction for SynchronizeLanguagePack {}
32541
32542impl SynchronizeLanguagePack {
32543 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
32544 pub fn builder() -> RTDSynchronizeLanguagePackBuilder {
32545 let mut inner = SynchronizeLanguagePack::default();
32546 inner.td_name = "synchronizeLanguagePack".to_string();
32547 inner.extra = Some(Uuid::new_v4().to_string());
32548 RTDSynchronizeLanguagePackBuilder { inner }
32549 }
32550
32551 pub fn language_pack_id(&self) -> &String { &self.language_pack_id }
32552
32553}
32554
32555#[doc(hidden)]
32556pub struct RTDSynchronizeLanguagePackBuilder {
32557 inner: SynchronizeLanguagePack
32558}
32559
32560impl RTDSynchronizeLanguagePackBuilder {
32561 pub fn build(&self) -> SynchronizeLanguagePack { self.inner.clone() }
32562
32563
32564 pub fn language_pack_id<T: AsRef<str>>(&mut self, language_pack_id: T) -> &mut Self {
32565 self.inner.language_pack_id = language_pack_id.as_ref().to_string();
32566 self
32567 }
32568
32569}
32570
32571impl AsRef<SynchronizeLanguagePack> for SynchronizeLanguagePack {
32572 fn as_ref(&self) -> &SynchronizeLanguagePack { self }
32573}
32574
32575impl AsRef<SynchronizeLanguagePack> for RTDSynchronizeLanguagePackBuilder {
32576 fn as_ref(&self) -> &SynchronizeLanguagePack { &self.inner }
32577}
32578
32579
32580
32581
32582
32583
32584
32585#[derive(Debug, Clone, Default, Serialize, Deserialize)]
32587pub struct TerminateAllOtherSessions {
32588 #[doc(hidden)]
32589 #[serde(rename(serialize = "@type", deserialize = "@type"))]
32590 td_name: String,
32591 #[doc(hidden)]
32592 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
32593 extra: Option<String>,
32594
32595}
32596
32597impl RObject for TerminateAllOtherSessions {
32598 #[doc(hidden)] fn td_name(&self) -> &'static str { "terminateAllOtherSessions" }
32599 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
32600 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
32601}
32602
32603
32604
32605
32606impl RFunction for TerminateAllOtherSessions {}
32607
32608impl TerminateAllOtherSessions {
32609 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
32610 pub fn builder() -> RTDTerminateAllOtherSessionsBuilder {
32611 let mut inner = TerminateAllOtherSessions::default();
32612 inner.td_name = "terminateAllOtherSessions".to_string();
32613 inner.extra = Some(Uuid::new_v4().to_string());
32614 RTDTerminateAllOtherSessionsBuilder { inner }
32615 }
32616
32617}
32618
32619#[doc(hidden)]
32620pub struct RTDTerminateAllOtherSessionsBuilder {
32621 inner: TerminateAllOtherSessions
32622}
32623
32624impl RTDTerminateAllOtherSessionsBuilder {
32625 pub fn build(&self) -> TerminateAllOtherSessions { self.inner.clone() }
32626
32627}
32628
32629impl AsRef<TerminateAllOtherSessions> for TerminateAllOtherSessions {
32630 fn as_ref(&self) -> &TerminateAllOtherSessions { self }
32631}
32632
32633impl AsRef<TerminateAllOtherSessions> for RTDTerminateAllOtherSessionsBuilder {
32634 fn as_ref(&self) -> &TerminateAllOtherSessions { &self.inner }
32635}
32636
32637
32638
32639
32640
32641
32642
32643#[derive(Debug, Clone, Default, Serialize, Deserialize)]
32645pub struct TerminateSession {
32646 #[doc(hidden)]
32647 #[serde(rename(serialize = "@type", deserialize = "@type"))]
32648 td_name: String,
32649 #[doc(hidden)]
32650 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
32651 extra: Option<String>,
32652 session_id: isize,
32654
32655}
32656
32657impl RObject for TerminateSession {
32658 #[doc(hidden)] fn td_name(&self) -> &'static str { "terminateSession" }
32659 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
32660 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
32661}
32662
32663
32664
32665
32666impl RFunction for TerminateSession {}
32667
32668impl TerminateSession {
32669 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
32670 pub fn builder() -> RTDTerminateSessionBuilder {
32671 let mut inner = TerminateSession::default();
32672 inner.td_name = "terminateSession".to_string();
32673 inner.extra = Some(Uuid::new_v4().to_string());
32674 RTDTerminateSessionBuilder { inner }
32675 }
32676
32677 pub fn session_id(&self) -> isize { self.session_id }
32678
32679}
32680
32681#[doc(hidden)]
32682pub struct RTDTerminateSessionBuilder {
32683 inner: TerminateSession
32684}
32685
32686impl RTDTerminateSessionBuilder {
32687 pub fn build(&self) -> TerminateSession { self.inner.clone() }
32688
32689
32690 pub fn session_id(&mut self, session_id: isize) -> &mut Self {
32691 self.inner.session_id = session_id;
32692 self
32693 }
32694
32695}
32696
32697impl AsRef<TerminateSession> for TerminateSession {
32698 fn as_ref(&self) -> &TerminateSession { self }
32699}
32700
32701impl AsRef<TerminateSession> for RTDTerminateSessionBuilder {
32702 fn as_ref(&self) -> &TerminateSession { &self.inner }
32703}
32704
32705
32706
32707
32708
32709
32710
32711#[derive(Debug, Clone, Default, Serialize, Deserialize)]
32713pub struct TestCallBytes {
32714 #[doc(hidden)]
32715 #[serde(rename(serialize = "@type", deserialize = "@type"))]
32716 td_name: String,
32717 #[doc(hidden)]
32718 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
32719 extra: Option<String>,
32720 x: String,
32722
32723}
32724
32725impl RObject for TestCallBytes {
32726 #[doc(hidden)] fn td_name(&self) -> &'static str { "testCallBytes" }
32727 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
32728 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
32729}
32730
32731
32732
32733
32734impl RFunction for TestCallBytes {}
32735
32736impl TestCallBytes {
32737 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
32738 pub fn builder() -> RTDTestCallBytesBuilder {
32739 let mut inner = TestCallBytes::default();
32740 inner.td_name = "testCallBytes".to_string();
32741 inner.extra = Some(Uuid::new_v4().to_string());
32742 RTDTestCallBytesBuilder { inner }
32743 }
32744
32745 pub fn x(&self) -> &String { &self.x }
32746
32747}
32748
32749#[doc(hidden)]
32750pub struct RTDTestCallBytesBuilder {
32751 inner: TestCallBytes
32752}
32753
32754impl RTDTestCallBytesBuilder {
32755 pub fn build(&self) -> TestCallBytes { self.inner.clone() }
32756
32757
32758 pub fn x<T: AsRef<str>>(&mut self, x: T) -> &mut Self {
32759 self.inner.x = x.as_ref().to_string();
32760 self
32761 }
32762
32763}
32764
32765impl AsRef<TestCallBytes> for TestCallBytes {
32766 fn as_ref(&self) -> &TestCallBytes { self }
32767}
32768
32769impl AsRef<TestCallBytes> for RTDTestCallBytesBuilder {
32770 fn as_ref(&self) -> &TestCallBytes { &self.inner }
32771}
32772
32773
32774
32775
32776
32777
32778
32779#[derive(Debug, Clone, Default, Serialize, Deserialize)]
32781pub struct TestCallEmpty {
32782 #[doc(hidden)]
32783 #[serde(rename(serialize = "@type", deserialize = "@type"))]
32784 td_name: String,
32785 #[doc(hidden)]
32786 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
32787 extra: Option<String>,
32788
32789}
32790
32791impl RObject for TestCallEmpty {
32792 #[doc(hidden)] fn td_name(&self) -> &'static str { "testCallEmpty" }
32793 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
32794 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
32795}
32796
32797
32798
32799
32800impl RFunction for TestCallEmpty {}
32801
32802impl TestCallEmpty {
32803 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
32804 pub fn builder() -> RTDTestCallEmptyBuilder {
32805 let mut inner = TestCallEmpty::default();
32806 inner.td_name = "testCallEmpty".to_string();
32807 inner.extra = Some(Uuid::new_v4().to_string());
32808 RTDTestCallEmptyBuilder { inner }
32809 }
32810
32811}
32812
32813#[doc(hidden)]
32814pub struct RTDTestCallEmptyBuilder {
32815 inner: TestCallEmpty
32816}
32817
32818impl RTDTestCallEmptyBuilder {
32819 pub fn build(&self) -> TestCallEmpty { self.inner.clone() }
32820
32821}
32822
32823impl AsRef<TestCallEmpty> for TestCallEmpty {
32824 fn as_ref(&self) -> &TestCallEmpty { self }
32825}
32826
32827impl AsRef<TestCallEmpty> for RTDTestCallEmptyBuilder {
32828 fn as_ref(&self) -> &TestCallEmpty { &self.inner }
32829}
32830
32831
32832
32833
32834
32835
32836
32837#[derive(Debug, Clone, Default, Serialize, Deserialize)]
32839pub struct TestCallString {
32840 #[doc(hidden)]
32841 #[serde(rename(serialize = "@type", deserialize = "@type"))]
32842 td_name: String,
32843 #[doc(hidden)]
32844 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
32845 extra: Option<String>,
32846 x: String,
32848
32849}
32850
32851impl RObject for TestCallString {
32852 #[doc(hidden)] fn td_name(&self) -> &'static str { "testCallString" }
32853 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
32854 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
32855}
32856
32857
32858
32859
32860impl RFunction for TestCallString {}
32861
32862impl TestCallString {
32863 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
32864 pub fn builder() -> RTDTestCallStringBuilder {
32865 let mut inner = TestCallString::default();
32866 inner.td_name = "testCallString".to_string();
32867 inner.extra = Some(Uuid::new_v4().to_string());
32868 RTDTestCallStringBuilder { inner }
32869 }
32870
32871 pub fn x(&self) -> &String { &self.x }
32872
32873}
32874
32875#[doc(hidden)]
32876pub struct RTDTestCallStringBuilder {
32877 inner: TestCallString
32878}
32879
32880impl RTDTestCallStringBuilder {
32881 pub fn build(&self) -> TestCallString { self.inner.clone() }
32882
32883
32884 pub fn x<T: AsRef<str>>(&mut self, x: T) -> &mut Self {
32885 self.inner.x = x.as_ref().to_string();
32886 self
32887 }
32888
32889}
32890
32891impl AsRef<TestCallString> for TestCallString {
32892 fn as_ref(&self) -> &TestCallString { self }
32893}
32894
32895impl AsRef<TestCallString> for RTDTestCallStringBuilder {
32896 fn as_ref(&self) -> &TestCallString { &self.inner }
32897}
32898
32899
32900
32901
32902
32903
32904
32905#[derive(Debug, Clone, Default, Serialize, Deserialize)]
32907pub struct TestCallVectorInt {
32908 #[doc(hidden)]
32909 #[serde(rename(serialize = "@type", deserialize = "@type"))]
32910 td_name: String,
32911 #[doc(hidden)]
32912 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
32913 extra: Option<String>,
32914 x: Vec<i64>,
32916
32917}
32918
32919impl RObject for TestCallVectorInt {
32920 #[doc(hidden)] fn td_name(&self) -> &'static str { "testCallVectorInt" }
32921 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
32922 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
32923}
32924
32925
32926
32927
32928impl RFunction for TestCallVectorInt {}
32929
32930impl TestCallVectorInt {
32931 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
32932 pub fn builder() -> RTDTestCallVectorIntBuilder {
32933 let mut inner = TestCallVectorInt::default();
32934 inner.td_name = "testCallVectorInt".to_string();
32935 inner.extra = Some(Uuid::new_v4().to_string());
32936 RTDTestCallVectorIntBuilder { inner }
32937 }
32938
32939 pub fn x(&self) -> &Vec<i64> { &self.x }
32940
32941}
32942
32943#[doc(hidden)]
32944pub struct RTDTestCallVectorIntBuilder {
32945 inner: TestCallVectorInt
32946}
32947
32948impl RTDTestCallVectorIntBuilder {
32949 pub fn build(&self) -> TestCallVectorInt { self.inner.clone() }
32950
32951
32952 pub fn x(&mut self, x: Vec<i64>) -> &mut Self {
32953 self.inner.x = x;
32954 self
32955 }
32956
32957}
32958
32959impl AsRef<TestCallVectorInt> for TestCallVectorInt {
32960 fn as_ref(&self) -> &TestCallVectorInt { self }
32961}
32962
32963impl AsRef<TestCallVectorInt> for RTDTestCallVectorIntBuilder {
32964 fn as_ref(&self) -> &TestCallVectorInt { &self.inner }
32965}
32966
32967
32968
32969
32970
32971
32972
32973#[derive(Debug, Clone, Default, Serialize, Deserialize)]
32975pub struct TestCallVectorIntObject {
32976 #[doc(hidden)]
32977 #[serde(rename(serialize = "@type", deserialize = "@type"))]
32978 td_name: String,
32979 #[doc(hidden)]
32980 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
32981 extra: Option<String>,
32982 x: Vec<TestInt>,
32984
32985}
32986
32987impl RObject for TestCallVectorIntObject {
32988 #[doc(hidden)] fn td_name(&self) -> &'static str { "testCallVectorIntObject" }
32989 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
32990 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
32991}
32992
32993
32994
32995
32996impl RFunction for TestCallVectorIntObject {}
32997
32998impl TestCallVectorIntObject {
32999 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
33000 pub fn builder() -> RTDTestCallVectorIntObjectBuilder {
33001 let mut inner = TestCallVectorIntObject::default();
33002 inner.td_name = "testCallVectorIntObject".to_string();
33003 inner.extra = Some(Uuid::new_v4().to_string());
33004 RTDTestCallVectorIntObjectBuilder { inner }
33005 }
33006
33007 pub fn x(&self) -> &Vec<TestInt> { &self.x }
33008
33009}
33010
33011#[doc(hidden)]
33012pub struct RTDTestCallVectorIntObjectBuilder {
33013 inner: TestCallVectorIntObject
33014}
33015
33016impl RTDTestCallVectorIntObjectBuilder {
33017 pub fn build(&self) -> TestCallVectorIntObject { self.inner.clone() }
33018
33019
33020 pub fn x(&mut self, x: Vec<TestInt>) -> &mut Self {
33021 self.inner.x = x;
33022 self
33023 }
33024
33025}
33026
33027impl AsRef<TestCallVectorIntObject> for TestCallVectorIntObject {
33028 fn as_ref(&self) -> &TestCallVectorIntObject { self }
33029}
33030
33031impl AsRef<TestCallVectorIntObject> for RTDTestCallVectorIntObjectBuilder {
33032 fn as_ref(&self) -> &TestCallVectorIntObject { &self.inner }
33033}
33034
33035
33036
33037
33038
33039
33040
33041#[derive(Debug, Clone, Default, Serialize, Deserialize)]
33043pub struct TestCallVectorString {
33044 #[doc(hidden)]
33045 #[serde(rename(serialize = "@type", deserialize = "@type"))]
33046 td_name: String,
33047 #[doc(hidden)]
33048 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
33049 extra: Option<String>,
33050 x: Vec<String>,
33052
33053}
33054
33055impl RObject for TestCallVectorString {
33056 #[doc(hidden)] fn td_name(&self) -> &'static str { "testCallVectorString" }
33057 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
33058 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
33059}
33060
33061
33062
33063
33064impl RFunction for TestCallVectorString {}
33065
33066impl TestCallVectorString {
33067 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
33068 pub fn builder() -> RTDTestCallVectorStringBuilder {
33069 let mut inner = TestCallVectorString::default();
33070 inner.td_name = "testCallVectorString".to_string();
33071 inner.extra = Some(Uuid::new_v4().to_string());
33072 RTDTestCallVectorStringBuilder { inner }
33073 }
33074
33075 pub fn x(&self) -> &Vec<String> { &self.x }
33076
33077}
33078
33079#[doc(hidden)]
33080pub struct RTDTestCallVectorStringBuilder {
33081 inner: TestCallVectorString
33082}
33083
33084impl RTDTestCallVectorStringBuilder {
33085 pub fn build(&self) -> TestCallVectorString { self.inner.clone() }
33086
33087
33088 pub fn x(&mut self, x: Vec<String>) -> &mut Self {
33089 self.inner.x = x;
33090 self
33091 }
33092
33093}
33094
33095impl AsRef<TestCallVectorString> for TestCallVectorString {
33096 fn as_ref(&self) -> &TestCallVectorString { self }
33097}
33098
33099impl AsRef<TestCallVectorString> for RTDTestCallVectorStringBuilder {
33100 fn as_ref(&self) -> &TestCallVectorString { &self.inner }
33101}
33102
33103
33104
33105
33106
33107
33108
33109#[derive(Debug, Clone, Default, Serialize, Deserialize)]
33111pub struct TestCallVectorStringObject {
33112 #[doc(hidden)]
33113 #[serde(rename(serialize = "@type", deserialize = "@type"))]
33114 td_name: String,
33115 #[doc(hidden)]
33116 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
33117 extra: Option<String>,
33118 x: Vec<TestString>,
33120
33121}
33122
33123impl RObject for TestCallVectorStringObject {
33124 #[doc(hidden)] fn td_name(&self) -> &'static str { "testCallVectorStringObject" }
33125 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
33126 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
33127}
33128
33129
33130
33131
33132impl RFunction for TestCallVectorStringObject {}
33133
33134impl TestCallVectorStringObject {
33135 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
33136 pub fn builder() -> RTDTestCallVectorStringObjectBuilder {
33137 let mut inner = TestCallVectorStringObject::default();
33138 inner.td_name = "testCallVectorStringObject".to_string();
33139 inner.extra = Some(Uuid::new_v4().to_string());
33140 RTDTestCallVectorStringObjectBuilder { inner }
33141 }
33142
33143 pub fn x(&self) -> &Vec<TestString> { &self.x }
33144
33145}
33146
33147#[doc(hidden)]
33148pub struct RTDTestCallVectorStringObjectBuilder {
33149 inner: TestCallVectorStringObject
33150}
33151
33152impl RTDTestCallVectorStringObjectBuilder {
33153 pub fn build(&self) -> TestCallVectorStringObject { self.inner.clone() }
33154
33155
33156 pub fn x(&mut self, x: Vec<TestString>) -> &mut Self {
33157 self.inner.x = x;
33158 self
33159 }
33160
33161}
33162
33163impl AsRef<TestCallVectorStringObject> for TestCallVectorStringObject {
33164 fn as_ref(&self) -> &TestCallVectorStringObject { self }
33165}
33166
33167impl AsRef<TestCallVectorStringObject> for RTDTestCallVectorStringObjectBuilder {
33168 fn as_ref(&self) -> &TestCallVectorStringObject { &self.inner }
33169}
33170
33171
33172
33173
33174
33175
33176
33177#[derive(Debug, Clone, Default, Serialize, Deserialize)]
33179pub struct TestGetDifference {
33180 #[doc(hidden)]
33181 #[serde(rename(serialize = "@type", deserialize = "@type"))]
33182 td_name: String,
33183 #[doc(hidden)]
33184 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
33185 extra: Option<String>,
33186
33187}
33188
33189impl RObject for TestGetDifference {
33190 #[doc(hidden)] fn td_name(&self) -> &'static str { "testGetDifference" }
33191 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
33192 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
33193}
33194
33195
33196
33197
33198impl RFunction for TestGetDifference {}
33199
33200impl TestGetDifference {
33201 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
33202 pub fn builder() -> RTDTestGetDifferenceBuilder {
33203 let mut inner = TestGetDifference::default();
33204 inner.td_name = "testGetDifference".to_string();
33205 inner.extra = Some(Uuid::new_v4().to_string());
33206 RTDTestGetDifferenceBuilder { inner }
33207 }
33208
33209}
33210
33211#[doc(hidden)]
33212pub struct RTDTestGetDifferenceBuilder {
33213 inner: TestGetDifference
33214}
33215
33216impl RTDTestGetDifferenceBuilder {
33217 pub fn build(&self) -> TestGetDifference { self.inner.clone() }
33218
33219}
33220
33221impl AsRef<TestGetDifference> for TestGetDifference {
33222 fn as_ref(&self) -> &TestGetDifference { self }
33223}
33224
33225impl AsRef<TestGetDifference> for RTDTestGetDifferenceBuilder {
33226 fn as_ref(&self) -> &TestGetDifference { &self.inner }
33227}
33228
33229
33230
33231
33232
33233
33234
33235#[derive(Debug, Clone, Default, Serialize, Deserialize)]
33237pub struct TestNetwork {
33238 #[doc(hidden)]
33239 #[serde(rename(serialize = "@type", deserialize = "@type"))]
33240 td_name: String,
33241 #[doc(hidden)]
33242 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
33243 extra: Option<String>,
33244
33245}
33246
33247impl RObject for TestNetwork {
33248 #[doc(hidden)] fn td_name(&self) -> &'static str { "testNetwork" }
33249 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
33250 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
33251}
33252
33253
33254
33255
33256impl RFunction for TestNetwork {}
33257
33258impl TestNetwork {
33259 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
33260 pub fn builder() -> RTDTestNetworkBuilder {
33261 let mut inner = TestNetwork::default();
33262 inner.td_name = "testNetwork".to_string();
33263 inner.extra = Some(Uuid::new_v4().to_string());
33264 RTDTestNetworkBuilder { inner }
33265 }
33266
33267}
33268
33269#[doc(hidden)]
33270pub struct RTDTestNetworkBuilder {
33271 inner: TestNetwork
33272}
33273
33274impl RTDTestNetworkBuilder {
33275 pub fn build(&self) -> TestNetwork { self.inner.clone() }
33276
33277}
33278
33279impl AsRef<TestNetwork> for TestNetwork {
33280 fn as_ref(&self) -> &TestNetwork { self }
33281}
33282
33283impl AsRef<TestNetwork> for RTDTestNetworkBuilder {
33284 fn as_ref(&self) -> &TestNetwork { &self.inner }
33285}
33286
33287
33288
33289
33290
33291
33292
33293#[derive(Debug, Clone, Default, Serialize, Deserialize)]
33295pub struct TestProxy {
33296 #[doc(hidden)]
33297 #[serde(rename(serialize = "@type", deserialize = "@type"))]
33298 td_name: String,
33299 #[doc(hidden)]
33300 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
33301 extra: Option<String>,
33302 server: String,
33304 port: i64,
33306 #[serde(rename(serialize = "type", deserialize = "type"))] type_: ProxyType,
33308 dc_id: i64,
33310 timeout: f32,
33312
33313}
33314
33315impl RObject for TestProxy {
33316 #[doc(hidden)] fn td_name(&self) -> &'static str { "testProxy" }
33317 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
33318 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
33319}
33320
33321
33322
33323
33324impl RFunction for TestProxy {}
33325
33326impl TestProxy {
33327 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
33328 pub fn builder() -> RTDTestProxyBuilder {
33329 let mut inner = TestProxy::default();
33330 inner.td_name = "testProxy".to_string();
33331 inner.extra = Some(Uuid::new_v4().to_string());
33332 RTDTestProxyBuilder { inner }
33333 }
33334
33335 pub fn server(&self) -> &String { &self.server }
33336
33337 pub fn port(&self) -> i64 { self.port }
33338
33339 pub fn type_(&self) -> &ProxyType { &self.type_ }
33340
33341 pub fn dc_id(&self) -> i64 { self.dc_id }
33342
33343 pub fn timeout(&self) -> f32 { self.timeout }
33344
33345}
33346
33347#[doc(hidden)]
33348pub struct RTDTestProxyBuilder {
33349 inner: TestProxy
33350}
33351
33352impl RTDTestProxyBuilder {
33353 pub fn build(&self) -> TestProxy { self.inner.clone() }
33354
33355
33356 pub fn server<T: AsRef<str>>(&mut self, server: T) -> &mut Self {
33357 self.inner.server = server.as_ref().to_string();
33358 self
33359 }
33360
33361
33362 pub fn port(&mut self, port: i64) -> &mut Self {
33363 self.inner.port = port;
33364 self
33365 }
33366
33367
33368 pub fn type_<T: AsRef<ProxyType>>(&mut self, type_: T) -> &mut Self {
33369 self.inner.type_ = type_.as_ref().clone();
33370 self
33371 }
33372
33373
33374 pub fn dc_id(&mut self, dc_id: i64) -> &mut Self {
33375 self.inner.dc_id = dc_id;
33376 self
33377 }
33378
33379
33380 pub fn timeout(&mut self, timeout: f32) -> &mut Self {
33381 self.inner.timeout = timeout;
33382 self
33383 }
33384
33385}
33386
33387impl AsRef<TestProxy> for TestProxy {
33388 fn as_ref(&self) -> &TestProxy { self }
33389}
33390
33391impl AsRef<TestProxy> for RTDTestProxyBuilder {
33392 fn as_ref(&self) -> &TestProxy { &self.inner }
33393}
33394
33395
33396
33397
33398
33399
33400
33401#[derive(Debug, Clone, Default, Serialize, Deserialize)]
33403pub struct TestReturnError {
33404 #[doc(hidden)]
33405 #[serde(rename(serialize = "@type", deserialize = "@type"))]
33406 td_name: String,
33407 #[doc(hidden)]
33408 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
33409 extra: Option<String>,
33410 error: Error,
33412
33413}
33414
33415impl RObject for TestReturnError {
33416 #[doc(hidden)] fn td_name(&self) -> &'static str { "testReturnError" }
33417 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
33418 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
33419}
33420
33421
33422
33423
33424impl RFunction for TestReturnError {}
33425
33426impl TestReturnError {
33427 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
33428 pub fn builder() -> RTDTestReturnErrorBuilder {
33429 let mut inner = TestReturnError::default();
33430 inner.td_name = "testReturnError".to_string();
33431 inner.extra = Some(Uuid::new_v4().to_string());
33432 RTDTestReturnErrorBuilder { inner }
33433 }
33434
33435 pub fn error(&self) -> &Error { &self.error }
33436
33437}
33438
33439#[doc(hidden)]
33440pub struct RTDTestReturnErrorBuilder {
33441 inner: TestReturnError
33442}
33443
33444impl RTDTestReturnErrorBuilder {
33445 pub fn build(&self) -> TestReturnError { self.inner.clone() }
33446
33447
33448 pub fn error<T: AsRef<Error>>(&mut self, error: T) -> &mut Self {
33449 self.inner.error = error.as_ref().clone();
33450 self
33451 }
33452
33453}
33454
33455impl AsRef<TestReturnError> for TestReturnError {
33456 fn as_ref(&self) -> &TestReturnError { self }
33457}
33458
33459impl AsRef<TestReturnError> for RTDTestReturnErrorBuilder {
33460 fn as_ref(&self) -> &TestReturnError { &self.inner }
33461}
33462
33463
33464
33465
33466
33467
33468
33469#[derive(Debug, Clone, Default, Serialize, Deserialize)]
33471pub struct TestSquareInt {
33472 #[doc(hidden)]
33473 #[serde(rename(serialize = "@type", deserialize = "@type"))]
33474 td_name: String,
33475 #[doc(hidden)]
33476 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
33477 extra: Option<String>,
33478 x: i64,
33480
33481}
33482
33483impl RObject for TestSquareInt {
33484 #[doc(hidden)] fn td_name(&self) -> &'static str { "testSquareInt" }
33485 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
33486 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
33487}
33488
33489
33490
33491
33492impl RFunction for TestSquareInt {}
33493
33494impl TestSquareInt {
33495 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
33496 pub fn builder() -> RTDTestSquareIntBuilder {
33497 let mut inner = TestSquareInt::default();
33498 inner.td_name = "testSquareInt".to_string();
33499 inner.extra = Some(Uuid::new_v4().to_string());
33500 RTDTestSquareIntBuilder { inner }
33501 }
33502
33503 pub fn x(&self) -> i64 { self.x }
33504
33505}
33506
33507#[doc(hidden)]
33508pub struct RTDTestSquareIntBuilder {
33509 inner: TestSquareInt
33510}
33511
33512impl RTDTestSquareIntBuilder {
33513 pub fn build(&self) -> TestSquareInt { self.inner.clone() }
33514
33515
33516 pub fn x(&mut self, x: i64) -> &mut Self {
33517 self.inner.x = x;
33518 self
33519 }
33520
33521}
33522
33523impl AsRef<TestSquareInt> for TestSquareInt {
33524 fn as_ref(&self) -> &TestSquareInt { self }
33525}
33526
33527impl AsRef<TestSquareInt> for RTDTestSquareIntBuilder {
33528 fn as_ref(&self) -> &TestSquareInt { &self.inner }
33529}
33530
33531
33532
33533
33534
33535
33536
33537#[derive(Debug, Clone, Default, Serialize, Deserialize)]
33539pub struct TestUseUpdate {
33540 #[doc(hidden)]
33541 #[serde(rename(serialize = "@type", deserialize = "@type"))]
33542 td_name: String,
33543 #[doc(hidden)]
33544 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
33545 extra: Option<String>,
33546
33547}
33548
33549impl RObject for TestUseUpdate {
33550 #[doc(hidden)] fn td_name(&self) -> &'static str { "testUseUpdate" }
33551 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
33552 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
33553}
33554
33555
33556impl TDUpdate for TestUseUpdate {}
33557
33558impl RFunction for TestUseUpdate {}
33559
33560impl TestUseUpdate {
33561 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
33562 pub fn builder() -> RTDTestUseUpdateBuilder {
33563 let mut inner = TestUseUpdate::default();
33564 inner.td_name = "testUseUpdate".to_string();
33565 inner.extra = Some(Uuid::new_v4().to_string());
33566 RTDTestUseUpdateBuilder { inner }
33567 }
33568
33569}
33570
33571#[doc(hidden)]
33572pub struct RTDTestUseUpdateBuilder {
33573 inner: TestUseUpdate
33574}
33575
33576impl RTDTestUseUpdateBuilder {
33577 pub fn build(&self) -> TestUseUpdate { self.inner.clone() }
33578
33579}
33580
33581impl AsRef<TestUseUpdate> for TestUseUpdate {
33582 fn as_ref(&self) -> &TestUseUpdate { self }
33583}
33584
33585impl AsRef<TestUseUpdate> for RTDTestUseUpdateBuilder {
33586 fn as_ref(&self) -> &TestUseUpdate { &self.inner }
33587}
33588
33589
33590
33591
33592
33593
33594
33595#[derive(Debug, Clone, Default, Serialize, Deserialize)]
33597pub struct ToggleChatDefaultDisableNotification {
33598 #[doc(hidden)]
33599 #[serde(rename(serialize = "@type", deserialize = "@type"))]
33600 td_name: String,
33601 #[doc(hidden)]
33602 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
33603 extra: Option<String>,
33604 chat_id: i64,
33606 default_disable_notification: bool,
33608
33609}
33610
33611impl RObject for ToggleChatDefaultDisableNotification {
33612 #[doc(hidden)] fn td_name(&self) -> &'static str { "toggleChatDefaultDisableNotification" }
33613 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
33614 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
33615}
33616
33617
33618
33619
33620impl RFunction for ToggleChatDefaultDisableNotification {}
33621
33622impl ToggleChatDefaultDisableNotification {
33623 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
33624 pub fn builder() -> RTDToggleChatDefaultDisableNotificationBuilder {
33625 let mut inner = ToggleChatDefaultDisableNotification::default();
33626 inner.td_name = "toggleChatDefaultDisableNotification".to_string();
33627 inner.extra = Some(Uuid::new_v4().to_string());
33628 RTDToggleChatDefaultDisableNotificationBuilder { inner }
33629 }
33630
33631 pub fn chat_id(&self) -> i64 { self.chat_id }
33632
33633 pub fn default_disable_notification(&self) -> bool { self.default_disable_notification }
33634
33635}
33636
33637#[doc(hidden)]
33638pub struct RTDToggleChatDefaultDisableNotificationBuilder {
33639 inner: ToggleChatDefaultDisableNotification
33640}
33641
33642impl RTDToggleChatDefaultDisableNotificationBuilder {
33643 pub fn build(&self) -> ToggleChatDefaultDisableNotification { self.inner.clone() }
33644
33645
33646 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
33647 self.inner.chat_id = chat_id;
33648 self
33649 }
33650
33651
33652 pub fn default_disable_notification(&mut self, default_disable_notification: bool) -> &mut Self {
33653 self.inner.default_disable_notification = default_disable_notification;
33654 self
33655 }
33656
33657}
33658
33659impl AsRef<ToggleChatDefaultDisableNotification> for ToggleChatDefaultDisableNotification {
33660 fn as_ref(&self) -> &ToggleChatDefaultDisableNotification { self }
33661}
33662
33663impl AsRef<ToggleChatDefaultDisableNotification> for RTDToggleChatDefaultDisableNotificationBuilder {
33664 fn as_ref(&self) -> &ToggleChatDefaultDisableNotification { &self.inner }
33665}
33666
33667
33668
33669
33670
33671
33672
33673#[derive(Debug, Clone, Default, Serialize, Deserialize)]
33675pub struct ToggleChatHasProtectedContent {
33676 #[doc(hidden)]
33677 #[serde(rename(serialize = "@type", deserialize = "@type"))]
33678 td_name: String,
33679 #[doc(hidden)]
33680 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
33681 extra: Option<String>,
33682 chat_id: i64,
33684 has_protected_content: bool,
33686
33687}
33688
33689impl RObject for ToggleChatHasProtectedContent {
33690 #[doc(hidden)] fn td_name(&self) -> &'static str { "toggleChatHasProtectedContent" }
33691 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
33692 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
33693}
33694
33695
33696
33697
33698impl RFunction for ToggleChatHasProtectedContent {}
33699
33700impl ToggleChatHasProtectedContent {
33701 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
33702 pub fn builder() -> RTDToggleChatHasProtectedContentBuilder {
33703 let mut inner = ToggleChatHasProtectedContent::default();
33704 inner.td_name = "toggleChatHasProtectedContent".to_string();
33705 inner.extra = Some(Uuid::new_v4().to_string());
33706 RTDToggleChatHasProtectedContentBuilder { inner }
33707 }
33708
33709 pub fn chat_id(&self) -> i64 { self.chat_id }
33710
33711 pub fn has_protected_content(&self) -> bool { self.has_protected_content }
33712
33713}
33714
33715#[doc(hidden)]
33716pub struct RTDToggleChatHasProtectedContentBuilder {
33717 inner: ToggleChatHasProtectedContent
33718}
33719
33720impl RTDToggleChatHasProtectedContentBuilder {
33721 pub fn build(&self) -> ToggleChatHasProtectedContent { self.inner.clone() }
33722
33723
33724 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
33725 self.inner.chat_id = chat_id;
33726 self
33727 }
33728
33729
33730 pub fn has_protected_content(&mut self, has_protected_content: bool) -> &mut Self {
33731 self.inner.has_protected_content = has_protected_content;
33732 self
33733 }
33734
33735}
33736
33737impl AsRef<ToggleChatHasProtectedContent> for ToggleChatHasProtectedContent {
33738 fn as_ref(&self) -> &ToggleChatHasProtectedContent { self }
33739}
33740
33741impl AsRef<ToggleChatHasProtectedContent> for RTDToggleChatHasProtectedContentBuilder {
33742 fn as_ref(&self) -> &ToggleChatHasProtectedContent { &self.inner }
33743}
33744
33745
33746
33747
33748
33749
33750
33751#[derive(Debug, Clone, Default, Serialize, Deserialize)]
33753pub struct ToggleChatIsMarkedAsUnread {
33754 #[doc(hidden)]
33755 #[serde(rename(serialize = "@type", deserialize = "@type"))]
33756 td_name: String,
33757 #[doc(hidden)]
33758 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
33759 extra: Option<String>,
33760 chat_id: i64,
33762 is_marked_as_unread: bool,
33764
33765}
33766
33767impl RObject for ToggleChatIsMarkedAsUnread {
33768 #[doc(hidden)] fn td_name(&self) -> &'static str { "toggleChatIsMarkedAsUnread" }
33769 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
33770 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
33771}
33772
33773
33774
33775
33776impl RFunction for ToggleChatIsMarkedAsUnread {}
33777
33778impl ToggleChatIsMarkedAsUnread {
33779 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
33780 pub fn builder() -> RTDToggleChatIsMarkedAsUnreadBuilder {
33781 let mut inner = ToggleChatIsMarkedAsUnread::default();
33782 inner.td_name = "toggleChatIsMarkedAsUnread".to_string();
33783 inner.extra = Some(Uuid::new_v4().to_string());
33784 RTDToggleChatIsMarkedAsUnreadBuilder { inner }
33785 }
33786
33787 pub fn chat_id(&self) -> i64 { self.chat_id }
33788
33789 pub fn is_marked_as_unread(&self) -> bool { self.is_marked_as_unread }
33790
33791}
33792
33793#[doc(hidden)]
33794pub struct RTDToggleChatIsMarkedAsUnreadBuilder {
33795 inner: ToggleChatIsMarkedAsUnread
33796}
33797
33798impl RTDToggleChatIsMarkedAsUnreadBuilder {
33799 pub fn build(&self) -> ToggleChatIsMarkedAsUnread { self.inner.clone() }
33800
33801
33802 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
33803 self.inner.chat_id = chat_id;
33804 self
33805 }
33806
33807
33808 pub fn is_marked_as_unread(&mut self, is_marked_as_unread: bool) -> &mut Self {
33809 self.inner.is_marked_as_unread = is_marked_as_unread;
33810 self
33811 }
33812
33813}
33814
33815impl AsRef<ToggleChatIsMarkedAsUnread> for ToggleChatIsMarkedAsUnread {
33816 fn as_ref(&self) -> &ToggleChatIsMarkedAsUnread { self }
33817}
33818
33819impl AsRef<ToggleChatIsMarkedAsUnread> for RTDToggleChatIsMarkedAsUnreadBuilder {
33820 fn as_ref(&self) -> &ToggleChatIsMarkedAsUnread { &self.inner }
33821}
33822
33823
33824
33825
33826
33827
33828
33829#[derive(Debug, Clone, Default, Serialize, Deserialize)]
33831pub struct ToggleChatIsPinned {
33832 #[doc(hidden)]
33833 #[serde(rename(serialize = "@type", deserialize = "@type"))]
33834 td_name: String,
33835 #[doc(hidden)]
33836 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
33837 extra: Option<String>,
33838 chat_list: ChatList,
33840 chat_id: i64,
33842 is_pinned: bool,
33844
33845}
33846
33847impl RObject for ToggleChatIsPinned {
33848 #[doc(hidden)] fn td_name(&self) -> &'static str { "toggleChatIsPinned" }
33849 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
33850 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
33851}
33852
33853
33854
33855
33856impl RFunction for ToggleChatIsPinned {}
33857
33858impl ToggleChatIsPinned {
33859 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
33860 pub fn builder() -> RTDToggleChatIsPinnedBuilder {
33861 let mut inner = ToggleChatIsPinned::default();
33862 inner.td_name = "toggleChatIsPinned".to_string();
33863 inner.extra = Some(Uuid::new_v4().to_string());
33864 RTDToggleChatIsPinnedBuilder { inner }
33865 }
33866
33867 pub fn chat_list(&self) -> &ChatList { &self.chat_list }
33868
33869 pub fn chat_id(&self) -> i64 { self.chat_id }
33870
33871 pub fn is_pinned(&self) -> bool { self.is_pinned }
33872
33873}
33874
33875#[doc(hidden)]
33876pub struct RTDToggleChatIsPinnedBuilder {
33877 inner: ToggleChatIsPinned
33878}
33879
33880impl RTDToggleChatIsPinnedBuilder {
33881 pub fn build(&self) -> ToggleChatIsPinned { self.inner.clone() }
33882
33883
33884 pub fn chat_list<T: AsRef<ChatList>>(&mut self, chat_list: T) -> &mut Self {
33885 self.inner.chat_list = chat_list.as_ref().clone();
33886 self
33887 }
33888
33889
33890 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
33891 self.inner.chat_id = chat_id;
33892 self
33893 }
33894
33895
33896 pub fn is_pinned(&mut self, is_pinned: bool) -> &mut Self {
33897 self.inner.is_pinned = is_pinned;
33898 self
33899 }
33900
33901}
33902
33903impl AsRef<ToggleChatIsPinned> for ToggleChatIsPinned {
33904 fn as_ref(&self) -> &ToggleChatIsPinned { self }
33905}
33906
33907impl AsRef<ToggleChatIsPinned> for RTDToggleChatIsPinnedBuilder {
33908 fn as_ref(&self) -> &ToggleChatIsPinned { &self.inner }
33909}
33910
33911
33912
33913
33914
33915
33916
33917#[derive(Debug, Clone, Default, Serialize, Deserialize)]
33919pub struct ToggleGroupCallEnabledStartNotification {
33920 #[doc(hidden)]
33921 #[serde(rename(serialize = "@type", deserialize = "@type"))]
33922 td_name: String,
33923 #[doc(hidden)]
33924 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
33925 extra: Option<String>,
33926 group_call_id: i64,
33928 enabled_start_notification: bool,
33930
33931}
33932
33933impl RObject for ToggleGroupCallEnabledStartNotification {
33934 #[doc(hidden)] fn td_name(&self) -> &'static str { "toggleGroupCallEnabledStartNotification" }
33935 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
33936 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
33937}
33938
33939
33940
33941
33942impl RFunction for ToggleGroupCallEnabledStartNotification {}
33943
33944impl ToggleGroupCallEnabledStartNotification {
33945 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
33946 pub fn builder() -> RTDToggleGroupCallEnabledStartNotificationBuilder {
33947 let mut inner = ToggleGroupCallEnabledStartNotification::default();
33948 inner.td_name = "toggleGroupCallEnabledStartNotification".to_string();
33949 inner.extra = Some(Uuid::new_v4().to_string());
33950 RTDToggleGroupCallEnabledStartNotificationBuilder { inner }
33951 }
33952
33953 pub fn group_call_id(&self) -> i64 { self.group_call_id }
33954
33955 pub fn enabled_start_notification(&self) -> bool { self.enabled_start_notification }
33956
33957}
33958
33959#[doc(hidden)]
33960pub struct RTDToggleGroupCallEnabledStartNotificationBuilder {
33961 inner: ToggleGroupCallEnabledStartNotification
33962}
33963
33964impl RTDToggleGroupCallEnabledStartNotificationBuilder {
33965 pub fn build(&self) -> ToggleGroupCallEnabledStartNotification { self.inner.clone() }
33966
33967
33968 pub fn group_call_id(&mut self, group_call_id: i64) -> &mut Self {
33969 self.inner.group_call_id = group_call_id;
33970 self
33971 }
33972
33973
33974 pub fn enabled_start_notification(&mut self, enabled_start_notification: bool) -> &mut Self {
33975 self.inner.enabled_start_notification = enabled_start_notification;
33976 self
33977 }
33978
33979}
33980
33981impl AsRef<ToggleGroupCallEnabledStartNotification> for ToggleGroupCallEnabledStartNotification {
33982 fn as_ref(&self) -> &ToggleGroupCallEnabledStartNotification { self }
33983}
33984
33985impl AsRef<ToggleGroupCallEnabledStartNotification> for RTDToggleGroupCallEnabledStartNotificationBuilder {
33986 fn as_ref(&self) -> &ToggleGroupCallEnabledStartNotification { &self.inner }
33987}
33988
33989
33990
33991
33992
33993
33994
33995#[derive(Debug, Clone, Default, Serialize, Deserialize)]
33997pub struct ToggleGroupCallIsMyVideoEnabled {
33998 #[doc(hidden)]
33999 #[serde(rename(serialize = "@type", deserialize = "@type"))]
34000 td_name: String,
34001 #[doc(hidden)]
34002 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
34003 extra: Option<String>,
34004 group_call_id: i64,
34006 is_my_video_enabled: bool,
34008
34009}
34010
34011impl RObject for ToggleGroupCallIsMyVideoEnabled {
34012 #[doc(hidden)] fn td_name(&self) -> &'static str { "toggleGroupCallIsMyVideoEnabled" }
34013 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
34014 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
34015}
34016
34017
34018
34019
34020impl RFunction for ToggleGroupCallIsMyVideoEnabled {}
34021
34022impl ToggleGroupCallIsMyVideoEnabled {
34023 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
34024 pub fn builder() -> RTDToggleGroupCallIsMyVideoEnabledBuilder {
34025 let mut inner = ToggleGroupCallIsMyVideoEnabled::default();
34026 inner.td_name = "toggleGroupCallIsMyVideoEnabled".to_string();
34027 inner.extra = Some(Uuid::new_v4().to_string());
34028 RTDToggleGroupCallIsMyVideoEnabledBuilder { inner }
34029 }
34030
34031 pub fn group_call_id(&self) -> i64 { self.group_call_id }
34032
34033 pub fn is_my_video_enabled(&self) -> bool { self.is_my_video_enabled }
34034
34035}
34036
34037#[doc(hidden)]
34038pub struct RTDToggleGroupCallIsMyVideoEnabledBuilder {
34039 inner: ToggleGroupCallIsMyVideoEnabled
34040}
34041
34042impl RTDToggleGroupCallIsMyVideoEnabledBuilder {
34043 pub fn build(&self) -> ToggleGroupCallIsMyVideoEnabled { self.inner.clone() }
34044
34045
34046 pub fn group_call_id(&mut self, group_call_id: i64) -> &mut Self {
34047 self.inner.group_call_id = group_call_id;
34048 self
34049 }
34050
34051
34052 pub fn is_my_video_enabled(&mut self, is_my_video_enabled: bool) -> &mut Self {
34053 self.inner.is_my_video_enabled = is_my_video_enabled;
34054 self
34055 }
34056
34057}
34058
34059impl AsRef<ToggleGroupCallIsMyVideoEnabled> for ToggleGroupCallIsMyVideoEnabled {
34060 fn as_ref(&self) -> &ToggleGroupCallIsMyVideoEnabled { self }
34061}
34062
34063impl AsRef<ToggleGroupCallIsMyVideoEnabled> for RTDToggleGroupCallIsMyVideoEnabledBuilder {
34064 fn as_ref(&self) -> &ToggleGroupCallIsMyVideoEnabled { &self.inner }
34065}
34066
34067
34068
34069
34070
34071
34072
34073#[derive(Debug, Clone, Default, Serialize, Deserialize)]
34075pub struct ToggleGroupCallIsMyVideoPaused {
34076 #[doc(hidden)]
34077 #[serde(rename(serialize = "@type", deserialize = "@type"))]
34078 td_name: String,
34079 #[doc(hidden)]
34080 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
34081 extra: Option<String>,
34082 group_call_id: i64,
34084 is_my_video_paused: bool,
34086
34087}
34088
34089impl RObject for ToggleGroupCallIsMyVideoPaused {
34090 #[doc(hidden)] fn td_name(&self) -> &'static str { "toggleGroupCallIsMyVideoPaused" }
34091 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
34092 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
34093}
34094
34095
34096
34097
34098impl RFunction for ToggleGroupCallIsMyVideoPaused {}
34099
34100impl ToggleGroupCallIsMyVideoPaused {
34101 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
34102 pub fn builder() -> RTDToggleGroupCallIsMyVideoPausedBuilder {
34103 let mut inner = ToggleGroupCallIsMyVideoPaused::default();
34104 inner.td_name = "toggleGroupCallIsMyVideoPaused".to_string();
34105 inner.extra = Some(Uuid::new_v4().to_string());
34106 RTDToggleGroupCallIsMyVideoPausedBuilder { inner }
34107 }
34108
34109 pub fn group_call_id(&self) -> i64 { self.group_call_id }
34110
34111 pub fn is_my_video_paused(&self) -> bool { self.is_my_video_paused }
34112
34113}
34114
34115#[doc(hidden)]
34116pub struct RTDToggleGroupCallIsMyVideoPausedBuilder {
34117 inner: ToggleGroupCallIsMyVideoPaused
34118}
34119
34120impl RTDToggleGroupCallIsMyVideoPausedBuilder {
34121 pub fn build(&self) -> ToggleGroupCallIsMyVideoPaused { self.inner.clone() }
34122
34123
34124 pub fn group_call_id(&mut self, group_call_id: i64) -> &mut Self {
34125 self.inner.group_call_id = group_call_id;
34126 self
34127 }
34128
34129
34130 pub fn is_my_video_paused(&mut self, is_my_video_paused: bool) -> &mut Self {
34131 self.inner.is_my_video_paused = is_my_video_paused;
34132 self
34133 }
34134
34135}
34136
34137impl AsRef<ToggleGroupCallIsMyVideoPaused> for ToggleGroupCallIsMyVideoPaused {
34138 fn as_ref(&self) -> &ToggleGroupCallIsMyVideoPaused { self }
34139}
34140
34141impl AsRef<ToggleGroupCallIsMyVideoPaused> for RTDToggleGroupCallIsMyVideoPausedBuilder {
34142 fn as_ref(&self) -> &ToggleGroupCallIsMyVideoPaused { &self.inner }
34143}
34144
34145
34146
34147
34148
34149
34150
34151#[derive(Debug, Clone, Default, Serialize, Deserialize)]
34153pub struct ToggleGroupCallMuteNewParticipants {
34154 #[doc(hidden)]
34155 #[serde(rename(serialize = "@type", deserialize = "@type"))]
34156 td_name: String,
34157 #[doc(hidden)]
34158 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
34159 extra: Option<String>,
34160 group_call_id: i64,
34162 mute_new_participants: bool,
34164
34165}
34166
34167impl RObject for ToggleGroupCallMuteNewParticipants {
34168 #[doc(hidden)] fn td_name(&self) -> &'static str { "toggleGroupCallMuteNewParticipants" }
34169 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
34170 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
34171}
34172
34173
34174
34175
34176impl RFunction for ToggleGroupCallMuteNewParticipants {}
34177
34178impl ToggleGroupCallMuteNewParticipants {
34179 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
34180 pub fn builder() -> RTDToggleGroupCallMuteNewParticipantsBuilder {
34181 let mut inner = ToggleGroupCallMuteNewParticipants::default();
34182 inner.td_name = "toggleGroupCallMuteNewParticipants".to_string();
34183 inner.extra = Some(Uuid::new_v4().to_string());
34184 RTDToggleGroupCallMuteNewParticipantsBuilder { inner }
34185 }
34186
34187 pub fn group_call_id(&self) -> i64 { self.group_call_id }
34188
34189 pub fn mute_new_participants(&self) -> bool { self.mute_new_participants }
34190
34191}
34192
34193#[doc(hidden)]
34194pub struct RTDToggleGroupCallMuteNewParticipantsBuilder {
34195 inner: ToggleGroupCallMuteNewParticipants
34196}
34197
34198impl RTDToggleGroupCallMuteNewParticipantsBuilder {
34199 pub fn build(&self) -> ToggleGroupCallMuteNewParticipants { self.inner.clone() }
34200
34201
34202 pub fn group_call_id(&mut self, group_call_id: i64) -> &mut Self {
34203 self.inner.group_call_id = group_call_id;
34204 self
34205 }
34206
34207
34208 pub fn mute_new_participants(&mut self, mute_new_participants: bool) -> &mut Self {
34209 self.inner.mute_new_participants = mute_new_participants;
34210 self
34211 }
34212
34213}
34214
34215impl AsRef<ToggleGroupCallMuteNewParticipants> for ToggleGroupCallMuteNewParticipants {
34216 fn as_ref(&self) -> &ToggleGroupCallMuteNewParticipants { self }
34217}
34218
34219impl AsRef<ToggleGroupCallMuteNewParticipants> for RTDToggleGroupCallMuteNewParticipantsBuilder {
34220 fn as_ref(&self) -> &ToggleGroupCallMuteNewParticipants { &self.inner }
34221}
34222
34223
34224
34225
34226
34227
34228
34229#[derive(Debug, Clone, Default, Serialize, Deserialize)]
34231pub struct ToggleGroupCallParticipantIsHandRaised {
34232 #[doc(hidden)]
34233 #[serde(rename(serialize = "@type", deserialize = "@type"))]
34234 td_name: String,
34235 #[doc(hidden)]
34236 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
34237 extra: Option<String>,
34238 group_call_id: i64,
34240 participant_id: MessageSender,
34242 is_hand_raised: bool,
34244
34245}
34246
34247impl RObject for ToggleGroupCallParticipantIsHandRaised {
34248 #[doc(hidden)] fn td_name(&self) -> &'static str { "toggleGroupCallParticipantIsHandRaised" }
34249 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
34250 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
34251}
34252
34253
34254
34255
34256impl RFunction for ToggleGroupCallParticipantIsHandRaised {}
34257
34258impl ToggleGroupCallParticipantIsHandRaised {
34259 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
34260 pub fn builder() -> RTDToggleGroupCallParticipantIsHandRaisedBuilder {
34261 let mut inner = ToggleGroupCallParticipantIsHandRaised::default();
34262 inner.td_name = "toggleGroupCallParticipantIsHandRaised".to_string();
34263 inner.extra = Some(Uuid::new_v4().to_string());
34264 RTDToggleGroupCallParticipantIsHandRaisedBuilder { inner }
34265 }
34266
34267 pub fn group_call_id(&self) -> i64 { self.group_call_id }
34268
34269 pub fn participant_id(&self) -> &MessageSender { &self.participant_id }
34270
34271 pub fn is_hand_raised(&self) -> bool { self.is_hand_raised }
34272
34273}
34274
34275#[doc(hidden)]
34276pub struct RTDToggleGroupCallParticipantIsHandRaisedBuilder {
34277 inner: ToggleGroupCallParticipantIsHandRaised
34278}
34279
34280impl RTDToggleGroupCallParticipantIsHandRaisedBuilder {
34281 pub fn build(&self) -> ToggleGroupCallParticipantIsHandRaised { self.inner.clone() }
34282
34283
34284 pub fn group_call_id(&mut self, group_call_id: i64) -> &mut Self {
34285 self.inner.group_call_id = group_call_id;
34286 self
34287 }
34288
34289
34290 pub fn participant_id<T: AsRef<MessageSender>>(&mut self, participant_id: T) -> &mut Self {
34291 self.inner.participant_id = participant_id.as_ref().clone();
34292 self
34293 }
34294
34295
34296 pub fn is_hand_raised(&mut self, is_hand_raised: bool) -> &mut Self {
34297 self.inner.is_hand_raised = is_hand_raised;
34298 self
34299 }
34300
34301}
34302
34303impl AsRef<ToggleGroupCallParticipantIsHandRaised> for ToggleGroupCallParticipantIsHandRaised {
34304 fn as_ref(&self) -> &ToggleGroupCallParticipantIsHandRaised { self }
34305}
34306
34307impl AsRef<ToggleGroupCallParticipantIsHandRaised> for RTDToggleGroupCallParticipantIsHandRaisedBuilder {
34308 fn as_ref(&self) -> &ToggleGroupCallParticipantIsHandRaised { &self.inner }
34309}
34310
34311
34312
34313
34314
34315
34316
34317#[derive(Debug, Clone, Default, Serialize, Deserialize)]
34319pub struct ToggleGroupCallParticipantIsMuted {
34320 #[doc(hidden)]
34321 #[serde(rename(serialize = "@type", deserialize = "@type"))]
34322 td_name: String,
34323 #[doc(hidden)]
34324 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
34325 extra: Option<String>,
34326 group_call_id: i64,
34328 participant_id: MessageSender,
34330 is_muted: bool,
34332
34333}
34334
34335impl RObject for ToggleGroupCallParticipantIsMuted {
34336 #[doc(hidden)] fn td_name(&self) -> &'static str { "toggleGroupCallParticipantIsMuted" }
34337 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
34338 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
34339}
34340
34341
34342
34343
34344impl RFunction for ToggleGroupCallParticipantIsMuted {}
34345
34346impl ToggleGroupCallParticipantIsMuted {
34347 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
34348 pub fn builder() -> RTDToggleGroupCallParticipantIsMutedBuilder {
34349 let mut inner = ToggleGroupCallParticipantIsMuted::default();
34350 inner.td_name = "toggleGroupCallParticipantIsMuted".to_string();
34351 inner.extra = Some(Uuid::new_v4().to_string());
34352 RTDToggleGroupCallParticipantIsMutedBuilder { inner }
34353 }
34354
34355 pub fn group_call_id(&self) -> i64 { self.group_call_id }
34356
34357 pub fn participant_id(&self) -> &MessageSender { &self.participant_id }
34358
34359 pub fn is_muted(&self) -> bool { self.is_muted }
34360
34361}
34362
34363#[doc(hidden)]
34364pub struct RTDToggleGroupCallParticipantIsMutedBuilder {
34365 inner: ToggleGroupCallParticipantIsMuted
34366}
34367
34368impl RTDToggleGroupCallParticipantIsMutedBuilder {
34369 pub fn build(&self) -> ToggleGroupCallParticipantIsMuted { self.inner.clone() }
34370
34371
34372 pub fn group_call_id(&mut self, group_call_id: i64) -> &mut Self {
34373 self.inner.group_call_id = group_call_id;
34374 self
34375 }
34376
34377
34378 pub fn participant_id<T: AsRef<MessageSender>>(&mut self, participant_id: T) -> &mut Self {
34379 self.inner.participant_id = participant_id.as_ref().clone();
34380 self
34381 }
34382
34383
34384 pub fn is_muted(&mut self, is_muted: bool) -> &mut Self {
34385 self.inner.is_muted = is_muted;
34386 self
34387 }
34388
34389}
34390
34391impl AsRef<ToggleGroupCallParticipantIsMuted> for ToggleGroupCallParticipantIsMuted {
34392 fn as_ref(&self) -> &ToggleGroupCallParticipantIsMuted { self }
34393}
34394
34395impl AsRef<ToggleGroupCallParticipantIsMuted> for RTDToggleGroupCallParticipantIsMutedBuilder {
34396 fn as_ref(&self) -> &ToggleGroupCallParticipantIsMuted { &self.inner }
34397}
34398
34399
34400
34401
34402
34403
34404
34405#[derive(Debug, Clone, Default, Serialize, Deserialize)]
34407pub struct ToggleGroupCallScreenSharingIsPaused {
34408 #[doc(hidden)]
34409 #[serde(rename(serialize = "@type", deserialize = "@type"))]
34410 td_name: String,
34411 #[doc(hidden)]
34412 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
34413 extra: Option<String>,
34414 group_call_id: i64,
34416 is_paused: bool,
34418
34419}
34420
34421impl RObject for ToggleGroupCallScreenSharingIsPaused {
34422 #[doc(hidden)] fn td_name(&self) -> &'static str { "toggleGroupCallScreenSharingIsPaused" }
34423 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
34424 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
34425}
34426
34427
34428
34429
34430impl RFunction for ToggleGroupCallScreenSharingIsPaused {}
34431
34432impl ToggleGroupCallScreenSharingIsPaused {
34433 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
34434 pub fn builder() -> RTDToggleGroupCallScreenSharingIsPausedBuilder {
34435 let mut inner = ToggleGroupCallScreenSharingIsPaused::default();
34436 inner.td_name = "toggleGroupCallScreenSharingIsPaused".to_string();
34437 inner.extra = Some(Uuid::new_v4().to_string());
34438 RTDToggleGroupCallScreenSharingIsPausedBuilder { inner }
34439 }
34440
34441 pub fn group_call_id(&self) -> i64 { self.group_call_id }
34442
34443 pub fn is_paused(&self) -> bool { self.is_paused }
34444
34445}
34446
34447#[doc(hidden)]
34448pub struct RTDToggleGroupCallScreenSharingIsPausedBuilder {
34449 inner: ToggleGroupCallScreenSharingIsPaused
34450}
34451
34452impl RTDToggleGroupCallScreenSharingIsPausedBuilder {
34453 pub fn build(&self) -> ToggleGroupCallScreenSharingIsPaused { self.inner.clone() }
34454
34455
34456 pub fn group_call_id(&mut self, group_call_id: i64) -> &mut Self {
34457 self.inner.group_call_id = group_call_id;
34458 self
34459 }
34460
34461
34462 pub fn is_paused(&mut self, is_paused: bool) -> &mut Self {
34463 self.inner.is_paused = is_paused;
34464 self
34465 }
34466
34467}
34468
34469impl AsRef<ToggleGroupCallScreenSharingIsPaused> for ToggleGroupCallScreenSharingIsPaused {
34470 fn as_ref(&self) -> &ToggleGroupCallScreenSharingIsPaused { self }
34471}
34472
34473impl AsRef<ToggleGroupCallScreenSharingIsPaused> for RTDToggleGroupCallScreenSharingIsPausedBuilder {
34474 fn as_ref(&self) -> &ToggleGroupCallScreenSharingIsPaused { &self.inner }
34475}
34476
34477
34478
34479
34480
34481
34482
34483#[derive(Debug, Clone, Default, Serialize, Deserialize)]
34485pub struct ToggleMessageSenderIsBlocked {
34486 #[doc(hidden)]
34487 #[serde(rename(serialize = "@type", deserialize = "@type"))]
34488 td_name: String,
34489 #[doc(hidden)]
34490 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
34491 extra: Option<String>,
34492 sender_id: MessageSender,
34494 is_blocked: bool,
34496
34497}
34498
34499impl RObject for ToggleMessageSenderIsBlocked {
34500 #[doc(hidden)] fn td_name(&self) -> &'static str { "toggleMessageSenderIsBlocked" }
34501 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
34502 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
34503}
34504
34505
34506
34507
34508impl RFunction for ToggleMessageSenderIsBlocked {}
34509
34510impl ToggleMessageSenderIsBlocked {
34511 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
34512 pub fn builder() -> RTDToggleMessageSenderIsBlockedBuilder {
34513 let mut inner = ToggleMessageSenderIsBlocked::default();
34514 inner.td_name = "toggleMessageSenderIsBlocked".to_string();
34515 inner.extra = Some(Uuid::new_v4().to_string());
34516 RTDToggleMessageSenderIsBlockedBuilder { inner }
34517 }
34518
34519 pub fn sender_id(&self) -> &MessageSender { &self.sender_id }
34520
34521 pub fn is_blocked(&self) -> bool { self.is_blocked }
34522
34523}
34524
34525#[doc(hidden)]
34526pub struct RTDToggleMessageSenderIsBlockedBuilder {
34527 inner: ToggleMessageSenderIsBlocked
34528}
34529
34530impl RTDToggleMessageSenderIsBlockedBuilder {
34531 pub fn build(&self) -> ToggleMessageSenderIsBlocked { self.inner.clone() }
34532
34533
34534 pub fn sender_id<T: AsRef<MessageSender>>(&mut self, sender_id: T) -> &mut Self {
34535 self.inner.sender_id = sender_id.as_ref().clone();
34536 self
34537 }
34538
34539
34540 pub fn is_blocked(&mut self, is_blocked: bool) -> &mut Self {
34541 self.inner.is_blocked = is_blocked;
34542 self
34543 }
34544
34545}
34546
34547impl AsRef<ToggleMessageSenderIsBlocked> for ToggleMessageSenderIsBlocked {
34548 fn as_ref(&self) -> &ToggleMessageSenderIsBlocked { self }
34549}
34550
34551impl AsRef<ToggleMessageSenderIsBlocked> for RTDToggleMessageSenderIsBlockedBuilder {
34552 fn as_ref(&self) -> &ToggleMessageSenderIsBlocked { &self.inner }
34553}
34554
34555
34556
34557
34558
34559
34560
34561#[derive(Debug, Clone, Default, Serialize, Deserialize)]
34563pub struct ToggleSessionCanAcceptCalls {
34564 #[doc(hidden)]
34565 #[serde(rename(serialize = "@type", deserialize = "@type"))]
34566 td_name: String,
34567 #[doc(hidden)]
34568 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
34569 extra: Option<String>,
34570 session_id: isize,
34572 can_accept_calls: bool,
34574
34575}
34576
34577impl RObject for ToggleSessionCanAcceptCalls {
34578 #[doc(hidden)] fn td_name(&self) -> &'static str { "toggleSessionCanAcceptCalls" }
34579 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
34580 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
34581}
34582
34583
34584
34585
34586impl RFunction for ToggleSessionCanAcceptCalls {}
34587
34588impl ToggleSessionCanAcceptCalls {
34589 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
34590 pub fn builder() -> RTDToggleSessionCanAcceptCallsBuilder {
34591 let mut inner = ToggleSessionCanAcceptCalls::default();
34592 inner.td_name = "toggleSessionCanAcceptCalls".to_string();
34593 inner.extra = Some(Uuid::new_v4().to_string());
34594 RTDToggleSessionCanAcceptCallsBuilder { inner }
34595 }
34596
34597 pub fn session_id(&self) -> isize { self.session_id }
34598
34599 pub fn can_accept_calls(&self) -> bool { self.can_accept_calls }
34600
34601}
34602
34603#[doc(hidden)]
34604pub struct RTDToggleSessionCanAcceptCallsBuilder {
34605 inner: ToggleSessionCanAcceptCalls
34606}
34607
34608impl RTDToggleSessionCanAcceptCallsBuilder {
34609 pub fn build(&self) -> ToggleSessionCanAcceptCalls { self.inner.clone() }
34610
34611
34612 pub fn session_id(&mut self, session_id: isize) -> &mut Self {
34613 self.inner.session_id = session_id;
34614 self
34615 }
34616
34617
34618 pub fn can_accept_calls(&mut self, can_accept_calls: bool) -> &mut Self {
34619 self.inner.can_accept_calls = can_accept_calls;
34620 self
34621 }
34622
34623}
34624
34625impl AsRef<ToggleSessionCanAcceptCalls> for ToggleSessionCanAcceptCalls {
34626 fn as_ref(&self) -> &ToggleSessionCanAcceptCalls { self }
34627}
34628
34629impl AsRef<ToggleSessionCanAcceptCalls> for RTDToggleSessionCanAcceptCallsBuilder {
34630 fn as_ref(&self) -> &ToggleSessionCanAcceptCalls { &self.inner }
34631}
34632
34633
34634
34635
34636
34637
34638
34639#[derive(Debug, Clone, Default, Serialize, Deserialize)]
34641pub struct ToggleSessionCanAcceptSecretChats {
34642 #[doc(hidden)]
34643 #[serde(rename(serialize = "@type", deserialize = "@type"))]
34644 td_name: String,
34645 #[doc(hidden)]
34646 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
34647 extra: Option<String>,
34648 session_id: isize,
34650 can_accept_secret_chats: bool,
34652
34653}
34654
34655impl RObject for ToggleSessionCanAcceptSecretChats {
34656 #[doc(hidden)] fn td_name(&self) -> &'static str { "toggleSessionCanAcceptSecretChats" }
34657 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
34658 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
34659}
34660
34661
34662
34663
34664impl RFunction for ToggleSessionCanAcceptSecretChats {}
34665
34666impl ToggleSessionCanAcceptSecretChats {
34667 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
34668 pub fn builder() -> RTDToggleSessionCanAcceptSecretChatsBuilder {
34669 let mut inner = ToggleSessionCanAcceptSecretChats::default();
34670 inner.td_name = "toggleSessionCanAcceptSecretChats".to_string();
34671 inner.extra = Some(Uuid::new_v4().to_string());
34672 RTDToggleSessionCanAcceptSecretChatsBuilder { inner }
34673 }
34674
34675 pub fn session_id(&self) -> isize { self.session_id }
34676
34677 pub fn can_accept_secret_chats(&self) -> bool { self.can_accept_secret_chats }
34678
34679}
34680
34681#[doc(hidden)]
34682pub struct RTDToggleSessionCanAcceptSecretChatsBuilder {
34683 inner: ToggleSessionCanAcceptSecretChats
34684}
34685
34686impl RTDToggleSessionCanAcceptSecretChatsBuilder {
34687 pub fn build(&self) -> ToggleSessionCanAcceptSecretChats { self.inner.clone() }
34688
34689
34690 pub fn session_id(&mut self, session_id: isize) -> &mut Self {
34691 self.inner.session_id = session_id;
34692 self
34693 }
34694
34695
34696 pub fn can_accept_secret_chats(&mut self, can_accept_secret_chats: bool) -> &mut Self {
34697 self.inner.can_accept_secret_chats = can_accept_secret_chats;
34698 self
34699 }
34700
34701}
34702
34703impl AsRef<ToggleSessionCanAcceptSecretChats> for ToggleSessionCanAcceptSecretChats {
34704 fn as_ref(&self) -> &ToggleSessionCanAcceptSecretChats { self }
34705}
34706
34707impl AsRef<ToggleSessionCanAcceptSecretChats> for RTDToggleSessionCanAcceptSecretChatsBuilder {
34708 fn as_ref(&self) -> &ToggleSessionCanAcceptSecretChats { &self.inner }
34709}
34710
34711
34712
34713
34714
34715
34716
34717#[derive(Debug, Clone, Default, Serialize, Deserialize)]
34719pub struct ToggleSupergroupIsAllHistoryAvailable {
34720 #[doc(hidden)]
34721 #[serde(rename(serialize = "@type", deserialize = "@type"))]
34722 td_name: String,
34723 #[doc(hidden)]
34724 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
34725 extra: Option<String>,
34726 supergroup_id: i64,
34728 is_all_history_available: bool,
34730
34731}
34732
34733impl RObject for ToggleSupergroupIsAllHistoryAvailable {
34734 #[doc(hidden)] fn td_name(&self) -> &'static str { "toggleSupergroupIsAllHistoryAvailable" }
34735 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
34736 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
34737}
34738
34739
34740
34741
34742impl RFunction for ToggleSupergroupIsAllHistoryAvailable {}
34743
34744impl ToggleSupergroupIsAllHistoryAvailable {
34745 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
34746 pub fn builder() -> RTDToggleSupergroupIsAllHistoryAvailableBuilder {
34747 let mut inner = ToggleSupergroupIsAllHistoryAvailable::default();
34748 inner.td_name = "toggleSupergroupIsAllHistoryAvailable".to_string();
34749 inner.extra = Some(Uuid::new_v4().to_string());
34750 RTDToggleSupergroupIsAllHistoryAvailableBuilder { inner }
34751 }
34752
34753 pub fn supergroup_id(&self) -> i64 { self.supergroup_id }
34754
34755 pub fn is_all_history_available(&self) -> bool { self.is_all_history_available }
34756
34757}
34758
34759#[doc(hidden)]
34760pub struct RTDToggleSupergroupIsAllHistoryAvailableBuilder {
34761 inner: ToggleSupergroupIsAllHistoryAvailable
34762}
34763
34764impl RTDToggleSupergroupIsAllHistoryAvailableBuilder {
34765 pub fn build(&self) -> ToggleSupergroupIsAllHistoryAvailable { self.inner.clone() }
34766
34767
34768 pub fn supergroup_id(&mut self, supergroup_id: i64) -> &mut Self {
34769 self.inner.supergroup_id = supergroup_id;
34770 self
34771 }
34772
34773
34774 pub fn is_all_history_available(&mut self, is_all_history_available: bool) -> &mut Self {
34775 self.inner.is_all_history_available = is_all_history_available;
34776 self
34777 }
34778
34779}
34780
34781impl AsRef<ToggleSupergroupIsAllHistoryAvailable> for ToggleSupergroupIsAllHistoryAvailable {
34782 fn as_ref(&self) -> &ToggleSupergroupIsAllHistoryAvailable { self }
34783}
34784
34785impl AsRef<ToggleSupergroupIsAllHistoryAvailable> for RTDToggleSupergroupIsAllHistoryAvailableBuilder {
34786 fn as_ref(&self) -> &ToggleSupergroupIsAllHistoryAvailable { &self.inner }
34787}
34788
34789
34790
34791
34792
34793
34794
34795#[derive(Debug, Clone, Default, Serialize, Deserialize)]
34797pub struct ToggleSupergroupIsBroadcastGroup {
34798 #[doc(hidden)]
34799 #[serde(rename(serialize = "@type", deserialize = "@type"))]
34800 td_name: String,
34801 #[doc(hidden)]
34802 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
34803 extra: Option<String>,
34804 supergroup_id: i64,
34806
34807}
34808
34809impl RObject for ToggleSupergroupIsBroadcastGroup {
34810 #[doc(hidden)] fn td_name(&self) -> &'static str { "toggleSupergroupIsBroadcastGroup" }
34811 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
34812 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
34813}
34814
34815
34816
34817
34818impl RFunction for ToggleSupergroupIsBroadcastGroup {}
34819
34820impl ToggleSupergroupIsBroadcastGroup {
34821 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
34822 pub fn builder() -> RTDToggleSupergroupIsBroadcastGroupBuilder {
34823 let mut inner = ToggleSupergroupIsBroadcastGroup::default();
34824 inner.td_name = "toggleSupergroupIsBroadcastGroup".to_string();
34825 inner.extra = Some(Uuid::new_v4().to_string());
34826 RTDToggleSupergroupIsBroadcastGroupBuilder { inner }
34827 }
34828
34829 pub fn supergroup_id(&self) -> i64 { self.supergroup_id }
34830
34831}
34832
34833#[doc(hidden)]
34834pub struct RTDToggleSupergroupIsBroadcastGroupBuilder {
34835 inner: ToggleSupergroupIsBroadcastGroup
34836}
34837
34838impl RTDToggleSupergroupIsBroadcastGroupBuilder {
34839 pub fn build(&self) -> ToggleSupergroupIsBroadcastGroup { self.inner.clone() }
34840
34841
34842 pub fn supergroup_id(&mut self, supergroup_id: i64) -> &mut Self {
34843 self.inner.supergroup_id = supergroup_id;
34844 self
34845 }
34846
34847}
34848
34849impl AsRef<ToggleSupergroupIsBroadcastGroup> for ToggleSupergroupIsBroadcastGroup {
34850 fn as_ref(&self) -> &ToggleSupergroupIsBroadcastGroup { self }
34851}
34852
34853impl AsRef<ToggleSupergroupIsBroadcastGroup> for RTDToggleSupergroupIsBroadcastGroupBuilder {
34854 fn as_ref(&self) -> &ToggleSupergroupIsBroadcastGroup { &self.inner }
34855}
34856
34857
34858
34859
34860
34861
34862
34863#[derive(Debug, Clone, Default, Serialize, Deserialize)]
34865pub struct ToggleSupergroupSignMessages {
34866 #[doc(hidden)]
34867 #[serde(rename(serialize = "@type", deserialize = "@type"))]
34868 td_name: String,
34869 #[doc(hidden)]
34870 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
34871 extra: Option<String>,
34872 supergroup_id: i64,
34874 sign_messages: bool,
34876
34877}
34878
34879impl RObject for ToggleSupergroupSignMessages {
34880 #[doc(hidden)] fn td_name(&self) -> &'static str { "toggleSupergroupSignMessages" }
34881 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
34882 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
34883}
34884
34885
34886
34887
34888impl RFunction for ToggleSupergroupSignMessages {}
34889
34890impl ToggleSupergroupSignMessages {
34891 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
34892 pub fn builder() -> RTDToggleSupergroupSignMessagesBuilder {
34893 let mut inner = ToggleSupergroupSignMessages::default();
34894 inner.td_name = "toggleSupergroupSignMessages".to_string();
34895 inner.extra = Some(Uuid::new_v4().to_string());
34896 RTDToggleSupergroupSignMessagesBuilder { inner }
34897 }
34898
34899 pub fn supergroup_id(&self) -> i64 { self.supergroup_id }
34900
34901 pub fn sign_messages(&self) -> bool { self.sign_messages }
34902
34903}
34904
34905#[doc(hidden)]
34906pub struct RTDToggleSupergroupSignMessagesBuilder {
34907 inner: ToggleSupergroupSignMessages
34908}
34909
34910impl RTDToggleSupergroupSignMessagesBuilder {
34911 pub fn build(&self) -> ToggleSupergroupSignMessages { self.inner.clone() }
34912
34913
34914 pub fn supergroup_id(&mut self, supergroup_id: i64) -> &mut Self {
34915 self.inner.supergroup_id = supergroup_id;
34916 self
34917 }
34918
34919
34920 pub fn sign_messages(&mut self, sign_messages: bool) -> &mut Self {
34921 self.inner.sign_messages = sign_messages;
34922 self
34923 }
34924
34925}
34926
34927impl AsRef<ToggleSupergroupSignMessages> for ToggleSupergroupSignMessages {
34928 fn as_ref(&self) -> &ToggleSupergroupSignMessages { self }
34929}
34930
34931impl AsRef<ToggleSupergroupSignMessages> for RTDToggleSupergroupSignMessagesBuilder {
34932 fn as_ref(&self) -> &ToggleSupergroupSignMessages { &self.inner }
34933}
34934
34935
34936
34937
34938
34939
34940
34941#[derive(Debug, Clone, Default, Serialize, Deserialize)]
34943pub struct TransferChatOwnership {
34944 #[doc(hidden)]
34945 #[serde(rename(serialize = "@type", deserialize = "@type"))]
34946 td_name: String,
34947 #[doc(hidden)]
34948 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
34949 extra: Option<String>,
34950 chat_id: i64,
34952 user_id: i64,
34954 password: String,
34956
34957}
34958
34959impl RObject for TransferChatOwnership {
34960 #[doc(hidden)] fn td_name(&self) -> &'static str { "transferChatOwnership" }
34961 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
34962 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
34963}
34964
34965
34966
34967
34968impl RFunction for TransferChatOwnership {}
34969
34970impl TransferChatOwnership {
34971 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
34972 pub fn builder() -> RTDTransferChatOwnershipBuilder {
34973 let mut inner = TransferChatOwnership::default();
34974 inner.td_name = "transferChatOwnership".to_string();
34975 inner.extra = Some(Uuid::new_v4().to_string());
34976 RTDTransferChatOwnershipBuilder { inner }
34977 }
34978
34979 pub fn chat_id(&self) -> i64 { self.chat_id }
34980
34981 pub fn user_id(&self) -> i64 { self.user_id }
34982
34983 pub fn password(&self) -> &String { &self.password }
34984
34985}
34986
34987#[doc(hidden)]
34988pub struct RTDTransferChatOwnershipBuilder {
34989 inner: TransferChatOwnership
34990}
34991
34992impl RTDTransferChatOwnershipBuilder {
34993 pub fn build(&self) -> TransferChatOwnership { self.inner.clone() }
34994
34995
34996 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
34997 self.inner.chat_id = chat_id;
34998 self
34999 }
35000
35001
35002 pub fn user_id(&mut self, user_id: i64) -> &mut Self {
35003 self.inner.user_id = user_id;
35004 self
35005 }
35006
35007
35008 pub fn password<T: AsRef<str>>(&mut self, password: T) -> &mut Self {
35009 self.inner.password = password.as_ref().to_string();
35010 self
35011 }
35012
35013}
35014
35015impl AsRef<TransferChatOwnership> for TransferChatOwnership {
35016 fn as_ref(&self) -> &TransferChatOwnership { self }
35017}
35018
35019impl AsRef<TransferChatOwnership> for RTDTransferChatOwnershipBuilder {
35020 fn as_ref(&self) -> &TransferChatOwnership { &self.inner }
35021}
35022
35023
35024
35025
35026
35027
35028
35029#[derive(Debug, Clone, Default, Serialize, Deserialize)]
35031pub struct UnpinAllChatMessages {
35032 #[doc(hidden)]
35033 #[serde(rename(serialize = "@type", deserialize = "@type"))]
35034 td_name: String,
35035 #[doc(hidden)]
35036 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
35037 extra: Option<String>,
35038 chat_id: i64,
35040
35041}
35042
35043impl RObject for UnpinAllChatMessages {
35044 #[doc(hidden)] fn td_name(&self) -> &'static str { "unpinAllChatMessages" }
35045 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
35046 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
35047}
35048
35049
35050
35051
35052impl RFunction for UnpinAllChatMessages {}
35053
35054impl UnpinAllChatMessages {
35055 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
35056 pub fn builder() -> RTDUnpinAllChatMessagesBuilder {
35057 let mut inner = UnpinAllChatMessages::default();
35058 inner.td_name = "unpinAllChatMessages".to_string();
35059 inner.extra = Some(Uuid::new_v4().to_string());
35060 RTDUnpinAllChatMessagesBuilder { inner }
35061 }
35062
35063 pub fn chat_id(&self) -> i64 { self.chat_id }
35064
35065}
35066
35067#[doc(hidden)]
35068pub struct RTDUnpinAllChatMessagesBuilder {
35069 inner: UnpinAllChatMessages
35070}
35071
35072impl RTDUnpinAllChatMessagesBuilder {
35073 pub fn build(&self) -> UnpinAllChatMessages { self.inner.clone() }
35074
35075
35076 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
35077 self.inner.chat_id = chat_id;
35078 self
35079 }
35080
35081}
35082
35083impl AsRef<UnpinAllChatMessages> for UnpinAllChatMessages {
35084 fn as_ref(&self) -> &UnpinAllChatMessages { self }
35085}
35086
35087impl AsRef<UnpinAllChatMessages> for RTDUnpinAllChatMessagesBuilder {
35088 fn as_ref(&self) -> &UnpinAllChatMessages { &self.inner }
35089}
35090
35091
35092
35093
35094
35095
35096
35097#[derive(Debug, Clone, Default, Serialize, Deserialize)]
35099pub struct UnpinChatMessage {
35100 #[doc(hidden)]
35101 #[serde(rename(serialize = "@type", deserialize = "@type"))]
35102 td_name: String,
35103 #[doc(hidden)]
35104 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
35105 extra: Option<String>,
35106 chat_id: i64,
35108 message_id: i64,
35110
35111}
35112
35113impl RObject for UnpinChatMessage {
35114 #[doc(hidden)] fn td_name(&self) -> &'static str { "unpinChatMessage" }
35115 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
35116 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
35117}
35118
35119
35120
35121
35122impl RFunction for UnpinChatMessage {}
35123
35124impl UnpinChatMessage {
35125 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
35126 pub fn builder() -> RTDUnpinChatMessageBuilder {
35127 let mut inner = UnpinChatMessage::default();
35128 inner.td_name = "unpinChatMessage".to_string();
35129 inner.extra = Some(Uuid::new_v4().to_string());
35130 RTDUnpinChatMessageBuilder { inner }
35131 }
35132
35133 pub fn chat_id(&self) -> i64 { self.chat_id }
35134
35135 pub fn message_id(&self) -> i64 { self.message_id }
35136
35137}
35138
35139#[doc(hidden)]
35140pub struct RTDUnpinChatMessageBuilder {
35141 inner: UnpinChatMessage
35142}
35143
35144impl RTDUnpinChatMessageBuilder {
35145 pub fn build(&self) -> UnpinChatMessage { self.inner.clone() }
35146
35147
35148 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
35149 self.inner.chat_id = chat_id;
35150 self
35151 }
35152
35153
35154 pub fn message_id(&mut self, message_id: i64) -> &mut Self {
35155 self.inner.message_id = message_id;
35156 self
35157 }
35158
35159}
35160
35161impl AsRef<UnpinChatMessage> for UnpinChatMessage {
35162 fn as_ref(&self) -> &UnpinChatMessage { self }
35163}
35164
35165impl AsRef<UnpinChatMessage> for RTDUnpinChatMessageBuilder {
35166 fn as_ref(&self) -> &UnpinChatMessage { &self.inner }
35167}
35168
35169
35170
35171
35172
35173
35174
35175#[derive(Debug, Clone, Default, Serialize, Deserialize)]
35177pub struct UpgradeBasicGroupChatToSupergroupChat {
35178 #[doc(hidden)]
35179 #[serde(rename(serialize = "@type", deserialize = "@type"))]
35180 td_name: String,
35181 #[doc(hidden)]
35182 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
35183 extra: Option<String>,
35184 chat_id: i64,
35186
35187}
35188
35189impl RObject for UpgradeBasicGroupChatToSupergroupChat {
35190 #[doc(hidden)] fn td_name(&self) -> &'static str { "upgradeBasicGroupChatToSupergroupChat" }
35191 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
35192 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
35193}
35194
35195
35196
35197
35198impl RFunction for UpgradeBasicGroupChatToSupergroupChat {}
35199
35200impl UpgradeBasicGroupChatToSupergroupChat {
35201 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
35202 pub fn builder() -> RTDUpgradeBasicGroupChatToSupergroupChatBuilder {
35203 let mut inner = UpgradeBasicGroupChatToSupergroupChat::default();
35204 inner.td_name = "upgradeBasicGroupChatToSupergroupChat".to_string();
35205 inner.extra = Some(Uuid::new_v4().to_string());
35206 RTDUpgradeBasicGroupChatToSupergroupChatBuilder { inner }
35207 }
35208
35209 pub fn chat_id(&self) -> i64 { self.chat_id }
35210
35211}
35212
35213#[doc(hidden)]
35214pub struct RTDUpgradeBasicGroupChatToSupergroupChatBuilder {
35215 inner: UpgradeBasicGroupChatToSupergroupChat
35216}
35217
35218impl RTDUpgradeBasicGroupChatToSupergroupChatBuilder {
35219 pub fn build(&self) -> UpgradeBasicGroupChatToSupergroupChat { self.inner.clone() }
35220
35221
35222 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
35223 self.inner.chat_id = chat_id;
35224 self
35225 }
35226
35227}
35228
35229impl AsRef<UpgradeBasicGroupChatToSupergroupChat> for UpgradeBasicGroupChatToSupergroupChat {
35230 fn as_ref(&self) -> &UpgradeBasicGroupChatToSupergroupChat { self }
35231}
35232
35233impl AsRef<UpgradeBasicGroupChatToSupergroupChat> for RTDUpgradeBasicGroupChatToSupergroupChatBuilder {
35234 fn as_ref(&self) -> &UpgradeBasicGroupChatToSupergroupChat { &self.inner }
35235}
35236
35237
35238
35239
35240
35241
35242
35243#[derive(Debug, Clone, Default, Serialize, Deserialize)]
35245pub struct UploadFile {
35246 #[doc(hidden)]
35247 #[serde(rename(serialize = "@type", deserialize = "@type"))]
35248 td_name: String,
35249 #[doc(hidden)]
35250 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
35251 extra: Option<String>,
35252 file: InputFile,
35254 file_type: FileType,
35256 priority: i64,
35258
35259}
35260
35261impl RObject for UploadFile {
35262 #[doc(hidden)] fn td_name(&self) -> &'static str { "uploadFile" }
35263 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
35264 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
35265}
35266
35267
35268
35269
35270impl RFunction for UploadFile {}
35271
35272impl UploadFile {
35273 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
35274 pub fn builder() -> RTDUploadFileBuilder {
35275 let mut inner = UploadFile::default();
35276 inner.td_name = "uploadFile".to_string();
35277 inner.extra = Some(Uuid::new_v4().to_string());
35278 RTDUploadFileBuilder { inner }
35279 }
35280
35281 pub fn file(&self) -> &InputFile { &self.file }
35282
35283 pub fn file_type(&self) -> &FileType { &self.file_type }
35284
35285 pub fn priority(&self) -> i64 { self.priority }
35286
35287}
35288
35289#[doc(hidden)]
35290pub struct RTDUploadFileBuilder {
35291 inner: UploadFile
35292}
35293
35294impl RTDUploadFileBuilder {
35295 pub fn build(&self) -> UploadFile { self.inner.clone() }
35296
35297
35298 pub fn file<T: AsRef<InputFile>>(&mut self, file: T) -> &mut Self {
35299 self.inner.file = file.as_ref().clone();
35300 self
35301 }
35302
35303
35304 pub fn file_type<T: AsRef<FileType>>(&mut self, file_type: T) -> &mut Self {
35305 self.inner.file_type = file_type.as_ref().clone();
35306 self
35307 }
35308
35309
35310 pub fn priority(&mut self, priority: i64) -> &mut Self {
35311 self.inner.priority = priority;
35312 self
35313 }
35314
35315}
35316
35317impl AsRef<UploadFile> for UploadFile {
35318 fn as_ref(&self) -> &UploadFile { self }
35319}
35320
35321impl AsRef<UploadFile> for RTDUploadFileBuilder {
35322 fn as_ref(&self) -> &UploadFile { &self.inner }
35323}
35324
35325
35326
35327
35328
35329
35330
35331#[derive(Debug, Clone, Default, Serialize, Deserialize)]
35333pub struct UploadStickerFile {
35334 #[doc(hidden)]
35335 #[serde(rename(serialize = "@type", deserialize = "@type"))]
35336 td_name: String,
35337 #[doc(hidden)]
35338 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
35339 extra: Option<String>,
35340 user_id: i64,
35342 sticker: InputSticker,
35344
35345}
35346
35347impl RObject for UploadStickerFile {
35348 #[doc(hidden)] fn td_name(&self) -> &'static str { "uploadStickerFile" }
35349 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
35350 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
35351}
35352
35353
35354
35355
35356impl RFunction for UploadStickerFile {}
35357
35358impl UploadStickerFile {
35359 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
35360 pub fn builder() -> RTDUploadStickerFileBuilder {
35361 let mut inner = UploadStickerFile::default();
35362 inner.td_name = "uploadStickerFile".to_string();
35363 inner.extra = Some(Uuid::new_v4().to_string());
35364 RTDUploadStickerFileBuilder { inner }
35365 }
35366
35367 pub fn user_id(&self) -> i64 { self.user_id }
35368
35369 pub fn sticker(&self) -> &InputSticker { &self.sticker }
35370
35371}
35372
35373#[doc(hidden)]
35374pub struct RTDUploadStickerFileBuilder {
35375 inner: UploadStickerFile
35376}
35377
35378impl RTDUploadStickerFileBuilder {
35379 pub fn build(&self) -> UploadStickerFile { self.inner.clone() }
35380
35381
35382 pub fn user_id(&mut self, user_id: i64) -> &mut Self {
35383 self.inner.user_id = user_id;
35384 self
35385 }
35386
35387
35388 pub fn sticker<T: AsRef<InputSticker>>(&mut self, sticker: T) -> &mut Self {
35389 self.inner.sticker = sticker.as_ref().clone();
35390 self
35391 }
35392
35393}
35394
35395impl AsRef<UploadStickerFile> for UploadStickerFile {
35396 fn as_ref(&self) -> &UploadStickerFile { self }
35397}
35398
35399impl AsRef<UploadStickerFile> for RTDUploadStickerFileBuilder {
35400 fn as_ref(&self) -> &UploadStickerFile { &self.inner }
35401}
35402
35403
35404
35405
35406
35407
35408
35409#[derive(Debug, Clone, Default, Serialize, Deserialize)]
35411pub struct ValidateOrderInfo {
35412 #[doc(hidden)]
35413 #[serde(rename(serialize = "@type", deserialize = "@type"))]
35414 td_name: String,
35415 #[doc(hidden)]
35416 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
35417 extra: Option<String>,
35418 chat_id: i64,
35420 message_id: i64,
35422 order_info: OrderInfo,
35424 allow_save: bool,
35426
35427}
35428
35429impl RObject for ValidateOrderInfo {
35430 #[doc(hidden)] fn td_name(&self) -> &'static str { "validateOrderInfo" }
35431 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
35432 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
35433}
35434
35435
35436
35437
35438impl RFunction for ValidateOrderInfo {}
35439
35440impl ValidateOrderInfo {
35441 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
35442 pub fn builder() -> RTDValidateOrderInfoBuilder {
35443 let mut inner = ValidateOrderInfo::default();
35444 inner.td_name = "validateOrderInfo".to_string();
35445 inner.extra = Some(Uuid::new_v4().to_string());
35446 RTDValidateOrderInfoBuilder { inner }
35447 }
35448
35449 pub fn chat_id(&self) -> i64 { self.chat_id }
35450
35451 pub fn message_id(&self) -> i64 { self.message_id }
35452
35453 pub fn order_info(&self) -> &OrderInfo { &self.order_info }
35454
35455 pub fn allow_save(&self) -> bool { self.allow_save }
35456
35457}
35458
35459#[doc(hidden)]
35460pub struct RTDValidateOrderInfoBuilder {
35461 inner: ValidateOrderInfo
35462}
35463
35464impl RTDValidateOrderInfoBuilder {
35465 pub fn build(&self) -> ValidateOrderInfo { self.inner.clone() }
35466
35467
35468 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
35469 self.inner.chat_id = chat_id;
35470 self
35471 }
35472
35473
35474 pub fn message_id(&mut self, message_id: i64) -> &mut Self {
35475 self.inner.message_id = message_id;
35476 self
35477 }
35478
35479
35480 pub fn order_info<T: AsRef<OrderInfo>>(&mut self, order_info: T) -> &mut Self {
35481 self.inner.order_info = order_info.as_ref().clone();
35482 self
35483 }
35484
35485
35486 pub fn allow_save(&mut self, allow_save: bool) -> &mut Self {
35487 self.inner.allow_save = allow_save;
35488 self
35489 }
35490
35491}
35492
35493impl AsRef<ValidateOrderInfo> for ValidateOrderInfo {
35494 fn as_ref(&self) -> &ValidateOrderInfo { self }
35495}
35496
35497impl AsRef<ValidateOrderInfo> for RTDValidateOrderInfoBuilder {
35498 fn as_ref(&self) -> &ValidateOrderInfo { &self.inner }
35499}
35500
35501
35502
35503
35504
35505
35506
35507#[derive(Debug, Clone, Default, Serialize, Deserialize)]
35509pub struct ViewMessages {
35510 #[doc(hidden)]
35511 #[serde(rename(serialize = "@type", deserialize = "@type"))]
35512 td_name: String,
35513 #[doc(hidden)]
35514 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
35515 extra: Option<String>,
35516 chat_id: i64,
35518 message_thread_id: i64,
35520 message_ids: Vec<i64>,
35522 force_read: bool,
35524
35525}
35526
35527impl RObject for ViewMessages {
35528 #[doc(hidden)] fn td_name(&self) -> &'static str { "viewMessages" }
35529 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
35530 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
35531}
35532
35533
35534
35535
35536impl RFunction for ViewMessages {}
35537
35538impl ViewMessages {
35539 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
35540 pub fn builder() -> RTDViewMessagesBuilder {
35541 let mut inner = ViewMessages::default();
35542 inner.td_name = "viewMessages".to_string();
35543 inner.extra = Some(Uuid::new_v4().to_string());
35544 RTDViewMessagesBuilder { inner }
35545 }
35546
35547 pub fn chat_id(&self) -> i64 { self.chat_id }
35548
35549 pub fn message_thread_id(&self) -> i64 { self.message_thread_id }
35550
35551 pub fn message_ids(&self) -> &Vec<i64> { &self.message_ids }
35552
35553 pub fn force_read(&self) -> bool { self.force_read }
35554
35555}
35556
35557#[doc(hidden)]
35558pub struct RTDViewMessagesBuilder {
35559 inner: ViewMessages
35560}
35561
35562impl RTDViewMessagesBuilder {
35563 pub fn build(&self) -> ViewMessages { self.inner.clone() }
35564
35565
35566 pub fn chat_id(&mut self, chat_id: i64) -> &mut Self {
35567 self.inner.chat_id = chat_id;
35568 self
35569 }
35570
35571
35572 pub fn message_thread_id(&mut self, message_thread_id: i64) -> &mut Self {
35573 self.inner.message_thread_id = message_thread_id;
35574 self
35575 }
35576
35577
35578 pub fn message_ids(&mut self, message_ids: Vec<i64>) -> &mut Self {
35579 self.inner.message_ids = message_ids;
35580 self
35581 }
35582
35583
35584 pub fn force_read(&mut self, force_read: bool) -> &mut Self {
35585 self.inner.force_read = force_read;
35586 self
35587 }
35588
35589}
35590
35591impl AsRef<ViewMessages> for ViewMessages {
35592 fn as_ref(&self) -> &ViewMessages { self }
35593}
35594
35595impl AsRef<ViewMessages> for RTDViewMessagesBuilder {
35596 fn as_ref(&self) -> &ViewMessages { &self.inner }
35597}
35598
35599
35600
35601
35602
35603
35604
35605#[derive(Debug, Clone, Default, Serialize, Deserialize)]
35607pub struct ViewTrendingStickerSets {
35608 #[doc(hidden)]
35609 #[serde(rename(serialize = "@type", deserialize = "@type"))]
35610 td_name: String,
35611 #[doc(hidden)]
35612 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
35613 extra: Option<String>,
35614 sticker_set_ids: Vec<isize>,
35616
35617}
35618
35619impl RObject for ViewTrendingStickerSets {
35620 #[doc(hidden)] fn td_name(&self) -> &'static str { "viewTrendingStickerSets" }
35621 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
35622 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
35623}
35624
35625
35626
35627
35628impl RFunction for ViewTrendingStickerSets {}
35629
35630impl ViewTrendingStickerSets {
35631 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
35632 pub fn builder() -> RTDViewTrendingStickerSetsBuilder {
35633 let mut inner = ViewTrendingStickerSets::default();
35634 inner.td_name = "viewTrendingStickerSets".to_string();
35635 inner.extra = Some(Uuid::new_v4().to_string());
35636 RTDViewTrendingStickerSetsBuilder { inner }
35637 }
35638
35639 pub fn sticker_set_ids(&self) -> &Vec<isize> { &self.sticker_set_ids }
35640
35641}
35642
35643#[doc(hidden)]
35644pub struct RTDViewTrendingStickerSetsBuilder {
35645 inner: ViewTrendingStickerSets
35646}
35647
35648impl RTDViewTrendingStickerSetsBuilder {
35649 pub fn build(&self) -> ViewTrendingStickerSets { self.inner.clone() }
35650
35651
35652 pub fn sticker_set_ids(&mut self, sticker_set_ids: Vec<isize>) -> &mut Self {
35653 self.inner.sticker_set_ids = sticker_set_ids;
35654 self
35655 }
35656
35657}
35658
35659impl AsRef<ViewTrendingStickerSets> for ViewTrendingStickerSets {
35660 fn as_ref(&self) -> &ViewTrendingStickerSets { self }
35661}
35662
35663impl AsRef<ViewTrendingStickerSets> for RTDViewTrendingStickerSetsBuilder {
35664 fn as_ref(&self) -> &ViewTrendingStickerSets { &self.inner }
35665}
35666
35667
35668
35669
35670
35671
35672
35673#[derive(Debug, Clone, Default, Serialize, Deserialize)]
35675pub struct WriteGeneratedFilePart {
35676 #[doc(hidden)]
35677 #[serde(rename(serialize = "@type", deserialize = "@type"))]
35678 td_name: String,
35679 #[doc(hidden)]
35680 #[serde(rename(serialize = "@extra", deserialize = "@extra"))]
35681 extra: Option<String>,
35682 generation_id: isize,
35684 offset: i64,
35686 data: String,
35688
35689}
35690
35691impl RObject for WriteGeneratedFilePart {
35692 #[doc(hidden)] fn td_name(&self) -> &'static str { "writeGeneratedFilePart" }
35693 #[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
35694 fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
35695}
35696
35697
35698
35699
35700impl RFunction for WriteGeneratedFilePart {}
35701
35702impl WriteGeneratedFilePart {
35703 pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
35704 pub fn builder() -> RTDWriteGeneratedFilePartBuilder {
35705 let mut inner = WriteGeneratedFilePart::default();
35706 inner.td_name = "writeGeneratedFilePart".to_string();
35707 inner.extra = Some(Uuid::new_v4().to_string());
35708 RTDWriteGeneratedFilePartBuilder { inner }
35709 }
35710
35711 pub fn generation_id(&self) -> isize { self.generation_id }
35712
35713 pub fn offset(&self) -> i64 { self.offset }
35714
35715 pub fn data(&self) -> &String { &self.data }
35716
35717}
35718
35719#[doc(hidden)]
35720pub struct RTDWriteGeneratedFilePartBuilder {
35721 inner: WriteGeneratedFilePart
35722}
35723
35724impl RTDWriteGeneratedFilePartBuilder {
35725 pub fn build(&self) -> WriteGeneratedFilePart { self.inner.clone() }
35726
35727
35728 pub fn generation_id(&mut self, generation_id: isize) -> &mut Self {
35729 self.inner.generation_id = generation_id;
35730 self
35731 }
35732
35733
35734 pub fn offset(&mut self, offset: i64) -> &mut Self {
35735 self.inner.offset = offset;
35736 self
35737 }
35738
35739
35740 pub fn data<T: AsRef<str>>(&mut self, data: T) -> &mut Self {
35741 self.inner.data = data.as_ref().to_string();
35742 self
35743 }
35744
35745}
35746
35747impl AsRef<WriteGeneratedFilePart> for WriteGeneratedFilePart {
35748 fn as_ref(&self) -> &WriteGeneratedFilePart { self }
35749}
35750
35751impl AsRef<WriteGeneratedFilePart> for RTDWriteGeneratedFilePartBuilder {
35752 fn as_ref(&self) -> &WriteGeneratedFilePart { &self.inner }
35753}
35754
35755
35756