-
Notifications
You must be signed in to change notification settings - Fork 46
/
models.pb.go
4709 lines (4521 loc) · 110 KB
/
models.pb.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 protoc-gen-gogo. DO NOT EDIT.
// source: desmos/posts/v1/models.proto
package v2
import (
fmt "fmt"
_ "github.com/cosmos/cosmos-proto"
types "github.com/cosmos/cosmos-sdk/codec/types"
_ "github.com/cosmos/gogoproto/gogoproto"
proto "github.com/cosmos/gogoproto/proto"
github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types"
_ "google.golang.org/protobuf/types/known/timestamppb"
io "io"
math "math"
math_bits "math/bits"
time "time"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
var _ = time.Kitchen
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
// PostReferenceType represents the different types of references
type PostReferenceType int32
const (
// No reference specified
POST_REFERENCE_TYPE_UNSPECIFIED PostReferenceType = 0
// This reference represents a reply to the specified post
POST_REFERENCE_TYPE_REPLY PostReferenceType = 1
// This reference represents a quote of the specified post
POST_REFERENCE_TYPE_QUOTE PostReferenceType = 2
// This reference represents a repost of the specified post
POST_REFERENCE_TYPE_REPOST PostReferenceType = 3
)
var PostReferenceType_name = map[int32]string{
0: "POST_REFERENCE_TYPE_UNSPECIFIED",
1: "POST_REFERENCE_TYPE_REPLY",
2: "POST_REFERENCE_TYPE_QUOTE",
3: "POST_REFERENCE_TYPE_REPOST",
}
var PostReferenceType_value = map[string]int32{
"POST_REFERENCE_TYPE_UNSPECIFIED": 0,
"POST_REFERENCE_TYPE_REPLY": 1,
"POST_REFERENCE_TYPE_QUOTE": 2,
"POST_REFERENCE_TYPE_REPOST": 3,
}
func (x PostReferenceType) String() string {
return proto.EnumName(PostReferenceType_name, int32(x))
}
func (PostReferenceType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_9cb993d391569998, []int{0}
}
// ReplySetting contains the possible reply settings that a post can have
type ReplySetting int32
const (
// No reply setting specified
REPLY_SETTING_UNSPECIFIED ReplySetting = 0
// Everyone will be able to reply to this post
REPLY_SETTING_EVERYONE ReplySetting = 1
// Only followers of the author will be able to reply to this post
REPLY_SETTING_FOLLOWERS ReplySetting = 2
// Only the author mutual followers will be able to reply to this post
REPLY_SETTING_MUTUAL ReplySetting = 3
// Only people mentioned inside this post will be able to reply
REPLY_SETTING_MENTIONS ReplySetting = 4
)
var ReplySetting_name = map[int32]string{
0: "REPLY_SETTING_UNSPECIFIED",
1: "REPLY_SETTING_EVERYONE",
2: "REPLY_SETTING_FOLLOWERS",
3: "REPLY_SETTING_MUTUAL",
4: "REPLY_SETTING_MENTIONS",
}
var ReplySetting_value = map[string]int32{
"REPLY_SETTING_UNSPECIFIED": 0,
"REPLY_SETTING_EVERYONE": 1,
"REPLY_SETTING_FOLLOWERS": 2,
"REPLY_SETTING_MUTUAL": 3,
"REPLY_SETTING_MENTIONS": 4,
}
func (x ReplySetting) String() string {
return proto.EnumName(ReplySetting_name, int32(x))
}
func (ReplySetting) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_9cb993d391569998, []int{1}
}
// Post contains all the information about a single post
type Post struct {
// Id of the subspace inside which the post has been created
SubspaceID uint64 `protobuf:"varint,1,opt,name=subspace_id,json=subspaceId,proto3" json:"subspace_id,omitempty"`
// Id of the section inside which the post has been created
SectionID uint32 `protobuf:"varint,2,opt,name=section_id,json=sectionId,proto3" json:"section_id,omitempty"`
// Unique id of the post
ID uint64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"`
// (optional) External id for this post
ExternalID string `protobuf:"bytes,4,opt,name=external_id,json=externalId,proto3" json:"external_id,omitempty"`
// (optional) Text of the post
Text string `protobuf:"bytes,5,opt,name=text,proto3" json:"text,omitempty"`
// (optional) Entities connected to this post
Entities *Entities `protobuf:"bytes,6,opt,name=entities,proto3" json:"entities,omitempty"`
// Author of the post
Author string `protobuf:"bytes,7,opt,name=author,proto3" json:"author,omitempty"`
// (optional) Id of the original post of the conversation
ConversationID uint64 `protobuf:"varint,8,opt,name=conversation_id,json=conversationId,proto3" json:"conversation_id,omitempty"`
// A list this posts references (either as a reply, repost or quote)
ReferencedPosts []PostReference `protobuf:"bytes,9,rep,name=referenced_posts,json=referencedPosts,proto3" json:"referenced_posts"`
// Reply settings of this post
ReplySettings ReplySetting `protobuf:"varint,10,opt,name=reply_settings,json=replySettings,proto3,enum=desmos.posts.v1.ReplySetting" json:"reply_settings,omitempty"`
// Creation date of the post
CreationDate time.Time `protobuf:"bytes,11,opt,name=creation_date,json=creationDate,proto3,stdtime" json:"creation_date"`
// (optional) Last edited time of the post
LastEditedDate *time.Time `protobuf:"bytes,12,opt,name=last_edited_date,json=lastEditedDate,proto3,stdtime" json:"last_edited_date,omitempty"`
}
func (m *Post) Reset() { *m = Post{} }
func (m *Post) String() string { return proto.CompactTextString(m) }
func (*Post) ProtoMessage() {}
func (*Post) Descriptor() ([]byte, []int) {
return fileDescriptor_9cb993d391569998, []int{0}
}
func (m *Post) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Post) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Post.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *Post) XXX_Merge(src proto.Message) {
xxx_messageInfo_Post.Merge(m, src)
}
func (m *Post) XXX_Size() int {
return m.Size()
}
func (m *Post) XXX_DiscardUnknown() {
xxx_messageInfo_Post.DiscardUnknown(m)
}
var xxx_messageInfo_Post proto.InternalMessageInfo
func (m *Post) GetSubspaceID() uint64 {
if m != nil {
return m.SubspaceID
}
return 0
}
func (m *Post) GetSectionID() uint32 {
if m != nil {
return m.SectionID
}
return 0
}
func (m *Post) GetID() uint64 {
if m != nil {
return m.ID
}
return 0
}
func (m *Post) GetExternalID() string {
if m != nil {
return m.ExternalID
}
return ""
}
func (m *Post) GetText() string {
if m != nil {
return m.Text
}
return ""
}
func (m *Post) GetEntities() *Entities {
if m != nil {
return m.Entities
}
return nil
}
func (m *Post) GetAuthor() string {
if m != nil {
return m.Author
}
return ""
}
func (m *Post) GetConversationID() uint64 {
if m != nil {
return m.ConversationID
}
return 0
}
func (m *Post) GetReferencedPosts() []PostReference {
if m != nil {
return m.ReferencedPosts
}
return nil
}
func (m *Post) GetReplySettings() ReplySetting {
if m != nil {
return m.ReplySettings
}
return REPLY_SETTING_UNSPECIFIED
}
func (m *Post) GetCreationDate() time.Time {
if m != nil {
return m.CreationDate
}
return time.Time{}
}
func (m *Post) GetLastEditedDate() *time.Time {
if m != nil {
return m.LastEditedDate
}
return nil
}
// PostReference contains the details of a post reference
type PostReference struct {
// Type of reference
Type PostReferenceType `protobuf:"varint,1,opt,name=type,proto3,enum=desmos.posts.v1.PostReferenceType" json:"type,omitempty"`
// Id of the referenced post
PostID uint64 `protobuf:"varint,2,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"`
// Position of the reference inside the post's text. This should be used only
// with the type set to TYPE_QUOTE
Position uint64 `protobuf:"varint,3,opt,name=position,proto3" json:"position,omitempty"`
}
func (m *PostReference) Reset() { *m = PostReference{} }
func (m *PostReference) String() string { return proto.CompactTextString(m) }
func (*PostReference) ProtoMessage() {}
func (*PostReference) Descriptor() ([]byte, []int) {
return fileDescriptor_9cb993d391569998, []int{1}
}
func (m *PostReference) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *PostReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_PostReference.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *PostReference) XXX_Merge(src proto.Message) {
xxx_messageInfo_PostReference.Merge(m, src)
}
func (m *PostReference) XXX_Size() int {
return m.Size()
}
func (m *PostReference) XXX_DiscardUnknown() {
xxx_messageInfo_PostReference.DiscardUnknown(m)
}
var xxx_messageInfo_PostReference proto.InternalMessageInfo
func (m *PostReference) GetType() PostReferenceType {
if m != nil {
return m.Type
}
return POST_REFERENCE_TYPE_UNSPECIFIED
}
func (m *PostReference) GetPostID() uint64 {
if m != nil {
return m.PostID
}
return 0
}
func (m *PostReference) GetPosition() uint64 {
if m != nil {
return m.Position
}
return 0
}
// Contains the details of entities parsed out of the post text
type Entities struct {
Hashtags []Tag `protobuf:"bytes,1,rep,name=hashtags,proto3" json:"hashtags"`
Mentions []Tag `protobuf:"bytes,2,rep,name=mentions,proto3" json:"mentions"`
Urls []Url `protobuf:"bytes,3,rep,name=urls,proto3" json:"urls"`
}
func (m *Entities) Reset() { *m = Entities{} }
func (m *Entities) String() string { return proto.CompactTextString(m) }
func (*Entities) ProtoMessage() {}
func (*Entities) Descriptor() ([]byte, []int) {
return fileDescriptor_9cb993d391569998, []int{2}
}
func (m *Entities) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Entities) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Entities.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *Entities) XXX_Merge(src proto.Message) {
xxx_messageInfo_Entities.Merge(m, src)
}
func (m *Entities) XXX_Size() int {
return m.Size()
}
func (m *Entities) XXX_DiscardUnknown() {
xxx_messageInfo_Entities.DiscardUnknown(m)
}
var xxx_messageInfo_Entities proto.InternalMessageInfo
func (m *Entities) GetHashtags() []Tag {
if m != nil {
return m.Hashtags
}
return nil
}
func (m *Entities) GetMentions() []Tag {
if m != nil {
return m.Mentions
}
return nil
}
func (m *Entities) GetUrls() []Url {
if m != nil {
return m.Urls
}
return nil
}
// Tag represents a generic tag
type Tag struct {
// Index of the character inside the text at which the tag starts
Start uint64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"`
// Index of the character inside the text at which the tag ends
End uint64 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"`
// Tag reference (user address, hashtag value, etc)
Tag string `protobuf:"bytes,3,opt,name=tag,proto3" json:"tag,omitempty"`
}
func (m *Tag) Reset() { *m = Tag{} }
func (m *Tag) String() string { return proto.CompactTextString(m) }
func (*Tag) ProtoMessage() {}
func (*Tag) Descriptor() ([]byte, []int) {
return fileDescriptor_9cb993d391569998, []int{3}
}
func (m *Tag) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Tag) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Tag.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *Tag) XXX_Merge(src proto.Message) {
xxx_messageInfo_Tag.Merge(m, src)
}
func (m *Tag) XXX_Size() int {
return m.Size()
}
func (m *Tag) XXX_DiscardUnknown() {
xxx_messageInfo_Tag.DiscardUnknown(m)
}
var xxx_messageInfo_Tag proto.InternalMessageInfo
func (m *Tag) GetStart() uint64 {
if m != nil {
return m.Start
}
return 0
}
func (m *Tag) GetEnd() uint64 {
if m != nil {
return m.End
}
return 0
}
func (m *Tag) GetTag() string {
if m != nil {
return m.Tag
}
return ""
}
// Url contains the details of a generic URL
type Url struct {
// Index of the character inside the text at which the URL starts
Start uint64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"`
// Index of the character inside the text at which the URL ends
End uint64 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"`
// Value of the URL where the user should be redirected to
Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
// (optional) Display value of the URL
DisplayUrl string `protobuf:"bytes,4,opt,name=display_url,json=displayUrl,proto3" json:"display_url,omitempty"`
}
func (m *Url) Reset() { *m = Url{} }
func (m *Url) String() string { return proto.CompactTextString(m) }
func (*Url) ProtoMessage() {}
func (*Url) Descriptor() ([]byte, []int) {
return fileDescriptor_9cb993d391569998, []int{4}
}
func (m *Url) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Url) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Url.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *Url) XXX_Merge(src proto.Message) {
xxx_messageInfo_Url.Merge(m, src)
}
func (m *Url) XXX_Size() int {
return m.Size()
}
func (m *Url) XXX_DiscardUnknown() {
xxx_messageInfo_Url.DiscardUnknown(m)
}
var xxx_messageInfo_Url proto.InternalMessageInfo
func (m *Url) GetStart() uint64 {
if m != nil {
return m.Start
}
return 0
}
func (m *Url) GetEnd() uint64 {
if m != nil {
return m.End
}
return 0
}
func (m *Url) GetUrl() string {
if m != nil {
return m.Url
}
return ""
}
func (m *Url) GetDisplayUrl() string {
if m != nil {
return m.DisplayUrl
}
return ""
}
// Attachment contains the data of a single post attachment
type Attachment struct {
// Id of the subspace inside which the post to which this attachment should be
// connected is
SubspaceID uint64 `protobuf:"varint,1,opt,name=subspace_id,json=subspaceId,proto3" json:"subspace_id,omitempty"`
// Id of the subspace section inside which the post to which this attachment
// should be connected is
SectionID uint32 `protobuf:"varint,2,opt,name=section_id,json=sectionId,proto3" json:"section_id,omitempty"`
// Id of the post to which this attachment should be connected
PostID uint64 `protobuf:"varint,3,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"`
// Id of this attachment
ID uint32 `protobuf:"varint,4,opt,name=id,proto3" json:"id,omitempty"`
// Content of the attachment
Content *types.Any `protobuf:"bytes,5,opt,name=content,proto3" json:"content,omitempty"`
}
func (m *Attachment) Reset() { *m = Attachment{} }
func (m *Attachment) String() string { return proto.CompactTextString(m) }
func (*Attachment) ProtoMessage() {}
func (*Attachment) Descriptor() ([]byte, []int) {
return fileDescriptor_9cb993d391569998, []int{5}
}
func (m *Attachment) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Attachment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Attachment.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *Attachment) XXX_Merge(src proto.Message) {
xxx_messageInfo_Attachment.Merge(m, src)
}
func (m *Attachment) XXX_Size() int {
return m.Size()
}
func (m *Attachment) XXX_DiscardUnknown() {
xxx_messageInfo_Attachment.DiscardUnknown(m)
}
var xxx_messageInfo_Attachment proto.InternalMessageInfo
func (m *Attachment) GetSubspaceID() uint64 {
if m != nil {
return m.SubspaceID
}
return 0
}
func (m *Attachment) GetSectionID() uint32 {
if m != nil {
return m.SectionID
}
return 0
}
func (m *Attachment) GetPostID() uint64 {
if m != nil {
return m.PostID
}
return 0
}
func (m *Attachment) GetID() uint32 {
if m != nil {
return m.ID
}
return 0
}
func (m *Attachment) GetContent() *types.Any {
if m != nil {
return m.Content
}
return nil
}
// Media represents a media attachment
type Media struct {
Uri string `protobuf:"bytes,2,opt,name=uri,proto3" json:"uri,omitempty"`
MimeType string `protobuf:"bytes,3,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"`
}
func (m *Media) Reset() { *m = Media{} }
func (m *Media) String() string { return proto.CompactTextString(m) }
func (*Media) ProtoMessage() {}
func (*Media) Descriptor() ([]byte, []int) {
return fileDescriptor_9cb993d391569998, []int{6}
}
func (m *Media) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Media) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Media.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *Media) XXX_Merge(src proto.Message) {
xxx_messageInfo_Media.Merge(m, src)
}
func (m *Media) XXX_Size() int {
return m.Size()
}
func (m *Media) XXX_DiscardUnknown() {
xxx_messageInfo_Media.DiscardUnknown(m)
}
var xxx_messageInfo_Media proto.InternalMessageInfo
func (m *Media) GetUri() string {
if m != nil {
return m.Uri
}
return ""
}
func (m *Media) GetMimeType() string {
if m != nil {
return m.MimeType
}
return ""
}
// Poll represents a poll attachment
type Poll struct {
// Question of the poll
Question string `protobuf:"bytes,1,opt,name=question,proto3" json:"question,omitempty"`
// Answers the users can choose from
ProvidedAnswers []Poll_ProvidedAnswer `protobuf:"bytes,2,rep,name=provided_answers,json=providedAnswers,proto3" json:"provided_answers"`
// Date at which the poll will close
EndDate time.Time `protobuf:"bytes,3,opt,name=end_date,json=endDate,proto3,stdtime" json:"end_date"`
// Whether the poll allows multiple choices from the same user or not
AllowsMultipleAnswers bool `protobuf:"varint,4,opt,name=allows_multiple_answers,json=allowsMultipleAnswers,proto3" json:"allows_multiple_answers,omitempty"`
// Whether the poll allows to edit an answer or not
AllowsAnswerEdits bool `protobuf:"varint,5,opt,name=allows_answer_edits,json=allowsAnswerEdits,proto3" json:"allows_answer_edits,omitempty"`
// Final poll results
FinalTallyResults *PollTallyResults `protobuf:"bytes,6,opt,name=final_tally_results,json=finalTallyResults,proto3" json:"final_tally_results,omitempty"`
}
func (m *Poll) Reset() { *m = Poll{} }
func (m *Poll) String() string { return proto.CompactTextString(m) }
func (*Poll) ProtoMessage() {}
func (*Poll) Descriptor() ([]byte, []int) {
return fileDescriptor_9cb993d391569998, []int{7}
}
func (m *Poll) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Poll) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Poll.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *Poll) XXX_Merge(src proto.Message) {
xxx_messageInfo_Poll.Merge(m, src)
}
func (m *Poll) XXX_Size() int {
return m.Size()
}
func (m *Poll) XXX_DiscardUnknown() {
xxx_messageInfo_Poll.DiscardUnknown(m)
}
var xxx_messageInfo_Poll proto.InternalMessageInfo
func (m *Poll) GetQuestion() string {
if m != nil {
return m.Question
}
return ""
}
func (m *Poll) GetProvidedAnswers() []Poll_ProvidedAnswer {
if m != nil {
return m.ProvidedAnswers
}
return nil
}
func (m *Poll) GetEndDate() time.Time {
if m != nil {
return m.EndDate
}
return time.Time{}
}
func (m *Poll) GetAllowsMultipleAnswers() bool {
if m != nil {
return m.AllowsMultipleAnswers
}
return false
}
func (m *Poll) GetAllowsAnswerEdits() bool {
if m != nil {
return m.AllowsAnswerEdits
}
return false
}
func (m *Poll) GetFinalTallyResults() *PollTallyResults {
if m != nil {
return m.FinalTallyResults
}
return nil
}
// Provided answer contains the details of a possible poll answer
type Poll_ProvidedAnswer struct {
// (optional) Text of the answer
Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
// Attachments of the answer
Attachments []Attachment `protobuf:"bytes,2,rep,name=attachments,proto3" json:"attachments"`
}
func (m *Poll_ProvidedAnswer) Reset() { *m = Poll_ProvidedAnswer{} }
func (m *Poll_ProvidedAnswer) String() string { return proto.CompactTextString(m) }
func (*Poll_ProvidedAnswer) ProtoMessage() {}
func (*Poll_ProvidedAnswer) Descriptor() ([]byte, []int) {
return fileDescriptor_9cb993d391569998, []int{7, 0}
}
func (m *Poll_ProvidedAnswer) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Poll_ProvidedAnswer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Poll_ProvidedAnswer.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *Poll_ProvidedAnswer) XXX_Merge(src proto.Message) {
xxx_messageInfo_Poll_ProvidedAnswer.Merge(m, src)
}
func (m *Poll_ProvidedAnswer) XXX_Size() int {
return m.Size()
}
func (m *Poll_ProvidedAnswer) XXX_DiscardUnknown() {
xxx_messageInfo_Poll_ProvidedAnswer.DiscardUnknown(m)
}
var xxx_messageInfo_Poll_ProvidedAnswer proto.InternalMessageInfo
func (m *Poll_ProvidedAnswer) GetText() string {
if m != nil {
return m.Text
}
return ""
}
func (m *Poll_ProvidedAnswer) GetAttachments() []Attachment {
if m != nil {
return m.Attachments
}
return nil
}
// UserAnswer represents a user answer to a poll
type UserAnswer struct {
// Subspace id inside which the post related to this attachment is located
SubspaceID uint64 `protobuf:"varint,1,opt,name=subspace_id,json=subspaceId,proto3" json:"subspace_id,omitempty"`
// Section id inside which the post related to this attachment is located
SectionID uint32 `protobuf:"varint,2,opt,name=section_id,json=sectionId,proto3" json:"section_id,omitempty"`
// Id of the post associated to this attachment
PostID uint64 `protobuf:"varint,3,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"`
// Id of the poll to which this answer is associated
PollID uint32 `protobuf:"varint,4,opt,name=poll_id,json=pollId,proto3" json:"poll_id,omitempty"`
// Indexes of the answers inside the ProvidedAnswers array
AnswersIndexes []uint32 `protobuf:"varint,5,rep,packed,name=answers_indexes,json=answersIndexes,proto3" json:"answers_indexes,omitempty"`
// Address of the user answering the poll
User string `protobuf:"bytes,6,opt,name=user,proto3" json:"user,omitempty"`
}
func (m *UserAnswer) Reset() { *m = UserAnswer{} }
func (m *UserAnswer) String() string { return proto.CompactTextString(m) }
func (*UserAnswer) ProtoMessage() {}
func (*UserAnswer) Descriptor() ([]byte, []int) {
return fileDescriptor_9cb993d391569998, []int{8}
}
func (m *UserAnswer) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *UserAnswer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_UserAnswer.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *UserAnswer) XXX_Merge(src proto.Message) {
xxx_messageInfo_UserAnswer.Merge(m, src)
}
func (m *UserAnswer) XXX_Size() int {
return m.Size()
}
func (m *UserAnswer) XXX_DiscardUnknown() {
xxx_messageInfo_UserAnswer.DiscardUnknown(m)
}
var xxx_messageInfo_UserAnswer proto.InternalMessageInfo
func (m *UserAnswer) GetSubspaceID() uint64 {
if m != nil {
return m.SubspaceID
}
return 0
}
func (m *UserAnswer) GetSectionID() uint32 {
if m != nil {
return m.SectionID
}
return 0
}
func (m *UserAnswer) GetPostID() uint64 {
if m != nil {
return m.PostID
}
return 0
}
func (m *UserAnswer) GetPollID() uint32 {
if m != nil {
return m.PollID
}
return 0
}
func (m *UserAnswer) GetAnswersIndexes() []uint32 {
if m != nil {
return m.AnswersIndexes
}
return nil
}
func (m *UserAnswer) GetUser() string {
if m != nil {
return m.User
}
return ""
}
// PollTallyResults contains the tally results for a poll
type PollTallyResults struct {
Results []PollTallyResults_AnswerResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results"`
}
func (m *PollTallyResults) Reset() { *m = PollTallyResults{} }
func (m *PollTallyResults) String() string { return proto.CompactTextString(m) }
func (*PollTallyResults) ProtoMessage() {}
func (*PollTallyResults) Descriptor() ([]byte, []int) {
return fileDescriptor_9cb993d391569998, []int{9}
}
func (m *PollTallyResults) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *PollTallyResults) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_PollTallyResults.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *PollTallyResults) XXX_Merge(src proto.Message) {
xxx_messageInfo_PollTallyResults.Merge(m, src)
}
func (m *PollTallyResults) XXX_Size() int {
return m.Size()
}
func (m *PollTallyResults) XXX_DiscardUnknown() {
xxx_messageInfo_PollTallyResults.DiscardUnknown(m)
}
var xxx_messageInfo_PollTallyResults proto.InternalMessageInfo
func (m *PollTallyResults) GetResults() []PollTallyResults_AnswerResult {
if m != nil {
return m.Results
}
return nil
}
// AnswerResult contains the result of a single poll provided answer
type PollTallyResults_AnswerResult struct {
// Index of the answer inside the poll's ProvidedAnswers slice
AnswerIndex uint32 `protobuf:"varint,1,opt,name=answer_index,json=answerIndex,proto3" json:"answer_index,omitempty"`
// Number of votes the answer has received
Votes uint64 `protobuf:"varint,2,opt,name=votes,proto3" json:"votes,omitempty"`
}
func (m *PollTallyResults_AnswerResult) Reset() { *m = PollTallyResults_AnswerResult{} }
func (m *PollTallyResults_AnswerResult) String() string { return proto.CompactTextString(m) }
func (*PollTallyResults_AnswerResult) ProtoMessage() {}
func (*PollTallyResults_AnswerResult) Descriptor() ([]byte, []int) {
return fileDescriptor_9cb993d391569998, []int{9, 0}
}
func (m *PollTallyResults_AnswerResult) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *PollTallyResults_AnswerResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_PollTallyResults_AnswerResult.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *PollTallyResults_AnswerResult) XXX_Merge(src proto.Message) {
xxx_messageInfo_PollTallyResults_AnswerResult.Merge(m, src)
}
func (m *PollTallyResults_AnswerResult) XXX_Size() int {
return m.Size()
}
func (m *PollTallyResults_AnswerResult) XXX_DiscardUnknown() {
xxx_messageInfo_PollTallyResults_AnswerResult.DiscardUnknown(m)
}
var xxx_messageInfo_PollTallyResults_AnswerResult proto.InternalMessageInfo
func (m *PollTallyResults_AnswerResult) GetAnswerIndex() uint32 {
if m != nil {
return m.AnswerIndex
}
return 0
}
func (m *PollTallyResults_AnswerResult) GetVotes() uint64 {
if m != nil {
return m.Votes
}
return 0
}
// Params contains the parameters for the posts module
type Params struct {
// Maximum length of the post text
MaxTextLength uint32 `protobuf:"varint,1,opt,name=max_text_length,json=maxTextLength,proto3" json:"max_text_length,omitempty"`
}
func (m *Params) Reset() { *m = Params{} }
func (m *Params) String() string { return proto.CompactTextString(m) }
func (*Params) ProtoMessage() {}
func (*Params) Descriptor() ([]byte, []int) {
return fileDescriptor_9cb993d391569998, []int{10}