-
Notifications
You must be signed in to change notification settings - Fork 200
/
pubsub.pb.go
6604 lines (5976 loc) · 289 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
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc v3.12.4
// source: mockgcp/pubsub/v1/pubsub.proto
package pubsubpb
import (
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"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// Possible states for ingestion from Amazon Kinesis Data Streams.
type IngestionDataSourceSettings_AwsKinesis_State int32
const (
// Default value. This value is unused.
IngestionDataSourceSettings_AwsKinesis_STATE_UNSPECIFIED IngestionDataSourceSettings_AwsKinesis_State = 0
// Ingestion is active.
IngestionDataSourceSettings_AwsKinesis_ACTIVE IngestionDataSourceSettings_AwsKinesis_State = 1
// Permission denied encountered while consuming data from Kinesis.
// This can happen if:
// - The provided `aws_role_arn` does not exist or does not have the
// appropriate permissions attached.
// - The provided `aws_role_arn` is not set up properly for Identity
// Federation using `gcp_service_account`.
// - The Pub/Sub SA is not granted the
// `iam.serviceAccounts.getOpenIdToken` permission on
// `gcp_service_account`.
IngestionDataSourceSettings_AwsKinesis_KINESIS_PERMISSION_DENIED IngestionDataSourceSettings_AwsKinesis_State = 2
// Permission denied encountered while publishing to the topic. This can
// happen if the Pub/Sub SA has not been granted the [appropriate publish
// permissions](https://cloud.google.com/pubsub/docs/access-control#pubsub.publisher)
IngestionDataSourceSettings_AwsKinesis_PUBLISH_PERMISSION_DENIED IngestionDataSourceSettings_AwsKinesis_State = 3
// The Kinesis stream does not exist.
IngestionDataSourceSettings_AwsKinesis_STREAM_NOT_FOUND IngestionDataSourceSettings_AwsKinesis_State = 4
// The Kinesis consumer does not exist.
IngestionDataSourceSettings_AwsKinesis_CONSUMER_NOT_FOUND IngestionDataSourceSettings_AwsKinesis_State = 5
)
// Enum value maps for IngestionDataSourceSettings_AwsKinesis_State.
var (
IngestionDataSourceSettings_AwsKinesis_State_name = map[int32]string{
0: "STATE_UNSPECIFIED",
1: "ACTIVE",
2: "KINESIS_PERMISSION_DENIED",
3: "PUBLISH_PERMISSION_DENIED",
4: "STREAM_NOT_FOUND",
5: "CONSUMER_NOT_FOUND",
}
IngestionDataSourceSettings_AwsKinesis_State_value = map[string]int32{
"STATE_UNSPECIFIED": 0,
"ACTIVE": 1,
"KINESIS_PERMISSION_DENIED": 2,
"PUBLISH_PERMISSION_DENIED": 3,
"STREAM_NOT_FOUND": 4,
"CONSUMER_NOT_FOUND": 5,
}
)
func (x IngestionDataSourceSettings_AwsKinesis_State) Enum() *IngestionDataSourceSettings_AwsKinesis_State {
p := new(IngestionDataSourceSettings_AwsKinesis_State)
*p = x
return p
}
func (x IngestionDataSourceSettings_AwsKinesis_State) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (IngestionDataSourceSettings_AwsKinesis_State) Descriptor() protoreflect.EnumDescriptor {
return file_mockgcp_pubsub_v1_pubsub_proto_enumTypes[0].Descriptor()
}
func (IngestionDataSourceSettings_AwsKinesis_State) Type() protoreflect.EnumType {
return &file_mockgcp_pubsub_v1_pubsub_proto_enumTypes[0]
}
func (x IngestionDataSourceSettings_AwsKinesis_State) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use IngestionDataSourceSettings_AwsKinesis_State.Descriptor instead.
func (IngestionDataSourceSettings_AwsKinesis_State) EnumDescriptor() ([]byte, []int) {
return file_mockgcp_pubsub_v1_pubsub_proto_rawDescGZIP(), []int{2, 0, 0}
}
// The state of the topic.
type Topic_State int32
const (
// Default value. This value is unused.
Topic_STATE_UNSPECIFIED Topic_State = 0
// The topic does not have any persistent errors.
Topic_ACTIVE Topic_State = 1
// Ingestion from the data source has encountered a permanent error.
// See the more detailed error state in the corresponding ingestion
// source configuration.
Topic_INGESTION_RESOURCE_ERROR Topic_State = 2
)
// Enum value maps for Topic_State.
var (
Topic_State_name = map[int32]string{
0: "STATE_UNSPECIFIED",
1: "ACTIVE",
2: "INGESTION_RESOURCE_ERROR",
}
Topic_State_value = map[string]int32{
"STATE_UNSPECIFIED": 0,
"ACTIVE": 1,
"INGESTION_RESOURCE_ERROR": 2,
}
)
func (x Topic_State) Enum() *Topic_State {
p := new(Topic_State)
*p = x
return p
}
func (x Topic_State) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Topic_State) Descriptor() protoreflect.EnumDescriptor {
return file_mockgcp_pubsub_v1_pubsub_proto_enumTypes[1].Descriptor()
}
func (Topic_State) Type() protoreflect.EnumType {
return &file_mockgcp_pubsub_v1_pubsub_proto_enumTypes[1]
}
func (x Topic_State) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Topic_State.Descriptor instead.
func (Topic_State) EnumDescriptor() ([]byte, []int) {
return file_mockgcp_pubsub_v1_pubsub_proto_rawDescGZIP(), []int{3, 0}
}
// Possible states for a subscription.
type Subscription_State int32
const (
// Default value. This value is unused.
Subscription_STATE_UNSPECIFIED Subscription_State = 0
// The subscription can actively receive messages
Subscription_ACTIVE Subscription_State = 1
// The subscription cannot receive messages because of an error with the
// resource to which it pushes messages. See the more detailed error state
// in the corresponding configuration.
Subscription_RESOURCE_ERROR Subscription_State = 2
)
// Enum value maps for Subscription_State.
var (
Subscription_State_name = map[int32]string{
0: "STATE_UNSPECIFIED",
1: "ACTIVE",
2: "RESOURCE_ERROR",
}
Subscription_State_value = map[string]int32{
"STATE_UNSPECIFIED": 0,
"ACTIVE": 1,
"RESOURCE_ERROR": 2,
}
)
func (x Subscription_State) Enum() *Subscription_State {
p := new(Subscription_State)
*p = x
return p
}
func (x Subscription_State) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Subscription_State) Descriptor() protoreflect.EnumDescriptor {
return file_mockgcp_pubsub_v1_pubsub_proto_enumTypes[2].Descriptor()
}
func (Subscription_State) Type() protoreflect.EnumType {
return &file_mockgcp_pubsub_v1_pubsub_proto_enumTypes[2]
}
func (x Subscription_State) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Subscription_State.Descriptor instead.
func (Subscription_State) EnumDescriptor() ([]byte, []int) {
return file_mockgcp_pubsub_v1_pubsub_proto_rawDescGZIP(), []int{18, 0}
}
// Possible states for a BigQuery subscription.
type BigQueryConfig_State int32
const (
// Default value. This value is unused.
BigQueryConfig_STATE_UNSPECIFIED BigQueryConfig_State = 0
// The subscription can actively send messages to BigQuery
BigQueryConfig_ACTIVE BigQueryConfig_State = 1
// Cannot write to the BigQuery table because of permission denied errors.
// This can happen if
// - Pub/Sub SA has not been granted the [appropriate BigQuery IAM
// permissions](https://cloud.google.com/pubsub/docs/create-subscription#assign_bigquery_service_account)
// - bigquery.googleapis.com API is not enabled for the project
// ([instructions](https://cloud.google.com/service-usage/docs/enable-disable))
BigQueryConfig_PERMISSION_DENIED BigQueryConfig_State = 2
// Cannot write to the BigQuery table because it does not exist.
BigQueryConfig_NOT_FOUND BigQueryConfig_State = 3
// Cannot write to the BigQuery table due to a schema mismatch.
BigQueryConfig_SCHEMA_MISMATCH BigQueryConfig_State = 4
// Cannot write to the destination because enforce_in_transit is set to true
// and the destination locations are not in the allowed regions.
BigQueryConfig_IN_TRANSIT_LOCATION_RESTRICTION BigQueryConfig_State = 5
)
// Enum value maps for BigQueryConfig_State.
var (
BigQueryConfig_State_name = map[int32]string{
0: "STATE_UNSPECIFIED",
1: "ACTIVE",
2: "PERMISSION_DENIED",
3: "NOT_FOUND",
4: "SCHEMA_MISMATCH",
5: "IN_TRANSIT_LOCATION_RESTRICTION",
}
BigQueryConfig_State_value = map[string]int32{
"STATE_UNSPECIFIED": 0,
"ACTIVE": 1,
"PERMISSION_DENIED": 2,
"NOT_FOUND": 3,
"SCHEMA_MISMATCH": 4,
"IN_TRANSIT_LOCATION_RESTRICTION": 5,
}
)
func (x BigQueryConfig_State) Enum() *BigQueryConfig_State {
p := new(BigQueryConfig_State)
*p = x
return p
}
func (x BigQueryConfig_State) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (BigQueryConfig_State) Descriptor() protoreflect.EnumDescriptor {
return file_mockgcp_pubsub_v1_pubsub_proto_enumTypes[3].Descriptor()
}
func (BigQueryConfig_State) Type() protoreflect.EnumType {
return &file_mockgcp_pubsub_v1_pubsub_proto_enumTypes[3]
}
func (x BigQueryConfig_State) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use BigQueryConfig_State.Descriptor instead.
func (BigQueryConfig_State) EnumDescriptor() ([]byte, []int) {
return file_mockgcp_pubsub_v1_pubsub_proto_rawDescGZIP(), []int{23, 0}
}
// Possible states for a Cloud Storage subscription.
type CloudStorageConfig_State int32
const (
// Default value. This value is unused.
CloudStorageConfig_STATE_UNSPECIFIED CloudStorageConfig_State = 0
// The subscription can actively send messages to Cloud Storage.
CloudStorageConfig_ACTIVE CloudStorageConfig_State = 1
// Cannot write to the Cloud Storage bucket because of permission denied
// errors.
CloudStorageConfig_PERMISSION_DENIED CloudStorageConfig_State = 2
// Cannot write to the Cloud Storage bucket because it does not exist.
CloudStorageConfig_NOT_FOUND CloudStorageConfig_State = 3
// Cannot write to the destination because enforce_in_transit is set to true
// and the destination locations are not in the allowed regions.
CloudStorageConfig_IN_TRANSIT_LOCATION_RESTRICTION CloudStorageConfig_State = 4
)
// Enum value maps for CloudStorageConfig_State.
var (
CloudStorageConfig_State_name = map[int32]string{
0: "STATE_UNSPECIFIED",
1: "ACTIVE",
2: "PERMISSION_DENIED",
3: "NOT_FOUND",
4: "IN_TRANSIT_LOCATION_RESTRICTION",
}
CloudStorageConfig_State_value = map[string]int32{
"STATE_UNSPECIFIED": 0,
"ACTIVE": 1,
"PERMISSION_DENIED": 2,
"NOT_FOUND": 3,
"IN_TRANSIT_LOCATION_RESTRICTION": 4,
}
)
func (x CloudStorageConfig_State) Enum() *CloudStorageConfig_State {
p := new(CloudStorageConfig_State)
*p = x
return p
}
func (x CloudStorageConfig_State) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (CloudStorageConfig_State) Descriptor() protoreflect.EnumDescriptor {
return file_mockgcp_pubsub_v1_pubsub_proto_enumTypes[4].Descriptor()
}
func (CloudStorageConfig_State) Type() protoreflect.EnumType {
return &file_mockgcp_pubsub_v1_pubsub_proto_enumTypes[4]
}
func (x CloudStorageConfig_State) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use CloudStorageConfig_State.Descriptor instead.
func (CloudStorageConfig_State) EnumDescriptor() ([]byte, []int) {
return file_mockgcp_pubsub_v1_pubsub_proto_rawDescGZIP(), []int{24, 0}
}
// A policy constraining the storage of messages published to the topic.
type MessageStoragePolicy struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Optional. A list of IDs of Google Cloud regions where messages that are
// published to the topic may be persisted in storage. Messages published by
// publishers running in non-allowed Google Cloud regions (or running outside
// of Google Cloud altogether) are routed for storage in one of the allowed
// regions. An empty list means that no regions are allowed, and is not a
// valid configuration.
AllowedPersistenceRegions []string `protobuf:"bytes,1,rep,name=allowed_persistence_regions,json=allowedPersistenceRegions,proto3" json:"allowed_persistence_regions,omitempty"`
// Optional. If true, `allowed_persistence_regions` is also used to enforce
// in-transit guarantees for messages. That is, Pub/Sub will fail
// Publish operations on this topic and subscribe operations
// on any subscription attached to this topic in any region that is
// not in `allowed_persistence_regions`.
EnforceInTransit bool `protobuf:"varint,2,opt,name=enforce_in_transit,json=enforceInTransit,proto3" json:"enforce_in_transit,omitempty"`
}
func (x *MessageStoragePolicy) Reset() {
*x = MessageStoragePolicy{}
if protoimpl.UnsafeEnabled {
mi := &file_mockgcp_pubsub_v1_pubsub_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageStoragePolicy) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageStoragePolicy) ProtoMessage() {}
func (x *MessageStoragePolicy) ProtoReflect() protoreflect.Message {
mi := &file_mockgcp_pubsub_v1_pubsub_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MessageStoragePolicy.ProtoReflect.Descriptor instead.
func (*MessageStoragePolicy) Descriptor() ([]byte, []int) {
return file_mockgcp_pubsub_v1_pubsub_proto_rawDescGZIP(), []int{0}
}
func (x *MessageStoragePolicy) GetAllowedPersistenceRegions() []string {
if x != nil {
return x.AllowedPersistenceRegions
}
return nil
}
func (x *MessageStoragePolicy) GetEnforceInTransit() bool {
if x != nil {
return x.EnforceInTransit
}
return false
}
// Settings for validating messages published against a schema.
type SchemaSettings struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The name of the schema that messages published should be
// validated against. Format is `projects/{project}/schemas/{schema}`. The
// value of this field will be `_deleted-schema_` if the schema has been
// deleted.
Schema string `protobuf:"bytes,1,opt,name=schema,proto3" json:"schema,omitempty"`
// Optional. The encoding of messages validated against `schema`.
Encoding Encoding `protobuf:"varint,2,opt,name=encoding,proto3,enum=mockgcp.pubsub.v1.Encoding" json:"encoding,omitempty"`
// Optional. The minimum (inclusive) revision allowed for validating messages.
// If empty or not present, allow any revision to be validated against
// last_revision or any revision created before.
FirstRevisionId string `protobuf:"bytes,3,opt,name=first_revision_id,json=firstRevisionId,proto3" json:"first_revision_id,omitempty"`
// Optional. The maximum (inclusive) revision allowed for validating messages.
// If empty or not present, allow any revision to be validated against
// first_revision or any revision created after.
LastRevisionId string `protobuf:"bytes,4,opt,name=last_revision_id,json=lastRevisionId,proto3" json:"last_revision_id,omitempty"`
}
func (x *SchemaSettings) Reset() {
*x = SchemaSettings{}
if protoimpl.UnsafeEnabled {
mi := &file_mockgcp_pubsub_v1_pubsub_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SchemaSettings) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SchemaSettings) ProtoMessage() {}
func (x *SchemaSettings) ProtoReflect() protoreflect.Message {
mi := &file_mockgcp_pubsub_v1_pubsub_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SchemaSettings.ProtoReflect.Descriptor instead.
func (*SchemaSettings) Descriptor() ([]byte, []int) {
return file_mockgcp_pubsub_v1_pubsub_proto_rawDescGZIP(), []int{1}
}
func (x *SchemaSettings) GetSchema() string {
if x != nil {
return x.Schema
}
return ""
}
func (x *SchemaSettings) GetEncoding() Encoding {
if x != nil {
return x.Encoding
}
return Encoding_ENCODING_UNSPECIFIED
}
func (x *SchemaSettings) GetFirstRevisionId() string {
if x != nil {
return x.FirstRevisionId
}
return ""
}
func (x *SchemaSettings) GetLastRevisionId() string {
if x != nil {
return x.LastRevisionId
}
return ""
}
// Settings for an ingestion data source on a topic.
type IngestionDataSourceSettings struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Only one source type can have settings set.
//
// Types that are assignable to Source:
//
// *IngestionDataSourceSettings_AwsKinesis_
Source isIngestionDataSourceSettings_Source `protobuf_oneof:"source"`
}
func (x *IngestionDataSourceSettings) Reset() {
*x = IngestionDataSourceSettings{}
if protoimpl.UnsafeEnabled {
mi := &file_mockgcp_pubsub_v1_pubsub_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *IngestionDataSourceSettings) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*IngestionDataSourceSettings) ProtoMessage() {}
func (x *IngestionDataSourceSettings) ProtoReflect() protoreflect.Message {
mi := &file_mockgcp_pubsub_v1_pubsub_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use IngestionDataSourceSettings.ProtoReflect.Descriptor instead.
func (*IngestionDataSourceSettings) Descriptor() ([]byte, []int) {
return file_mockgcp_pubsub_v1_pubsub_proto_rawDescGZIP(), []int{2}
}
func (m *IngestionDataSourceSettings) GetSource() isIngestionDataSourceSettings_Source {
if m != nil {
return m.Source
}
return nil
}
func (x *IngestionDataSourceSettings) GetAwsKinesis() *IngestionDataSourceSettings_AwsKinesis {
if x, ok := x.GetSource().(*IngestionDataSourceSettings_AwsKinesis_); ok {
return x.AwsKinesis
}
return nil
}
type isIngestionDataSourceSettings_Source interface {
isIngestionDataSourceSettings_Source()
}
type IngestionDataSourceSettings_AwsKinesis_ struct {
// Optional. Amazon Kinesis Data Streams.
AwsKinesis *IngestionDataSourceSettings_AwsKinesis `protobuf:"bytes,1,opt,name=aws_kinesis,json=awsKinesis,proto3,oneof"`
}
func (*IngestionDataSourceSettings_AwsKinesis_) isIngestionDataSourceSettings_Source() {}
// A topic resource.
type Topic struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. 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"`
// Optional. See [Creating and managing labels]
// (https://cloud.google.com/pubsub/docs/labels).
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"`
// Optional. Policy constraining the set of Google Cloud Platform regions
// where messages published to the topic may be stored. If not present, then
// no constraints are in effect.
MessageStoragePolicy *MessageStoragePolicy `protobuf:"bytes,3,opt,name=message_storage_policy,json=messageStoragePolicy,proto3" json:"message_storage_policy,omitempty"`
// Optional. The resource name of the Cloud KMS CryptoKey to be used to
// protect access to messages published on this topic.
//
// The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
KmsKeyName string `protobuf:"bytes,5,opt,name=kms_key_name,json=kmsKeyName,proto3" json:"kms_key_name,omitempty"`
// Optional. Settings for validating messages published against a schema.
SchemaSettings *SchemaSettings `protobuf:"bytes,6,opt,name=schema_settings,json=schemaSettings,proto3" json:"schema_settings,omitempty"`
// Optional. Reserved for future use. This field is set only in responses from
// the server; it is ignored if it is set in any requests.
SatisfiesPzs bool `protobuf:"varint,7,opt,name=satisfies_pzs,json=satisfiesPzs,proto3" json:"satisfies_pzs,omitempty"`
// Optional. Indicates the minimum duration to retain a message after it is
// published to the topic. If this field is set, messages published to the
// topic in the last `message_retention_duration` are always available to
// subscribers. For instance, it allows any attached subscription to [seek to
// a
// timestamp](https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time)
// that is up to `message_retention_duration` in the past. If this field is
// not set, message retention is controlled by settings on individual
// subscriptions. Cannot be more than 31 days or less than 10 minutes.
MessageRetentionDuration *duration.Duration `protobuf:"bytes,8,opt,name=message_retention_duration,json=messageRetentionDuration,proto3" json:"message_retention_duration,omitempty"`
// Output only. An output-only field indicating the state of the topic.
State Topic_State `protobuf:"varint,9,opt,name=state,proto3,enum=mockgcp.pubsub.v1.Topic_State" json:"state,omitempty"`
// Optional. Settings for ingestion from a data source into this topic.
IngestionDataSourceSettings *IngestionDataSourceSettings `protobuf:"bytes,10,opt,name=ingestion_data_source_settings,json=ingestionDataSourceSettings,proto3" json:"ingestion_data_source_settings,omitempty"`
}
func (x *Topic) Reset() {
*x = Topic{}
if protoimpl.UnsafeEnabled {
mi := &file_mockgcp_pubsub_v1_pubsub_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Topic) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Topic) ProtoMessage() {}
func (x *Topic) ProtoReflect() protoreflect.Message {
mi := &file_mockgcp_pubsub_v1_pubsub_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Topic.ProtoReflect.Descriptor instead.
func (*Topic) Descriptor() ([]byte, []int) {
return file_mockgcp_pubsub_v1_pubsub_proto_rawDescGZIP(), []int{3}
}
func (x *Topic) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Topic) GetLabels() map[string]string {
if x != nil {
return x.Labels
}
return nil
}
func (x *Topic) GetMessageStoragePolicy() *MessageStoragePolicy {
if x != nil {
return x.MessageStoragePolicy
}
return nil
}
func (x *Topic) GetKmsKeyName() string {
if x != nil {
return x.KmsKeyName
}
return ""
}
func (x *Topic) GetSchemaSettings() *SchemaSettings {
if x != nil {
return x.SchemaSettings
}
return nil
}
func (x *Topic) GetSatisfiesPzs() bool {
if x != nil {
return x.SatisfiesPzs
}
return false
}
func (x *Topic) GetMessageRetentionDuration() *duration.Duration {
if x != nil {
return x.MessageRetentionDuration
}
return nil
}
func (x *Topic) GetState() Topic_State {
if x != nil {
return x.State
}
return Topic_STATE_UNSPECIFIED
}
func (x *Topic) GetIngestionDataSourceSettings() *IngestionDataSourceSettings {
if x != nil {
return x.IngestionDataSourceSettings
}
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.
// Note that client libraries represent this object differently
// depending on the language. See the corresponding [client library
// documentation](https://cloud.google.com/pubsub/docs/reference/libraries) for
// more information. See [quotas and limits]
// (https://cloud.google.com/pubsub/quotas) for more information about message
// limits.
type PubsubMessage struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Optional. 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. If this field is empty, the message
// must contain non-empty data. This can be used to filter messages on the
// subscription.
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"`
// Optional. If non-empty, identifies related messages for which publish order
// should be respected. If a `Subscription` has `enable_message_ordering` set
// to `true`, messages published with the same non-empty `ordering_key` value
// will be delivered to subscribers in the order in which they are received by
// the Pub/Sub system. All `PubsubMessage`s published in a given
// `PublishRequest` must specify the same `ordering_key` value. For more
// information, see [ordering
// messages](https://cloud.google.com/pubsub/docs/ordering).
OrderingKey string `protobuf:"bytes,5,opt,name=ordering_key,json=orderingKey,proto3" json:"ordering_key,omitempty"`
}
func (x *PubsubMessage) Reset() {
*x = PubsubMessage{}
if protoimpl.UnsafeEnabled {
mi := &file_mockgcp_pubsub_v1_pubsub_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PubsubMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PubsubMessage) ProtoMessage() {}
func (x *PubsubMessage) ProtoReflect() protoreflect.Message {
mi := &file_mockgcp_pubsub_v1_pubsub_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PubsubMessage.ProtoReflect.Descriptor instead.
func (*PubsubMessage) Descriptor() ([]byte, []int) {
return file_mockgcp_pubsub_v1_pubsub_proto_rawDescGZIP(), []int{4}
}
func (x *PubsubMessage) GetData() []byte {
if x != nil {
return x.Data
}
return nil
}
func (x *PubsubMessage) GetAttributes() map[string]string {
if x != nil {
return x.Attributes
}
return nil
}
func (x *PubsubMessage) GetMessageId() string {
if x != nil {
return x.MessageId
}
return ""
}
func (x *PubsubMessage) GetPublishTime() *timestamp.Timestamp {
if x != nil {
return x.PublishTime
}
return nil
}
func (x *PubsubMessage) GetOrderingKey() string {
if x != nil {
return x.OrderingKey
}
return ""
}
// Request for the GetTopic method.
type GetTopicRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. 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"`
}
func (x *GetTopicRequest) Reset() {
*x = GetTopicRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_mockgcp_pubsub_v1_pubsub_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetTopicRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetTopicRequest) ProtoMessage() {}
func (x *GetTopicRequest) ProtoReflect() protoreflect.Message {
mi := &file_mockgcp_pubsub_v1_pubsub_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetTopicRequest.ProtoReflect.Descriptor instead.
func (*GetTopicRequest) Descriptor() ([]byte, []int) {
return file_mockgcp_pubsub_v1_pubsub_proto_rawDescGZIP(), []int{5}
}
func (x *GetTopicRequest) GetTopic() string {
if x != nil {
return x.Topic
}
return ""
}
// Request for the UpdateTopic method.
type UpdateTopicRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The updated topic object.
Topic *Topic `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
// Required. Indicates which fields in the provided topic to update. Must be
// specified and non-empty. Note that if `update_mask` contains
// "message_storage_policy" but the `message_storage_policy` is not set in
// the `topic` provided above, then the updated value is determined by the
// policy configured at the project or organization level.
UpdateMask *field_mask.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
}
func (x *UpdateTopicRequest) Reset() {
*x = UpdateTopicRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_mockgcp_pubsub_v1_pubsub_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UpdateTopicRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdateTopicRequest) ProtoMessage() {}
func (x *UpdateTopicRequest) ProtoReflect() protoreflect.Message {
mi := &file_mockgcp_pubsub_v1_pubsub_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UpdateTopicRequest.ProtoReflect.Descriptor instead.
func (*UpdateTopicRequest) Descriptor() ([]byte, []int) {
return file_mockgcp_pubsub_v1_pubsub_proto_rawDescGZIP(), []int{6}
}
func (x *UpdateTopicRequest) GetTopic() *Topic {
if x != nil {
return x.Topic
}
return nil
}
func (x *UpdateTopicRequest) GetUpdateMask() *field_mask.FieldMask {
if x != nil {
return x.UpdateMask
}
return nil
}
// Request for the Publish method.
type PublishRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. 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"`
// Required. The messages to publish.
Messages []*PubsubMessage `protobuf:"bytes,2,rep,name=messages,proto3" json:"messages,omitempty"`
}
func (x *PublishRequest) Reset() {
*x = PublishRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_mockgcp_pubsub_v1_pubsub_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PublishRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PublishRequest) ProtoMessage() {}
func (x *PublishRequest) ProtoReflect() protoreflect.Message {
mi := &file_mockgcp_pubsub_v1_pubsub_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PublishRequest.ProtoReflect.Descriptor instead.
func (*PublishRequest) Descriptor() ([]byte, []int) {
return file_mockgcp_pubsub_v1_pubsub_proto_rawDescGZIP(), []int{7}
}
func (x *PublishRequest) GetTopic() string {
if x != nil {
return x.Topic
}
return ""
}
func (x *PublishRequest) GetMessages() []*PubsubMessage {
if x != nil {
return x.Messages
}
return nil
}