google-cloud-pubsub 0.33.2 → 0.34.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +4 -4
  3. data/CHANGELOG.md +45 -0
  4. data/EMULATOR.md +2 -2
  5. data/OVERVIEW.md +81 -43
  6. data/lib/google-cloud-pubsub.rb +10 -7
  7. data/lib/google/cloud/pubsub.rb +38 -21
  8. data/lib/google/cloud/pubsub/async_publisher.rb +8 -6
  9. data/lib/google/cloud/pubsub/batch_publisher.rb +7 -5
  10. data/lib/google/cloud/pubsub/convert.rb +5 -3
  11. data/lib/google/cloud/pubsub/credentials.rb +6 -4
  12. data/lib/google/cloud/pubsub/message.rb +9 -6
  13. data/lib/google/cloud/pubsub/policy.rb +12 -10
  14. data/lib/google/cloud/pubsub/project.rb +30 -28
  15. data/lib/google/cloud/pubsub/publish_result.rb +3 -1
  16. data/lib/google/cloud/pubsub/received_message.rb +11 -10
  17. data/lib/google/cloud/pubsub/service.rb +47 -37
  18. data/lib/google/cloud/pubsub/snapshot.rb +11 -9
  19. data/lib/google/cloud/pubsub/snapshot/list.rb +10 -8
  20. data/lib/google/cloud/pubsub/subscriber.rb +32 -6
  21. data/lib/google/cloud/pubsub/subscriber/enumerator_queue.rb +3 -1
  22. data/lib/google/cloud/pubsub/subscriber/inventory.rb +4 -2
  23. data/lib/google/cloud/pubsub/subscriber/stream.rb +23 -43
  24. data/lib/google/cloud/pubsub/subscriber/timed_unary_buffer.rb +221 -0
  25. data/lib/google/cloud/pubsub/subscription.rb +157 -80
  26. data/lib/google/cloud/pubsub/subscription/list.rb +12 -10
  27. data/lib/google/cloud/pubsub/topic.rb +79 -51
  28. data/lib/google/cloud/pubsub/topic/list.rb +10 -8
  29. data/lib/google/cloud/pubsub/v1/credentials.rb +4 -2
  30. data/lib/google/cloud/pubsub/v1/doc/google/iam/v1/iam_policy.rb +1 -43
  31. data/lib/google/cloud/pubsub/v1/doc/google/iam/v1/policy.rb +1 -108
  32. data/lib/google/cloud/pubsub/v1/doc/google/protobuf/duration.rb +1 -1
  33. data/lib/google/cloud/pubsub/v1/doc/google/protobuf/empty.rb +1 -1
  34. data/lib/google/cloud/pubsub/v1/doc/google/protobuf/field_mask.rb +1 -1
  35. data/lib/google/cloud/pubsub/v1/doc/google/protobuf/timestamp.rb +1 -1
  36. data/lib/google/cloud/pubsub/v1/doc/google/pubsub/v1/pubsub.rb +107 -61
  37. data/lib/google/cloud/pubsub/v1/publisher_client.rb +58 -55
  38. data/lib/google/cloud/pubsub/v1/publisher_client_config.json +0 -4
  39. data/lib/google/cloud/pubsub/v1/subscriber_client.rb +177 -128
  40. data/lib/google/cloud/pubsub/v1/subscriber_client_config.json +0 -4
  41. data/lib/google/cloud/pubsub/version.rb +4 -2
  42. data/lib/google/pubsub/v1/pubsub_pb.rb +48 -40
  43. data/lib/google/pubsub/v1/pubsub_services_pb.rb +201 -161
  44. metadata +6 -7
  45. data/lib/google/cloud/pubsub/subscriber/async_stream_pusher.rb +0 -223
  46. data/lib/google/cloud/pubsub/subscriber/async_unary_pusher.rb +0 -271
@@ -12,10 +12,6 @@
12
12
  "RESOURCE_EXHAUSTED",
13
13
  "UNAVAILABLE"
14
14
  ],
15
- "http_get": [
16
- "DEADLINE_EXCEEDED",
17
- "UNAVAILABLE"
18
- ],
19
15
  "non_idempotent": []
