-
-
Notifications
You must be signed in to change notification settings - Fork 121
/
tl_report_reason_gen.go
1205 lines (1043 loc) · 34.5 KB
/
tl_report_reason_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
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// 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{}
)
// InputReportReasonSpam represents TL type `inputReportReasonSpam#58dbcab8`.
// Report for spam
//
// See https://core.telegram.org/constructor/inputReportReasonSpam for reference.
type InputReportReasonSpam struct {
}
// InputReportReasonSpamTypeID is TL type id of InputReportReasonSpam.
const InputReportReasonSpamTypeID = 0x58dbcab8
// construct implements constructor of ReportReasonClass.
func (i InputReportReasonSpam) construct() ReportReasonClass { return &i }
// Ensuring interfaces in compile-time for InputReportReasonSpam.
var (
_ bin.Encoder = &InputReportReasonSpam{}
_ bin.Decoder = &InputReportReasonSpam{}
_ bin.BareEncoder = &InputReportReasonSpam{}
_ bin.BareDecoder = &InputReportReasonSpam{}
_ ReportReasonClass = &InputReportReasonSpam{}
)
func (i *InputReportReasonSpam) Zero() bool {
if i == nil {
return true
}
return true
}
// String implements fmt.Stringer.
func (i *InputReportReasonSpam) String() string {
if i == nil {
return "InputReportReasonSpam(nil)"
}
type Alias InputReportReasonSpam
return fmt.Sprintf("InputReportReasonSpam%+v", Alias(*i))
}
// TypeID returns type id in TL schema.
//
// See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*InputReportReasonSpam) TypeID() uint32 {
return InputReportReasonSpamTypeID
}
// TypeName returns name of type in TL schema.
func (*InputReportReasonSpam) TypeName() string {
return "inputReportReasonSpam"
}
// TypeInfo returns info about TL type.
func (i *InputReportReasonSpam) TypeInfo() tdp.Type {
typ := tdp.Type{
Name: "inputReportReasonSpam",
ID: InputReportReasonSpamTypeID,
}
if i == nil {
typ.Null = true
return typ
}
typ.Fields = []tdp.Field{}
return typ
}
// Encode implements bin.Encoder.
func (i *InputReportReasonSpam) Encode(b *bin.Buffer) error {
if i == nil {
return fmt.Errorf("can't encode inputReportReasonSpam#58dbcab8 as nil")
}
b.PutID(InputReportReasonSpamTypeID)
return i.EncodeBare(b)
}
// EncodeBare implements bin.BareEncoder.
func (i *InputReportReasonSpam) EncodeBare(b *bin.Buffer) error {
if i == nil {
return fmt.Errorf("can't encode inputReportReasonSpam#58dbcab8 as nil")
}
return nil
}
// Decode implements bin.Decoder.
func (i *InputReportReasonSpam) Decode(b *bin.Buffer) error {
if i == nil {
return fmt.Errorf("can't decode inputReportReasonSpam#58dbcab8 to nil")
}
if err := b.ConsumeID(InputReportReasonSpamTypeID); err != nil {
return fmt.Errorf("unable to decode inputReportReasonSpam#58dbcab8: %w", err)
}
return i.DecodeBare(b)
}
// DecodeBare implements bin.BareDecoder.
func (i *InputReportReasonSpam) DecodeBare(b *bin.Buffer) error {
if i == nil {
return fmt.Errorf("can't decode inputReportReasonSpam#58dbcab8 to nil")
}
return nil
}
// InputReportReasonViolence represents TL type `inputReportReasonViolence#1e22c78d`.
// Report for violence
//
// See https://core.telegram.org/constructor/inputReportReasonViolence for reference.
type InputReportReasonViolence struct {
}
// InputReportReasonViolenceTypeID is TL type id of InputReportReasonViolence.
const InputReportReasonViolenceTypeID = 0x1e22c78d
// construct implements constructor of ReportReasonClass.
func (i InputReportReasonViolence) construct() ReportReasonClass { return &i }
// Ensuring interfaces in compile-time for InputReportReasonViolence.
var (
_ bin.Encoder = &InputReportReasonViolence{}
_ bin.Decoder = &InputReportReasonViolence{}
_ bin.BareEncoder = &InputReportReasonViolence{}
_ bin.BareDecoder = &InputReportReasonViolence{}
_ ReportReasonClass = &InputReportReasonViolence{}
)
func (i *InputReportReasonViolence) Zero() bool {
if i == nil {
return true
}
return true
}
// String implements fmt.Stringer.
func (i *InputReportReasonViolence) String() string {
if i == nil {
return "InputReportReasonViolence(nil)"
}
type Alias InputReportReasonViolence
return fmt.Sprintf("InputReportReasonViolence%+v", Alias(*i))
}
// TypeID returns type id in TL schema.
//
// See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*InputReportReasonViolence) TypeID() uint32 {
return InputReportReasonViolenceTypeID
}
// TypeName returns name of type in TL schema.
func (*InputReportReasonViolence) TypeName() string {
return "inputReportReasonViolence"
}
// TypeInfo returns info about TL type.
func (i *InputReportReasonViolence) TypeInfo() tdp.Type {
typ := tdp.Type{
Name: "inputReportReasonViolence",
ID: InputReportReasonViolenceTypeID,
}
if i == nil {
typ.Null = true
return typ
}
typ.Fields = []tdp.Field{}
return typ
}
// Encode implements bin.Encoder.
func (i *InputReportReasonViolence) Encode(b *bin.Buffer) error {
if i == nil {
return fmt.Errorf("can't encode inputReportReasonViolence#1e22c78d as nil")
}
b.PutID(InputReportReasonViolenceTypeID)
return i.EncodeBare(b)
}
// EncodeBare implements bin.BareEncoder.
func (i *InputReportReasonViolence) EncodeBare(b *bin.Buffer) error {
if i == nil {
return fmt.Errorf("can't encode inputReportReasonViolence#1e22c78d as nil")
}
return nil
}
// Decode implements bin.Decoder.
func (i *InputReportReasonViolence) Decode(b *bin.Buffer) error {
if i == nil {
return fmt.Errorf("can't decode inputReportReasonViolence#1e22c78d to nil")
}
if err := b.ConsumeID(InputReportReasonViolenceTypeID); err != nil {
return fmt.Errorf("unable to decode inputReportReasonViolence#1e22c78d: %w", err)
}
return i.DecodeBare(b)
}
// DecodeBare implements bin.BareDecoder.
func (i *InputReportReasonViolence) DecodeBare(b *bin.Buffer) error {
if i == nil {
return fmt.Errorf("can't decode inputReportReasonViolence#1e22c78d to nil")
}
return nil
}
// InputReportReasonPornography represents TL type `inputReportReasonPornography#2e59d922`.
// Report for pornography
//
// See https://core.telegram.org/constructor/inputReportReasonPornography for reference.
type InputReportReasonPornography struct {
}
// InputReportReasonPornographyTypeID is TL type id of InputReportReasonPornography.
const InputReportReasonPornographyTypeID = 0x2e59d922
// construct implements constructor of ReportReasonClass.
func (i InputReportReasonPornography) construct() ReportReasonClass { return &i }
// Ensuring interfaces in compile-time for InputReportReasonPornography.
var (
_ bin.Encoder = &InputReportReasonPornography{}
_ bin.Decoder = &InputReportReasonPornography{}
_ bin.BareEncoder = &InputReportReasonPornography{}
_ bin.BareDecoder = &InputReportReasonPornography{}
_ ReportReasonClass = &InputReportReasonPornography{}
)
func (i *InputReportReasonPornography) Zero() bool {
if i == nil {
return true
}
return true
}
// String implements fmt.Stringer.
func (i *InputReportReasonPornography) String() string {
if i == nil {
return "InputReportReasonPornography(nil)"
}
type Alias InputReportReasonPornography
return fmt.Sprintf("InputReportReasonPornography%+v", Alias(*i))
}
// TypeID returns type id in TL schema.
//
// See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*InputReportReasonPornography) TypeID() uint32 {
return InputReportReasonPornographyTypeID
}
// TypeName returns name of type in TL schema.
func (*InputReportReasonPornography) TypeName() string {
return "inputReportReasonPornography"
}
// TypeInfo returns info about TL type.
func (i *InputReportReasonPornography) TypeInfo() tdp.Type {
typ := tdp.Type{
Name: "inputReportReasonPornography",
ID: InputReportReasonPornographyTypeID,
}
if i == nil {
typ.Null = true
return typ
}
typ.Fields = []tdp.Field{}
return typ
}
// Encode implements bin.Encoder.
func (i *InputReportReasonPornography) Encode(b *bin.Buffer) error {
if i == nil {
return fmt.Errorf("can't encode inputReportReasonPornography#2e59d922 as nil")
}
b.PutID(InputReportReasonPornographyTypeID)
return i.EncodeBare(b)
}
// EncodeBare implements bin.BareEncoder.
func (i *InputReportReasonPornography) EncodeBare(b *bin.Buffer) error {
if i == nil {
return fmt.Errorf("can't encode inputReportReasonPornography#2e59d922 as nil")
}
return nil
}
// Decode implements bin.Decoder.
func (i *InputReportReasonPornography) Decode(b *bin.Buffer) error {
if i == nil {
return fmt.Errorf("can't decode inputReportReasonPornography#2e59d922 to nil")
}
if err := b.ConsumeID(InputReportReasonPornographyTypeID); err != nil {
return fmt.Errorf("unable to decode inputReportReasonPornography#2e59d922: %w", err)
}
return i.DecodeBare(b)
}
// DecodeBare implements bin.BareDecoder.
func (i *InputReportReasonPornography) DecodeBare(b *bin.Buffer) error {
if i == nil {
return fmt.Errorf("can't decode inputReportReasonPornography#2e59d922 to nil")
}
return nil
}
// InputReportReasonChildAbuse represents TL type `inputReportReasonChildAbuse#adf44ee3`.
// Report for child abuse
//
// See https://core.telegram.org/constructor/inputReportReasonChildAbuse for reference.
type InputReportReasonChildAbuse struct {
}
// InputReportReasonChildAbuseTypeID is TL type id of InputReportReasonChildAbuse.
const InputReportReasonChildAbuseTypeID = 0xadf44ee3
// construct implements constructor of ReportReasonClass.
func (i InputReportReasonChildAbuse) construct() ReportReasonClass { return &i }
// Ensuring interfaces in compile-time for InputReportReasonChildAbuse.
var (
_ bin.Encoder = &InputReportReasonChildAbuse{}
_ bin.Decoder = &InputReportReasonChildAbuse{}
_ bin.BareEncoder = &InputReportReasonChildAbuse{}
_ bin.BareDecoder = &InputReportReasonChildAbuse{}
_ ReportReasonClass = &InputReportReasonChildAbuse{}
)
func (i *InputReportReasonChildAbuse) Zero() bool {
if i == nil {
return true
}
return true
}
// String implements fmt.Stringer.
func (i *InputReportReasonChildAbuse) String() string {
if i == nil {
return "InputReportReasonChildAbuse(nil)"
}
type Alias InputReportReasonChildAbuse
return fmt.Sprintf("InputReportReasonChildAbuse%+v", Alias(*i))
}
// TypeID returns type id in TL schema.
//
// See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*InputReportReasonChildAbuse) TypeID() uint32 {
return InputReportReasonChildAbuseTypeID
}
// TypeName returns name of type in TL schema.
func (*InputReportReasonChildAbuse) TypeName() string {
return "inputReportReasonChildAbuse"
}
// TypeInfo returns info about TL type.
func (i *InputReportReasonChildAbuse) TypeInfo() tdp.Type {
typ := tdp.Type{
Name: "inputReportReasonChildAbuse",
ID: InputReportReasonChildAbuseTypeID,
}
if i == nil {
typ.Null = true
return typ
}
typ.Fields = []tdp.Field{}
return typ
}
// Encode implements bin.Encoder.
func (i *InputReportReasonChildAbuse) Encode(b *bin.Buffer) error {
if i == nil {
return fmt.Errorf("can't encode inputReportReasonChildAbuse#adf44ee3 as nil")
}
b.PutID(InputReportReasonChildAbuseTypeID)
return i.EncodeBare(b)
}
// EncodeBare implements bin.BareEncoder.
func (i *InputReportReasonChildAbuse) EncodeBare(b *bin.Buffer) error {
if i == nil {
return fmt.Errorf("can't encode inputReportReasonChildAbuse#adf44ee3 as nil")
}
return nil
}
// Decode implements bin.Decoder.
func (i *InputReportReasonChildAbuse) Decode(b *bin.Buffer) error {
if i == nil {
return fmt.Errorf("can't decode inputReportReasonChildAbuse#adf44ee3 to nil")
}
if err := b.ConsumeID(InputReportReasonChildAbuseTypeID); err != nil {
return fmt.Errorf("unable to decode inputReportReasonChildAbuse#adf44ee3: %w", err)
}
return i.DecodeBare(b)
}
// DecodeBare implements bin.BareDecoder.
func (i *InputReportReasonChildAbuse) DecodeBare(b *bin.Buffer) error {
if i == nil {
return fmt.Errorf("can't decode inputReportReasonChildAbuse#adf44ee3 to nil")
}
return nil
}
// InputReportReasonOther represents TL type `inputReportReasonOther#c1e4a2b1`.
// Other
//
// See https://core.telegram.org/constructor/inputReportReasonOther for reference.
type InputReportReasonOther struct {
}
// InputReportReasonOtherTypeID is TL type id of InputReportReasonOther.
const InputReportReasonOtherTypeID = 0xc1e4a2b1
// construct implements constructor of ReportReasonClass.
func (i InputReportReasonOther) construct() ReportReasonClass { return &i }
// Ensuring interfaces in compile-time for InputReportReasonOther.
var (
_ bin.Encoder = &InputReportReasonOther{}
_ bin.Decoder = &InputReportReasonOther{}
_ bin.BareEncoder = &InputReportReasonOther{}
_ bin.BareDecoder = &InputReportReasonOther{}
_ ReportReasonClass = &InputReportReasonOther{}
)
func (i *InputReportReasonOther) Zero() bool {
if i == nil {
return true
}
return true
}
// String implements fmt.Stringer.
func (i *InputReportReasonOther) String() string {
if i == nil {
return "InputReportReasonOther(nil)"
}
type Alias InputReportReasonOther
return fmt.Sprintf("InputReportReasonOther%+v", Alias(*i))
}
// TypeID returns type id in TL schema.
//
// See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*InputReportReasonOther) TypeID() uint32 {
return InputReportReasonOtherTypeID
}
// TypeName returns name of type in TL schema.
func (*InputReportReasonOther) TypeName() string {
return "inputReportReasonOther"
}
// TypeInfo returns info about TL type.
func (i *InputReportReasonOther) TypeInfo() tdp.Type {
typ := tdp.Type{
Name: "inputReportReasonOther",
ID: InputReportReasonOtherTypeID,
}
if i == nil {
typ.Null = true
return typ
}
typ.Fields = []tdp.Field{}
return typ
}
// Encode implements bin.Encoder.
func (i *InputReportReasonOther) Encode(b *bin.Buffer) error {
if i == nil {
return fmt.Errorf("can't encode inputReportReasonOther#c1e4a2b1 as nil")
}
b.PutID(InputReportReasonOtherTypeID)
return i.EncodeBare(b)
}
// EncodeBare implements bin.BareEncoder.
func (i *InputReportReasonOther) EncodeBare(b *bin.Buffer) error {
if i == nil {
return fmt.Errorf("can't encode inputReportReasonOther#c1e4a2b1 as nil")
}
return nil
}
// Decode implements bin.Decoder.
func (i *InputReportReasonOther) Decode(b *bin.Buffer) error {
if i == nil {
return fmt.Errorf("can't decode inputReportReasonOther#c1e4a2b1 to nil")
}
if err := b.ConsumeID(InputReportReasonOtherTypeID); err != nil {
return fmt.Errorf("unable to decode inputReportReasonOther#c1e4a2b1: %w", err)
}
return i.DecodeBare(b)
}
// DecodeBare implements bin.BareDecoder.
func (i *InputReportReasonOther) DecodeBare(b *bin.Buffer) error {
if i == nil {
return fmt.Errorf("can't decode inputReportReasonOther#c1e4a2b1 to nil")
}
return nil
}
// InputReportReasonCopyright represents TL type `inputReportReasonCopyright#9b89f93a`.
// Report for copyrighted content
//
// See https://core.telegram.org/constructor/inputReportReasonCopyright for reference.
type InputReportReasonCopyright struct {
}
// InputReportReasonCopyrightTypeID is TL type id of InputReportReasonCopyright.
const InputReportReasonCopyrightTypeID = 0x9b89f93a
// construct implements constructor of ReportReasonClass.
func (i InputReportReasonCopyright) construct() ReportReasonClass { return &i }
// Ensuring interfaces in compile-time for InputReportReasonCopyright.
var (
_ bin.Encoder = &InputReportReasonCopyright{}
_ bin.Decoder = &InputReportReasonCopyright{}
_ bin.BareEncoder = &InputReportReasonCopyright{}
_ bin.BareDecoder = &InputReportReasonCopyright{}
_ ReportReasonClass = &InputReportReasonCopyright{}
)
func (i *InputReportReasonCopyright) Zero() bool {
if i == nil {
return true
}
return true
}
// String implements fmt.Stringer.
func (i *InputReportReasonCopyright) String() string {
if i == nil {
return "InputReportReasonCopyright(nil)"
}
type Alias InputReportReasonCopyright
return fmt.Sprintf("InputReportReasonCopyright%+v", Alias(*i))
}
// TypeID returns type id in TL schema.
//
// See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*InputReportReasonCopyright) TypeID() uint32 {
return InputReportReasonCopyrightTypeID
}
// TypeName returns name of type in TL schema.
func (*InputReportReasonCopyright) TypeName() string {
return "inputReportReasonCopyright"
}
// TypeInfo returns info about TL type.
func (i *InputReportReasonCopyright) TypeInfo() tdp.Type {
typ := tdp.Type{
Name: "inputReportReasonCopyright",
ID: InputReportReasonCopyrightTypeID,
}
if i == nil {
typ.Null = true
return typ
}
typ.Fields = []tdp.Field{}
return typ
}
// Encode implements bin.Encoder.
func (i *InputReportReasonCopyright) Encode(b *bin.Buffer) error {
if i == nil {
return fmt.Errorf("can't encode inputReportReasonCopyright#9b89f93a as nil")
}
b.PutID(InputReportReasonCopyrightTypeID)
return i.EncodeBare(b)
}
// EncodeBare implements bin.BareEncoder.
func (i *InputReportReasonCopyright) EncodeBare(b *bin.Buffer) error {
if i == nil {
return fmt.Errorf("can't encode inputReportReasonCopyright#9b89f93a as nil")
}
return nil
}
// Decode implements bin.Decoder.
func (i *InputReportReasonCopyright) Decode(b *bin.Buffer) error {
if i == nil {
return fmt.Errorf("can't decode inputReportReasonCopyright#9b89f93a to nil")
}
if err := b.ConsumeID(InputReportReasonCopyrightTypeID); err != nil {
return fmt.Errorf("unable to decode inputReportReasonCopyright#9b89f93a: %w", err)
}
return i.DecodeBare(b)
}
// DecodeBare implements bin.BareDecoder.
func (i *InputReportReasonCopyright) DecodeBare(b *bin.Buffer) error {
if i == nil {
return fmt.Errorf("can't decode inputReportReasonCopyright#9b89f93a to nil")
}
return nil
}
// InputReportReasonGeoIrrelevant represents TL type `inputReportReasonGeoIrrelevant#dbd4feed`.
// Report an irrelevant geogroup
//
// See https://core.telegram.org/constructor/inputReportReasonGeoIrrelevant for reference.
type InputReportReasonGeoIrrelevant struct {
}
// InputReportReasonGeoIrrelevantTypeID is TL type id of InputReportReasonGeoIrrelevant.
const InputReportReasonGeoIrrelevantTypeID = 0xdbd4feed
// construct implements constructor of ReportReasonClass.
func (i InputReportReasonGeoIrrelevant) construct() ReportReasonClass { return &i }
// Ensuring interfaces in compile-time for InputReportReasonGeoIrrelevant.
var (
_ bin.Encoder = &InputReportReasonGeoIrrelevant{}
_ bin.Decoder = &InputReportReasonGeoIrrelevant{}
_ bin.BareEncoder = &InputReportReasonGeoIrrelevant{}
_ bin.BareDecoder = &InputReportReasonGeoIrrelevant{}
_ ReportReasonClass = &InputReportReasonGeoIrrelevant{}
)
func (i *InputReportReasonGeoIrrelevant) Zero() bool {
if i == nil {
return true
}
return true
}
// String implements fmt.Stringer.
func (i *InputReportReasonGeoIrrelevant) String() string {
if i == nil {
return "InputReportReasonGeoIrrelevant(nil)"
}
type Alias InputReportReasonGeoIrrelevant
return fmt.Sprintf("InputReportReasonGeoIrrelevant%+v", Alias(*i))
}
// TypeID returns type id in TL schema.
//
// See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*InputReportReasonGeoIrrelevant) TypeID() uint32 {
return InputReportReasonGeoIrrelevantTypeID
}
// TypeName returns name of type in TL schema.
func (*InputReportReasonGeoIrrelevant) TypeName() string {
return "inputReportReasonGeoIrrelevant"
}
// TypeInfo returns info about TL type.
func (i *InputReportReasonGeoIrrelevant) TypeInfo() tdp.Type {
typ := tdp.Type{
Name: "inputReportReasonGeoIrrelevant",
ID: InputReportReasonGeoIrrelevantTypeID,
}
if i == nil {
typ.Null = true
return typ
}
typ.Fields = []tdp.Field{}
return typ
}
// Encode implements bin.Encoder.
func (i *InputReportReasonGeoIrrelevant) Encode(b *bin.Buffer) error {
if i == nil {
return fmt.Errorf("can't encode inputReportReasonGeoIrrelevant#dbd4feed as nil")
}
b.PutID(InputReportReasonGeoIrrelevantTypeID)
return i.EncodeBare(b)
}
// EncodeBare implements bin.BareEncoder.
func (i *InputReportReasonGeoIrrelevant) EncodeBare(b *bin.Buffer) error {
if i == nil {
return fmt.Errorf("can't encode inputReportReasonGeoIrrelevant#dbd4feed as nil")
}
return nil
}
// Decode implements bin.Decoder.
func (i *InputReportReasonGeoIrrelevant) Decode(b *bin.Buffer) error {
if i == nil {
return fmt.Errorf("can't decode inputReportReasonGeoIrrelevant#dbd4feed to nil")
}
if err := b.ConsumeID(InputReportReasonGeoIrrelevantTypeID); err != nil {
return fmt.Errorf("unable to decode inputReportReasonGeoIrrelevant#dbd4feed: %w", err)
}
return i.DecodeBare(b)
}
// DecodeBare implements bin.BareDecoder.
func (i *InputReportReasonGeoIrrelevant) DecodeBare(b *bin.Buffer) error {
if i == nil {
return fmt.Errorf("can't decode inputReportReasonGeoIrrelevant#dbd4feed to nil")
}
return nil
}
// InputReportReasonFake represents TL type `inputReportReasonFake#f5ddd6e7`.
// Report for impersonation
//
// See https://core.telegram.org/constructor/inputReportReasonFake for reference.
type InputReportReasonFake struct {
}
// InputReportReasonFakeTypeID is TL type id of InputReportReasonFake.
const InputReportReasonFakeTypeID = 0xf5ddd6e7
// construct implements constructor of ReportReasonClass.
func (i InputReportReasonFake) construct() ReportReasonClass { return &i }
// Ensuring interfaces in compile-time for InputReportReasonFake.
var (
_ bin.Encoder = &InputReportReasonFake{}
_ bin.Decoder = &InputReportReasonFake{}
_ bin.BareEncoder = &InputReportReasonFake{}
_ bin.BareDecoder = &InputReportReasonFake{}
_ ReportReasonClass = &InputReportReasonFake{}
)
func (i *InputReportReasonFake) Zero() bool {
if i == nil {
return true
}
return true
}
// String implements fmt.Stringer.
func (i *InputReportReasonFake) String() string {
if i == nil {
return "InputReportReasonFake(nil)"
}
type Alias InputReportReasonFake
return fmt.Sprintf("InputReportReasonFake%+v", Alias(*i))
}
// TypeID returns type id in TL schema.
//
// See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*InputReportReasonFake) TypeID() uint32 {
return InputReportReasonFakeTypeID
}
// TypeName returns name of type in TL schema.
func (*InputReportReasonFake) TypeName() string {
return "inputReportReasonFake"
}
// TypeInfo returns info about TL type.
func (i *InputReportReasonFake) TypeInfo() tdp.Type {
typ := tdp.Type{
Name: "inputReportReasonFake",
ID: InputReportReasonFakeTypeID,
}
if i == nil {
typ.Null = true
return typ
}
typ.Fields = []tdp.Field{}
return typ
}
// Encode implements bin.Encoder.
func (i *InputReportReasonFake) Encode(b *bin.Buffer) error {
if i == nil {
return fmt.Errorf("can't encode inputReportReasonFake#f5ddd6e7 as nil")
}
b.PutID(InputReportReasonFakeTypeID)
return i.EncodeBare(b)
}
// EncodeBare implements bin.BareEncoder.
func (i *InputReportReasonFake) EncodeBare(b *bin.Buffer) error {
if i == nil {
return fmt.Errorf("can't encode inputReportReasonFake#f5ddd6e7 as nil")
}
return nil
}
// Decode implements bin.Decoder.
func (i *InputReportReasonFake) Decode(b *bin.Buffer) error {
if i == nil {
return fmt.Errorf("can't decode inputReportReasonFake#f5ddd6e7 to nil")
}
if err := b.ConsumeID(InputReportReasonFakeTypeID); err != nil {
return fmt.Errorf("unable to decode inputReportReasonFake#f5ddd6e7: %w", err)
}
return i.DecodeBare(b)
}
// DecodeBare implements bin.BareDecoder.
func (i *InputReportReasonFake) DecodeBare(b *bin.Buffer) error {
if i == nil {
return fmt.Errorf("can't decode inputReportReasonFake#f5ddd6e7 to nil")
}
return nil
}
// InputReportReasonIllegalDrugs represents TL type `inputReportReasonIllegalDrugs#a8eb2be`.
// Report for illegal drugs
//
// See https://core.telegram.org/constructor/inputReportReasonIllegalDrugs for reference.
type InputReportReasonIllegalDrugs struct {
}
// InputReportReasonIllegalDrugsTypeID is TL type id of InputReportReasonIllegalDrugs.
const InputReportReasonIllegalDrugsTypeID = 0xa8eb2be
// construct implements constructor of ReportReasonClass.
func (i InputReportReasonIllegalDrugs) construct() ReportReasonClass { return &i }
// Ensuring interfaces in compile-time for InputReportReasonIllegalDrugs.
var (
_ bin.Encoder = &InputReportReasonIllegalDrugs{}
_ bin.Decoder = &InputReportReasonIllegalDrugs{}
_ bin.BareEncoder = &InputReportReasonIllegalDrugs{}
_ bin.BareDecoder = &InputReportReasonIllegalDrugs{}
_ ReportReasonClass = &InputReportReasonIllegalDrugs{}
)
func (i *InputReportReasonIllegalDrugs) Zero() bool {
if i == nil {
return true
}
return true
}
// String implements fmt.Stringer.
func (i *InputReportReasonIllegalDrugs) String() string {
if i == nil {
return "InputReportReasonIllegalDrugs(nil)"
}
type Alias InputReportReasonIllegalDrugs
return fmt.Sprintf("InputReportReasonIllegalDrugs%+v", Alias(*i))
}
// TypeID returns type id in TL schema.
//
// See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*InputReportReasonIllegalDrugs) TypeID() uint32 {
return InputReportReasonIllegalDrugsTypeID
}
// TypeName returns name of type in TL schema.
func (*InputReportReasonIllegalDrugs) TypeName() string {
return "inputReportReasonIllegalDrugs"
}
// TypeInfo returns info about TL type.
func (i *InputReportReasonIllegalDrugs) TypeInfo() tdp.Type {
typ := tdp.Type{
Name: "inputReportReasonIllegalDrugs",
ID: InputReportReasonIllegalDrugsTypeID,
}
if i == nil {
typ.Null = true
return typ
}
typ.Fields = []tdp.Field{}
return typ
}
// Encode implements bin.Encoder.
func (i *InputReportReasonIllegalDrugs) Encode(b *bin.Buffer) error {
if i == nil {
return fmt.Errorf("can't encode inputReportReasonIllegalDrugs#a8eb2be as nil")
}
b.PutID(InputReportReasonIllegalDrugsTypeID)
return i.EncodeBare(b)
}
// EncodeBare implements bin.BareEncoder.
func (i *InputReportReasonIllegalDrugs) EncodeBare(b *bin.Buffer) error {
if i == nil {
return fmt.Errorf("can't encode inputReportReasonIllegalDrugs#a8eb2be as nil")
}
return nil
}
// Decode implements bin.Decoder.
func (i *InputReportReasonIllegalDrugs) Decode(b *bin.Buffer) error {
if i == nil {
return fmt.Errorf("can't decode inputReportReasonIllegalDrugs#a8eb2be to nil")
}
if err := b.ConsumeID(InputReportReasonIllegalDrugsTypeID); err != nil {
return fmt.Errorf("unable to decode inputReportReasonIllegalDrugs#a8eb2be: %w", err)
}
return i.DecodeBare(b)
}
// DecodeBare implements bin.BareDecoder.
func (i *InputReportReasonIllegalDrugs) DecodeBare(b *bin.Buffer) error {
if i == nil {
return fmt.Errorf("can't decode inputReportReasonIllegalDrugs#a8eb2be to nil")
}
return nil
}
// InputReportReasonPersonalDetails represents TL type `inputReportReasonPersonalDetails#9ec7863d`.
// Report for divulgation of personal details
//
// See https://core.telegram.org/constructor/inputReportReasonPersonalDetails for reference.
type InputReportReasonPersonalDetails struct {
}
// InputReportReasonPersonalDetailsTypeID is TL type id of InputReportReasonPersonalDetails.
const InputReportReasonPersonalDetailsTypeID = 0x9ec7863d
// construct implements constructor of ReportReasonClass.
func (i InputReportReasonPersonalDetails) construct() ReportReasonClass { return &i }
// Ensuring interfaces in compile-time for InputReportReasonPersonalDetails.
var (
_ bin.Encoder = &InputReportReasonPersonalDetails{}
_ bin.Decoder = &InputReportReasonPersonalDetails{}
_ bin.BareEncoder = &InputReportReasonPersonalDetails{}
_ bin.BareDecoder = &InputReportReasonPersonalDetails{}
_ ReportReasonClass = &InputReportReasonPersonalDetails{}
)
func (i *InputReportReasonPersonalDetails) Zero() bool {
if i == nil {
return true
}
return true
}
// String implements fmt.Stringer.
func (i *InputReportReasonPersonalDetails) String() string {
if i == nil {
return "InputReportReasonPersonalDetails(nil)"
}
type Alias InputReportReasonPersonalDetails
return fmt.Sprintf("InputReportReasonPersonalDetails%+v", Alias(*i))
}
// TypeID returns type id in TL schema.
//
// See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*InputReportReasonPersonalDetails) TypeID() uint32 {
return InputReportReasonPersonalDetailsTypeID
}
// TypeName returns name of type in TL schema.
func (*InputReportReasonPersonalDetails) TypeName() string {