/
pubsub.pb.go
3706 lines (3375 loc) · 152 KB
/
pubsub.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-go. DO NOT EDIT.
// source: google/pubsub/v1/pubsub.proto
package pubsub
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
duration "github.com/golang/protobuf/ptypes/duration"
empty "github.com/golang/protobuf/ptypes/empty"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
_ "google.golang.org/genproto/googleapis/api/annotations"
field_mask "google.golang.org/genproto/protobuf/field_mask"
grpc "google.golang.org/grpc"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// 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.ProtoPackageIsVersion2 // please upgrade the proto package
type MessageStoragePolicy struct {
// The list of GCP regions where messages that are published to the topic may
// be persisted in storage. Messages published by publishers running in
// non-allowed GCP regions (or running outside of GCP altogether) will be
// routed for storage in one of the allowed regions. An empty list indicates a
// misconfiguration at the project or organization level, which will result in
// all Publish operations failing.
AllowedPersistenceRegions []string `protobuf:"bytes,1,rep,name=allowed_persistence_regions,json=allowedPersistenceRegions,proto3" json:"allowed_persistence_regions,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *MessageStoragePolicy) Reset() { *m = MessageStoragePolicy{} }
func (m *MessageStoragePolicy) String() string { return proto.CompactTextString(m) }
func (*MessageStoragePolicy) ProtoMessage() {}
func (*MessageStoragePolicy) Descriptor() ([]byte, []int) {
return fileDescriptor_f602d910f9a348fe, []int{0}
}
func (m *MessageStoragePolicy) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MessageStoragePolicy.Unmarshal(m, b)
}
func (m *MessageStoragePolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_MessageStoragePolicy.Marshal(b, m, deterministic)
}
func (m *MessageStoragePolicy) XXX_Merge(src proto.Message) {
xxx_messageInfo_MessageStoragePolicy.Merge(m, src)
}
func (m *MessageStoragePolicy) XXX_Size() int {
return xxx_messageInfo_MessageStoragePolicy.Size(m)
}
func (m *MessageStoragePolicy) XXX_DiscardUnknown() {
xxx_messageInfo_MessageStoragePolicy.DiscardUnknown(m)
}
var xxx_messageInfo_MessageStoragePolicy proto.InternalMessageInfo
func (m *MessageStoragePolicy) GetAllowedPersistenceRegions() []string {
if m != nil {
return m.AllowedPersistenceRegions
}
return nil
}
// A topic resource.
type Topic struct {
// The name of the topic. It must have the format
// `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
// and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
// underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
// signs (`%`). It must be between 3 and 255 characters in length, and it
// must not start with `"goog"`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// See <a href="/pubsub/docs/labels"> Creating and managing labels</a>.
Labels map[string]string `protobuf:"bytes,2,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Policy constraining how messages published to the topic may be stored. It
// is determined when the topic is created based on the policy configured at
// the project level. It must not be set by the caller in the request to
// CreateTopic or to UpdateTopic. This field will be populated in the
// responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the
// response, then no constraints are in effect.
MessageStoragePolicy *MessageStoragePolicy `protobuf:"bytes,3,opt,name=message_storage_policy,json=messageStoragePolicy,proto3" json:"message_storage_policy,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Topic) Reset() { *m = Topic{} }
func (m *Topic) String() string { return proto.CompactTextString(m) }
func (*Topic) ProtoMessage() {}
func (*Topic) Descriptor() ([]byte, []int) {
return fileDescriptor_f602d910f9a348fe, []int{1}
}
func (m *Topic) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Topic.Unmarshal(m, b)
}
func (m *Topic) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Topic.Marshal(b, m, deterministic)
}
func (m *Topic) XXX_Merge(src proto.Message) {
xxx_messageInfo_Topic.Merge(m, src)
}
func (m *Topic) XXX_Size() int {
return xxx_messageInfo_Topic.Size(m)
}
func (m *Topic) XXX_DiscardUnknown() {
xxx_messageInfo_Topic.DiscardUnknown(m)
}
var xxx_messageInfo_Topic proto.InternalMessageInfo
func (m *Topic) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Topic) GetLabels() map[string]string {
if m != nil {
return m.Labels
}
return nil
}
func (m *Topic) GetMessageStoragePolicy() *MessageStoragePolicy {
if m != nil {
return m.MessageStoragePolicy
}
return nil
}
// A message that is published by publishers and consumed by subscribers. The
// message must contain either a non-empty data field or at least one attribute.
// See <a href="/pubsub/quotas">Quotas and limits</a> for more information about
// message limits.
type PubsubMessage struct {
// The message data field. If this field is empty, the message must contain
// at least one attribute.
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
// Optional attributes for this message.
Attributes map[string]string `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// ID of this message, assigned by the server when the message is published.
// Guaranteed to be unique within the topic. This value may be read by a
// subscriber that receives a `PubsubMessage` via a `Pull` call or a push
// delivery. It must not be populated by the publisher in a `Publish` call.
MessageId string `protobuf:"bytes,3,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"`
// The time at which the message was published, populated by the server when
// it receives the `Publish` call. It must not be populated by the
// publisher in a `Publish` call.
PublishTime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=publish_time,json=publishTime,proto3" json:"publish_time,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PubsubMessage) Reset() { *m = PubsubMessage{} }
func (m *PubsubMessage) String() string { return proto.CompactTextString(m) }
func (*PubsubMessage) ProtoMessage() {}
func (*PubsubMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_f602d910f9a348fe, []int{2}
}
func (m *PubsubMessage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PubsubMessage.Unmarshal(m, b)
}
func (m *PubsubMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PubsubMessage.Marshal(b, m, deterministic)
}
func (m *PubsubMessage) XXX_Merge(src proto.Message) {
xxx_messageInfo_PubsubMessage.Merge(m, src)
}
func (m *PubsubMessage) XXX_Size() int {
return xxx_messageInfo_PubsubMessage.Size(m)
}
func (m *PubsubMessage) XXX_DiscardUnknown() {
xxx_messageInfo_PubsubMessage.DiscardUnknown(m)
}
var xxx_messageInfo_PubsubMessage proto.InternalMessageInfo
func (m *PubsubMessage) GetData() []byte {
if m != nil {
return m.Data
}
return nil
}
func (m *PubsubMessage) GetAttributes() map[string]string {
if m != nil {
return m.Attributes
}
return nil
}
func (m *PubsubMessage) GetMessageId() string {
if m != nil {
return m.MessageId
}
return ""
}
func (m *PubsubMessage) GetPublishTime() *timestamp.Timestamp {
if m != nil {
return m.PublishTime
}
return nil
}
// Request for the GetTopic method.
type GetTopicRequest struct {
// The name of the topic to get.
// Format is `projects/{project}/topics/{topic}`.
Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetTopicRequest) Reset() { *m = GetTopicRequest{} }
func (m *GetTopicRequest) String() string { return proto.CompactTextString(m) }
func (*GetTopicRequest) ProtoMessage() {}
func (*GetTopicRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_f602d910f9a348fe, []int{3}
}
func (m *GetTopicRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetTopicRequest.Unmarshal(m, b)
}
func (m *GetTopicRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetTopicRequest.Marshal(b, m, deterministic)
}
func (m *GetTopicRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetTopicRequest.Merge(m, src)
}
func (m *GetTopicRequest) XXX_Size() int {
return xxx_messageInfo_GetTopicRequest.Size(m)
}
func (m *GetTopicRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetTopicRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetTopicRequest proto.InternalMessageInfo
func (m *GetTopicRequest) GetTopic() string {
if m != nil {
return m.Topic
}
return ""
}
// Request for the UpdateTopic method.
type UpdateTopicRequest struct {
// The updated topic object.
Topic *Topic `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
// Indicates which fields in the provided topic to update. Must be specified
// and non-empty. Note that if `update_mask` contains
// "message_storage_policy" then the new value will be determined based on the
// policy configured at the project or organization level. The
// `message_storage_policy` must not be set in the `topic` provided above.
UpdateMask *field_mask.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *UpdateTopicRequest) Reset() { *m = UpdateTopicRequest{} }
func (m *UpdateTopicRequest) String() string { return proto.CompactTextString(m) }
func (*UpdateTopicRequest) ProtoMessage() {}
func (*UpdateTopicRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_f602d910f9a348fe, []int{4}
}
func (m *UpdateTopicRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UpdateTopicRequest.Unmarshal(m, b)
}
func (m *UpdateTopicRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_UpdateTopicRequest.Marshal(b, m, deterministic)
}
func (m *UpdateTopicRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_UpdateTopicRequest.Merge(m, src)
}
func (m *UpdateTopicRequest) XXX_Size() int {
return xxx_messageInfo_UpdateTopicRequest.Size(m)
}
func (m *UpdateTopicRequest) XXX_DiscardUnknown() {
xxx_messageInfo_UpdateTopicRequest.DiscardUnknown(m)
}
var xxx_messageInfo_UpdateTopicRequest proto.InternalMessageInfo
func (m *UpdateTopicRequest) GetTopic() *Topic {
if m != nil {
return m.Topic
}
return nil
}
func (m *UpdateTopicRequest) GetUpdateMask() *field_mask.FieldMask {
if m != nil {
return m.UpdateMask
}
return nil
}
// Request for the Publish method.
type PublishRequest struct {
// The messages in the request will be published on this topic.
// Format is `projects/{project}/topics/{topic}`.
Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
// The messages to publish.
Messages []*PubsubMessage `protobuf:"bytes,2,rep,name=messages,proto3" json:"messages,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PublishRequest) Reset() { *m = PublishRequest{} }
func (m *PublishRequest) String() string { return proto.CompactTextString(m) }
func (*PublishRequest) ProtoMessage() {}
func (*PublishRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_f602d910f9a348fe, []int{5}
}
func (m *PublishRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PublishRequest.Unmarshal(m, b)
}
func (m *PublishRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PublishRequest.Marshal(b, m, deterministic)
}
func (m *PublishRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_PublishRequest.Merge(m, src)
}
func (m *PublishRequest) XXX_Size() int {
return xxx_messageInfo_PublishRequest.Size(m)
}
func (m *PublishRequest) XXX_DiscardUnknown() {
xxx_messageInfo_PublishRequest.DiscardUnknown(m)
}
var xxx_messageInfo_PublishRequest proto.InternalMessageInfo
func (m *PublishRequest) GetTopic() string {
if m != nil {
return m.Topic
}
return ""
}
func (m *PublishRequest) GetMessages() []*PubsubMessage {
if m != nil {
return m.Messages
}
return nil
}
// Response for the `Publish` method.
type PublishResponse struct {
// The server-assigned ID of each published message, in the same order as
// the messages in the request. IDs are guaranteed to be unique within
// the topic.
MessageIds []string `protobuf:"bytes,1,rep,name=message_ids,json=messageIds,proto3" json:"message_ids,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PublishResponse) Reset() { *m = PublishResponse{} }
func (m *PublishResponse) String() string { return proto.CompactTextString(m) }
func (*PublishResponse) ProtoMessage() {}
func (*PublishResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_f602d910f9a348fe, []int{6}
}
func (m *PublishResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PublishResponse.Unmarshal(m, b)
}
func (m *PublishResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PublishResponse.Marshal(b, m, deterministic)
}
func (m *PublishResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_PublishResponse.Merge(m, src)
}
func (m *PublishResponse) XXX_Size() int {
return xxx_messageInfo_PublishResponse.Size(m)
}
func (m *PublishResponse) XXX_DiscardUnknown() {
xxx_messageInfo_PublishResponse.DiscardUnknown(m)
}
var xxx_messageInfo_PublishResponse proto.InternalMessageInfo
func (m *PublishResponse) GetMessageIds() []string {
if m != nil {
return m.MessageIds
}
return nil
}
// Request for the `ListTopics` method.
type ListTopicsRequest struct {
// The name of the project in which to list topics.
// Format is `projects/{project-id}`.
Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"`
// Maximum number of topics to return.
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// The value returned by the last `ListTopicsResponse`; indicates that this is
// a continuation of a prior `ListTopics` call, and that the system should
// return the next page of data.
PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListTopicsRequest) Reset() { *m = ListTopicsRequest{} }
func (m *ListTopicsRequest) String() string { return proto.CompactTextString(m) }
func (*ListTopicsRequest) ProtoMessage() {}
func (*ListTopicsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_f602d910f9a348fe, []int{7}
}
func (m *ListTopicsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListTopicsRequest.Unmarshal(m, b)
}
func (m *ListTopicsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListTopicsRequest.Marshal(b, m, deterministic)
}
func (m *ListTopicsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListTopicsRequest.Merge(m, src)
}
func (m *ListTopicsRequest) XXX_Size() int {
return xxx_messageInfo_ListTopicsRequest.Size(m)
}
func (m *ListTopicsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ListTopicsRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ListTopicsRequest proto.InternalMessageInfo
func (m *ListTopicsRequest) GetProject() string {
if m != nil {
return m.Project
}
return ""
}
func (m *ListTopicsRequest) GetPageSize() int32 {
if m != nil {
return m.PageSize
}
return 0
}
func (m *ListTopicsRequest) GetPageToken() string {
if m != nil {
return m.PageToken
}
return ""
}
// Response for the `ListTopics` method.
type ListTopicsResponse struct {
// The resulting topics.
Topics []*Topic `protobuf:"bytes,1,rep,name=topics,proto3" json:"topics,omitempty"`
// If not empty, indicates that there may be more topics that match the
// request; this value should be passed in a new `ListTopicsRequest`.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListTopicsResponse) Reset() { *m = ListTopicsResponse{} }
func (m *ListTopicsResponse) String() string { return proto.CompactTextString(m) }
func (*ListTopicsResponse) ProtoMessage() {}
func (*ListTopicsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_f602d910f9a348fe, []int{8}
}
func (m *ListTopicsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListTopicsResponse.Unmarshal(m, b)
}
func (m *ListTopicsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListTopicsResponse.Marshal(b, m, deterministic)
}
func (m *ListTopicsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListTopicsResponse.Merge(m, src)
}
func (m *ListTopicsResponse) XXX_Size() int {
return xxx_messageInfo_ListTopicsResponse.Size(m)
}
func (m *ListTopicsResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ListTopicsResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ListTopicsResponse proto.InternalMessageInfo
func (m *ListTopicsResponse) GetTopics() []*Topic {
if m != nil {
return m.Topics
}
return nil
}
func (m *ListTopicsResponse) GetNextPageToken() string {
if m != nil {
return m.NextPageToken
}
return ""
}
// Request for the `ListTopicSubscriptions` method.
type ListTopicSubscriptionsRequest struct {
// The name of the topic that subscriptions are attached to.
// Format is `projects/{project}/topics/{topic}`.
Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
// Maximum number of subscription names to return.
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// The value returned by the last `ListTopicSubscriptionsResponse`; indicates
// that this is a continuation of a prior `ListTopicSubscriptions` call, and
// that the system should return the next page of data.
PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListTopicSubscriptionsRequest) Reset() { *m = ListTopicSubscriptionsRequest{} }
func (m *ListTopicSubscriptionsRequest) String() string { return proto.CompactTextString(m) }
func (*ListTopicSubscriptionsRequest) ProtoMessage() {}
func (*ListTopicSubscriptionsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_f602d910f9a348fe, []int{9}
}
func (m *ListTopicSubscriptionsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListTopicSubscriptionsRequest.Unmarshal(m, b)
}
func (m *ListTopicSubscriptionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListTopicSubscriptionsRequest.Marshal(b, m, deterministic)
}
func (m *ListTopicSubscriptionsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListTopicSubscriptionsRequest.Merge(m, src)
}
func (m *ListTopicSubscriptionsRequest) XXX_Size() int {
return xxx_messageInfo_ListTopicSubscriptionsRequest.Size(m)
}
func (m *ListTopicSubscriptionsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ListTopicSubscriptionsRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ListTopicSubscriptionsRequest proto.InternalMessageInfo
func (m *ListTopicSubscriptionsRequest) GetTopic() string {
if m != nil {
return m.Topic
}
return ""
}
func (m *ListTopicSubscriptionsRequest) GetPageSize() int32 {
if m != nil {
return m.PageSize
}
return 0
}
func (m *ListTopicSubscriptionsRequest) GetPageToken() string {
if m != nil {
return m.PageToken
}
return ""
}
// Response for the `ListTopicSubscriptions` method.
type ListTopicSubscriptionsResponse struct {
// The names of the subscriptions that match the request.
Subscriptions []string `protobuf:"bytes,1,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"`
// If not empty, indicates that there may be more subscriptions that match
// the request; this value should be passed in a new
// `ListTopicSubscriptionsRequest` to get more subscriptions.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListTopicSubscriptionsResponse) Reset() { *m = ListTopicSubscriptionsResponse{} }
func (m *ListTopicSubscriptionsResponse) String() string { return proto.CompactTextString(m) }
func (*ListTopicSubscriptionsResponse) ProtoMessage() {}
func (*ListTopicSubscriptionsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_f602d910f9a348fe, []int{10}
}
func (m *ListTopicSubscriptionsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListTopicSubscriptionsResponse.Unmarshal(m, b)
}
func (m *ListTopicSubscriptionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListTopicSubscriptionsResponse.Marshal(b, m, deterministic)
}
func (m *ListTopicSubscriptionsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListTopicSubscriptionsResponse.Merge(m, src)
}
func (m *ListTopicSubscriptionsResponse) XXX_Size() int {
return xxx_messageInfo_ListTopicSubscriptionsResponse.Size(m)
}
func (m *ListTopicSubscriptionsResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ListTopicSubscriptionsResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ListTopicSubscriptionsResponse proto.InternalMessageInfo
func (m *ListTopicSubscriptionsResponse) GetSubscriptions() []string {
if m != nil {
return m.Subscriptions
}
return nil
}
func (m *ListTopicSubscriptionsResponse) GetNextPageToken() string {
if m != nil {
return m.NextPageToken
}
return ""
}
// Request for the `ListTopicSnapshots` method.<br><br>
// <b>ALPHA:</b> This feature is part of an alpha release. This API might be
// changed in backward-incompatible ways and is not recommended for production
// use. It is not subject to any SLA or deprecation policy.
type ListTopicSnapshotsRequest struct {
// The name of the topic that snapshots are attached to.
// Format is `projects/{project}/topics/{topic}`.
Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
// Maximum number of snapshot names to return.
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// The value returned by the last `ListTopicSnapshotsResponse`; indicates
// that this is a continuation of a prior `ListTopicSnapshots` call, and
// that the system should return the next page of data.
PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListTopicSnapshotsRequest) Reset() { *m = ListTopicSnapshotsRequest{} }
func (m *ListTopicSnapshotsRequest) String() string { return proto.CompactTextString(m) }
func (*ListTopicSnapshotsRequest) ProtoMessage() {}
func (*ListTopicSnapshotsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_f602d910f9a348fe, []int{11}
}
func (m *ListTopicSnapshotsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListTopicSnapshotsRequest.Unmarshal(m, b)
}
func (m *ListTopicSnapshotsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListTopicSnapshotsRequest.Marshal(b, m, deterministic)
}
func (m *ListTopicSnapshotsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListTopicSnapshotsRequest.Merge(m, src)
}
func (m *ListTopicSnapshotsRequest) XXX_Size() int {
return xxx_messageInfo_ListTopicSnapshotsRequest.Size(m)
}
func (m *ListTopicSnapshotsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ListTopicSnapshotsRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ListTopicSnapshotsRequest proto.InternalMessageInfo
func (m *ListTopicSnapshotsRequest) GetTopic() string {
if m != nil {
return m.Topic
}
return ""
}
func (m *ListTopicSnapshotsRequest) GetPageSize() int32 {
if m != nil {
return m.PageSize
}
return 0
}
func (m *ListTopicSnapshotsRequest) GetPageToken() string {
if m != nil {
return m.PageToken
}
return ""
}
// Response for the `ListTopicSnapshots` method.<br><br>
// <b>ALPHA:</b> This feature is part of an alpha release. This API might be
// changed in backward-incompatible ways and is not recommended for production
// use. It is not subject to any SLA or deprecation policy.
type ListTopicSnapshotsResponse struct {
// The names of the snapshots that match the request.
Snapshots []string `protobuf:"bytes,1,rep,name=snapshots,proto3" json:"snapshots,omitempty"`
// If not empty, indicates that there may be more snapshots that match
// the request; this value should be passed in a new
// `ListTopicSnapshotsRequest` to get more snapshots.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListTopicSnapshotsResponse) Reset() { *m = ListTopicSnapshotsResponse{} }
func (m *ListTopicSnapshotsResponse) String() string { return proto.CompactTextString(m) }
func (*ListTopicSnapshotsResponse) ProtoMessage() {}
func (*ListTopicSnapshotsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_f602d910f9a348fe, []int{12}
}
func (m *ListTopicSnapshotsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListTopicSnapshotsResponse.Unmarshal(m, b)
}
func (m *ListTopicSnapshotsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListTopicSnapshotsResponse.Marshal(b, m, deterministic)
}
func (m *ListTopicSnapshotsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListTopicSnapshotsResponse.Merge(m, src)
}
func (m *ListTopicSnapshotsResponse) XXX_Size() int {
return xxx_messageInfo_ListTopicSnapshotsResponse.Size(m)
}
func (m *ListTopicSnapshotsResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ListTopicSnapshotsResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ListTopicSnapshotsResponse proto.InternalMessageInfo
func (m *ListTopicSnapshotsResponse) GetSnapshots() []string {
if m != nil {
return m.Snapshots
}
return nil
}
func (m *ListTopicSnapshotsResponse) GetNextPageToken() string {
if m != nil {
return m.NextPageToken
}
return ""
}
// Request for the `DeleteTopic` method.
type DeleteTopicRequest struct {
// Name of the topic to delete.
// Format is `projects/{project}/topics/{topic}`.
Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DeleteTopicRequest) Reset() { *m = DeleteTopicRequest{} }
func (m *DeleteTopicRequest) String() string { return proto.CompactTextString(m) }
func (*DeleteTopicRequest) ProtoMessage() {}
func (*DeleteTopicRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_f602d910f9a348fe, []int{13}
}
func (m *DeleteTopicRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteTopicRequest.Unmarshal(m, b)
}
func (m *DeleteTopicRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeleteTopicRequest.Marshal(b, m, deterministic)
}
func (m *DeleteTopicRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeleteTopicRequest.Merge(m, src)
}
func (m *DeleteTopicRequest) XXX_Size() int {
return xxx_messageInfo_DeleteTopicRequest.Size(m)
}
func (m *DeleteTopicRequest) XXX_DiscardUnknown() {
xxx_messageInfo_DeleteTopicRequest.DiscardUnknown(m)
}
var xxx_messageInfo_DeleteTopicRequest proto.InternalMessageInfo
func (m *DeleteTopicRequest) GetTopic() string {
if m != nil {
return m.Topic
}
return ""
}
// A subscription resource.
type Subscription struct {
// The name of the subscription. It must have the format
// `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
// start with a letter, and contain only letters (`[A-Za-z]`), numbers
// (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
// plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
// in length, and it must not start with `"goog"`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The name of the topic from which this subscription is receiving messages.
// Format is `projects/{project}/topics/{topic}`.
// The value of this field will be `_deleted-topic_` if the topic has been
// deleted.
Topic string `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"`
// If push delivery is used with this subscription, this field is
// used to configure it. An empty `pushConfig` signifies that the subscriber
// will pull and ack messages using API methods.
PushConfig *PushConfig `protobuf:"bytes,4,opt,name=push_config,json=pushConfig,proto3" json:"push_config,omitempty"`
// This value is the maximum time after a subscriber receives a message
// before the subscriber should acknowledge the message. After message
// delivery but before the ack deadline expires and before the message is
// acknowledged, it is an outstanding message and will not be delivered
// again during that time (on a best-effort basis).
//
// For pull subscriptions, this value is used as the initial value for the ack
// deadline. To override this value for a given message, call
// `ModifyAckDeadline` with the corresponding `ack_id` if using
// non-streaming pull or send the `ack_id` in a
// `StreamingModifyAckDeadlineRequest` if using streaming pull.
// The minimum custom deadline you can specify is 10 seconds.
// The maximum custom deadline you can specify is 600 seconds (10 minutes).
// If this parameter is 0, a default value of 10 seconds is used.
//
// For push delivery, this value is also used to set the request timeout for
// the call to the push endpoint.
//
// If the subscriber never acknowledges the message, the Pub/Sub
// system will eventually redeliver the message.
AckDeadlineSeconds int32 `protobuf:"varint,5,opt,name=ack_deadline_seconds,json=ackDeadlineSeconds,proto3" json:"ack_deadline_seconds,omitempty"`
// Indicates whether to retain acknowledged messages. If true, then
// messages are not expunged from the subscription's backlog, even if they are
// acknowledged, until they fall out of the `message_retention_duration`
// window.<br><br>
// <b>ALPHA:</b> This feature is part of an alpha release. This API might be
// changed in backward-incompatible ways and is not recommended for production
// use. It is not subject to any SLA or deprecation policy.
RetainAckedMessages bool `protobuf:"varint,7,opt,name=retain_acked_messages,json=retainAckedMessages,proto3" json:"retain_acked_messages,omitempty"`
// How long to retain unacknowledged messages in the subscription's backlog,
// from the moment a message is published.
// If `retain_acked_messages` is true, then this also configures the retention
// of acknowledged messages, and thus configures how far back in time a `Seek`
// can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10
// minutes.<br><br>
// <b>ALPHA:</b> This feature is part of an alpha release. This API might be
// changed in backward-incompatible ways and is not recommended for production
// use. It is not subject to any SLA or deprecation policy.
MessageRetentionDuration *duration.Duration `protobuf:"bytes,8,opt,name=message_retention_duration,json=messageRetentionDuration,proto3" json:"message_retention_duration,omitempty"`
// See <a href="/pubsub/docs/labels"> Creating and managing labels</a>.
Labels map[string]string `protobuf:"bytes,9,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// A policy that specifies the conditions for this subscription's expiration.
// A subscription is considered active as long as any connected subscriber is
// successfully consuming messages from the subscription or is issuing
// operations on the subscription. If `expiration_policy` is not set, a
// *default policy* with `ttl` of 31 days will be used. The minimum allowed
// value for `expiration_policy.ttl` is 1 day.
// <b>BETA:</b> This feature is part of a beta release. This API might be
// changed in backward-incompatible ways and is not recommended for production
// use. It is not subject to any SLA or deprecation policy.
ExpirationPolicy *ExpirationPolicy `protobuf:"bytes,11,opt,name=expiration_policy,json=expirationPolicy,proto3" json:"expiration_policy,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Subscription) Reset() { *m = Subscription{} }
func (m *Subscription) String() string { return proto.CompactTextString(m) }
func (*Subscription) ProtoMessage() {}
func (*Subscription) Descriptor() ([]byte, []int) {
return fileDescriptor_f602d910f9a348fe, []int{14}
}
func (m *Subscription) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Subscription.Unmarshal(m, b)
}
func (m *Subscription) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Subscription.Marshal(b, m, deterministic)
}
func (m *Subscription) XXX_Merge(src proto.Message) {
xxx_messageInfo_Subscription.Merge(m, src)
}
func (m *Subscription) XXX_Size() int {
return xxx_messageInfo_Subscription.Size(m)
}
func (m *Subscription) XXX_DiscardUnknown() {
xxx_messageInfo_Subscription.DiscardUnknown(m)
}
var xxx_messageInfo_Subscription proto.InternalMessageInfo
func (m *Subscription) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Subscription) GetTopic() string {
if m != nil {
return m.Topic
}
return ""
}
func (m *Subscription) GetPushConfig() *PushConfig {
if m != nil {
return m.PushConfig
}
return nil
}
func (m *Subscription) GetAckDeadlineSeconds() int32 {
if m != nil {
return m.AckDeadlineSeconds
}
return 0
}
func (m *Subscription) GetRetainAckedMessages() bool {
if m != nil {
return m.RetainAckedMessages
}
return false
}
func (m *Subscription) GetMessageRetentionDuration() *duration.Duration {
if m != nil {
return m.MessageRetentionDuration
}
return nil
}
func (m *Subscription) GetLabels() map[string]string {
if m != nil {
return m.Labels
}
return nil
}
func (m *Subscription) GetExpirationPolicy() *ExpirationPolicy {
if m != nil {
return m.ExpirationPolicy
}
return nil
}
// A policy that specifies the conditions for resource expiration (i.e.,
// automatic resource deletion).
type ExpirationPolicy struct {
// Specifies the "time-to-live" duration for an associated resource. The
// resource expires if it is not active for a period of `ttl`. The definition
// of "activity" depends on the type of the associated resource. The minimum
// and maximum allowed values for `ttl` depend on the type of the associated
// resource, as well. If `ttl` is not set, the associated resource never
// expires.
Ttl *duration.Duration `protobuf:"bytes,1,opt,name=ttl,proto3" json:"ttl,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ExpirationPolicy) Reset() { *m = ExpirationPolicy{} }
func (m *ExpirationPolicy) String() string { return proto.CompactTextString(m) }
func (*ExpirationPolicy) ProtoMessage() {}
func (*ExpirationPolicy) Descriptor() ([]byte, []int) {
return fileDescriptor_f602d910f9a348fe, []int{15}
}
func (m *ExpirationPolicy) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ExpirationPolicy.Unmarshal(m, b)
}
func (m *ExpirationPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ExpirationPolicy.Marshal(b, m, deterministic)
}
func (m *ExpirationPolicy) XXX_Merge(src proto.Message) {
xxx_messageInfo_ExpirationPolicy.Merge(m, src)
}
func (m *ExpirationPolicy) XXX_Size() int {
return xxx_messageInfo_ExpirationPolicy.Size(m)
}
func (m *ExpirationPolicy) XXX_DiscardUnknown() {
xxx_messageInfo_ExpirationPolicy.DiscardUnknown(m)
}
var xxx_messageInfo_ExpirationPolicy proto.InternalMessageInfo
func (m *ExpirationPolicy) GetTtl() *duration.Duration {
if m != nil {
return m.Ttl
}
return nil
}