google-cloud-pubsub 1.7.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +2 -1
  3. data/CHANGELOG.md +47 -0
  4. data/TROUBLESHOOTING.md +2 -8
  5. data/lib/google-cloud-pubsub.rb +13 -13
  6. data/lib/google/cloud/pubsub.rb +15 -18
  7. data/lib/google/cloud/pubsub/async_publisher.rb +1 -2
  8. data/lib/google/cloud/pubsub/credentials.rb +2 -2
  9. data/lib/google/cloud/pubsub/service.rb +110 -255
  10. data/lib/google/cloud/pubsub/subscriber/stream.rb +3 -2
  11. data/lib/google/cloud/pubsub/subscription.rb +70 -3
  12. data/lib/google/cloud/pubsub/topic.rb +7 -3
  13. data/lib/google/cloud/pubsub/version.rb +1 -1
  14. metadata +8 -79
  15. data/lib/google/cloud/pubsub/v1.rb +0 -17
  16. data/lib/google/cloud/pubsub/v1/credentials.rb +0 -41
  17. data/lib/google/cloud/pubsub/v1/doc/google/iam/v1/iam_policy.rb +0 -21
  18. data/lib/google/cloud/pubsub/v1/doc/google/iam/v1/options.rb +0 -21
  19. data/lib/google/cloud/pubsub/v1/doc/google/iam/v1/policy.rb +0 -21
  20. data/lib/google/cloud/pubsub/v1/doc/google/protobuf/duration.rb +0 -91
  21. data/lib/google/cloud/pubsub/v1/doc/google/protobuf/empty.rb +0 -29
  22. data/lib/google/cloud/pubsub/v1/doc/google/protobuf/field_mask.rb +0 -222
  23. data/lib/google/cloud/pubsub/v1/doc/google/protobuf/timestamp.rb +0 -113
  24. data/lib/google/cloud/pubsub/v1/doc/google/pubsub/v1/pubsub.rb +0 -796
  25. data/lib/google/cloud/pubsub/v1/doc/google/type/expr.rb +0 -19
  26. data/lib/google/cloud/pubsub/v1/publisher_client.rb +0 -869
  27. data/lib/google/cloud/pubsub/v1/publisher_client_config.json +0 -114
  28. data/lib/google/cloud/pubsub/v1/subscriber_client.rb +0 -1463
  29. data/lib/google/cloud/pubsub/v1/subscriber_client_config.json +0 -153
  30. data/lib/google/pubsub/v1/pubsub_pb.rb +0 -259
  31. data/lib/google/pubsub/v1/pubsub_services_pb.rb +0 -210
