1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
use crate::types::*;
use crate::errors::*;
use uuid::Uuid;
use std::fmt::Debug;
use serde::de::{Deserialize, Deserializer};
pub trait TDChatActionBar: Debug + RObject {}
#[derive(Debug, Clone, Serialize)]
#[serde(untagged)]
pub enum ChatActionBar {
#[doc(hidden)] _Default(()),
AddContact(ChatActionBarAddContact),
InviteMembers(ChatActionBarInviteMembers),
JoinRequest(ChatActionBarJoinRequest),
ReportAddBlock(ChatActionBarReportAddBlock),
ReportSpam(ChatActionBarReportSpam),
ReportUnrelatedLocation(ChatActionBarReportUnrelatedLocation),
SharePhoneNumber(ChatActionBarSharePhoneNumber),
}
impl Default for ChatActionBar {
fn default() -> Self { ChatActionBar::_Default(()) }
}
impl<'de> Deserialize<'de> for ChatActionBar {
fn deserialize<D>(deserializer: D) -> Result<ChatActionBar, D::Error> where D: Deserializer<'de> {
use serde::de::Error;
rtd_enum_deserialize!(
ChatActionBar,
(chatActionBarAddContact, AddContact);
(chatActionBarInviteMembers, InviteMembers);
(chatActionBarJoinRequest, JoinRequest);
(chatActionBarReportAddBlock, ReportAddBlock);
(chatActionBarReportSpam, ReportSpam);
(chatActionBarReportUnrelatedLocation, ReportUnrelatedLocation);
(chatActionBarSharePhoneNumber, SharePhoneNumber);
)(deserializer)
}
}
impl RObject for ChatActionBar {
#[doc(hidden)] fn td_name(&self) -> &'static str {
match self {
ChatActionBar::AddContact(t) => t.td_name(),
ChatActionBar::InviteMembers(t) => t.td_name(),
ChatActionBar::JoinRequest(t) => t.td_name(),
ChatActionBar::ReportAddBlock(t) => t.td_name(),
ChatActionBar::ReportSpam(t) => t.td_name(),
ChatActionBar::ReportUnrelatedLocation(t) => t.td_name(),
ChatActionBar::SharePhoneNumber(t) => t.td_name(),
_ => "-1",
}
}
#[doc(hidden)] fn extra(&self) -> Option<String> {
match self {
ChatActionBar::AddContact(t) => t.extra(),
ChatActionBar::InviteMembers(t) => t.extra(),
ChatActionBar::JoinRequest(t) => t.extra(),
ChatActionBar::ReportAddBlock(t) => t.extra(),
ChatActionBar::ReportSpam(t) => t.extra(),
ChatActionBar::ReportUnrelatedLocation(t) => t.extra(),
ChatActionBar::SharePhoneNumber(t) => t.extra(),
_ => None,
}
}
fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
}
impl ChatActionBar {
pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
#[doc(hidden)] pub fn _is_default(&self) -> bool { if let ChatActionBar::_Default(_) = self { true } else { false } }
pub fn is_add_contact(&self) -> bool { if let ChatActionBar::AddContact(_) = self { true } else { false } }
pub fn is_invite_members(&self) -> bool { if let ChatActionBar::InviteMembers(_) = self { true } else { false } }
pub fn is_join_request(&self) -> bool { if let ChatActionBar::JoinRequest(_) = self { true } else { false } }
pub fn is_report_add_block(&self) -> bool { if let ChatActionBar::ReportAddBlock(_) = self { true } else { false } }
pub fn is_report_spam(&self) -> bool { if let ChatActionBar::ReportSpam(_) = self { true } else { false } }
pub fn is_report_unrelated_location(&self) -> bool { if let ChatActionBar::ReportUnrelatedLocation(_) = self { true } else { false } }
pub fn is_share_phone_number(&self) -> bool { if let ChatActionBar::SharePhoneNumber(_) = self { true } else { false } }
pub fn on_add_contact<F: FnOnce(&ChatActionBarAddContact)>(&self, fnc: F) -> &Self { if let ChatActionBar::AddContact(t) = self { fnc(t) }; self }
pub fn on_invite_members<F: FnOnce(&ChatActionBarInviteMembers)>(&self, fnc: F) -> &Self { if let ChatActionBar::InviteMembers(t) = self { fnc(t) }; self }
pub fn on_join_request<F: FnOnce(&ChatActionBarJoinRequest)>(&self, fnc: F) -> &Self { if let ChatActionBar::JoinRequest(t) = self { fnc(t) }; self }
pub fn on_report_add_block<F: FnOnce(&ChatActionBarReportAddBlock)>(&self, fnc: F) -> &Self { if let ChatActionBar::ReportAddBlock(t) = self { fnc(t) }; self }
pub fn on_report_spam<F: FnOnce(&ChatActionBarReportSpam)>(&self, fnc: F) -> &Self { if let ChatActionBar::ReportSpam(t) = self { fnc(t) }; self }
pub fn on_report_unrelated_location<F: FnOnce(&ChatActionBarReportUnrelatedLocation)>(&self, fnc: F) -> &Self { if let ChatActionBar::ReportUnrelatedLocation(t) = self { fnc(t) }; self }
pub fn on_share_phone_number<F: FnOnce(&ChatActionBarSharePhoneNumber)>(&self, fnc: F) -> &Self { if let ChatActionBar::SharePhoneNumber(t) = self { fnc(t) }; self }
pub fn as_add_contact(&self) -> Option<&ChatActionBarAddContact> { if let ChatActionBar::AddContact(t) = self { return Some(t) } None }
pub fn as_invite_members(&self) -> Option<&ChatActionBarInviteMembers> { if let ChatActionBar::InviteMembers(t) = self { return Some(t) } None }
pub fn as_join_request(&self) -> Option<&ChatActionBarJoinRequest> { if let ChatActionBar::JoinRequest(t) = self { return Some(t) } None }
pub fn as_report_add_block(&self) -> Option<&ChatActionBarReportAddBlock> { if let ChatActionBar::ReportAddBlock(t) = self { return Some(t) } None }
pub fn as_report_spam(&self) -> Option<&ChatActionBarReportSpam> { if let ChatActionBar::ReportSpam(t) = self { return Some(t) } None }
pub fn as_report_unrelated_location(&self) -> Option<&ChatActionBarReportUnrelatedLocation> { if let ChatActionBar::ReportUnrelatedLocation(t) = self { return Some(t) } None }
pub fn as_share_phone_number(&self) -> Option<&ChatActionBarSharePhoneNumber> { if let ChatActionBar::SharePhoneNumber(t) = self { return Some(t) } None }
pub fn add_contact<T: AsRef<ChatActionBarAddContact>>(t: T) -> Self { ChatActionBar::AddContact(t.as_ref().clone()) }
pub fn invite_members<T: AsRef<ChatActionBarInviteMembers>>(t: T) -> Self { ChatActionBar::InviteMembers(t.as_ref().clone()) }
pub fn join_request<T: AsRef<ChatActionBarJoinRequest>>(t: T) -> Self { ChatActionBar::JoinRequest(t.as_ref().clone()) }
pub fn report_add_block<T: AsRef<ChatActionBarReportAddBlock>>(t: T) -> Self { ChatActionBar::ReportAddBlock(t.as_ref().clone()) }
pub fn report_spam<T: AsRef<ChatActionBarReportSpam>>(t: T) -> Self { ChatActionBar::ReportSpam(t.as_ref().clone()) }
pub fn report_unrelated_location<T: AsRef<ChatActionBarReportUnrelatedLocation>>(t: T) -> Self { ChatActionBar::ReportUnrelatedLocation(t.as_ref().clone()) }
pub fn share_phone_number<T: AsRef<ChatActionBarSharePhoneNumber>>(t: T) -> Self { ChatActionBar::SharePhoneNumber(t.as_ref().clone()) }
}
impl AsRef<ChatActionBar> for ChatActionBar {
fn as_ref(&self) -> &ChatActionBar { self }
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct ChatActionBarAddContact {
#[doc(hidden)]
#[serde(rename(serialize = "@type", deserialize = "@type"))]
td_name: String,
#[doc(hidden)]
#[serde(rename(serialize = "@extra", deserialize = "@extra"))]
extra: Option<String>,
}
impl RObject for ChatActionBarAddContact {
#[doc(hidden)] fn td_name(&self) -> &'static str { "chatActionBarAddContact" }
#[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
}
impl TDChatActionBar for ChatActionBarAddContact {}
impl ChatActionBarAddContact {
pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
pub fn builder() -> RTDChatActionBarAddContactBuilder {
let mut inner = ChatActionBarAddContact::default();
inner.td_name = "chatActionBarAddContact".to_string();
inner.extra = Some(Uuid::new_v4().to_string());
RTDChatActionBarAddContactBuilder { inner }
}
}
#[doc(hidden)]
pub struct RTDChatActionBarAddContactBuilder {
inner: ChatActionBarAddContact
}
impl RTDChatActionBarAddContactBuilder {
pub fn build(&self) -> ChatActionBarAddContact { self.inner.clone() }
}
impl AsRef<ChatActionBarAddContact> for ChatActionBarAddContact {
fn as_ref(&self) -> &ChatActionBarAddContact { self }
}
impl AsRef<ChatActionBarAddContact> for RTDChatActionBarAddContactBuilder {
fn as_ref(&self) -> &ChatActionBarAddContact { &self.inner }
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct ChatActionBarInviteMembers {
#[doc(hidden)]
#[serde(rename(serialize = "@type", deserialize = "@type"))]
td_name: String,
#[doc(hidden)]
#[serde(rename(serialize = "@extra", deserialize = "@extra"))]
extra: Option<String>,
}
impl RObject for ChatActionBarInviteMembers {
#[doc(hidden)] fn td_name(&self) -> &'static str { "chatActionBarInviteMembers" }
#[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
}
impl TDChatActionBar for ChatActionBarInviteMembers {}
impl ChatActionBarInviteMembers {
pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
pub fn builder() -> RTDChatActionBarInviteMembersBuilder {
let mut inner = ChatActionBarInviteMembers::default();
inner.td_name = "chatActionBarInviteMembers".to_string();
inner.extra = Some(Uuid::new_v4().to_string());
RTDChatActionBarInviteMembersBuilder { inner }
}
}
#[doc(hidden)]
pub struct RTDChatActionBarInviteMembersBuilder {
inner: ChatActionBarInviteMembers
}
impl RTDChatActionBarInviteMembersBuilder {
pub fn build(&self) -> ChatActionBarInviteMembers { self.inner.clone() }
}
impl AsRef<ChatActionBarInviteMembers> for ChatActionBarInviteMembers {
fn as_ref(&self) -> &ChatActionBarInviteMembers { self }
}
impl AsRef<ChatActionBarInviteMembers> for RTDChatActionBarInviteMembersBuilder {
fn as_ref(&self) -> &ChatActionBarInviteMembers { &self.inner }
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct ChatActionBarJoinRequest {
#[doc(hidden)]
#[serde(rename(serialize = "@type", deserialize = "@type"))]
td_name: String,
#[doc(hidden)]
#[serde(rename(serialize = "@extra", deserialize = "@extra"))]
extra: Option<String>,
title: String,
is_channel: bool,
request_date: i64,
}
impl RObject for ChatActionBarJoinRequest {
#[doc(hidden)] fn td_name(&self) -> &'static str { "chatActionBarJoinRequest" }
#[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
}
impl TDChatActionBar for ChatActionBarJoinRequest {}
impl ChatActionBarJoinRequest {
pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
pub fn builder() -> RTDChatActionBarJoinRequestBuilder {
let mut inner = ChatActionBarJoinRequest::default();
inner.td_name = "chatActionBarJoinRequest".to_string();
inner.extra = Some(Uuid::new_v4().to_string());
RTDChatActionBarJoinRequestBuilder { inner }
}
pub fn title(&self) -> &String { &self.title }
pub fn is_channel(&self) -> bool { self.is_channel }
pub fn request_date(&self) -> i64 { self.request_date }
}
#[doc(hidden)]
pub struct RTDChatActionBarJoinRequestBuilder {
inner: ChatActionBarJoinRequest
}
impl RTDChatActionBarJoinRequestBuilder {
pub fn build(&self) -> ChatActionBarJoinRequest { self.inner.clone() }
pub fn title<T: AsRef<str>>(&mut self, title: T) -> &mut Self {
self.inner.title = title.as_ref().to_string();
self
}
pub fn is_channel(&mut self, is_channel: bool) -> &mut Self {
self.inner.is_channel = is_channel;
self
}
pub fn request_date(&mut self, request_date: i64) -> &mut Self {
self.inner.request_date = request_date;
self
}
}
impl AsRef<ChatActionBarJoinRequest> for ChatActionBarJoinRequest {
fn as_ref(&self) -> &ChatActionBarJoinRequest { self }
}
impl AsRef<ChatActionBarJoinRequest> for RTDChatActionBarJoinRequestBuilder {
fn as_ref(&self) -> &ChatActionBarJoinRequest { &self.inner }
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct ChatActionBarReportAddBlock {
#[doc(hidden)]
#[serde(rename(serialize = "@type", deserialize = "@type"))]
td_name: String,
#[doc(hidden)]
#[serde(rename(serialize = "@extra", deserialize = "@extra"))]
extra: Option<String>,
can_unarchive: bool,
distance: i64,
}
impl RObject for ChatActionBarReportAddBlock {
#[doc(hidden)] fn td_name(&self) -> &'static str { "chatActionBarReportAddBlock" }
#[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
}
impl TDChatActionBar for ChatActionBarReportAddBlock {}
impl ChatActionBarReportAddBlock {
pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
pub fn builder() -> RTDChatActionBarReportAddBlockBuilder {
let mut inner = ChatActionBarReportAddBlock::default();
inner.td_name = "chatActionBarReportAddBlock".to_string();
inner.extra = Some(Uuid::new_v4().to_string());
RTDChatActionBarReportAddBlockBuilder { inner }
}
pub fn can_unarchive(&self) -> bool { self.can_unarchive }
pub fn distance(&self) -> i64 { self.distance }
}
#[doc(hidden)]
pub struct RTDChatActionBarReportAddBlockBuilder {
inner: ChatActionBarReportAddBlock
}
impl RTDChatActionBarReportAddBlockBuilder {
pub fn build(&self) -> ChatActionBarReportAddBlock { self.inner.clone() }
pub fn can_unarchive(&mut self, can_unarchive: bool) -> &mut Self {
self.inner.can_unarchive = can_unarchive;
self
}
pub fn distance(&mut self, distance: i64) -> &mut Self {
self.inner.distance = distance;
self
}
}
impl AsRef<ChatActionBarReportAddBlock> for ChatActionBarReportAddBlock {
fn as_ref(&self) -> &ChatActionBarReportAddBlock { self }
}
impl AsRef<ChatActionBarReportAddBlock> for RTDChatActionBarReportAddBlockBuilder {
fn as_ref(&self) -> &ChatActionBarReportAddBlock { &self.inner }
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct ChatActionBarReportSpam {
#[doc(hidden)]
#[serde(rename(serialize = "@type", deserialize = "@type"))]
td_name: String,
#[doc(hidden)]
#[serde(rename(serialize = "@extra", deserialize = "@extra"))]
extra: Option<String>,
can_unarchive: bool,
}
impl RObject for ChatActionBarReportSpam {
#[doc(hidden)] fn td_name(&self) -> &'static str { "chatActionBarReportSpam" }
#[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
}
impl TDChatActionBar for ChatActionBarReportSpam {}
impl ChatActionBarReportSpam {
pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
pub fn builder() -> RTDChatActionBarReportSpamBuilder {
let mut inner = ChatActionBarReportSpam::default();
inner.td_name = "chatActionBarReportSpam".to_string();
inner.extra = Some(Uuid::new_v4().to_string());
RTDChatActionBarReportSpamBuilder { inner }
}
pub fn can_unarchive(&self) -> bool { self.can_unarchive }
}
#[doc(hidden)]
pub struct RTDChatActionBarReportSpamBuilder {
inner: ChatActionBarReportSpam
}
impl RTDChatActionBarReportSpamBuilder {
pub fn build(&self) -> ChatActionBarReportSpam { self.inner.clone() }
pub fn can_unarchive(&mut self, can_unarchive: bool) -> &mut Self {
self.inner.can_unarchive = can_unarchive;
self
}
}
impl AsRef<ChatActionBarReportSpam> for ChatActionBarReportSpam {
fn as_ref(&self) -> &ChatActionBarReportSpam { self }
}
impl AsRef<ChatActionBarReportSpam> for RTDChatActionBarReportSpamBuilder {
fn as_ref(&self) -> &ChatActionBarReportSpam { &self.inner }
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct ChatActionBarReportUnrelatedLocation {
#[doc(hidden)]
#[serde(rename(serialize = "@type", deserialize = "@type"))]
td_name: String,
#[doc(hidden)]
#[serde(rename(serialize = "@extra", deserialize = "@extra"))]
extra: Option<String>,
}
impl RObject for ChatActionBarReportUnrelatedLocation {
#[doc(hidden)] fn td_name(&self) -> &'static str { "chatActionBarReportUnrelatedLocation" }
#[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
}
impl TDChatActionBar for ChatActionBarReportUnrelatedLocation {}
impl ChatActionBarReportUnrelatedLocation {
pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
pub fn builder() -> RTDChatActionBarReportUnrelatedLocationBuilder {
let mut inner = ChatActionBarReportUnrelatedLocation::default();
inner.td_name = "chatActionBarReportUnrelatedLocation".to_string();
inner.extra = Some(Uuid::new_v4().to_string());
RTDChatActionBarReportUnrelatedLocationBuilder { inner }
}
}
#[doc(hidden)]
pub struct RTDChatActionBarReportUnrelatedLocationBuilder {
inner: ChatActionBarReportUnrelatedLocation
}
impl RTDChatActionBarReportUnrelatedLocationBuilder {
pub fn build(&self) -> ChatActionBarReportUnrelatedLocation { self.inner.clone() }
}
impl AsRef<ChatActionBarReportUnrelatedLocation> for ChatActionBarReportUnrelatedLocation {
fn as_ref(&self) -> &ChatActionBarReportUnrelatedLocation { self }
}
impl AsRef<ChatActionBarReportUnrelatedLocation> for RTDChatActionBarReportUnrelatedLocationBuilder {
fn as_ref(&self) -> &ChatActionBarReportUnrelatedLocation { &self.inner }
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct ChatActionBarSharePhoneNumber {
#[doc(hidden)]
#[serde(rename(serialize = "@type", deserialize = "@type"))]
td_name: String,
#[doc(hidden)]
#[serde(rename(serialize = "@extra", deserialize = "@extra"))]
extra: Option<String>,
}
impl RObject for ChatActionBarSharePhoneNumber {
#[doc(hidden)] fn td_name(&self) -> &'static str { "chatActionBarSharePhoneNumber" }
#[doc(hidden)] fn extra(&self) -> Option<String> { self.extra.clone() }
fn to_json(&self) -> RTDResult<String> { Ok(serde_json::to_string(self)?) }
}
impl TDChatActionBar for ChatActionBarSharePhoneNumber {}
impl ChatActionBarSharePhoneNumber {
pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) }
pub fn builder() -> RTDChatActionBarSharePhoneNumberBuilder {
let mut inner = ChatActionBarSharePhoneNumber::default();
inner.td_name = "chatActionBarSharePhoneNumber".to_string();
inner.extra = Some(Uuid::new_v4().to_string());
RTDChatActionBarSharePhoneNumberBuilder { inner }
}
}
#[doc(hidden)]
pub struct RTDChatActionBarSharePhoneNumberBuilder {
inner: ChatActionBarSharePhoneNumber
}
impl RTDChatActionBarSharePhoneNumberBuilder {
pub fn build(&self) -> ChatActionBarSharePhoneNumber { self.inner.clone() }
}
impl AsRef<ChatActionBarSharePhoneNumber> for ChatActionBarSharePhoneNumber {
fn as_ref(&self) -> &ChatActionBarSharePhoneNumber { self }
}
impl AsRef<ChatActionBarSharePhoneNumber> for RTDChatActionBarSharePhoneNumberBuilder {
fn as_ref(&self) -> &ChatActionBarSharePhoneNumber { &self.inner }
}