google-cloud-pubsub 1.8.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +2 -1
  3. data/CHANGELOG.md +53 -0
  4. data/OVERVIEW.md +26 -58
  5. data/lib/google-cloud-pubsub.rb +14 -13
  6. data/lib/google/cloud/pubsub.rb +15 -18
  7. data/lib/google/cloud/pubsub/async_publisher.rb +2 -3
  8. data/lib/google/cloud/pubsub/credentials.rb +2 -2
  9. data/lib/google/cloud/pubsub/message.rb +1 -1
  10. data/lib/google/cloud/pubsub/project.rb +1 -1
  11. data/lib/google/cloud/pubsub/received_message.rb +4 -4
  12. data/lib/google/cloud/pubsub/service.rb +110 -257
  13. data/lib/google/cloud/pubsub/subscriber.rb +3 -3
  14. data/lib/google/cloud/pubsub/subscriber/stream.rb +3 -2
  15. data/lib/google/cloud/pubsub/subscription.rb +76 -12
  16. data/lib/google/cloud/pubsub/subscription/push_config.rb +55 -31
  17. data/lib/google/cloud/pubsub/topic.rb +50 -15
  18. data/lib/google/cloud/pubsub/version.rb +1 -1
  19. metadata +8 -79
  20. data/lib/google/cloud/pubsub/v1.rb +0 -17
  21. data/lib/google/cloud/pubsub/v1/credentials.rb +0 -41
  22. data/lib/google/cloud/pubsub/v1/doc/google/iam/v1/iam_policy.rb +0 -21
  23. data/lib/google/cloud/pubsub/v1/doc/google/iam/v1/options.rb +0 -21
  24. data/lib/google/cloud/pubsub/v1/doc/google/iam/v1/policy.rb +0 -21
  25. data/lib/google/cloud/pubsub/v1/doc/google/protobuf/duration.rb +0 -91
  26. data/lib/google/cloud/pubsub/v1/doc/google/protobuf/empty.rb +0 -29
  27. data/lib/google/cloud/pubsub/v1/doc/google/protobuf/field_mask.rb +0 -222
  28. data/lib/google/cloud/pubsub/v1/doc/google/protobuf/timestamp.rb +0 -113
  29. data/lib/google/cloud/pubsub/v1/doc/google/pubsub/v1/pubsub.rb +0 -833
  30. data/lib/google/cloud/pubsub/v1/doc/google/type/expr.rb +0 -19
  31. data/lib/google/cloud/pubsub/v1/publisher_client.rb +0 -928
  32. data/lib/google/cloud/pubsub/v1/publisher_client_config.json +0 -120
  33. data/lib/google/cloud/pubsub/v1/subscriber_client.rb +0 -1466
  34. data/lib/google/cloud/pubsub/v1/subscriber_client_config.json +0 -153
  35. data/lib/google/pubsub/v1/pubsub_pb.rb +0 -269
  36. data/lib/google/pubsub/v1/pubsub_services_pb.rb +0 -215
