-
-
Notifications
You must be signed in to change notification settings - Fork 126
/
tl_group_call_participant_gen.go
891 lines (830 loc) · 20.2 KB
/
tl_group_call_participant_gen.go
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
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
// Code generated by gotdgen, DO NOT EDIT.
package tg
import (
"context"
"errors"
"fmt"
"sort"
"strings"
"go.uber.org/multierr"
"github.com/gotd/td/bin"
"github.com/gotd/td/tdjson"
"github.com/gotd/td/tdp"
"github.com/gotd/td/tgerr"
)
// No-op definition for keeping imports.
var (
_ = bin.Buffer{}
_ = context.Background()
_ = fmt.Stringer(nil)
_ = strings.Builder{}
_ = errors.Is
_ = multierr.AppendInto
_ = sort.Ints
_ = tdp.Format
_ = tgerr.Error{}
_ = tdjson.Encoder{}
)
// GroupCallParticipant represents TL type `groupCallParticipant#eba636fe`.
// Info about a group call participant
//
// See https://core.telegram.org/constructor/groupCallParticipant for reference.
type GroupCallParticipant struct {
// Flags, see TL conditional fields¹
//
// Links:
// 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
Flags bin.Fields
// Whether the participant is muted
Muted bool
// Whether the participant has left
Left bool
// Whether the participant can unmute themselves
CanSelfUnmute bool
// Whether the participant has just joined
JustJoined bool
// If set, and updateGroupCallParticipants¹.version < locally stored call.version, info
// about this participant should be ignored. If (...), and updateGroupCallParticipants²
// version > call.version+1, the participant list should be refetched using phone
// getGroupParticipants³.
//
// Links:
// 1) https://core.telegram.org/constructor/updateGroupCallParticipants
// 2) https://core.telegram.org/constructor/updateGroupCallParticipants
// 3) https://core.telegram.org/method/phone.getGroupParticipants
Versioned bool
// If not set, the volume and muted_by_you fields can be safely used to overwrite locally
// cached information; otherwise, volume will contain valid information only if
// volume_by_admin is set both in the cache and in the received constructor.
Min bool
// Whether this participant was muted by the current user
MutedByYou bool
// Whether our volume can only changed by an admin
VolumeByAdmin bool
// Whether this participant is the current user
Self bool
// Whether this participant is currently broadcasting video
VideoJoined bool
// Peer information
Peer PeerClass
// When did this participant join the group call
Date int
// When was this participant last active in the group call
//
// Use SetActiveDate and GetActiveDate helpers.
ActiveDate int
// Source ID
Source int
// Volume, if not set the volume is set to 100%.
//
// Use SetVolume and GetVolume helpers.
Volume int
// Info about this participant
//
// Use SetAbout and GetAbout helpers.
About string
// Specifies the UI visualization order of peers with raised hands: peers with a higher
// rating should be showed first in the list.
//
// Use SetRaiseHandRating and GetRaiseHandRating helpers.
RaiseHandRating int64
// Info about the video stream the participant is currently broadcasting
//
// Use SetVideo and GetVideo helpers.
Video GroupCallParticipantVideo
// Info about the screen sharing stream the participant is currently broadcasting
//
// Use SetPresentation and GetPresentation helpers.
Presentation GroupCallParticipantVideo
}
// GroupCallParticipantTypeID is TL type id of GroupCallParticipant.
const GroupCallParticipantTypeID = 0xeba636fe
// Ensuring interfaces in compile-time for GroupCallParticipant.
var (
_ bin.Encoder = &GroupCallParticipant{}
_ bin.Decoder = &GroupCallParticipant{}
_ bin.BareEncoder = &GroupCallParticipant{}
_ bin.BareDecoder = &GroupCallParticipant{}
)
func (g *GroupCallParticipant) Zero() bool {
if g == nil {
return true
}
if !(g.Flags.Zero()) {
return false
}
if !(g.Muted == false) {
return false
}
if !(g.Left == false) {
return false
}
if !(g.CanSelfUnmute == false) {
return false
}
if !(g.JustJoined == false) {
return false
}
if !(g.Versioned == false) {
return false
}
if !(g.Min == false) {
return false
}
if !(g.MutedByYou == false) {
return false
}
if !(g.VolumeByAdmin == false) {
return false
}
if !(g.Self == false) {
return false
}
if !(g.VideoJoined == false) {
return false
}
if !(g.Peer == nil) {
return false
}
if !(g.Date == 0) {
return false
}
if !(g.ActiveDate == 0) {
return false
}
if !(g.Source == 0) {
return false
}
if !(g.Volume == 0) {
return false
}
if !(g.About == "") {
return false
}
if !(g.RaiseHandRating == 0) {
return false
}
if !(g.Video.Zero()) {
return false
}
if !(g.Presentation.Zero()) {
return false
}
return true
}
// String implements fmt.Stringer.
func (g *GroupCallParticipant) String() string {
if g == nil {
return "GroupCallParticipant(nil)"
}
type Alias GroupCallParticipant
return fmt.Sprintf("GroupCallParticipant%+v", Alias(*g))
}
// FillFrom fills GroupCallParticipant from given interface.
func (g *GroupCallParticipant) FillFrom(from interface {
GetMuted() (value bool)
GetLeft() (value bool)
GetCanSelfUnmute() (value bool)
GetJustJoined() (value bool)
GetVersioned() (value bool)
GetMin() (value bool)
GetMutedByYou() (value bool)
GetVolumeByAdmin() (value bool)
GetSelf() (value bool)
GetVideoJoined() (value bool)
GetPeer() (value PeerClass)
GetDate() (value int)
GetActiveDate() (value int, ok bool)
GetSource() (value int)
GetVolume() (value int, ok bool)
GetAbout() (value string, ok bool)
GetRaiseHandRating() (value int64, ok bool)
GetVideo() (value GroupCallParticipantVideo, ok bool)
GetPresentation() (value GroupCallParticipantVideo, ok bool)
}) {
g.Muted = from.GetMuted()
g.Left = from.GetLeft()
g.CanSelfUnmute = from.GetCanSelfUnmute()
g.JustJoined = from.GetJustJoined()
g.Versioned = from.GetVersioned()
g.Min = from.GetMin()
g.MutedByYou = from.GetMutedByYou()
g.VolumeByAdmin = from.GetVolumeByAdmin()
g.Self = from.GetSelf()
g.VideoJoined = from.GetVideoJoined()
g.Peer = from.GetPeer()
g.Date = from.GetDate()
if val, ok := from.GetActiveDate(); ok {
g.ActiveDate = val
}
g.Source = from.GetSource()
if val, ok := from.GetVolume(); ok {
g.Volume = val
}
if val, ok := from.GetAbout(); ok {
g.About = val
}
if val, ok := from.GetRaiseHandRating(); ok {
g.RaiseHandRating = val
}
if val, ok := from.GetVideo(); ok {
g.Video = val
}
if val, ok := from.GetPresentation(); ok {
g.Presentation = val
}
}
// TypeID returns type id in TL schema.
//
// See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*GroupCallParticipant) TypeID() uint32 {
return GroupCallParticipantTypeID
}
// TypeName returns name of type in TL schema.
func (*GroupCallParticipant) TypeName() string {
return "groupCallParticipant"
}
// TypeInfo returns info about TL type.
func (g *GroupCallParticipant) TypeInfo() tdp.Type {
typ := tdp.Type{
Name: "groupCallParticipant",
ID: GroupCallParticipantTypeID,
}
if g == nil {
typ.Null = true
return typ
}
typ.Fields = []tdp.Field{
{
Name: "Muted",
SchemaName: "muted",
Null: !g.Flags.Has(0),
},
{
Name: "Left",
SchemaName: "left",
Null: !g.Flags.Has(1),
},
{
Name: "CanSelfUnmute",
SchemaName: "can_self_unmute",
Null: !g.Flags.Has(2),
},
{
Name: "JustJoined",
SchemaName: "just_joined",
Null: !g.Flags.Has(4),
},
{
Name: "Versioned",
SchemaName: "versioned",
Null: !g.Flags.Has(5),
},
{
Name: "Min",
SchemaName: "min",
Null: !g.Flags.Has(8),
},
{
Name: "MutedByYou",
SchemaName: "muted_by_you",
Null: !g.Flags.Has(9),
},
{
Name: "VolumeByAdmin",
SchemaName: "volume_by_admin",
Null: !g.Flags.Has(10),
},
{
Name: "Self",
SchemaName: "self",
Null: !g.Flags.Has(12),
},
{
Name: "VideoJoined",
SchemaName: "video_joined",
Null: !g.Flags.Has(15),
},
{
Name: "Peer",
SchemaName: "peer",
},
{
Name: "Date",
SchemaName: "date",
},
{
Name: "ActiveDate",
SchemaName: "active_date",
Null: !g.Flags.Has(3),
},
{
Name: "Source",
SchemaName: "source",
},
{
Name: "Volume",
SchemaName: "volume",
Null: !g.Flags.Has(7),
},
{
Name: "About",
SchemaName: "about",
Null: !g.Flags.Has(11),
},
{
Name: "RaiseHandRating",
SchemaName: "raise_hand_rating",
Null: !g.Flags.Has(13),
},
{
Name: "Video",
SchemaName: "video",
Null: !g.Flags.Has(6),
},
{
Name: "Presentation",
SchemaName: "presentation",
Null: !g.Flags.Has(14),
},
}
return typ
}
// SetFlags sets flags for non-zero fields.
func (g *GroupCallParticipant) SetFlags() {
if !(g.Muted == false) {
g.Flags.Set(0)
}
if !(g.Left == false) {
g.Flags.Set(1)
}
if !(g.CanSelfUnmute == false) {
g.Flags.Set(2)
}
if !(g.JustJoined == false) {
g.Flags.Set(4)
}
if !(g.Versioned == false) {
g.Flags.Set(5)
}
if !(g.Min == false) {
g.Flags.Set(8)
}
if !(g.MutedByYou == false) {
g.Flags.Set(9)
}
if !(g.VolumeByAdmin == false) {
g.Flags.Set(10)
}
if !(g.Self == false) {
g.Flags.Set(12)
}
if !(g.VideoJoined == false) {
g.Flags.Set(15)
}
if !(g.ActiveDate == 0) {
g.Flags.Set(3)
}
if !(g.Volume == 0) {
g.Flags.Set(7)
}
if !(g.About == "") {
g.Flags.Set(11)
}
if !(g.RaiseHandRating == 0) {
g.Flags.Set(13)
}
if !(g.Video.Zero()) {
g.Flags.Set(6)
}
if !(g.Presentation.Zero()) {
g.Flags.Set(14)
}
}
// Encode implements bin.Encoder.
func (g *GroupCallParticipant) Encode(b *bin.Buffer) error {
if g == nil {
return fmt.Errorf("can't encode groupCallParticipant#eba636fe as nil")
}
b.PutID(GroupCallParticipantTypeID)
return g.EncodeBare(b)
}
// EncodeBare implements bin.BareEncoder.
func (g *GroupCallParticipant) EncodeBare(b *bin.Buffer) error {
if g == nil {
return fmt.Errorf("can't encode groupCallParticipant#eba636fe as nil")
}
g.SetFlags()
if err := g.Flags.Encode(b); err != nil {
return fmt.Errorf("unable to encode groupCallParticipant#eba636fe: field flags: %w", err)
}
if g.Peer == nil {
return fmt.Errorf("unable to encode groupCallParticipant#eba636fe: field peer is nil")
}
if err := g.Peer.Encode(b); err != nil {
return fmt.Errorf("unable to encode groupCallParticipant#eba636fe: field peer: %w", err)
}
b.PutInt(g.Date)
if g.Flags.Has(3) {
b.PutInt(g.ActiveDate)
}
b.PutInt(g.Source)
if g.Flags.Has(7) {
b.PutInt(g.Volume)
}
if g.Flags.Has(11) {
b.PutString(g.About)
}
if g.Flags.Has(13) {
b.PutLong(g.RaiseHandRating)
}
if g.Flags.Has(6) {
if err := g.Video.Encode(b); err != nil {
return fmt.Errorf("unable to encode groupCallParticipant#eba636fe: field video: %w", err)
}
}
if g.Flags.Has(14) {
if err := g.Presentation.Encode(b); err != nil {
return fmt.Errorf("unable to encode groupCallParticipant#eba636fe: field presentation: %w", err)
}
}
return nil
}
// Decode implements bin.Decoder.
func (g *GroupCallParticipant) Decode(b *bin.Buffer) error {
if g == nil {
return fmt.Errorf("can't decode groupCallParticipant#eba636fe to nil")
}
if err := b.ConsumeID(GroupCallParticipantTypeID); err != nil {
return fmt.Errorf("unable to decode groupCallParticipant#eba636fe: %w", err)
}
return g.DecodeBare(b)
}
// DecodeBare implements bin.BareDecoder.
func (g *GroupCallParticipant) DecodeBare(b *bin.Buffer) error {
if g == nil {
return fmt.Errorf("can't decode groupCallParticipant#eba636fe to nil")
}
{
if err := g.Flags.Decode(b); err != nil {
return fmt.Errorf("unable to decode groupCallParticipant#eba636fe: field flags: %w", err)
}
}
g.Muted = g.Flags.Has(0)
g.Left = g.Flags.Has(1)
g.CanSelfUnmute = g.Flags.Has(2)
g.JustJoined = g.Flags.Has(4)
g.Versioned = g.Flags.Has(5)
g.Min = g.Flags.Has(8)
g.MutedByYou = g.Flags.Has(9)
g.VolumeByAdmin = g.Flags.Has(10)
g.Self = g.Flags.Has(12)
g.VideoJoined = g.Flags.Has(15)
{
value, err := DecodePeer(b)
if err != nil {
return fmt.Errorf("unable to decode groupCallParticipant#eba636fe: field peer: %w", err)
}
g.Peer = value
}
{
value, err := b.Int()
if err != nil {
return fmt.Errorf("unable to decode groupCallParticipant#eba636fe: field date: %w", err)
}
g.Date = value
}
if g.Flags.Has(3) {
value, err := b.Int()
if err != nil {
return fmt.Errorf("unable to decode groupCallParticipant#eba636fe: field active_date: %w", err)
}
g.ActiveDate = value
}
{
value, err := b.Int()
if err != nil {
return fmt.Errorf("unable to decode groupCallParticipant#eba636fe: field source: %w", err)
}
g.Source = value
}
if g.Flags.Has(7) {
value, err := b.Int()
if err != nil {
return fmt.Errorf("unable to decode groupCallParticipant#eba636fe: field volume: %w", err)
}
g.Volume = value
}
if g.Flags.Has(11) {
value, err := b.String()
if err != nil {
return fmt.Errorf("unable to decode groupCallParticipant#eba636fe: field about: %w", err)
}
g.About = value
}
if g.Flags.Has(13) {
value, err := b.Long()
if err != nil {
return fmt.Errorf("unable to decode groupCallParticipant#eba636fe: field raise_hand_rating: %w", err)
}
g.RaiseHandRating = value
}
if g.Flags.Has(6) {
if err := g.Video.Decode(b); err != nil {
return fmt.Errorf("unable to decode groupCallParticipant#eba636fe: field video: %w", err)
}
}
if g.Flags.Has(14) {
if err := g.Presentation.Decode(b); err != nil {
return fmt.Errorf("unable to decode groupCallParticipant#eba636fe: field presentation: %w", err)
}
}
return nil
}
// SetMuted sets value of Muted conditional field.
func (g *GroupCallParticipant) SetMuted(value bool) {
if value {
g.Flags.Set(0)
g.Muted = true
} else {
g.Flags.Unset(0)
g.Muted = false
}
}
// GetMuted returns value of Muted conditional field.
func (g *GroupCallParticipant) GetMuted() (value bool) {
if g == nil {
return
}
return g.Flags.Has(0)
}
// SetLeft sets value of Left conditional field.
func (g *GroupCallParticipant) SetLeft(value bool) {
if value {
g.Flags.Set(1)
g.Left = true
} else {
g.Flags.Unset(1)
g.Left = false
}
}
// GetLeft returns value of Left conditional field.
func (g *GroupCallParticipant) GetLeft() (value bool) {
if g == nil {
return
}
return g.Flags.Has(1)
}
// SetCanSelfUnmute sets value of CanSelfUnmute conditional field.
func (g *GroupCallParticipant) SetCanSelfUnmute(value bool) {
if value {
g.Flags.Set(2)
g.CanSelfUnmute = true
} else {
g.Flags.Unset(2)
g.CanSelfUnmute = false
}
}
// GetCanSelfUnmute returns value of CanSelfUnmute conditional field.
func (g *GroupCallParticipant) GetCanSelfUnmute() (value bool) {
if g == nil {
return
}
return g.Flags.Has(2)
}
// SetJustJoined sets value of JustJoined conditional field.
func (g *GroupCallParticipant) SetJustJoined(value bool) {
if value {
g.Flags.Set(4)
g.JustJoined = true
} else {
g.Flags.Unset(4)
g.JustJoined = false
}
}
// GetJustJoined returns value of JustJoined conditional field.
func (g *GroupCallParticipant) GetJustJoined() (value bool) {
if g == nil {
return
}
return g.Flags.Has(4)
}
// SetVersioned sets value of Versioned conditional field.
func (g *GroupCallParticipant) SetVersioned(value bool) {
if value {
g.Flags.Set(5)
g.Versioned = true
} else {
g.Flags.Unset(5)
g.Versioned = false
}
}
// GetVersioned returns value of Versioned conditional field.
func (g *GroupCallParticipant) GetVersioned() (value bool) {
if g == nil {
return
}
return g.Flags.Has(5)
}
// SetMin sets value of Min conditional field.
func (g *GroupCallParticipant) SetMin(value bool) {
if value {
g.Flags.Set(8)
g.Min = true
} else {
g.Flags.Unset(8)
g.Min = false
}
}
// GetMin returns value of Min conditional field.
func (g *GroupCallParticipant) GetMin() (value bool) {
if g == nil {
return
}
return g.Flags.Has(8)
}
// SetMutedByYou sets value of MutedByYou conditional field.
func (g *GroupCallParticipant) SetMutedByYou(value bool) {
if value {
g.Flags.Set(9)
g.MutedByYou = true
} else {
g.Flags.Unset(9)
g.MutedByYou = false
}
}
// GetMutedByYou returns value of MutedByYou conditional field.
func (g *GroupCallParticipant) GetMutedByYou() (value bool) {
if g == nil {
return
}
return g.Flags.Has(9)
}
// SetVolumeByAdmin sets value of VolumeByAdmin conditional field.
func (g *GroupCallParticipant) SetVolumeByAdmin(value bool) {
if value {
g.Flags.Set(10)
g.VolumeByAdmin = true
} else {
g.Flags.Unset(10)
g.VolumeByAdmin = false
}
}
// GetVolumeByAdmin returns value of VolumeByAdmin conditional field.
func (g *GroupCallParticipant) GetVolumeByAdmin() (value bool) {
if g == nil {
return
}
return g.Flags.Has(10)
}
// SetSelf sets value of Self conditional field.
func (g *GroupCallParticipant) SetSelf(value bool) {
if value {
g.Flags.Set(12)
g.Self = true
} else {
g.Flags.Unset(12)
g.Self = false
}
}
// GetSelf returns value of Self conditional field.
func (g *GroupCallParticipant) GetSelf() (value bool) {
if g == nil {
return
}
return g.Flags.Has(12)
}
// SetVideoJoined sets value of VideoJoined conditional field.
func (g *GroupCallParticipant) SetVideoJoined(value bool) {
if value {
g.Flags.Set(15)
g.VideoJoined = true
} else {
g.Flags.Unset(15)
g.VideoJoined = false
}
}
// GetVideoJoined returns value of VideoJoined conditional field.
func (g *GroupCallParticipant) GetVideoJoined() (value bool) {
if g == nil {
return
}
return g.Flags.Has(15)
}
// GetPeer returns value of Peer field.
func (g *GroupCallParticipant) GetPeer() (value PeerClass) {
if g == nil {
return
}
return g.Peer
}
// GetDate returns value of Date field.
func (g *GroupCallParticipant) GetDate() (value int) {
if g == nil {
return
}
return g.Date
}
// SetActiveDate sets value of ActiveDate conditional field.
func (g *GroupCallParticipant) SetActiveDate(value int) {
g.Flags.Set(3)
g.ActiveDate = value
}
// GetActiveDate returns value of ActiveDate conditional field and
// boolean which is true if field was set.
func (g *GroupCallParticipant) GetActiveDate() (value int, ok bool) {
if g == nil {
return
}
if !g.Flags.Has(3) {
return value, false
}
return g.ActiveDate, true
}
// GetSource returns value of Source field.
func (g *GroupCallParticipant) GetSource() (value int) {
if g == nil {
return
}
return g.Source
}
// SetVolume sets value of Volume conditional field.
func (g *GroupCallParticipant) SetVolume(value int) {
g.Flags.Set(7)
g.Volume = value
}
// GetVolume returns value of Volume conditional field and
// boolean which is true if field was set.
func (g *GroupCallParticipant) GetVolume() (value int, ok bool) {
if g == nil {
return
}
if !g.Flags.Has(7) {
return value, false
}
return g.Volume, true
}
// SetAbout sets value of About conditional field.
func (g *GroupCallParticipant) SetAbout(value string) {
g.Flags.Set(11)
g.About = value
}
// GetAbout returns value of About conditional field and
// boolean which is true if field was set.
func (g *GroupCallParticipant) GetAbout() (value string, ok bool) {
if g == nil {
return
}
if !g.Flags.Has(11) {
return value, false
}
return g.About, true
}
// SetRaiseHandRating sets value of RaiseHandRating conditional field.
func (g *GroupCallParticipant) SetRaiseHandRating(value int64) {
g.Flags.Set(13)
g.RaiseHandRating = value
}
// GetRaiseHandRating returns value of RaiseHandRating conditional field and
// boolean which is true if field was set.
func (g *GroupCallParticipant) GetRaiseHandRating() (value int64, ok bool) {
if g == nil {
return
}
if !g.Flags.Has(13) {
return value, false
}
return g.RaiseHandRating, true
}
// SetVideo sets value of Video conditional field.
func (g *GroupCallParticipant) SetVideo(value GroupCallParticipantVideo) {
g.Flags.Set(6)
g.Video = value
}
// GetVideo returns value of Video conditional field and
// boolean which is true if field was set.
func (g *GroupCallParticipant) GetVideo() (value GroupCallParticipantVideo, ok bool) {
if g == nil {
return
}
if !g.Flags.Has(6) {
return value, false
}
return g.Video, true
}
// SetPresentation sets value of Presentation conditional field.
func (g *GroupCallParticipant) SetPresentation(value GroupCallParticipantVideo) {
g.Flags.Set(14)
g.Presentation = value
}
// GetPresentation returns value of Presentation conditional field and
// boolean which is true if field was set.
func (g *GroupCallParticipant) GetPresentation() (value GroupCallParticipantVideo, ok bool) {
if g == nil {
return
}
if !g.Flags.Has(14) {
return value, false
}
return g.Presentation, true
}