google-cloud-pubsub 0.33.1 → 2.15.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +41 -40
- data/CHANGELOG.md +610 -0
- data/CONTRIBUTING.md +328 -116
- data/EMULATOR.md +2 -2
- data/LOGGING.md +95 -3
- data/OVERVIEW.md +183 -90
- data/TROUBLESHOOTING.md +2 -8
- data/lib/google/cloud/pubsub/acknowledge_result.rb +79 -0
- data/lib/google/cloud/pubsub/async_publisher/batch.rb +306 -0
- data/lib/google/cloud/pubsub/async_publisher.rb +270 -161
- data/lib/google/cloud/pubsub/batch_publisher.rb +65 -33
- data/lib/google/cloud/pubsub/convert.rb +36 -8
- data/lib/google/cloud/pubsub/credentials.rb +7 -5
- data/lib/google/cloud/pubsub/errors.rb +93 -0
- data/lib/google/cloud/pubsub/flow_controller.rb +139 -0
- data/lib/google/cloud/pubsub/message.rb +52 -7
- data/lib/google/cloud/pubsub/policy.rb +15 -12
- data/lib/google/cloud/pubsub/project.rb +341 -75
- data/lib/google/cloud/pubsub/publish_result.rb +9 -2
- data/lib/google/cloud/pubsub/received_message.rb +182 -20
- data/lib/google/cloud/pubsub/retry_policy.rb +88 -0
- data/lib/google/cloud/pubsub/schema/list.rb +180 -0
- data/lib/google/cloud/pubsub/schema.rb +310 -0
- data/lib/google/cloud/pubsub/service.rb +285 -258
- data/lib/google/cloud/pubsub/snapshot/list.rb +14 -14
- data/lib/google/cloud/pubsub/snapshot.rb +17 -12
- data/lib/google/cloud/pubsub/subscriber/enumerator_queue.rb +4 -4
- data/lib/google/cloud/pubsub/subscriber/inventory.rb +74 -33
- data/lib/google/cloud/pubsub/subscriber/sequencer.rb +115 -0
- data/lib/google/cloud/pubsub/subscriber/stream.rb +138 -91
- data/lib/google/cloud/pubsub/subscriber/timed_unary_buffer.rb +397 -0
- data/lib/google/cloud/pubsub/subscriber.rb +213 -51
- data/lib/google/cloud/pubsub/subscription/list.rb +16 -16
- data/lib/google/cloud/pubsub/subscription/push_config.rb +268 -0
- data/lib/google/cloud/pubsub/subscription.rb +827 -137
- data/lib/google/cloud/pubsub/topic/list.rb +14 -14
- data/lib/google/cloud/pubsub/topic.rb +565 -93
- data/lib/google/cloud/pubsub/version.rb +4 -2
- data/lib/google/cloud/pubsub.rb +50 -41
- data/lib/google-cloud-pubsub.rb +26 -29
- metadata +59 -53
- data/lib/google/cloud/pubsub/subscriber/async_stream_pusher.rb +0 -222
- data/lib/google/cloud/pubsub/subscriber/async_unary_pusher.rb +0 -270
- data/lib/google/cloud/pubsub/v1/credentials.rb +0 -39
- data/lib/google/cloud/pubsub/v1/doc/google/iam/v1/iam_policy.rb +0 -63
- data/lib/google/cloud/pubsub/v1/doc/google/iam/v1/policy.rb +0 -128
- data/lib/google/cloud/pubsub/v1/doc/google/protobuf/duration.rb +0 -91
- data/lib/google/cloud/pubsub/v1/doc/google/protobuf/empty.rb +0 -29
- data/lib/google/cloud/pubsub/v1/doc/google/protobuf/field_mask.rb +0 -230
- data/lib/google/cloud/pubsub/v1/doc/google/protobuf/timestamp.rb +0 -109
- data/lib/google/cloud/pubsub/v1/doc/google/pubsub/v1/pubsub.rb +0 -628
- data/lib/google/cloud/pubsub/v1/publisher_client.rb +0 -734
- data/lib/google/cloud/pubsub/v1/publisher_client_config.json +0 -105
- data/lib/google/cloud/pubsub/v1/subscriber_client.rb +0 -1267
- data/lib/google/cloud/pubsub/v1/subscriber_client_config.json +0 -144
- data/lib/google/cloud/pubsub/v1.rb +0 -17
- data/lib/google/pubsub/v1/pubsub_pb.rb +0 -222
- data/lib/google/pubsub/v1/pubsub_services_pb.rb +0 -192
@@ -1,628 +0,0 @@
|
|
1
|
-
# Copyright 2018 Google LLC
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
|
16
|
-
module Google
|
17
|
-
module Pubsub
|
18
|
-
module V1
|
19
|
-
# @!attribute [rw] allowed_persistence_regions
|
20
|
-
# @return [Array<String>]
|
21
|
-
# The list of GCP regions where messages that are published to the topic may
|
22
|
-
# be persisted in storage. Messages published by publishers running in
|
23
|
-
# non-allowed GCP regions (or running outside of GCP altogether) will be
|
24
|
-
# routed for storage in one of the allowed regions. An empty list indicates a
|
25
|
-
# misconfiguration at the project or organization level, which will result in
|
26
|
-
# all Publish operations failing.
|
27
|
-
class MessageStoragePolicy; end
|
28
|
-
|
29
|
-
# A topic resource.
|
30
|
-
# @!attribute [rw] name
|
31
|
-
# @return [String]
|
32
|
-
# The name of the topic. It must have the format
|
33
|
-
# `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
|
34
|
-
# and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
|
35
|
-
# underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
|
36
|
-
# signs (`%`). It must be between 3 and 255 characters in length, and it
|
37
|
-
# must not start with `"goog"`.
|
38
|
-
# @!attribute [rw] labels
|
39
|
-
# @return [Hash{String => String}]
|
40
|
-
# User labels.
|
41
|
-
# @!attribute [rw] message_storage_policy
|
42
|
-
# @return [Google::Pubsub::V1::MessageStoragePolicy]
|
43
|
-
# Policy constraining how messages published to the topic may be stored. It
|
44
|
-
# is determined when the topic is created based on the policy configured at
|
45
|
-
# the project level. It must not be set by the caller in the request to
|
46
|
-
# CreateTopic or to UpdateTopic. This field will be populated in the
|
47
|
-
# responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the
|
48
|
-
# response, then no constraints are in effect.
|
49
|
-
class Topic; end
|
50
|
-
|
51
|
-
# A message data and its attributes. The message payload must not be empty;
|
52
|
-
# it must contain either a non-empty data field, or at least one attribute.
|
53
|
-
# @!attribute [rw] data
|
54
|
-
# @return [String]
|
55
|
-
# The message payload.
|
56
|
-
# @!attribute [rw] attributes
|
57
|
-
# @return [Hash{String => String}]
|
58
|
-
# Optional attributes for this message.
|
59
|
-
# @!attribute [rw] message_id
|
60
|
-
# @return [String]
|
61
|
-
# ID of this message, assigned by the server when the message is published.
|
62
|
-
# Guaranteed to be unique within the topic. This value may be read by a
|
63
|
-
# subscriber that receives a `PubsubMessage` via a `Pull` call or a push
|
64
|
-
# delivery. It must not be populated by the publisher in a `Publish` call.
|
65
|
-
# @!attribute [rw] publish_time
|
66
|
-
# @return [Google::Protobuf::Timestamp]
|
67
|
-
# The time at which the message was published, populated by the server when
|
68
|
-
# it receives the `Publish` call. It must not be populated by the
|
69
|
-
# publisher in a `Publish` call.
|
70
|
-
class PubsubMessage; end
|
71
|
-
|
72
|
-
# Request for the GetTopic method.
|
73
|
-
# @!attribute [rw] topic
|
74
|
-
# @return [String]
|
75
|
-
# The name of the topic to get.
|
76
|
-
# Format is `projects/{project}/topics/{topic}`.
|
77
|
-
class GetTopicRequest; end
|
78
|
-
|
79
|
-
# Request for the UpdateTopic method.
|
80
|
-
# @!attribute [rw] topic
|
81
|
-
# @return [Google::Pubsub::V1::Topic]
|
82
|
-
# The updated topic object.
|
83
|
-
# @!attribute [rw] update_mask
|
84
|
-
# @return [Google::Protobuf::FieldMask]
|
85
|
-
# Indicates which fields in the provided topic to update. Must be specified
|
86
|
-
# and non-empty. Note that if `update_mask` contains
|
87
|
-
# "message_storage_policy" then the new value will be determined based on the
|
88
|
-
# policy configured at the project or organization level. The
|
89
|
-
# `message_storage_policy` must not be set in the `topic` provided above.
|
90
|
-
class UpdateTopicRequest; end
|
91
|
-
|
92
|
-
# Request for the Publish method.
|
93
|
-
# @!attribute [rw] topic
|
94
|
-
# @return [String]
|
95
|
-
# The messages in the request will be published on this topic.
|
96
|
-
# Format is `projects/{project}/topics/{topic}`.
|
97
|
-
# @!attribute [rw] messages
|
98
|
-
# @return [Array<Google::Pubsub::V1::PubsubMessage>]
|
99
|
-
# The messages to publish.
|
100
|
-
class PublishRequest; end
|
101
|
-
|
102
|
-
# Response for the `Publish` method.
|
103
|
-
# @!attribute [rw] message_ids
|
104
|
-
# @return [Array<String>]
|
105
|
-
# The server-assigned ID of each published message, in the same order as
|
106
|
-
# the messages in the request. IDs are guaranteed to be unique within
|
107
|
-
# the topic.
|
108
|
-
class PublishResponse; end
|
109
|
-
|
110
|
-
# Request for the `ListTopics` method.
|
111
|
-
# @!attribute [rw] project
|
112
|
-
# @return [String]
|
113
|
-
# The name of the cloud project that topics belong to.
|
114
|
-
# Format is `projects/{project}`.
|
115
|
-
# @!attribute [rw] page_size
|
116
|
-
# @return [Integer]
|
117
|
-
# Maximum number of topics to return.
|
118
|
-
# @!attribute [rw] page_token
|
119
|
-
# @return [String]
|
120
|
-
# The value returned by the last `ListTopicsResponse`; indicates that this is
|
121
|
-
# a continuation of a prior `ListTopics` call, and that the system should
|
122
|
-
# return the next page of data.
|
123
|
-
class ListTopicsRequest; end
|
124
|
-
|
125
|
-
# Response for the `ListTopics` method.
|
126
|
-
# @!attribute [rw] topics
|
127
|
-
# @return [Array<Google::Pubsub::V1::Topic>]
|
128
|
-
# The resulting topics.
|
129
|
-
# @!attribute [rw] next_page_token
|
130
|
-
# @return [String]
|
131
|
-
# If not empty, indicates that there may be more topics that match the
|
132
|
-
# request; this value should be passed in a new `ListTopicsRequest`.
|
133
|
-
class ListTopicsResponse; end
|
134
|
-
|
135
|
-
# Request for the `ListTopicSubscriptions` method.
|
136
|
-
# @!attribute [rw] topic
|
137
|
-
# @return [String]
|
138
|
-
# The name of the topic that subscriptions are attached to.
|
139
|
-
# Format is `projects/{project}/topics/{topic}`.
|
140
|
-
# @!attribute [rw] page_size
|
141
|
-
# @return [Integer]
|
142
|
-
# Maximum number of subscription names to return.
|
143
|
-
# @!attribute [rw] page_token
|
144
|
-
# @return [String]
|
145
|
-
# The value returned by the last `ListTopicSubscriptionsResponse`; indicates
|
146
|
-
# that this is a continuation of a prior `ListTopicSubscriptions` call, and
|
147
|
-
# that the system should return the next page of data.
|
148
|
-
class ListTopicSubscriptionsRequest; end
|
149
|
-
|
150
|
-
# Response for the `ListTopicSubscriptions` method.
|
151
|
-
# @!attribute [rw] subscriptions
|
152
|
-
# @return [Array<String>]
|
153
|
-
# The names of the subscriptions that match the request.
|
154
|
-
# @!attribute [rw] next_page_token
|
155
|
-
# @return [String]
|
156
|
-
# If not empty, indicates that there may be more subscriptions that match
|
157
|
-
# the request; this value should be passed in a new
|
158
|
-
# `ListTopicSubscriptionsRequest` to get more subscriptions.
|
159
|
-
class ListTopicSubscriptionsResponse; end
|
160
|
-
|
161
|
-
# Request for the `ListTopicSnapshots` method.<br><br>
|
162
|
-
# <b>ALPHA:</b> This feature is part of an alpha release. This API might be
|
163
|
-
# changed in backward-incompatible ways and is not recommended for production
|
164
|
-
# use. It is not subject to any SLA or deprecation policy.
|
165
|
-
# @!attribute [rw] topic
|
166
|
-
# @return [String]
|
167
|
-
# The name of the topic that snapshots are attached to.
|
168
|
-
# Format is `projects/{project}/topics/{topic}`.
|
169
|
-
# @!attribute [rw] page_size
|
170
|
-
# @return [Integer]
|
171
|
-
# Maximum number of snapshot names to return.
|
172
|
-
# @!attribute [rw] page_token
|
173
|
-
# @return [String]
|
174
|
-
# The value returned by the last `ListTopicSnapshotsResponse`; indicates
|
175
|
-
# that this is a continuation of a prior `ListTopicSnapshots` call, and
|
176
|
-
# that the system should return the next page of data.
|
177
|
-
class ListTopicSnapshotsRequest; end
|
178
|
-
|
179
|
-
# Response for the `ListTopicSnapshots` method.<br><br>
|
180
|
-
# <b>ALPHA:</b> This feature is part of an alpha release. This API might be
|
181
|
-
# changed in backward-incompatible ways and is not recommended for production
|
182
|
-
# use. It is not subject to any SLA or deprecation policy.
|
183
|
-
# @!attribute [rw] snapshots
|
184
|
-
# @return [Array<String>]
|
185
|
-
# The names of the snapshots that match the request.
|
186
|
-
# @!attribute [rw] next_page_token
|
187
|
-
# @return [String]
|
188
|
-
# If not empty, indicates that there may be more snapshots that match
|
189
|
-
# the request; this value should be passed in a new
|
190
|
-
# `ListTopicSnapshotsRequest` to get more snapshots.
|
191
|
-
class ListTopicSnapshotsResponse; end
|
192
|
-
|
193
|
-
# Request for the `DeleteTopic` method.
|
194
|
-
# @!attribute [rw] topic
|
195
|
-
# @return [String]
|
196
|
-
# Name of the topic to delete.
|
197
|
-
# Format is `projects/{project}/topics/{topic}`.
|
198
|
-
class DeleteTopicRequest; end
|
199
|
-
|
200
|
-
# A subscription resource.
|
201
|
-
# @!attribute [rw] name
|
202
|
-
# @return [String]
|
203
|
-
# The name of the subscription. It must have the format
|
204
|
-
# `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
|
205
|
-
# start with a letter, and contain only letters (`[A-Za-z]`), numbers
|
206
|
-
# (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
|
207
|
-
# plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
|
208
|
-
# in length, and it must not start with `"goog"`
|
209
|
-
# @!attribute [rw] topic
|
210
|
-
# @return [String]
|
211
|
-
# The name of the topic from which this subscription is receiving messages.
|
212
|
-
# Format is `projects/{project}/topics/{topic}`.
|
213
|
-
# The value of this field will be `_deleted-topic_` if the topic has been
|
214
|
-
# deleted.
|
215
|
-
# @!attribute [rw] push_config
|
216
|
-
# @return [Google::Pubsub::V1::PushConfig]
|
217
|
-
# If push delivery is used with this subscription, this field is
|
218
|
-
# used to configure it. An empty `pushConfig` signifies that the subscriber
|
219
|
-
# will pull and ack messages using API methods.
|
220
|
-
# @!attribute [rw] ack_deadline_seconds
|
221
|
-
# @return [Integer]
|
222
|
-
# This value is the maximum time after a subscriber receives a message
|
223
|
-
# before the subscriber should acknowledge the message. After message
|
224
|
-
# delivery but before the ack deadline expires and before the message is
|
225
|
-
# acknowledged, it is an outstanding message and will not be delivered
|
226
|
-
# again during that time (on a best-effort basis).
|
227
|
-
#
|
228
|
-
# For pull subscriptions, this value is used as the initial value for the ack
|
229
|
-
# deadline. To override this value for a given message, call
|
230
|
-
# `ModifyAckDeadline` with the corresponding `ack_id` if using
|
231
|
-
# non-streaming pull or send the `ack_id` in a
|
232
|
-
# `StreamingModifyAckDeadlineRequest` if using streaming pull.
|
233
|
-
# The minimum custom deadline you can specify is 10 seconds.
|
234
|
-
# The maximum custom deadline you can specify is 600 seconds (10 minutes).
|
235
|
-
# If this parameter is 0, a default value of 10 seconds is used.
|
236
|
-
#
|
237
|
-
# For push delivery, this value is also used to set the request timeout for
|
238
|
-
# the call to the push endpoint.
|
239
|
-
#
|
240
|
-
# If the subscriber never acknowledges the message, the Pub/Sub
|
241
|
-
# system will eventually redeliver the message.
|
242
|
-
# @!attribute [rw] retain_acked_messages
|
243
|
-
# @return [true, false]
|
244
|
-
# Indicates whether to retain acknowledged messages. If true, then
|
245
|
-
# messages are not expunged from the subscription's backlog, even if they are
|
246
|
-
# acknowledged, until they fall out of the `message_retention_duration`
|
247
|
-
# window.<br><br>
|
248
|
-
# <b>ALPHA:</b> This feature is part of an alpha release. This API might be
|
249
|
-
# changed in backward-incompatible ways and is not recommended for production
|
250
|
-
# use. It is not subject to any SLA or deprecation policy.
|
251
|
-
# @!attribute [rw] message_retention_duration
|
252
|
-
# @return [Google::Protobuf::Duration]
|
253
|
-
# How long to retain unacknowledged messages in the subscription's backlog,
|
254
|
-
# from the moment a message is published.
|
255
|
-
# If `retain_acked_messages` is true, then this also configures the retention
|
256
|
-
# of acknowledged messages, and thus configures how far back in time a `Seek`
|
257
|
-
# can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10
|
258
|
-
# minutes.<br><br>
|
259
|
-
# <b>ALPHA:</b> This feature is part of an alpha release. This API might be
|
260
|
-
# changed in backward-incompatible ways and is not recommended for production
|
261
|
-
# use. It is not subject to any SLA or deprecation policy.
|
262
|
-
# @!attribute [rw] labels
|
263
|
-
# @return [Hash{String => String}]
|
264
|
-
# User labels.
|
265
|
-
class Subscription; end
|
266
|
-
|
267
|
-
# Configuration for a push delivery endpoint.
|
268
|
-
# @!attribute [rw] push_endpoint
|
269
|
-
# @return [String]
|
270
|
-
# A URL locating the endpoint to which messages should be pushed.
|
271
|
-
# For example, a Webhook endpoint might use "https://example.com/push".
|
272
|
-
# @!attribute [rw] attributes
|
273
|
-
# @return [Hash{String => String}]
|
274
|
-
# Endpoint configuration attributes.
|
275
|
-
#
|
276
|
-
# Every endpoint has a set of API supported attributes that can be used to
|
277
|
-
# control different aspects of the message delivery.
|
278
|
-
#
|
279
|
-
# The currently supported attribute is `x-goog-version`, which you can
|
280
|
-
# use to change the format of the pushed message. This attribute
|
281
|
-
# indicates the version of the data expected by the endpoint. This
|
282
|
-
# controls the shape of the pushed message (i.e., its fields and metadata).
|
283
|
-
# The endpoint version is based on the version of the Pub/Sub API.
|
284
|
-
#
|
285
|
-
# If not present during the `CreateSubscription` call, it will default to
|
286
|
-
# the version of the API used to make such call. If not present during a
|
287
|
-
# `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
|
288
|
-
# calls will always return a valid version, even if the subscription was
|
289
|
-
# created without this attribute.
|
290
|
-
#
|
291
|
-
# The possible values for this attribute are:
|
292
|
-
#
|
293
|
-
# * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
|
294
|
-
# * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
|
295
|
-
class PushConfig; end
|
296
|
-
|
297
|
-
# A message and its corresponding acknowledgment ID.
|
298
|
-
# @!attribute [rw] ack_id
|
299
|
-
# @return [String]
|
300
|
-
# This ID can be used to acknowledge the received message.
|
301
|
-
# @!attribute [rw] message
|
302
|
-
# @return [Google::Pubsub::V1::PubsubMessage]
|
303
|
-
# The message.
|
304
|
-
class ReceivedMessage; end
|
305
|
-
|
306
|
-
# Request for the GetSubscription method.
|
307
|
-
# @!attribute [rw] subscription
|
308
|
-
# @return [String]
|
309
|
-
# The name of the subscription to get.
|
310
|
-
# Format is `projects/{project}/subscriptions/{sub}`.
|
311
|
-
class GetSubscriptionRequest; end
|
312
|
-
|
313
|
-
# Request for the UpdateSubscription method.
|
314
|
-
# @!attribute [rw] subscription
|
315
|
-
# @return [Google::Pubsub::V1::Subscription]
|
316
|
-
# The updated subscription object.
|
317
|
-
# @!attribute [rw] update_mask
|
318
|
-
# @return [Google::Protobuf::FieldMask]
|
319
|
-
# Indicates which fields in the provided subscription to update.
|
320
|
-
# Must be specified and non-empty.
|
321
|
-
class UpdateSubscriptionRequest; end
|
322
|
-
|
323
|
-
# Request for the `ListSubscriptions` method.
|
324
|
-
# @!attribute [rw] project
|
325
|
-
# @return [String]
|
326
|
-
# The name of the cloud project that subscriptions belong to.
|
327
|
-
# Format is `projects/{project}`.
|
328
|
-
# @!attribute [rw] page_size
|
329
|
-
# @return [Integer]
|
330
|
-
# Maximum number of subscriptions to return.
|
331
|
-
# @!attribute [rw] page_token
|
332
|
-
# @return [String]
|
333
|
-
# The value returned by the last `ListSubscriptionsResponse`; indicates that
|
334
|
-
# this is a continuation of a prior `ListSubscriptions` call, and that the
|
335
|
-
# system should return the next page of data.
|
336
|
-
class ListSubscriptionsRequest; end
|
337
|
-
|
338
|
-
# Response for the `ListSubscriptions` method.
|
339
|
-
# @!attribute [rw] subscriptions
|
340
|
-
# @return [Array<Google::Pubsub::V1::Subscription>]
|
341
|
-
# The subscriptions that match the request.
|
342
|
-
# @!attribute [rw] next_page_token
|
343
|
-
# @return [String]
|
344
|
-
# If not empty, indicates that there may be more subscriptions that match
|
345
|
-
# the request; this value should be passed in a new
|
346
|
-
# `ListSubscriptionsRequest` to get more subscriptions.
|
347
|
-
class ListSubscriptionsResponse; end
|
348
|
-
|
349
|
-
# Request for the DeleteSubscription method.
|
350
|
-
# @!attribute [rw] subscription
|
351
|
-
# @return [String]
|
352
|
-
# The subscription to delete.
|
353
|
-
# Format is `projects/{project}/subscriptions/{sub}`.
|
354
|
-
class DeleteSubscriptionRequest; end
|
355
|
-
|
356
|
-
# Request for the ModifyPushConfig method.
|
357
|
-
# @!attribute [rw] subscription
|
358
|
-
# @return [String]
|
359
|
-
# The name of the subscription.
|
360
|
-
# Format is `projects/{project}/subscriptions/{sub}`.
|
361
|
-
# @!attribute [rw] push_config
|
362
|
-
# @return [Google::Pubsub::V1::PushConfig]
|
363
|
-
# The push configuration for future deliveries.
|
364
|
-
#
|
365
|
-
# An empty `pushConfig` indicates that the Pub/Sub system should
|
366
|
-
# stop pushing messages from the given subscription and allow
|
367
|
-
# messages to be pulled and acknowledged - effectively pausing
|
368
|
-
# the subscription if `Pull` or `StreamingPull` is not called.
|
369
|
-
class ModifyPushConfigRequest; end
|
370
|
-
|
371
|
-
# Request for the `Pull` method.
|
372
|
-
# @!attribute [rw] subscription
|
373
|
-
# @return [String]
|
374
|
-
# The subscription from which messages should be pulled.
|
375
|
-
# Format is `projects/{project}/subscriptions/{sub}`.
|
376
|
-
# @!attribute [rw] return_immediately
|
377
|
-
# @return [true, false]
|
378
|
-
# If this field set to true, the system will respond immediately even if
|
379
|
-
# it there are no messages available to return in the `Pull` response.
|
380
|
-
# Otherwise, the system may wait (for a bounded amount of time) until at
|
381
|
-
# least one message is available, rather than returning no messages. The
|
382
|
-
# client may cancel the request if it does not wish to wait any longer for
|
383
|
-
# the response.
|
384
|
-
# @!attribute [rw] max_messages
|
385
|
-
# @return [Integer]
|
386
|
-
# The maximum number of messages returned for this request. The Pub/Sub
|
387
|
-
# system may return fewer than the number specified.
|
388
|
-
class PullRequest; end
|
389
|
-
|
390
|
-
# Response for the `Pull` method.
|
391
|
-
# @!attribute [rw] received_messages
|
392
|
-
# @return [Array<Google::Pubsub::V1::ReceivedMessage>]
|
393
|
-
# Received Pub/Sub messages. The Pub/Sub system will return zero messages if
|
394
|
-
# there are no more available in the backlog. The Pub/Sub system may return
|
395
|
-
# fewer than the `maxMessages` requested even if there are more messages
|
396
|
-
# available in the backlog.
|
397
|
-
class PullResponse; end
|
398
|
-
|
399
|
-
# Request for the ModifyAckDeadline method.
|
400
|
-
# @!attribute [rw] subscription
|
401
|
-
# @return [String]
|
402
|
-
# The name of the subscription.
|
403
|
-
# Format is `projects/{project}/subscriptions/{sub}`.
|
404
|
-
# @!attribute [rw] ack_ids
|
405
|
-
# @return [Array<String>]
|
406
|
-
# List of acknowledgment IDs.
|
407
|
-
# @!attribute [rw] ack_deadline_seconds
|
408
|
-
# @return [Integer]
|
409
|
-
# The new ack deadline with respect to the time this request was sent to
|
410
|
-
# the Pub/Sub system. For example, if the value is 10, the new
|
411
|
-
# ack deadline will expire 10 seconds after the `ModifyAckDeadline` call
|
412
|
-
# was made. Specifying zero may immediately make the message available for
|
413
|
-
# another pull request.
|
414
|
-
# The minimum deadline you can specify is 0 seconds.
|
415
|
-
# The maximum deadline you can specify is 600 seconds (10 minutes).
|
416
|
-
class ModifyAckDeadlineRequest; end
|
417
|
-
|
418
|
-
# Request for the Acknowledge method.
|
419
|
-
# @!attribute [rw] subscription
|
420
|
-
# @return [String]
|
421
|
-
# The subscription whose message is being acknowledged.
|
422
|
-
# Format is `projects/{project}/subscriptions/{sub}`.
|
423
|
-
# @!attribute [rw] ack_ids
|
424
|
-
# @return [Array<String>]
|
425
|
-
# The acknowledgment ID for the messages being acknowledged that was returned
|
426
|
-
# by the Pub/Sub system in the `Pull` response. Must not be empty.
|
427
|
-
class AcknowledgeRequest; end
|
428
|
-
|
429
|
-
# Request for the `StreamingPull` streaming RPC method. This request is used to
|
430
|
-
# establish the initial stream as well as to stream acknowledgements and ack
|
431
|
-
# deadline modifications from the client to the server.
|
432
|
-
# @!attribute [rw] subscription
|
433
|
-
# @return [String]
|
434
|
-
# The subscription for which to initialize the new stream. This must be
|
435
|
-
# provided in the first request on the stream, and must not be set in
|
436
|
-
# subsequent requests from client to server.
|
437
|
-
# Format is `projects/{project}/subscriptions/{sub}`.
|
438
|
-
# @!attribute [rw] ack_ids
|
439
|
-
# @return [Array<String>]
|
440
|
-
# List of acknowledgement IDs for acknowledging previously received messages
|
441
|
-
# (received on this stream or a different stream). If an ack ID has expired,
|
442
|
-
# the corresponding message may be redelivered later. Acknowledging a message
|
443
|
-
# more than once will not result in an error. If the acknowledgement ID is
|
444
|
-
# malformed, the stream will be aborted with status `INVALID_ARGUMENT`.
|
445
|
-
# @!attribute [rw] modify_deadline_seconds
|
446
|
-
# @return [Array<Integer>]
|
447
|
-
# The list of new ack deadlines for the IDs listed in
|
448
|
-
# `modify_deadline_ack_ids`. The size of this list must be the same as the
|
449
|
-
# size of `modify_deadline_ack_ids`. If it differs the stream will be aborted
|
450
|
-
# with `INVALID_ARGUMENT`. Each element in this list is applied to the
|
451
|
-
# element in the same position in `modify_deadline_ack_ids`. The new ack
|
452
|
-
# deadline is with respect to the time this request was sent to the Pub/Sub
|
453
|
-
# system. Must be >= 0. For example, if the value is 10, the new ack deadline
|
454
|
-
# will expire 10 seconds after this request is received. If the value is 0,
|
455
|
-
# the message is immediately made available for another streaming or
|
456
|
-
# non-streaming pull request. If the value is < 0 (an error), the stream will
|
457
|
-
# be aborted with status `INVALID_ARGUMENT`.
|
458
|
-
# @!attribute [rw] modify_deadline_ack_ids
|
459
|
-
# @return [Array<String>]
|
460
|
-
# List of acknowledgement IDs whose deadline will be modified based on the
|
461
|
-
# corresponding element in `modify_deadline_seconds`. This field can be used
|
462
|
-
# to indicate that more time is needed to process a message by the
|
463
|
-
# subscriber, or to make the message available for redelivery if the
|
464
|
-
# processing was interrupted.
|
465
|
-
# @!attribute [rw] stream_ack_deadline_seconds
|
466
|
-
# @return [Integer]
|
467
|
-
# The ack deadline to use for the stream. This must be provided in the
|
468
|
-
# first request on the stream, but it can also be updated on subsequent
|
469
|
-
# requests from client to server. The minimum deadline you can specify is 10
|
470
|
-
# seconds. The maximum deadline you can specify is 600 seconds (10 minutes).
|
471
|
-
class StreamingPullRequest; end
|
472
|
-
|
473
|
-
# Response for the `StreamingPull` method. This response is used to stream
|
474
|
-
# messages from the server to the client.
|
475
|
-
# @!attribute [rw] received_messages
|
476
|
-
# @return [Array<Google::Pubsub::V1::ReceivedMessage>]
|
477
|
-
# Received Pub/Sub messages. This will not be empty.
|
478
|
-
class StreamingPullResponse; end
|
479
|
-
|
480
|
-
# Request for the `CreateSnapshot` method.<br><br>
|
481
|
-
# <b>ALPHA:</b> This feature is part of an alpha release. This API might be changed in
|
482
|
-
# backward-incompatible ways and is not recommended for production use.
|
483
|
-
# It is not subject to any SLA or deprecation policy.
|
484
|
-
# @!attribute [rw] name
|
485
|
-
# @return [String]
|
486
|
-
# Optional user-provided name for this snapshot.
|
487
|
-
# If the name is not provided in the request, the server will assign a random
|
488
|
-
# name for this snapshot on the same project as the subscription.
|
489
|
-
# Note that for REST API requests, you must specify a name.
|
490
|
-
# Format is `projects/{project}/snapshots/{snap}`.
|
491
|
-
# @!attribute [rw] subscription
|
492
|
-
# @return [String]
|
493
|
-
# The subscription whose backlog the snapshot retains.
|
494
|
-
# Specifically, the created snapshot is guaranteed to retain:
|
495
|
-
# (a) The existing backlog on the subscription. More precisely, this is
|
496
|
-
# defined as the messages in the subscription's backlog that are
|
497
|
-
# unacknowledged upon the successful completion of the
|
498
|
-
# `CreateSnapshot` request; as well as:
|
499
|
-
# (b) Any messages published to the subscription's topic following the
|
500
|
-
# successful completion of the CreateSnapshot request.
|
501
|
-
# Format is `projects/{project}/subscriptions/{sub}`.
|
502
|
-
# @!attribute [rw] labels
|
503
|
-
# @return [Hash{String => String}]
|
504
|
-
# User labels.
|
505
|
-
class CreateSnapshotRequest; end
|
506
|
-
|
507
|
-
# Request for the UpdateSnapshot method.<br><br>
|
508
|
-
# <b>ALPHA:</b> This feature is part of an alpha release. This API might be
|
509
|
-
# changed in backward-incompatible ways and is not recommended for production
|
510
|
-
# use. It is not subject to any SLA or deprecation policy.
|
511
|
-
# @!attribute [rw] snapshot
|
512
|
-
# @return [Google::Pubsub::V1::Snapshot]
|
513
|
-
# The updated snapshot object.
|
514
|
-
# @!attribute [rw] update_mask
|
515
|
-
# @return [Google::Protobuf::FieldMask]
|
516
|
-
# Indicates which fields in the provided snapshot to update.
|
517
|
-
# Must be specified and non-empty.
|
518
|
-
class UpdateSnapshotRequest; end
|
519
|
-
|
520
|
-
# A snapshot resource.<br><br>
|
521
|
-
# <b>ALPHA:</b> This feature is part of an alpha release. This API might be
|
522
|
-
# changed in backward-incompatible ways and is not recommended for production
|
523
|
-
# use. It is not subject to any SLA or deprecation policy.
|
524
|
-
# @!attribute [rw] name
|
525
|
-
# @return [String]
|
526
|
-
# The name of the snapshot.
|
527
|
-
# @!attribute [rw] topic
|
528
|
-
# @return [String]
|
529
|
-
# The name of the topic from which this snapshot is retaining messages.
|
530
|
-
# @!attribute [rw] expire_time
|
531
|
-
# @return [Google::Protobuf::Timestamp]
|
532
|
-
# The snapshot is guaranteed to exist up until this time.
|
533
|
-
# A newly-created snapshot expires no later than 7 days from the time of its
|
534
|
-
# creation. Its exact lifetime is determined at creation by the existing
|
535
|
-
# backlog in the source subscription. Specifically, the lifetime of the
|
536
|
-
# snapshot is `7 days - (age of oldest unacked message in the subscription)`.
|
537
|
-
# For example, consider a subscription whose oldest unacked message is 3 days
|
538
|
-
# old. If a snapshot is created from this subscription, the snapshot -- which
|
539
|
-
# will always capture this 3-day-old backlog as long as the snapshot
|
540
|
-
# exists -- will expire in 4 days. The service will refuse to create a
|
541
|
-
# snapshot that would expire in less than 1 hour after creation.
|
542
|
-
# @!attribute [rw] labels
|
543
|
-
# @return [Hash{String => String}]
|
544
|
-
# User labels.
|
545
|
-
class Snapshot; end
|
546
|
-
|
547
|
-
# Request for the GetSnapshot method.<br><br>
|
548
|
-
# <b>ALPHA:</b> This feature is part of an alpha release. This API might be
|
549
|
-
# changed in backward-incompatible ways and is not recommended for production
|
550
|
-
# use. It is not subject to any SLA or deprecation policy.
|
551
|
-
# @!attribute [rw] snapshot
|
552
|
-
# @return [String]
|
553
|
-
# The name of the snapshot to get.
|
554
|
-
# Format is `projects/{project}/snapshots/{snap}`.
|
555
|
-
class GetSnapshotRequest; end
|
556
|
-
|
557
|
-
# Request for the `ListSnapshots` method.<br><br>
|
558
|
-
# <b>ALPHA:</b> This feature is part of an alpha release. This API might be
|
559
|
-
# changed in backward-incompatible ways and is not recommended for production
|
560
|
-
# use. It is not subject to any SLA or deprecation policy.
|
561
|
-
# @!attribute [rw] project
|
562
|
-
# @return [String]
|
563
|
-
# The name of the cloud project that snapshots belong to.
|
564
|
-
# Format is `projects/{project}`.
|
565
|
-
# @!attribute [rw] page_size
|
566
|
-
# @return [Integer]
|
567
|
-
# Maximum number of snapshots to return.
|
568
|
-
# @!attribute [rw] page_token
|
569
|
-
# @return [String]
|
570
|
-
# The value returned by the last `ListSnapshotsResponse`; indicates that this
|
571
|
-
# is a continuation of a prior `ListSnapshots` call, and that the system
|
572
|
-
# should return the next page of data.
|
573
|
-
class ListSnapshotsRequest; end
|
574
|
-
|
575
|
-
# Response for the `ListSnapshots` method.<br><br>
|
576
|
-
# <b>ALPHA:</b> This feature is part of an alpha release. This API might be
|
577
|
-
# changed in backward-incompatible ways and is not recommended for production
|
578
|
-
# use. It is not subject to any SLA or deprecation policy.
|
579
|
-
# @!attribute [rw] snapshots
|
580
|
-
# @return [Array<Google::Pubsub::V1::Snapshot>]
|
581
|
-
# The resulting snapshots.
|
582
|
-
# @!attribute [rw] next_page_token
|
583
|
-
# @return [String]
|
584
|
-
# If not empty, indicates that there may be more snapshot that match the
|
585
|
-
# request; this value should be passed in a new `ListSnapshotsRequest`.
|
586
|
-
class ListSnapshotsResponse; end
|
587
|
-
|
588
|
-
# Request for the `DeleteSnapshot` method.<br><br>
|
589
|
-
# <b>ALPHA:</b> This feature is part of an alpha release. This API might be
|
590
|
-
# changed in backward-incompatible ways and is not recommended for production
|
591
|
-
# use. It is not subject to any SLA or deprecation policy.
|
592
|
-
# @!attribute [rw] snapshot
|
593
|
-
# @return [String]
|
594
|
-
# The name of the snapshot to delete.
|
595
|
-
# Format is `projects/{project}/snapshots/{snap}`.
|
596
|
-
class DeleteSnapshotRequest; end
|
597
|
-
|
598
|
-
# Request for the `Seek` method.<br><br>
|
599
|
-
# <b>ALPHA:</b> This feature is part of an alpha release. This API might be
|
600
|
-
# changed in backward-incompatible ways and is not recommended for production
|
601
|
-
# use. It is not subject to any SLA or deprecation policy.
|
602
|
-
# @!attribute [rw] subscription
|
603
|
-
# @return [String]
|
604
|
-
# The subscription to affect.
|
605
|
-
# @!attribute [rw] time
|
606
|
-
# @return [Google::Protobuf::Timestamp]
|
607
|
-
# The time to seek to.
|
608
|
-
# Messages retained in the subscription that were published before this
|
609
|
-
# time are marked as acknowledged, and messages retained in the
|
610
|
-
# subscription that were published after this time are marked as
|
611
|
-
# unacknowledged. Note that this operation affects only those messages
|
612
|
-
# retained in the subscription (configured by the combination of
|
613
|
-
# `message_retention_duration` and `retain_acked_messages`). For example,
|
614
|
-
# if `time` corresponds to a point before the message retention
|
615
|
-
# window (or to a point before the system's notion of the subscription
|
616
|
-
# creation time), only retained messages will be marked as unacknowledged,
|
617
|
-
# and already-expunged messages will not be restored.
|
618
|
-
# @!attribute [rw] snapshot
|
619
|
-
# @return [String]
|
620
|
-
# The snapshot to seek to. The snapshot's topic must be the same as that of
|
621
|
-
# the provided subscription.
|
622
|
-
# Format is `projects/{project}/snapshots/{snap}`.
|
623
|
-
class SeekRequest; end
|
624
|
-
|
625
|
-
class SeekResponse; end
|
626
|
-
end
|
627
|
-
end
|
628
|
-
end
|