20
16
  },
21
17
  "retry_params": {
@@ -15,8 +15,10 @@
15
15
 
16
16
  module Google
17
17
  module Cloud
18
- module Pubsub
19
- VERSION = "0.33.2".freeze
18
+ module PubSub
19
+ VERSION = "0.34.0".freeze
20
20
  end
21
+
22
+ Pubsub = PubSub unless const_defined? :Pubsub
21
23
  end
22
24
  end
@@ -76,6 +76,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
76
76
  optional :retain_acked_messages, :bool, 7
77
77
  optional :message_retention_duration, :message, 8, "google.protobuf.Duration"
78
78
  map :labels, :string, :string, 9
79
+ optional :expiration_policy, :message, 11, "google.pubsub.v1.ExpirationPolicy"
80
+ end
81
+ add_message "google.pubsub.v1.ExpirationPolicy" do
82
+ optional :ttl, :message, 1, "google.protobuf.Duration"
79
83
  end
80
84
  add_message "google.pubsub.v1.PushConfig" do
81
85
  optional :push_endpoint, :string, 1
@@ -177,46 +181,50 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
177
181
  end
178
182
 
179
183
  module Google
180
- module Pubsub
181
- module V1
182
- MessageStoragePolicy = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.MessageStoragePolicy").msgclass
183
- Topic = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.Topic").msgclass
184
- PubsubMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PubsubMessage").msgclass
185
- GetTopicRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.GetTopicRequest").msgclass
186
- UpdateTopicRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.UpdateTopicRequest").msgclass
187
- PublishRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PublishRequest").msgclass
188
- PublishResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PublishResponse").msgclass
189
- ListTopicsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListTopicsRequest").msgclass
190
- ListTopicsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListTopicsResponse").msgclass
191
- ListTopicSubscriptionsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListTopicSubscriptionsRequest").msgclass
192
- ListTopicSubscriptionsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListTopicSubscriptionsResponse").msgclass
193
- ListTopicSnapshotsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListTopicSnapshotsRequest").msgclass
194
- ListTopicSnapshotsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListTopicSnapshotsResponse").msgclass
195
- DeleteTopicRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.DeleteTopicRequest").msgclass
196
- Subscription = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.Subscription").msgclass
197
- PushConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PushConfig").msgclass
198
- ReceivedMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ReceivedMessage").msgclass
199
- GetSubscriptionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.GetSubscriptionRequest").msgclass
200
- UpdateSubscriptionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.UpdateSubscriptionRequest").msgclass
201
- ListSubscriptionsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListSubscriptionsRequest").msgclass
202
- ListSubscriptionsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListSubscriptionsResponse").msgclass
203
- DeleteSubscriptionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.DeleteSubscriptionRequest").msgclass
204
- ModifyPushConfigRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ModifyPushConfigRequest").msgclass
205
- PullRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PullRequest").msgclass
206
- PullResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PullResponse").msgclass
207
- ModifyAckDeadlineRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ModifyAckDeadlineRequest").msgclass
208
- AcknowledgeRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.AcknowledgeRequest").msgclass
209
- StreamingPullRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.StreamingPullRequest").msgclass
210
- StreamingPullResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.StreamingPullResponse").msgclass
211
- CreateSnapshotRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.CreateSnapshotRequest").msgclass
212
- UpdateSnapshotRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.UpdateSnapshotRequest").msgclass
213
- Snapshot = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.Snapshot").msgclass
214
- GetSnapshotRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.GetSnapshotRequest").msgclass
215
- ListSnapshotsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListSnapshotsRequest").msgclass
216
- ListSnapshotsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListSnapshotsResponse").msgclass
217
- DeleteSnapshotRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.DeleteSnapshotRequest").msgclass
218
- SeekRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.SeekRequest").msgclass
219
- SeekResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.SeekResponse").msgclass
184
+ module Cloud
185
+ module PubSub
220
186
  end
221
187
  end
188
+ Pubsub = Cloud::PubSub unless const_defined? :Pubsub
189
+ end
190
+ module Google::Cloud::PubSub::V1
191
+ MessageStoragePolicy = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.MessageStoragePolicy").msgclass
192
+ Topic = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.Topic").msgclass
193
+ PubsubMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PubsubMessage").msgclass
194
+ GetTopicRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.GetTopicRequest").msgclass
195
+ UpdateTopicRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.UpdateTopicRequest").msgclass
196
+ PublishRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PublishRequest").msgclass
197
+ PublishResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PublishResponse").msgclass
198
+ ListTopicsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListTopicsRequest").msgclass
199
+ ListTopicsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListTopicsResponse").msgclass
200
+ ListTopicSubscriptionsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListTopicSubscriptionsRequest").msgclass
201
+ ListTopicSubscriptionsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListTopicSubscriptionsResponse").msgclass
202
+ ListTopicSnapshotsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListTopicSnapshotsRequest").msgclass
203
+ ListTopicSnapshotsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListTopicSnapshotsResponse").msgclass
204
+ DeleteTopicRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.DeleteTopicRequest").msgclass
205
+ Subscription = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.Subscription").msgclass
206
+ ExpirationPolicy = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ExpirationPolicy").msgclass
207
+ PushConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PushConfig").msgclass
208
+ ReceivedMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ReceivedMessage").msgclass
209
+ GetSubscriptionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.GetSubscriptionRequest").msgclass
210
+ UpdateSubscriptionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.UpdateSubscriptionRequest").msgclass
211
+ ListSubscriptionsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListSubscriptionsRequest").msgclass
212
+ ListSubscriptionsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListSubscriptionsResponse").msgclass
213
+ DeleteSubscriptionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.DeleteSubscriptionRequest").msgclass
214
+ ModifyPushConfigRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ModifyPushConfigRequest").msgclass
215
+ PullRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PullRequest").msgclass
216
+ PullResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PullResponse").msgclass
217
+ ModifyAckDeadlineRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ModifyAckDeadlineRequest").msgclass
218
+ AcknowledgeRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.AcknowledgeRequest").msgclass
219
+ StreamingPullRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.StreamingPullRequest").msgclass
220
+ StreamingPullResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.StreamingPullResponse").msgclass
221
+ CreateSnapshotRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.CreateSnapshotRequest").msgclass
222
+ UpdateSnapshotRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.UpdateSnapshotRequest").msgclass
223
+ Snapshot = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.Snapshot").msgclass
224
+ GetSnapshotRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.GetSnapshotRequest").msgclass
225
+ ListSnapshotsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListSnapshotsRequest").msgclass
226
+ ListSnapshotsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListSnapshotsResponse").msgclass
227
+ DeleteSnapshotRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.DeleteSnapshotRequest").msgclass
228
+ SeekRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.SeekRequest").msgclass
229
+ SeekResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.SeekResponse").msgclass
222
230
  end
@@ -1,7 +1,7 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # Source: google/pubsub/v1/pubsub.proto for package 'google.pubsub.v1'
2
+ # Source: google/pubsub/v1/pubsub.proto for package 'Google::Cloud::PubSub::V1'
3
3
  # Original file comments:
4
- # Copyright 2018 Google Inc.
4
+ # Copyright 2018 Google LLC.
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
7
7
  # you may not use this file except in compliance with the License.
@@ -15,178 +15,218 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
+ #
18
19
 
19
20
 
20
21
  require 'grpc'
21
22
  require 'google/pubsub/v1/pubsub_pb'
22
23
 
23
24
  module Google
24
- module Pubsub
25
- module V1
26
- module Publisher
27
- # The service that an application uses to manipulate topics, and to send
28
- # messages to a topic.
29
- class Service
30
-
31
- include GRPC::GenericService
25
+ module Cloud
26
+ module PubSub
27
+ end
28
+ end
29
+ Pubsub = Cloud::PubSub unless const_defined? :Pubsub
30
+ end
31
+ module Google::Cloud::PubSub::V1
32
+ module Publisher
33
+ # The service that an application uses to manipulate topics, and to send
34
+ # messages to a topic.
35
+ class Service
32
36
 
33
- self.marshal_class_method = :encode
34
- self.unmarshal_class_method = :decode
35
- self.service_name = 'google.pubsub.v1.Publisher'
37
+ include GRPC::GenericService
36
38
 
37
- # Creates the given topic with the given name. See the
38
- # <a href="/pubsub/docs/admin#resource_names"> resource name rules</a>.
39
- rpc :CreateTopic, Topic, Topic
40
- # Updates an existing topic. Note that certain properties of a
41
- # topic are not modifiable.
42
- rpc :UpdateTopic, UpdateTopicRequest, Topic
43
- # Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
44
- # does not exist. The message payload must not be empty; it must contain
45
- # either a non-empty data field, or at least one attribute.
46
- rpc :Publish, PublishRequest, PublishResponse
47
- # Gets the configuration of a topic.
48
- rpc :GetTopic, GetTopicRequest, Topic
49
- # Lists matching topics.
50
- rpc :ListTopics, ListTopicsRequest, ListTopicsResponse
51
- # Lists the names of the subscriptions on this topic.
52
- rpc :ListTopicSubscriptions, ListTopicSubscriptionsRequest, ListTopicSubscriptionsResponse
53
- # Lists the names of the snapshots on this topic.<br><br>
54
- # <b>ALPHA:</b> This feature is part of an alpha release. This API might be
55
- # changed in backward-incompatible ways and is not recommended for production
56
- # use. It is not subject to any SLA or deprecation policy.
57
- rpc :ListTopicSnapshots, ListTopicSnapshotsRequest, ListTopicSnapshotsResponse
58
- # Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
59
- # does not exist. After a topic is deleted, a new topic may be created with
60
- # the same name; this is an entirely new topic with none of the old
61
- # configuration or subscriptions. Existing subscriptions to this topic are
62
- # not deleted, but their `topic` field is set to `_deleted-topic_`.
63
- rpc :DeleteTopic, DeleteTopicRequest, Google::Protobuf::Empty
64
- end
39
+ self.marshal_class_method = :encode
40
+ self.unmarshal_class_method = :decode
41
+ self.service_name = 'google.pubsub.v1.Publisher'
65
42
 
66
- Stub = Service.rpc_stub_class
67
- end
68
- module Subscriber
69
- # The service that an application uses to manipulate subscriptions and to
70
- # consume messages from a subscription via the `Pull` method or by
71
- # establishing a bi-directional stream using the `StreamingPull` method.
72
- class Service
43
+ # Creates the given topic with the given name. See the
44
+ # <a href="https://cloud.google.com/pubsub/docs/admin#resource_names">
45
+ # resource name rules</a>.
46
+ rpc :CreateTopic, Topic, Topic
47
+ # Updates an existing topic. Note that certain properties of a
48
+ # topic are not modifiable.
49
+ rpc :UpdateTopic, UpdateTopicRequest, Topic
50
+ # Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
51
+ # does not exist.
52
+ rpc :Publish, PublishRequest, PublishResponse
53
+ # Gets the configuration of a topic.
54
+ rpc :GetTopic, GetTopicRequest, Topic
55
+ # Lists matching topics.
56
+ rpc :ListTopics, ListTopicsRequest, ListTopicsResponse
57
+ # Lists the names of the subscriptions on this topic.
58
+ rpc :ListTopicSubscriptions, ListTopicSubscriptionsRequest, ListTopicSubscriptionsResponse
59
+ # Lists the names of the snapshots on this topic. Snapshots are used in
60
+ # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
61
+ # operations, which allow
62
+ # you to manage message acknowledgments in bulk. That is, you can set the
63
+ # acknowledgment state of messages in an existing subscription to the state
64
+ # captured by a snapshot.<br><br>
65
+ # <b>BETA:</b> This feature is part of a beta release. This API might be
66
+ # changed in backward-incompatible ways and is not recommended for production
67
+ # use. It is not subject to any SLA or deprecation policy.
68
+ rpc :ListTopicSnapshots, ListTopicSnapshotsRequest, ListTopicSnapshotsResponse
69
+ # Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
70
+ # does not exist. After a topic is deleted, a new topic may be created with
71
+ # the same name; this is an entirely new topic with none of the old
72
+ # configuration or subscriptions. Existing subscriptions to this topic are
73
+ # not deleted, but their `topic` field is set to `_deleted-topic_`.
74
+ rpc :DeleteTopic, DeleteTopicRequest, Google::Protobuf::Empty
75
+ end
73
76
 
74
- include GRPC::GenericService
77
+ Stub = Service.rpc_stub_class
78
+ end
79
+ module Subscriber
80
+ # The service that an application uses to manipulate subscriptions and to
81
+ # consume messages from a subscription via the `Pull` method or by
82
+ # establishing a bi-directional stream using the `StreamingPull` method.
83
+ class Service
75
84
 
76
- self.marshal_class_method = :encode
77
- self.unmarshal_class_method = :decode
78
- self.service_name = 'google.pubsub.v1.Subscriber'
85
+ include GRPC::GenericService
79
86
 
80
- # Creates a subscription to a given topic. See the
81
- # <a href="/pubsub/docs/admin#resource_names"> resource name rules</a>.
82
- # If the subscription already exists, returns `ALREADY_EXISTS`.
83
- # If the corresponding topic doesn't exist, returns `NOT_FOUND`.
84
- #
85
- # If the name is not provided in the request, the server will assign a random
86
- # name for this subscription on the same project as the topic, conforming
87
- # to the
88
- # [resource name format](https://cloud.google.com/pubsub/docs/overview#names).
89
- # The generated name is populated in the returned Subscription object.
90
- # Note that for REST API requests, you must specify a name in the request.
91
- rpc :CreateSubscription, Subscription, Subscription
92
- # Gets the configuration details of a subscription.
93
- rpc :GetSubscription, GetSubscriptionRequest, Subscription
94
- # Updates an existing subscription. Note that certain properties of a
95
- # subscription, such as its topic, are not modifiable.
96
- rpc :UpdateSubscription, UpdateSubscriptionRequest, Subscription
97
- # Lists matching subscriptions.
98
- rpc :ListSubscriptions, ListSubscriptionsRequest, ListSubscriptionsResponse
99
- # Deletes an existing subscription. All messages retained in the subscription
100
- # are immediately dropped. Calls to `Pull` after deletion will return
101
- # `NOT_FOUND`. After a subscription is deleted, a new one may be created with
102
- # the same name, but the new one has no association with the old
103
- # subscription or its topic unless the same topic is specified.
104
- rpc :DeleteSubscription, DeleteSubscriptionRequest, Google::Protobuf::Empty
105
- # Modifies the ack deadline for a specific message. This method is useful
106
- # to indicate that more time is needed to process a message by the
107
- # subscriber, or to make the message available for redelivery if the
108
- # processing was interrupted. Note that this does not modify the
109
- # subscription-level `ackDeadlineSeconds` used for subsequent messages.
110
- rpc :ModifyAckDeadline, ModifyAckDeadlineRequest, Google::Protobuf::Empty
111
- # Acknowledges the messages associated with the `ack_ids` in the
112
- # `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages
113
- # from the subscription.
114
- #
115
- # Acknowledging a message whose ack deadline has expired may succeed,
116
- # but such a message may be redelivered later. Acknowledging a message more
117
- # than once will not result in an error.
118
- rpc :Acknowledge, AcknowledgeRequest, Google::Protobuf::Empty
119
- # Pulls messages from the server. Returns an empty list if there are no
120
- # messages available in the backlog. The server may return `UNAVAILABLE` if
121
- # there are too many concurrent pull requests pending for the given
122
- # subscription.
123
- rpc :Pull, PullRequest, PullResponse
124
- # Establishes a stream with the server, which sends messages down to the
125
- # client. The client streams acknowledgements and ack deadline modifications
126
- # back to the server. The server will close the stream and return the status
127
- # on any error. The server may close the stream with status `UNAVAILABLE` to
128
- # reassign server-side resources, in which case, the client should
129
- # re-establish the stream. Flow control can be achieved by configuring the
130
- # underlying RPC channel.
131
- rpc :StreamingPull, stream(StreamingPullRequest), stream(StreamingPullResponse)
132
- # Modifies the `PushConfig` for a specified subscription.
133
- #
134
- # This may be used to change a push subscription to a pull one (signified by
135
- # an empty `PushConfig`) or vice versa, or change the endpoint URL and other
136
- # attributes of a push subscription. Messages will accumulate for delivery
137
- # continuously through the call regardless of changes to the `PushConfig`.
138
- rpc :ModifyPushConfig, ModifyPushConfigRequest, Google::Protobuf::Empty
139
- # Gets the configuration details of a snapshot.<br><br>
140
- # <b>ALPHA:</b> This feature is part of an alpha release. This API might be
141
- # changed in backward-incompatible ways and is not recommended for production
142
- # use. It is not subject to any SLA or deprecation policy.
143
- rpc :GetSnapshot, GetSnapshotRequest, Snapshot
144
- # Lists the existing snapshots.<br><br>
145
- # <b>ALPHA:</b> This feature is part of an alpha release. This API might be
146
- # changed in backward-incompatible ways and is not recommended for production
147
- # use. It is not subject to any SLA or deprecation policy.
148
- rpc :ListSnapshots, ListSnapshotsRequest, ListSnapshotsResponse
149
- # Creates a snapshot from the requested subscription.<br><br>
150
- # <b>ALPHA:</b> This feature is part of an alpha release. This API might be
151
- # changed in backward-incompatible ways and is not recommended for production
152
- # use. It is not subject to any SLA or deprecation policy.
153
- # If the snapshot already exists, returns `ALREADY_EXISTS`.
154
- # If the requested subscription doesn't exist, returns `NOT_FOUND`.
155
- # If the backlog in the subscription is too old -- and the resulting snapshot
156
- # would expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned.
157
- # See also the `Snapshot.expire_time` field. If the name is not provided in
158
- # the request, the server will assign a random
159
- # name for this snapshot on the same project as the subscription, conforming
160
- # to the [resource name format](https://cloud.google.com/pubsub/docs/overview#names).
161
- # The generated
162
- # name is populated in the returned Snapshot object. Note that for REST API
163
- # requests, you must specify a name in the request.
164
- rpc :CreateSnapshot, CreateSnapshotRequest, Snapshot
165
- # Updates an existing snapshot.<br><br>
166
- # <b>ALPHA:</b> This feature is part of an alpha release. This API might be
167
- # changed in backward-incompatible ways and is not recommended for production
168
- # use. It is not subject to any SLA or deprecation policy.
169
- # Note that certain properties of a snapshot are not modifiable.
170
- rpc :UpdateSnapshot, UpdateSnapshotRequest, Snapshot
171
- # Removes an existing snapshot. <br><br>
172
- # <b>ALPHA:</b> This feature is part of an alpha release. This API might be
173
- # changed in backward-incompatible ways and is not recommended for production
174
- # use. It is not subject to any SLA or deprecation policy.
175
- # When the snapshot is deleted, all messages retained in the snapshot
176
- # are immediately dropped. After a snapshot is deleted, a new one may be
177
- # created with the same name, but the new one has no association with the old
178
- # snapshot or its subscription, unless the same subscription is specified.
179
- rpc :DeleteSnapshot, DeleteSnapshotRequest, Google::Protobuf::Empty
180
- # Seeks an existing subscription to a point in time or to a given snapshot,
181
- # whichever is provided in the request.<br><br>
182
- # <b>ALPHA:</b> This feature is part of an alpha release. This API might be
183
- # changed in backward-incompatible ways and is not recommended for production
184
- # use. It is not subject to any SLA or deprecation policy.
185
- rpc :Seek, SeekRequest, SeekResponse
186
- end
87
+ self.marshal_class_method = :encode
88
+ self.unmarshal_class_method = :decode
89
+ self.service_name = 'google.pubsub.v1.Subscriber'
187
90
 
188
- Stub = Service.rpc_stub_class
189
- end
91
+ # Creates a subscription to a given topic. See the
92
+ # <a href="https://cloud.google.com/pubsub/docs/admin#resource_names">
93
+ # resource name rules</a>.
94
+ # If the subscription already exists, returns `ALREADY_EXISTS`.
95
+ # If the corresponding topic doesn't exist, returns `NOT_FOUND`.
96
+ #
97
+ # If the name is not provided in the request, the server will assign a random
98
+ # name for this subscription on the same project as the topic, conforming
99
+ # to the
100
+ # [resource name format](https://cloud.google.com/pubsub/docs/admin#resource_names).
101
+ # The generated name is populated in the returned Subscription object.
102
+ # Note that for REST API requests, you must specify a name in the request.
103
+ rpc :CreateSubscription, Subscription, Subscription
104
+ # Gets the configuration details of a subscription.
105
+ rpc :GetSubscription, GetSubscriptionRequest, Subscription
106
+ # Updates an existing subscription. Note that certain properties of a
107
+ # subscription, such as its topic, are not modifiable.
108
+ rpc :UpdateSubscription, UpdateSubscriptionRequest, Subscription
109
+ # Lists matching subscriptions.
110
+ rpc :ListSubscriptions, ListSubscriptionsRequest, ListSubscriptionsResponse
111
+ # Deletes an existing subscription. All messages retained in the subscription
112
+ # are immediately dropped. Calls to `Pull` after deletion will return
113
+ # `NOT_FOUND`. After a subscription is deleted, a new one may be created with
114
+ # the same name, but the new one has no association with the old
115
+ # subscription or its topic unless the same topic is specified.
116
+ rpc :DeleteSubscription, DeleteSubscriptionRequest, Google::Protobuf::Empty
117
+ # Modifies the ack deadline for a specific message. This method is useful
118
+ # to indicate that more time is needed to process a message by the
119
+ # subscriber, or to make the message available for redelivery if the
120
+ # processing was interrupted. Note that this does not modify the
121
+ # subscription-level `ackDeadlineSeconds` used for subsequent messages.
122
+ rpc :ModifyAckDeadline, ModifyAckDeadlineRequest, Google::Protobuf::Empty
123
+ # Acknowledges the messages associated with the `ack_ids` in the
124
+ # `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages
125
+ # from the subscription.
126
+ #
127
+ # Acknowledging a message whose ack deadline has expired may succeed,
128
+ # but such a message may be redelivered later. Acknowledging a message more
129
+ # than once will not result in an error.
130
+ rpc :Acknowledge, AcknowledgeRequest, Google::Protobuf::Empty
131
+ # Pulls messages from the server. The server may return `UNAVAILABLE` if
132
+ # there are too many concurrent pull requests pending for the given
133
+ # subscription.
134
+ rpc :Pull, PullRequest, PullResponse
135
+ # Establishes a stream with the server, which sends messages down to the
136
+ # client. The client streams acknowledgements and ack deadline modifications
137
+ # back to the server. The server will close the stream and return the status
138
+ # on any error. The server may close the stream with status `UNAVAILABLE` to
139
+ # reassign server-side resources, in which case, the client should
140
+ # re-establish the stream. Flow control can be achieved by configuring the
141
+ # underlying RPC channel.
142
+ rpc :StreamingPull, stream(StreamingPullRequest), stream(StreamingPullResponse)
143
+ # Modifies the `PushConfig` for a specified subscription.
144
+ #
145
+ # This may be used to change a push subscription to a pull one (signified by
146
+ # an empty `PushConfig`) or vice versa, or change the endpoint URL and other
147
+ # attributes of a push subscription. Messages will accumulate for delivery
148
+ # continuously through the call regardless of changes to the `PushConfig`.
149
+ rpc :ModifyPushConfig, ModifyPushConfigRequest, Google::Protobuf::Empty
150
+ # Gets the configuration details of a snapshot. Snapshots are used in
151
+ # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
152
+ # operations, which allow you to manage message acknowledgments in bulk. That
153
+ # is, you can set the acknowledgment state of messages in an existing
154
+ # subscription to the state captured by a snapshot.<br><br>
155
+ # <b>BETA:</b> This feature is part of a beta release. This API might be
156
+ # changed in backward-incompatible ways and is not recommended for production
157
+ # use. It is not subject to any SLA or deprecation policy.
158
+ rpc :GetSnapshot, GetSnapshotRequest, Snapshot
159
+ # Lists the existing snapshots. Snapshots are used in
160
+ # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
161
+ # operations, which allow
162
+ # you to manage message acknowledgments in bulk. That is, you can set the
163
+ # acknowledgment state of messages in an existing subscription to the state
164
+ # captured by a snapshot.<br><br>
165
+ # <b>BETA:</b> This feature is part of a beta release. This API might be
166
+ # changed in backward-incompatible ways and is not recommended for production
167
+ # use. It is not subject to any SLA or deprecation policy.
168
+ rpc :ListSnapshots, ListSnapshotsRequest, ListSnapshotsResponse
169
+ # Creates a snapshot from the requested subscription. Snapshots are used in
170
+ # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
171
+ # operations, which allow
172
+ # you to manage message acknowledgments in bulk. That is, you can set the
173
+ # acknowledgment state of messages in an existing subscription to the state
174
+ # captured by a snapshot.
175
+ # <br><br>
176
+ # <b>BETA:</b> This feature is part of a beta release. This API might be
177
+ # changed in backward-incompatible ways and is not recommended for production
178
+ # use. It is not subject to any SLA or deprecation policy.<br><br>
179
+ # If the snapshot already exists, returns `ALREADY_EXISTS`.
180
+ # If the requested subscription doesn't exist, returns `NOT_FOUND`.
181
+ # If the backlog in the subscription is too old -- and the resulting snapshot
182
+ # would expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned.
183
+ # See also the `Snapshot.expire_time` field. If the name is not provided in
184
+ # the request, the server will assign a random
185
+ # name for this snapshot on the same project as the subscription, conforming
186
+ # to the
187
+ # [resource name format](https://cloud.google.com/pubsub/docs/admin#resource_names).
188
+ # The generated name is populated in the returned Snapshot object. Note that
189
+ # for REST API requests, you must specify a name in the request.
190
+ rpc :CreateSnapshot, CreateSnapshotRequest, Snapshot
191
+ # Updates 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
+ # <b>BETA:</b> This feature is part of a beta release. This API might be
198
+ # changed in backward-incompatible ways and is not recommended for production
199
+ # use. It is not subject to any SLA or deprecation policy.
200
+ # Note that certain properties of a snapshot are not modifiable.
201
+ rpc :UpdateSnapshot, UpdateSnapshotRequest, Snapshot
202
+ # Removes an existing snapshot. Snapshots are used in
203
+ # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
204
+ # operations, which allow
205
+ # you to manage message acknowledgments in bulk. That is, you can set the
206
+ # acknowledgment state of messages in an existing subscription to the state
207
+ # captured by a snapshot.<br><br>
208
+ # <b>BETA:</b> This feature is part of a beta release. This API might be
209
+ # changed in backward-incompatible ways and is not recommended for production
210
+ # use. It is not subject to any SLA or deprecation policy.
211
+ # When the snapshot is deleted, all messages retained in the snapshot
212
+ # are immediately dropped. After a snapshot is deleted, a new one may be
213
+ # created with the same name, but the new one has no association with the old
214
+ # snapshot or its subscription, unless the same subscription is specified.
215
+ rpc :DeleteSnapshot, DeleteSnapshotRequest, Google::Protobuf::Empty
216
+ # Seeks an existing subscription to a point in time or to a given snapshot,
217
+ # whichever is provided in the request. Snapshots are used in
218
+ # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
219
+ # operations, which allow
220
+ # you to manage message acknowledgments in bulk. That is, you can set the
221
+ # acknowledgment state of messages in an existing subscription to the state
222
+ # captured by a snapshot. Note that both the subscription and the snapshot
223
+ # must be on the same topic.<br><br>
224
+ # <b>BETA:</b> This feature is part of a beta release. This API might be
225
+ # changed in backward-incompatible ways and is not recommended for production
226
+ # use. It is not subject to any SLA or deprecation policy.
227
+ rpc :Seek, SeekRequest, SeekResponse
190
228
  end
229
+
230
+ Stub = Service.rpc_stub_class
191
231
  end
192
232
  end