@@ -1,153 +0,0 @@
1
- {
2
- "interfaces": {
3
- "google.pubsub.v1.Subscriber": {
4
- "retry_codes": {
5
- "idempotent": [
6
- "ABORTED",
7
- "UNAVAILABLE",
8
- "UNKNOWN"
9
- ],
10
- "non_idempotent": [
11
- "UNAVAILABLE"
12
- ],
13
- "idempotent2": [
14
- "DEADLINE_EXCEEDED",
15
- "UNAVAILABLE"
16
- ],
17
- "streaming_pull": [
18
- "ABORTED",
19
- "DEADLINE_EXCEEDED",
20
- "INTERNAL",
21
- "RESOURCE_EXHAUSTED",
22
- "UNAVAILABLE"
23
- ]
24
- },
25
- "retry_params": {
26
- "default": {
27
- "initial_retry_delay_millis": 100,
28
- "retry_delay_multiplier": 1.3,
29
- "max_retry_delay_millis": 60000,
30
- "initial_rpc_timeout_millis": 60000,
31
- "rpc_timeout_multiplier": 1.0,
32
- "max_rpc_timeout_millis": 60000,
33
- "total_timeout_millis": 600000
34
- },
35
- "messaging": {
36
- "initial_retry_delay_millis": 100,
37
- "retry_delay_multiplier": 1.3,
38
- "max_retry_delay_millis": 60000,
39
- "initial_rpc_timeout_millis": 25000,
40
- "rpc_timeout_multiplier": 1.0,
41
- "max_rpc_timeout_millis": 25000,
42
- "total_timeout_millis": 600000
43
- },
44
- "streaming_messaging": {
45
- "initial_retry_delay_millis": 100,
46
- "retry_delay_multiplier": 1.3,
47
- "max_retry_delay_millis": 60000,
48
- "initial_rpc_timeout_millis": 600000,
49
- "rpc_timeout_multiplier": 1.0,
50
- "max_rpc_timeout_millis": 600000,
51
- "total_timeout_millis": 600000
52
- }
53
- },
54
- "methods": {
55
- "CreateSubscription": {
56
- "timeout_millis": 60000,
57
- "retry_codes_name": "idempotent",
58
- "retry_params_name": "default"
59
- },
60
- "GetSubscription": {
61
- "timeout_millis": 60000,
62
- "retry_codes_name": "idempotent",
63
- "retry_params_name": "default"
64
- },
65
- "UpdateSubscription": {
66
- "timeout_millis": 60000,
67
- "retry_codes_name": "non_idempotent",
68
- "retry_params_name": "default"
69
- },
70
- "ListSubscriptions": {
71
- "timeout_millis": 60000,
72
- "retry_codes_name": "idempotent",
73
- "retry_params_name": "default"
74
- },
75
- "DeleteSubscription": {
76
- "timeout_millis": 60000,
77
- "retry_codes_name": "non_idempotent",
78
- "retry_params_name": "default"
79
- },
80
- "GetSnapshot": {
81
- "timeout_millis": 60000,
82
- "retry_codes_name": "idempotent2",
83
- "retry_params_name": "default"
84
- },
85
- "ModifyAckDeadline": {
86
- "timeout_millis": 60000,
87
- "retry_codes_name": "non_idempotent",
88
- "retry_params_name": "default"
89
- },
90
- "Acknowledge": {
91
- "timeout_millis": 60000,
92
- "retry_codes_name": "non_idempotent",
93
- "retry_params_name": "messaging"
94
- },
95
- "Pull": {
96
- "timeout_millis": 60000,
97
- "retry_codes_name": "idempotent",
98
- "retry_params_name": "messaging"
99
- },
100
- "StreamingPull": {
101
- "timeout_millis": 900000,
102
- "retry_codes_name": "streaming_pull",
103
- "retry_params_name": "streaming_messaging"
104
- },
105
- "ModifyPushConfig": {
106
- "timeout_millis": 60000,
107
- "retry_codes_name": "non_idempotent",
108
- "retry_params_name": "default"
109
- },
110
- "ListSnapshots": {
111
- "timeout_millis": 60000,
112
- "retry_codes_name": "idempotent",
113
- "retry_params_name": "default"
114
- },
115
- "CreateSnapshot": {
116
- "timeout_millis": 60000,
117
- "retry_codes_name": "non_idempotent",
118
- "retry_params_name": "default"
119
- },
120
- "UpdateSnapshot": {
121
- "timeout_millis": 60000,
122
- "retry_codes_name": "non_idempotent",
123
- "retry_params_name": "default"
124
- },
125
- "DeleteSnapshot": {
126
- "timeout_millis": 60000,
127
- "retry_codes_name": "non_idempotent",
128
- "retry_params_name": "default"
129
- },
130
- "Seek": {
131
- "timeout_millis": 60000,
132
- "retry_codes_name": "idempotent",
133
- "retry_params_name": "default"
134
- },
135
- "SetIamPolicy": {
136
- "timeout_millis": 60000,
137
- "retry_codes_name": "non_idempotent",
138
- "retry_params_name": "default"
139
- },
140
- "GetIamPolicy": {
141
- "timeout_millis": 60000,
142
- "retry_codes_name": "idempotent",
143
- "retry_params_name": "default"
144
- },
145
- "TestIamPermissions": {
146
- "timeout_millis": 60000,
147
- "retry_codes_name": "non_idempotent",
148
- "retry_params_name": "default"
149
- }
150
- }
151
- }
152
- }
153
- }
@@ -1,259 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: google/pubsub/v1/pubsub.proto
3
-
4
-
5
- require 'google/protobuf'
6
-
7
- require 'google/api/annotations_pb'
8
- require 'google/api/client_pb'
9
- require 'google/api/field_behavior_pb'
10
- require 'google/api/resource_pb'
11
- require 'google/protobuf/duration_pb'
12
- require 'google/protobuf/empty_pb'
13
- require 'google/protobuf/field_mask_pb'
14
- require 'google/protobuf/timestamp_pb'
15
- Google::Protobuf::DescriptorPool.generated_pool.build do
16
- add_message "google.pubsub.v1.MessageStoragePolicy" do
17
- repeated :allowed_persistence_regions, :string, 1
18
- end
19
- add_message "google.pubsub.v1.Topic" do
20
- optional :name, :string, 1
21
- map :labels, :string, :string, 2
22
- optional :message_storage_policy, :message, 3, "google.pubsub.v1.MessageStoragePolicy"
23
- optional :kms_key_name, :string, 5
24
- end
25
- add_message "google.pubsub.v1.PubsubMessage" do
26
- optional :data, :bytes, 1
27
- map :attributes, :string, :string, 2
28
- optional :message_id, :string, 3
29
- optional :publish_time, :message, 4, "google.protobuf.Timestamp"
30
- optional :ordering_key, :string, 5
31
- end
32
- add_message "google.pubsub.v1.GetTopicRequest" do
33
- optional :topic, :string, 1
34
- end
35
- add_message "google.pubsub.v1.UpdateTopicRequest" do
36
- optional :topic, :message, 1, "google.pubsub.v1.Topic"
37
- optional :update_mask, :message, 2, "google.protobuf.FieldMask"
38
- end
39
- add_message "google.pubsub.v1.PublishRequest" do
40
- optional :topic, :string, 1
41
- repeated :messages, :message, 2, "google.pubsub.v1.PubsubMessage"
42
- end
43
- add_message "google.pubsub.v1.PublishResponse" do
44
- repeated :message_ids, :string, 1
45
- end
46
- add_message "google.pubsub.v1.ListTopicsRequest" do
47
- optional :project, :string, 1
48
- optional :page_size, :int32, 2
49
- optional :page_token, :string, 3
50
- end
51
- add_message "google.pubsub.v1.ListTopicsResponse" do
52
- repeated :topics, :message, 1, "google.pubsub.v1.Topic"
53
- optional :next_page_token, :string, 2
54
- end
55
- add_message "google.pubsub.v1.ListTopicSubscriptionsRequest" do
56
- optional :topic, :string, 1
57
- optional :page_size, :int32, 2
58
- optional :page_token, :string, 3
59
- end
60
- add_message "google.pubsub.v1.ListTopicSubscriptionsResponse" do
61
- repeated :subscriptions, :string, 1
62
- optional :next_page_token, :string, 2
63
- end
64
- add_message "google.pubsub.v1.ListTopicSnapshotsRequest" do
65
- optional :topic, :string, 1
66
- optional :page_size, :int32, 2
67
- optional :page_token, :string, 3
68
- end
69
- add_message "google.pubsub.v1.ListTopicSnapshotsResponse" do
70
- repeated :snapshots, :string, 1
71
- optional :next_page_token, :string, 2
72
- end
73
- add_message "google.pubsub.v1.DeleteTopicRequest" do
74
- optional :topic, :string, 1
75
- end
76
- add_message "google.pubsub.v1.Subscription" do
77
- optional :name, :string, 1
78
- optional :topic, :string, 2
79
- optional :push_config, :message, 4, "google.pubsub.v1.PushConfig"
80
- optional :ack_deadline_seconds, :int32, 5
81
- optional :retain_acked_messages, :bool, 7
82
- optional :message_retention_duration, :message, 8, "google.protobuf.Duration"
83
- map :labels, :string, :string, 9
84
- optional :enable_message_ordering, :bool, 10
85
- optional :expiration_policy, :message, 11, "google.pubsub.v1.ExpirationPolicy"
86
- optional :filter, :string, 12
87
- optional :dead_letter_policy, :message, 13, "google.pubsub.v1.DeadLetterPolicy"
88
- optional :retry_policy, :message, 14, "google.pubsub.v1.RetryPolicy"
89
- end
90
- add_message "google.pubsub.v1.RetryPolicy" do
91
- optional :minimum_backoff, :message, 1, "google.protobuf.Duration"
92
- optional :maximum_backoff, :message, 2, "google.protobuf.Duration"
93
- end
94
- add_message "google.pubsub.v1.DeadLetterPolicy" do
95
- optional :dead_letter_topic, :string, 1
96
- optional :max_delivery_attempts, :int32, 2
97
- end
98
- add_message "google.pubsub.v1.ExpirationPolicy" do
99
- optional :ttl, :message, 1, "google.protobuf.Duration"
100
- end
101
- add_message "google.pubsub.v1.PushConfig" do
102
- optional :push_endpoint, :string, 1
103
- map :attributes, :string, :string, 2
104
- oneof :authentication_method do
105
- optional :oidc_token, :message, 3, "google.pubsub.v1.PushConfig.OidcToken"
106
- end
107
- end
108
- add_message "google.pubsub.v1.PushConfig.OidcToken" do
109
- optional :service_account_email, :string, 1
110
- optional :audience, :string, 2
111
- end
112
- add_message "google.pubsub.v1.ReceivedMessage" do
113
- optional :ack_id, :string, 1
114
- optional :message, :message, 2, "google.pubsub.v1.PubsubMessage"
115
- optional :delivery_attempt, :int32, 3
116
- end
117
- add_message "google.pubsub.v1.GetSubscriptionRequest" do
118
- optional :subscription, :string, 1
119
- end
120
- add_message "google.pubsub.v1.UpdateSubscriptionRequest" do
121
- optional :subscription, :message, 1, "google.pubsub.v1.Subscription"
122
- optional :update_mask, :message, 2, "google.protobuf.FieldMask"
123
- end
124
- add_message "google.pubsub.v1.ListSubscriptionsRequest" do
125
- optional :project, :string, 1
126
- optional :page_size, :int32, 2
127
- optional :page_token, :string, 3
128
- end
129
- add_message "google.pubsub.v1.ListSubscriptionsResponse" do
130
- repeated :subscriptions, :message, 1, "google.pubsub.v1.Subscription"
131
- optional :next_page_token, :string, 2
132
- end
133
- add_message "google.pubsub.v1.DeleteSubscriptionRequest" do
134
- optional :subscription, :string, 1
135
- end
136
- add_message "google.pubsub.v1.ModifyPushConfigRequest" do
137
- optional :subscription, :string, 1
138
- optional :push_config, :message, 2, "google.pubsub.v1.PushConfig"
139
- end
140
- add_message "google.pubsub.v1.PullRequest" do
141
- optional :subscription, :string, 1
142
- optional :return_immediately, :bool, 2
143
- optional :max_messages, :int32, 3
144
- end
145
- add_message "google.pubsub.v1.PullResponse" do
146
- repeated :received_messages, :message, 1, "google.pubsub.v1.ReceivedMessage"
147
- end
148
- add_message "google.pubsub.v1.ModifyAckDeadlineRequest" do
149
- optional :subscription, :string, 1
150
- repeated :ack_ids, :string, 4
151
- optional :ack_deadline_seconds, :int32, 3
152
- end
153
- add_message "google.pubsub.v1.AcknowledgeRequest" do
154
- optional :subscription, :string, 1
155
- repeated :ack_ids, :string, 2
156
- end
157
- add_message "google.pubsub.v1.StreamingPullRequest" do
158
- optional :subscription, :string, 1
159
- repeated :ack_ids, :string, 2
160
- repeated :modify_deadline_seconds, :int32, 3
161
- repeated :modify_deadline_ack_ids, :string, 4
162
- optional :stream_ack_deadline_seconds, :int32, 5
163
- optional :client_id, :string, 6
164
- end
165
- add_message "google.pubsub.v1.StreamingPullResponse" do
166
- repeated :received_messages, :message, 1, "google.pubsub.v1.ReceivedMessage"
167
- end
168
- add_message "google.pubsub.v1.CreateSnapshotRequest" do
169
- optional :name, :string, 1
170
- optional :subscription, :string, 2
171
- map :labels, :string, :string, 3
172
- end
173
- add_message "google.pubsub.v1.UpdateSnapshotRequest" do
174
- optional :snapshot, :message, 1, "google.pubsub.v1.Snapshot"
175
- optional :update_mask, :message, 2, "google.protobuf.FieldMask"
176
- end
177
- add_message "google.pubsub.v1.Snapshot" do
178
- optional :name, :string, 1
179
- optional :topic, :string, 2
180
- optional :expire_time, :message, 3, "google.protobuf.Timestamp"
181
- map :labels, :string, :string, 4
182
- end
183
- add_message "google.pubsub.v1.GetSnapshotRequest" do
184
- optional :snapshot, :string, 1
185
- end
186
- add_message "google.pubsub.v1.ListSnapshotsRequest" do
187
- optional :project, :string, 1
188
- optional :page_size, :int32, 2
189
- optional :page_token, :string, 3
190
- end
191
- add_message "google.pubsub.v1.ListSnapshotsResponse" do
192
- repeated :snapshots, :message, 1, "google.pubsub.v1.Snapshot"
193
- optional :next_page_token, :string, 2
194
- end
195
- add_message "google.pubsub.v1.DeleteSnapshotRequest" do
196
- optional :snapshot, :string, 1
197
- end
198
- add_message "google.pubsub.v1.SeekRequest" do
199
- optional :subscription, :string, 1
200
- oneof :target do
201
- optional :time, :message, 2, "google.protobuf.Timestamp"
202
- optional :snapshot, :string, 3
203
- end
204
- end
205
- add_message "google.pubsub.v1.SeekResponse" do
206
- end
207
- end
208
-
209
- module Google
210
- module Cloud
211
- module PubSub
212
- end
213
- end
214
- Pubsub = Cloud::PubSub unless const_defined? :Pubsub
215
- end
216
- module Google::Cloud::PubSub::V1
217
- MessageStoragePolicy = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.MessageStoragePolicy").msgclass
218
- Topic = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.Topic").msgclass
219
- PubsubMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PubsubMessage").msgclass
220
- GetTopicRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.GetTopicRequest").msgclass
221
- UpdateTopicRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.UpdateTopicRequest").msgclass
222
- PublishRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PublishRequest").msgclass
223
- PublishResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PublishResponse").msgclass
224
- ListTopicsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListTopicsRequest").msgclass
225
- ListTopicsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListTopicsResponse").msgclass
226
- ListTopicSubscriptionsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListTopicSubscriptionsRequest").msgclass
227
- ListTopicSubscriptionsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListTopicSubscriptionsResponse").msgclass
228
- ListTopicSnapshotsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListTopicSnapshotsRequest").msgclass
229
- ListTopicSnapshotsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListTopicSnapshotsResponse").msgclass
230
- DeleteTopicRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.DeleteTopicRequest").msgclass
231
- Subscription = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.Subscription").msgclass
232
- RetryPolicy = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.RetryPolicy").msgclass
233
- DeadLetterPolicy = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.DeadLetterPolicy").msgclass
234
- ExpirationPolicy = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ExpirationPolicy").msgclass
235
- PushConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PushConfig").msgclass
236
- PushConfig::OidcToken = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PushConfig.OidcToken").msgclass
237
- ReceivedMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ReceivedMessage").msgclass
238
- GetSubscriptionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.GetSubscriptionRequest").msgclass
239
- UpdateSubscriptionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.UpdateSubscriptionRequest").msgclass
240
- ListSubscriptionsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListSubscriptionsRequest").msgclass
241
- ListSubscriptionsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListSubscriptionsResponse").msgclass
242
- DeleteSubscriptionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.DeleteSubscriptionRequest").msgclass
243
- ModifyPushConfigRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ModifyPushConfigRequest").msgclass
244
- PullRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PullRequest").msgclass
245
- PullResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PullResponse").msgclass
246
- ModifyAckDeadlineRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ModifyAckDeadlineRequest").msgclass
247
- AcknowledgeRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.AcknowledgeRequest").msgclass
248
- StreamingPullRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.StreamingPullRequest").msgclass
249
- StreamingPullResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.StreamingPullResponse").msgclass
250
- CreateSnapshotRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.CreateSnapshotRequest").msgclass
251
- UpdateSnapshotRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.UpdateSnapshotRequest").msgclass
252
- Snapshot = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.Snapshot").msgclass
253
- GetSnapshotRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.GetSnapshotRequest").msgclass
254
- ListSnapshotsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListSnapshotsRequest").msgclass
255
- ListSnapshotsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListSnapshotsResponse").msgclass
256
- DeleteSnapshotRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.DeleteSnapshotRequest").msgclass
257
- SeekRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.SeekRequest").msgclass
258
- SeekResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.SeekResponse").msgclass
259
- end
@@ -1,210 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # Source: google/pubsub/v1/pubsub.proto for package 'Google::Cloud::PubSub::V1'
3
- # Original file comments:
4
- # Copyright 2020 Google LLC
5
- #
6
- # Licensed under the Apache License, Version 2.0 (the "License");
7
- # you may not use this file except in compliance with the License.
8
- # You may obtain a copy of the License at
9
- #
10
- # http://www.apache.org/licenses/LICENSE-2.0
11
- #
12
- # Unless required by applicable law or agreed to in writing, software
13
- # distributed under the License is distributed on an "AS IS" BASIS,
14
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- # See the License for the specific language governing permissions and
16
- # limitations under the License.
17
- #
18
-
19
-
20
- require 'grpc'
21
- require 'google/pubsub/v1/pubsub_pb'
22
-
23
- module Google
24
- module Cloud
25
- module PubSub
26
- end
27
- end
28
- Pubsub = Cloud::PubSub unless const_defined? :Pubsub
29
- end
30
- module Google::Cloud::PubSub::V1
31
- module Publisher
32
- # The service that an application uses to manipulate topics, and to send
33
- # messages to a topic.
34
- class Service
35
-
36
- include GRPC::GenericService
37
-
38
- self.marshal_class_method = :encode
39
- self.unmarshal_class_method = :decode
40
- self.service_name = 'google.pubsub.v1.Publisher'
41
-
42
- # Creates the given topic with the given name. See the
43
- # <a href="https://cloud.google.com/pubsub/docs/admin#resource_names">
44
- # resource name rules</a>.
45
- rpc :CreateTopic, Topic, Topic
46
- # Updates an existing topic. Note that certain properties of a
47
- # topic are not modifiable.
48
- rpc :UpdateTopic, UpdateTopicRequest, Topic
49
- # Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
50
- # does not exist.
51
- rpc :Publish, PublishRequest, PublishResponse
52
- # Gets the configuration of a topic.
53
- rpc :GetTopic, GetTopicRequest, Topic
54
- # Lists matching topics.
55
- rpc :ListTopics, ListTopicsRequest, ListTopicsResponse
56
- # Lists the names of the subscriptions on this topic.
57
- rpc :ListTopicSubscriptions, ListTopicSubscriptionsRequest, ListTopicSubscriptionsResponse
58
- # Lists the names of the snapshots on this topic. Snapshots are used in
59
- # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
60
- # operations, which allow
61
- # you to manage message acknowledgments in bulk. That is, you can set the
62
- # acknowledgment state of messages in an existing subscription to the state
63
- # captured by a snapshot.
64
- rpc :ListTopicSnapshots, ListTopicSnapshotsRequest, ListTopicSnapshotsResponse
65
- # Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
66
- # does not exist. After a topic is deleted, a new topic may be created with
67
- # the same name; this is an entirely new topic with none of the old
68
- # configuration or subscriptions. Existing subscriptions to this topic are
69
- # not deleted, but their `topic` field is set to `_deleted-topic_`.
70
- rpc :DeleteTopic, DeleteTopicRequest, Google::Protobuf::Empty
71
- end
72
-
73
- Stub = Service.rpc_stub_class
74
- end
75
- module Subscriber
76
- # The service that an application uses to manipulate subscriptions and to
77
- # consume messages from a subscription via the `Pull` method or by
78
- # establishing a bi-directional stream using the `StreamingPull` method.
79
- class Service
80
-
81
- include GRPC::GenericService
82
-
83
- self.marshal_class_method = :encode
84
- self.unmarshal_class_method = :decode
85
- self.service_name = 'google.pubsub.v1.Subscriber'
86
-
87
- # Creates a subscription to a given topic. See the
88
- # <a href="https://cloud.google.com/pubsub/docs/admin#resource_names">
89
- # resource name rules</a>.
90
- # If the subscription already exists, returns `ALREADY_EXISTS`.
91
- # If the corresponding topic doesn't exist, returns `NOT_FOUND`.
92
- #
93
- # If the name is not provided in the request, the server will assign a random
94
- # name for this subscription on the same project as the topic, conforming
95
- # to the
96
- # [resource name
97
- # format](https://cloud.google.com/pubsub/docs/admin#resource_names). The
98
- # generated name is populated in the returned Subscription object. Note that
99
- # for REST API requests, you must specify a name in the request.
100
- rpc :CreateSubscription, Subscription, Subscription
101
- # Gets the configuration details of a subscription.
102
- rpc :GetSubscription, GetSubscriptionRequest, Subscription
103
- # Updates an existing subscription. Note that certain properties of a
104
- # subscription, such as its topic, are not modifiable.
105
- rpc :UpdateSubscription, UpdateSubscriptionRequest, Subscription
106
- # Lists matching subscriptions.
107
- rpc :ListSubscriptions, ListSubscriptionsRequest, ListSubscriptionsResponse
108
- # Deletes an existing subscription. All messages retained in the subscription
109
- # are immediately dropped. Calls to `Pull` after deletion will return
110
- # `NOT_FOUND`. After a subscription is deleted, a new one may be created with
111
- # the same name, but the new one has no association with the old
112
- # subscription or its topic unless the same topic is specified.
113
- rpc :DeleteSubscription, DeleteSubscriptionRequest, Google::Protobuf::Empty
114
- # Modifies the ack deadline for a specific message. This method is useful
115
- # to indicate that more time is needed to process a message by the
116
- # subscriber, or to make the message available for redelivery if the
117
- # processing was interrupted. Note that this does not modify the
118
- # subscription-level `ackDeadlineSeconds` used for subsequent messages.
119
- rpc :ModifyAckDeadline, ModifyAckDeadlineRequest, Google::Protobuf::Empty
120
- # Acknowledges the messages associated with the `ack_ids` in the
121
- # `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages
122
- # from the subscription.
123
- #
124
- # Acknowledging a message whose ack deadline has expired may succeed,
125
- # but such a message may be redelivered later. Acknowledging a message more
126
- # than once will not result in an error.
127
- rpc :Acknowledge, AcknowledgeRequest, Google::Protobuf::Empty
128
- # Pulls messages from the server. The server may return `UNAVAILABLE` if
129
- # there are too many concurrent pull requests pending for the given
130
- # subscription.
131
- rpc :Pull, PullRequest, PullResponse
132
- # Establishes a stream with the server, which sends messages down to the
133
- # client. The client streams acknowledgements and ack deadline modifications
134
- # back to the server. The server will close the stream and return the status
135
- # on any error. The server may close the stream with status `UNAVAILABLE` to
136
- # reassign server-side resources, in which case, the client should
137
- # re-establish the stream. Flow control can be achieved by configuring the
138
- # underlying RPC channel.
139
- rpc :StreamingPull, stream(StreamingPullRequest), stream(StreamingPullResponse)
140
- # Modifies the `PushConfig` for a specified subscription.
141
- #
142
- # This may be used to change a push subscription to a pull one (signified by
143
- # an empty `PushConfig`) or vice versa, or change the endpoint URL and other
144
- # attributes of a push subscription. Messages will accumulate for delivery
145
- # continuously through the call regardless of changes to the `PushConfig`.
146
- rpc :ModifyPushConfig, ModifyPushConfigRequest, Google::Protobuf::Empty
147
- # Gets the configuration details of a snapshot. Snapshots are used in
148
- # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
149
- # operations, which allow you to manage message acknowledgments in bulk. That
150
- # is, you can set the acknowledgment state of messages in an existing
151
- # subscription to the state captured by a snapshot.
152
- rpc :GetSnapshot, GetSnapshotRequest, Snapshot
153
- # Lists the existing snapshots. Snapshots are used in
154
- # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
155
- # operations, which allow
156
- # you to manage message acknowledgments in bulk. That is, you can set the
157
- # acknowledgment state of messages in an existing subscription to the state
158
- # captured by a snapshot.
159
- rpc :ListSnapshots, ListSnapshotsRequest, ListSnapshotsResponse
160
- # Creates a snapshot from the requested subscription. Snapshots are used in
161
- # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
162
- # operations, which allow
163
- # you to manage message acknowledgments in bulk. That is, you can set the
164
- # acknowledgment state of messages in an existing subscription to the state
165
- # captured by a snapshot.
166
- # <br><br>If the snapshot already exists, returns `ALREADY_EXISTS`.
167
- # If the requested subscription doesn't exist, returns `NOT_FOUND`.
168
- # If the backlog in the subscription is too old -- and the resulting snapshot
169
- # would expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned.
170
- # See also the `Snapshot.expire_time` field. If the name is not provided in
171
- # the request, the server will assign a random
172
- # name for this snapshot on the same project as the subscription, conforming
173
- # to the
174
- # [resource name
175
- # format](https://cloud.google.com/pubsub/docs/admin#resource_names). The
176
- # generated name is populated in the returned Snapshot object. Note that for
177
- # REST API requests, you must specify a name in the request.
178
- rpc :CreateSnapshot, CreateSnapshotRequest, Snapshot
179
- # Updates an existing snapshot. Snapshots are used in
180
- # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
181
- # operations, which allow
182
- # you to manage message acknowledgments in bulk. That is, you can set the
183
- # acknowledgment state of messages in an existing subscription to the state
184
- # captured by a snapshot.
185
- rpc :UpdateSnapshot, UpdateSnapshotRequest, Snapshot
186
- # Removes an existing snapshot. Snapshots are used in
187
- # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
188
- # operations, which allow
189
- # you to manage message acknowledgments in bulk. That is, you can set the
190
- # acknowledgment state of messages in an existing subscription to the state
191
- # captured by a snapshot.<br><br>
192
- # When the snapshot is deleted, all messages retained in the snapshot
193
- # are immediately dropped. After a snapshot is deleted, a new one may be
194
- # created with the same name, but the new one has no association with the old
195
- # snapshot or its subscription, unless the same subscription is specified.
196
- rpc :DeleteSnapshot, DeleteSnapshotRequest, Google::Protobuf::Empty
197
- # Seeks an existing subscription to a point in time or to a given snapshot,
198
- # whichever is provided in the request. Snapshots are used in
199
- # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
200
- # operations, which allow
201
- # you to manage message acknowledgments in bulk. That is, you can set the
202
- # acknowledgment state of messages in an existing subscription to the state
203
- # captured by a snapshot. Note that both the subscription and the snapshot
204
- # must be on the same topic.
205
- rpc :Seek, SeekRequest, SeekResponse
206
- end
207
-
208
- Stub = Service.rpc_stub_class
209
- end
210
- end