@@ -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,269 +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.DetachSubscriptionRequest" do
77
- optional :subscription, :string, 1
78
- end
79
- add_message "google.pubsub.v1.DetachSubscriptionResponse" do
80
- end
81
- add_message "google.pubsub.v1.Subscription" do
82
- optional :name, :string, 1
83
- optional :topic, :string, 2
84
- optional :push_config, :message, 4, "google.pubsub.v1.PushConfig"
85
- optional :ack_deadline_seconds, :int32, 5
86
- optional :retain_acked_messages, :bool, 7
87
- optional :message_retention_duration, :message, 8, "google.protobuf.Duration"
88
- map :labels, :string, :string, 9
89
- optional :enable_message_ordering, :bool, 10
90
- optional :expiration_policy, :message, 11, "google.pubsub.v1.ExpirationPolicy"
91
- optional :filter, :string, 12
92
- optional :dead_letter_policy, :message, 13, "google.pubsub.v1.DeadLetterPolicy"
93
- optional :retry_policy, :message, 14, "google.pubsub.v1.RetryPolicy"
94
- optional :detached, :bool, 15
95
- end
96
- add_message "google.pubsub.v1.RetryPolicy" do
97
- optional :minimum_backoff, :message, 1, "google.protobuf.Duration"
98
- optional :maximum_backoff, :message, 2, "google.protobuf.Duration"
99
- end
100
- add_message "google.pubsub.v1.DeadLetterPolicy" do
101
- optional :dead_letter_topic, :string, 1
102
- optional :max_delivery_attempts, :int32, 2
103
- end
104
- add_message "google.pubsub.v1.ExpirationPolicy" do
105
- optional :ttl, :message, 1, "google.protobuf.Duration"
106
- end
107
- add_message "google.pubsub.v1.PushConfig" do
108
- optional :push_endpoint, :string, 1
109
- map :attributes, :string, :string, 2
110
- oneof :authentication_method do
111
- optional :oidc_token, :message, 3, "google.pubsub.v1.PushConfig.OidcToken"
112
- end
113
- end
114
- add_message "google.pubsub.v1.PushConfig.OidcToken" do
115
- optional :service_account_email, :string, 1
116
- optional :audience, :string, 2
117
- end
118
- add_message "google.pubsub.v1.ReceivedMessage" do
119
- optional :ack_id, :string, 1
120
- optional :message, :message, 2, "google.pubsub.v1.PubsubMessage"
121
- optional :delivery_attempt, :int32, 3
122
- end
123
- add_message "google.pubsub.v1.GetSubscriptionRequest" do
124
- optional :subscription, :string, 1
125
- end
126
- add_message "google.pubsub.v1.UpdateSubscriptionRequest" do
127
- optional :subscription, :message, 1, "google.pubsub.v1.Subscription"
128
- optional :update_mask, :message, 2, "google.protobuf.FieldMask"
129
- end
130
- add_message "google.pubsub.v1.ListSubscriptionsRequest" do
131
- optional :project, :string, 1
132
- optional :page_size, :int32, 2
133
- optional :page_token, :string, 3
134
- end
135
- add_message "google.pubsub.v1.ListSubscriptionsResponse" do
136
- repeated :subscriptions, :message, 1, "google.pubsub.v1.Subscription"
137
- optional :next_page_token, :string, 2
138
- end
139
- add_message "google.pubsub.v1.DeleteSubscriptionRequest" do
140
- optional :subscription, :string, 1
141
- end
142
- add_message "google.pubsub.v1.ModifyPushConfigRequest" do
143
- optional :subscription, :string, 1
144
- optional :push_config, :message, 2, "google.pubsub.v1.PushConfig"
145
- end
146
- add_message "google.pubsub.v1.PullRequest" do
147
- optional :subscription, :string, 1
148
- optional :return_immediately, :bool, 2
149
- optional :max_messages, :int32, 3
150
- end
151
- add_message "google.pubsub.v1.PullResponse" do
152
- repeated :received_messages, :message, 1, "google.pubsub.v1.ReceivedMessage"
153
- end
154
- add_message "google.pubsub.v1.ModifyAckDeadlineRequest" do
155
- optional :subscription, :string, 1
156
- repeated :ack_ids, :string, 4
157
- optional :ack_deadline_seconds, :int32, 3
158
- end
159
- add_message "google.pubsub.v1.AcknowledgeRequest" do
160
- optional :subscription, :string, 1
161
- repeated :ack_ids, :string, 2
162
- end
163
- add_message "google.pubsub.v1.StreamingPullRequest" do
164
- optional :subscription, :string, 1
165
- repeated :ack_ids, :string, 2
166
- repeated :modify_deadline_seconds, :int32, 3
167
- repeated :modify_deadline_ack_ids, :string, 4
168
- optional :stream_ack_deadline_seconds, :int32, 5
169
- optional :client_id, :string, 6
170
- optional :max_outstanding_messages, :int64, 7
171
- optional :max_outstanding_bytes, :int64, 8
172
- end
173
- add_message "google.pubsub.v1.StreamingPullResponse" do
174
- repeated :received_messages, :message, 1, "google.pubsub.v1.ReceivedMessage"
175
- end
176
- add_message "google.pubsub.v1.CreateSnapshotRequest" do
177
- optional :name, :string, 1
178
- optional :subscription, :string, 2
179
- map :labels, :string, :string, 3
180
- end
181
- add_message "google.pubsub.v1.UpdateSnapshotRequest" do
182
- optional :snapshot, :message, 1, "google.pubsub.v1.Snapshot"
183
- optional :update_mask, :message, 2, "google.protobuf.FieldMask"
184
- end
185
- add_message "google.pubsub.v1.Snapshot" do
186
- optional :name, :string, 1
187
- optional :topic, :string, 2
188
- optional :expire_time, :message, 3, "google.protobuf.Timestamp"
189
- map :labels, :string, :string, 4
190
- end
191
- add_message "google.pubsub.v1.GetSnapshotRequest" do
192
- optional :snapshot, :string, 1
193
- end
194
- add_message "google.pubsub.v1.ListSnapshotsRequest" do
195
- optional :project, :string, 1
196
- optional :page_size, :int32, 2
197
- optional :page_token, :string, 3
198
- end
199
- add_message "google.pubsub.v1.ListSnapshotsResponse" do
200
- repeated :snapshots, :message, 1, "google.pubsub.v1.Snapshot"
201
- optional :next_page_token, :string, 2
202
- end
203
- add_message "google.pubsub.v1.DeleteSnapshotRequest" do
204
- optional :snapshot, :string, 1
205
- end
206
- add_message "google.pubsub.v1.SeekRequest" do
207
- optional :subscription, :string, 1
208
- oneof :target do
209
- optional :time, :message, 2, "google.protobuf.Timestamp"
210
- optional :snapshot, :string, 3
211
- end
212
- end
213
- add_message "google.pubsub.v1.SeekResponse" do
214
- end
215
- end
216
-
217
- module Google
218
- module Cloud
219
- module PubSub
220
- end
221
- end
222
- Pubsub = Cloud::PubSub unless const_defined? :Pubsub
223
- end
224
- module Google::Cloud::PubSub::V1
225
- MessageStoragePolicy = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.MessageStoragePolicy").msgclass
226
- Topic = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.Topic").msgclass
227
- PubsubMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PubsubMessage").msgclass
228
- GetTopicRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.GetTopicRequest").msgclass
229
- UpdateTopicRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.UpdateTopicRequest").msgclass
230
- PublishRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PublishRequest").msgclass
231
- PublishResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PublishResponse").msgclass
232
- ListTopicsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListTopicsRequest").msgclass
233
- ListTopicsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListTopicsResponse").msgclass
234
- ListTopicSubscriptionsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListTopicSubscriptionsRequest").msgclass
235
- ListTopicSubscriptionsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListTopicSubscriptionsResponse").msgclass
236
- ListTopicSnapshotsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListTopicSnapshotsRequest").msgclass
237
- ListTopicSnapshotsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListTopicSnapshotsResponse").msgclass
238
- DeleteTopicRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.DeleteTopicRequest").msgclass
239
- DetachSubscriptionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.DetachSubscriptionRequest").msgclass
240
- DetachSubscriptionResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.DetachSubscriptionResponse").msgclass
241
- Subscription = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.Subscription").msgclass
242
- RetryPolicy = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.RetryPolicy").msgclass
243
- DeadLetterPolicy = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.DeadLetterPolicy").msgclass
244
- ExpirationPolicy = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ExpirationPolicy").msgclass
245
- PushConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PushConfig").msgclass
246
- PushConfig::OidcToken = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PushConfig.OidcToken").msgclass
247
- ReceivedMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ReceivedMessage").msgclass
248
- GetSubscriptionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.GetSubscriptionRequest").msgclass
249
- UpdateSubscriptionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.UpdateSubscriptionRequest").msgclass
250
- ListSubscriptionsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListSubscriptionsRequest").msgclass
251
- ListSubscriptionsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListSubscriptionsResponse").msgclass
252
- DeleteSubscriptionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.DeleteSubscriptionRequest").msgclass
253
- ModifyPushConfigRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ModifyPushConfigRequest").msgclass
254
- PullRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PullRequest").msgclass
255
- PullResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PullResponse").msgclass
256
- ModifyAckDeadlineRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ModifyAckDeadlineRequest").msgclass
257
- AcknowledgeRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.AcknowledgeRequest").msgclass
258
- StreamingPullRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.StreamingPullRequest").msgclass
259
- StreamingPullResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.StreamingPullResponse").msgclass
260
- CreateSnapshotRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.CreateSnapshotRequest").msgclass
261
- UpdateSnapshotRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.UpdateSnapshotRequest").msgclass
262
- Snapshot = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.Snapshot").msgclass
263
- GetSnapshotRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.GetSnapshotRequest").msgclass
264
- ListSnapshotsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListSnapshotsRequest").msgclass
265
- ListSnapshotsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListSnapshotsResponse").msgclass
266
- DeleteSnapshotRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.DeleteSnapshotRequest").msgclass
267
- SeekRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.SeekRequest").msgclass
268
- SeekResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.SeekResponse").msgclass
269
- end
@@ -1,215 +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 attached 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
- # Detaches a subscription from this topic. All messages retained in the
72
- # subscription are dropped. Subsequent `Pull` and `StreamingPull` requests
73
- # will return FAILED_PRECONDITION. If the subscription is a push
74
- # subscription, pushes to the endpoint will stop.
75
- rpc :DetachSubscription, DetachSubscriptionRequest, DetachSubscriptionResponse
76
- end
77
-
78
- Stub = Service.rpc_stub_class
79
- end
80
- module Subscriber
81
- # The service that an application uses to manipulate subscriptions and to
82
- # consume messages from a subscription via the `Pull` method or by
83
- # establishing a bi-directional stream using the `StreamingPull` method.
84
- class Service
85
-
86
- include GRPC::GenericService
87
-
88
- self.marshal_class_method = :encode
89
- self.unmarshal_class_method = :decode
90
- self.service_name = 'google.pubsub.v1.Subscriber'
91
-
92
- # Creates a subscription to a given topic. See the
93
- # <a href="https://cloud.google.com/pubsub/docs/admin#resource_names">
94
- # resource name rules</a>.
95
- # If the subscription already exists, returns `ALREADY_EXISTS`.
96
- # If the corresponding topic doesn't exist, returns `NOT_FOUND`.
97
- #
98
- # If the name is not provided in the request, the server will assign a random
99
- # name for this subscription on the same project as the topic, conforming
100
- # to the
101
- # [resource name
102
- # format](https://cloud.google.com/pubsub/docs/admin#resource_names). The
103
- # generated name is populated in the returned Subscription object. Note that
104
- # for REST API requests, you must specify a name in the request.
105
- rpc :CreateSubscription, Subscription, Subscription
106
- # Gets the configuration details of a subscription.
107
- rpc :GetSubscription, GetSubscriptionRequest, Subscription
108
- # Updates an existing subscription. Note that certain properties of a
109
- # subscription, such as its topic, are not modifiable.
110
- rpc :UpdateSubscription, UpdateSubscriptionRequest, Subscription
111
- # Lists matching subscriptions.
112
- rpc :ListSubscriptions, ListSubscriptionsRequest, ListSubscriptionsResponse
113
- # Deletes an existing subscription. All messages retained in the subscription
114
- # are immediately dropped. Calls to `Pull` after deletion will return
115
- # `NOT_FOUND`. After a subscription is deleted, a new one may be created with
116
- # the same name, but the new one has no association with the old
117
- # subscription or its topic unless the same topic is specified.
118
- rpc :DeleteSubscription, DeleteSubscriptionRequest, Google::Protobuf::Empty
119
- # Modifies the ack deadline for a specific message. This method is useful
120
- # to indicate that more time is needed to process a message by the
121
- # subscriber, or to make the message available for redelivery if the
122
- # processing was interrupted. Note that this does not modify the
123
- # subscription-level `ackDeadlineSeconds` used for subsequent messages.
124
- rpc :ModifyAckDeadline, ModifyAckDeadlineRequest, Google::Protobuf::Empty
125
- # Acknowledges the messages associated with the `ack_ids` in the
126
- # `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages
127
- # from the subscription.
128
- #
129
- # Acknowledging a message whose ack deadline has expired may succeed,
130
- # but such a message may be redelivered later. Acknowledging a message more
131
- # than once will not result in an error.
132
- rpc :Acknowledge, AcknowledgeRequest, Google::Protobuf::Empty
133
- # Pulls messages from the server. The server may return `UNAVAILABLE` if
134
- # there are too many concurrent pull requests pending for the given
135
- # subscription.
136
- rpc :Pull, PullRequest, PullResponse
137
- # Establishes a stream with the server, which sends messages down to the
138
- # client. The client streams acknowledgements and ack deadline modifications
139
- # back to the server. The server will close the stream and return the status
140
- # on any error. The server may close the stream with status `UNAVAILABLE` to
141
- # reassign server-side resources, in which case, the client should
142
- # re-establish the stream. Flow control can be achieved by configuring the
143
- # underlying RPC channel.
144
- rpc :StreamingPull, stream(StreamingPullRequest), stream(StreamingPullResponse)
145
- # Modifies the `PushConfig` for a specified subscription.
146
- #
147
- # This may be used to change a push subscription to a pull one (signified by
148
- # an empty `PushConfig`) or vice versa, or change the endpoint URL and other
149
- # attributes of a push subscription. Messages will accumulate for delivery
150
- # continuously through the call regardless of changes to the `PushConfig`.
151
- rpc :ModifyPushConfig, ModifyPushConfigRequest, Google::Protobuf::Empty
152
- # Gets the configuration details of a snapshot. Snapshots are used in
153
- # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
154
- # operations, which allow you to manage message acknowledgments in bulk. That
155
- # is, you can set the acknowledgment state of messages in an existing
156
- # subscription to the state captured by a snapshot.
157
- rpc :GetSnapshot, GetSnapshotRequest, Snapshot
158
- # Lists the existing snapshots. Snapshots are used in
159
- # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
160
- # operations, which allow
161
- # you to manage message acknowledgments in bulk. That is, you can set the
162
- # acknowledgment state of messages in an existing subscription to the state
163
- # captured by a snapshot.
164
- rpc :ListSnapshots, ListSnapshotsRequest, ListSnapshotsResponse
165
- # Creates a snapshot from the requested subscription. Snapshots are used in
166
- # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
167
- # operations, which allow
168
- # you to manage message acknowledgments in bulk. That is, you can set the
169
- # acknowledgment state of messages in an existing subscription to the state
170
- # captured by a snapshot.
171
- # <br><br>If the snapshot already exists, returns `ALREADY_EXISTS`.
172
- # If the requested subscription doesn't exist, returns `NOT_FOUND`.
173
- # If the backlog in the subscription is too old -- and the resulting snapshot
174
- # would expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned.
175
- # See also the `Snapshot.expire_time` field. If the name is not provided in
176
- # the request, the server will assign a random
177
- # name for this snapshot on the same project as the subscription, conforming
178
- # to the
179
- # [resource name
180
- # format](https://cloud.google.com/pubsub/docs/admin#resource_names). The
181
- # generated name is populated in the returned Snapshot object. Note that for
182
- # REST API requests, you must specify a name in the request.
183
- rpc :CreateSnapshot, CreateSnapshotRequest, Snapshot
184
- # Updates an existing snapshot. Snapshots are used in
185
- # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
186
- # operations, which allow
187
- # you to manage message acknowledgments in bulk. That is, you can set the
188
- # acknowledgment state of messages in an existing subscription to the state
189
- # captured by a snapshot.
190
- rpc :UpdateSnapshot, UpdateSnapshotRequest, Snapshot
191
- # Removes an existing snapshot. Snapshots are used in
192
- # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
193
- # operations, which allow
194
- # you to manage message acknowledgments in bulk. That is, you can set the
195
- # acknowledgment state of messages in an existing subscription to the state
196
- # captured by a snapshot.<br><br>
197
- # When the snapshot is deleted, all messages retained in the snapshot
198
- # are immediately dropped. After a snapshot is deleted, a new one may be
199
- # created with the same name, but the new one has no association with the old
200
- # snapshot or its subscription, unless the same subscription is specified.
201
- rpc :DeleteSnapshot, DeleteSnapshotRequest, Google::Protobuf::Empty
202
- # Seeks an existing subscription to a point in time or to a given snapshot,
203
- # whichever is provided in the request. Snapshots are used in
204
- # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
205
- # operations, which allow
206
- # you to manage message acknowledgments in bulk. That is, you can set the
207
- # acknowledgment state of messages in an existing subscription to the state
208
- # captured by a snapshot. Note that both the subscription and the snapshot
209
- # must be on the same topic.
210
- rpc :Seek, SeekRequest, SeekResponse
211
- end
212
-
213
- Stub = Service.rpc_stub_class
214
- end
215
- end