google-cloud-pubsub 0.32.2 → 0.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/LOGGING.md +1 -1
- data/lib/google-cloud-pubsub.rb +1 -1
- data/lib/google/cloud/pubsub/project.rb +10 -2
- data/lib/google/cloud/pubsub/service.rb +22 -2
- data/lib/google/cloud/pubsub/snapshot.rb +35 -0
- data/lib/google/cloud/pubsub/subscription.rb +46 -2
- data/lib/google/cloud/pubsub/topic.rb +51 -2
- data/lib/google/cloud/pubsub/v1/doc/google/iam/v1/iam_policy.rb +13 -13
- data/lib/google/cloud/pubsub/v1/doc/google/iam/v1/policy.rb +28 -28
- data/lib/google/cloud/pubsub/v1/doc/google/protobuf/duration.rb +3 -3
- data/lib/google/cloud/pubsub/v1/doc/google/protobuf/empty.rb +1 -1
- data/lib/google/cloud/pubsub/v1/doc/google/protobuf/field_mask.rb +7 -7
- data/lib/google/cloud/pubsub/v1/doc/google/protobuf/timestamp.rb +7 -7
- data/lib/google/cloud/pubsub/v1/doc/google/pubsub/v1/pubsub.rb +101 -101
- data/lib/google/cloud/pubsub/v1/publisher_client.rb +27 -27
- data/lib/google/cloud/pubsub/v1/subscriber_client.rb +68 -68
- data/lib/google/cloud/pubsub/version.rb +1 -1
- metadata +3 -3
|
@@ -82,9 +82,9 @@ module Google
|
|
|
82
82
|
# @return [Integer]
|
|
83
83
|
# Signed fractions of a second at nanosecond resolution of the span
|
|
84
84
|
# of time. Durations less than one second are represented with a 0
|
|
85
|
-
#
|
|
86
|
-
# of one second or more, a non-zero value for the
|
|
87
|
-
# of the same sign as the
|
|
85
|
+
# `seconds` field and a positive or negative `nanos` field. For durations
|
|
86
|
+
# of one second or more, a non-zero value for the `nanos` field must be
|
|
87
|
+
# of the same sign as the `seconds` field. Must be from -999,999,999
|
|
88
88
|
# to +999,999,999 inclusive.
|
|
89
89
|
class Duration; end
|
|
90
90
|
end
|
|
@@ -23,7 +23,7 @@ module Google
|
|
|
23
23
|
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
|
24
24
|
# }
|
|
25
25
|
#
|
|
26
|
-
# The JSON representation for
|
|
26
|
+
# The JSON representation for `Empty` is empty JSON object `{}`.
|
|
27
27
|
class Empty; end
|
|
28
28
|
end
|
|
29
29
|
end
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
|
|
16
16
|
module Google
|
|
17
17
|
module Protobuf
|
|
18
|
-
#
|
|
18
|
+
# `FieldMask` represents a set of symbolic field paths, for example:
|
|
19
19
|
#
|
|
20
20
|
# paths: "f.a"
|
|
21
21
|
# paths: "f.b.d"
|
|
22
22
|
#
|
|
23
|
-
# Here
|
|
24
|
-
# fields in the message found in
|
|
25
|
-
# message in
|
|
23
|
+
# Here `f` represents a field in some root message, `a` and `b`
|
|
24
|
+
# fields in the message found in `f`, and `d` a field found in the
|
|
25
|
+
# message in `f.b`.
|
|
26
26
|
#
|
|
27
27
|
# Field masks are used to specify a subset of fields that should be
|
|
28
28
|
# returned by a get operation or modified by an update operation.
|
|
@@ -85,7 +85,7 @@ module Google
|
|
|
85
85
|
#
|
|
86
86
|
# If a repeated field is specified for an update operation, the existing
|
|
87
87
|
# repeated values in the target resource will be overwritten by the new values.
|
|
88
|
-
# Note that a repeated field is only allowed in the last position of a
|
|
88
|
+
# Note that a repeated field is only allowed in the last position of a `paths`
|
|
89
89
|
# string.
|
|
90
90
|
#
|
|
91
91
|
# If a sub-message is specified in the last position of the field mask for an
|
|
@@ -177,7 +177,7 @@ module Google
|
|
|
177
177
|
# string address = 2;
|
|
178
178
|
# }
|
|
179
179
|
#
|
|
180
|
-
# In proto a field mask for
|
|
180
|
+
# In proto a field mask for `Profile` may look as such:
|
|
181
181
|
#
|
|
182
182
|
# mask {
|
|
183
183
|
# paths: "user.display_name"
|
|
@@ -221,7 +221,7 @@ module Google
|
|
|
221
221
|
#
|
|
222
222
|
# The implementation of any API method which has a FieldMask type field in the
|
|
223
223
|
# request should verify the included field paths, and return an
|
|
224
|
-
#
|
|
224
|
+
# `INVALID_ARGUMENT` error if any path is duplicated or unmappable.
|
|
225
225
|
# @!attribute [rw] paths
|
|
226
226
|
# @return [Array<String>]
|
|
227
227
|
# The set of field mask paths.
|
|
@@ -29,13 +29,13 @@ module Google
|
|
|
29
29
|
#
|
|
30
30
|
# = Examples
|
|
31
31
|
#
|
|
32
|
-
# Example 1: Compute Timestamp from POSIX
|
|
32
|
+
# Example 1: Compute Timestamp from POSIX `time()`.
|
|
33
33
|
#
|
|
34
34
|
# Timestamp timestamp;
|
|
35
35
|
# timestamp.set_seconds(time(NULL));
|
|
36
36
|
# timestamp.set_nanos(0);
|
|
37
37
|
#
|
|
38
|
-
# Example 2: Compute Timestamp from POSIX
|
|
38
|
+
# Example 2: Compute Timestamp from POSIX `gettimeofday()`.
|
|
39
39
|
#
|
|
40
40
|
# struct timeval tv;
|
|
41
41
|
# gettimeofday(&tv, NULL);
|
|
@@ -44,7 +44,7 @@ module Google
|
|
|
44
44
|
# timestamp.set_seconds(tv.tv_sec);
|
|
45
45
|
# timestamp.set_nanos(tv.tv_usec * 1000);
|
|
46
46
|
#
|
|
47
|
-
# Example 3: Compute Timestamp from Win32
|
|
47
|
+
# Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
|
|
48
48
|
#
|
|
49
49
|
# FILETIME ft;
|
|
50
50
|
# GetSystemTimeAsFileTime(&ft);
|
|
@@ -56,7 +56,7 @@ module Google
|
|
|
56
56
|
# timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
|
|
57
57
|
# timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
|
|
58
58
|
#
|
|
59
|
-
# Example 4: Compute Timestamp from Java
|
|
59
|
+
# Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
|
|
60
60
|
#
|
|
61
61
|
# long millis = System.currentTimeMillis();
|
|
62
62
|
#
|
|
@@ -87,10 +87,10 @@ module Google
|
|
|
87
87
|
#
|
|
88
88
|
# In JavaScript, one can convert a Date object to this format using the
|
|
89
89
|
# standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString]
|
|
90
|
-
# method. In Python, a standard
|
|
91
|
-
# to this format using [
|
|
90
|
+
# method. In Python, a standard `datetime.datetime` object can be converted
|
|
91
|
+
# to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime)
|
|
92
92
|
# with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one
|
|
93
|
-
# can use the Joda Time's [
|
|
93
|
+
# can use the Joda Time's [`ISODateTimeFormat.dateTime()`](
|
|
94
94
|
# http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime--
|
|
95
95
|
# ) to obtain a formatter capable of generating timestamps in this format.
|
|
96
96
|
# @!attribute [rw] seconds
|
|
@@ -30,11 +30,11 @@ module Google
|
|
|
30
30
|
# @!attribute [rw] name
|
|
31
31
|
# @return [String]
|
|
32
32
|
# The name of the topic. It must have the format
|
|
33
|
-
#
|
|
34
|
-
# and contain only letters (
|
|
35
|
-
# underscores (
|
|
36
|
-
# signs (
|
|
37
|
-
# must not start with
|
|
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
38
|
# @!attribute [rw] labels
|
|
39
39
|
# @return [Hash{String => String}]
|
|
40
40
|
# User labels.
|
|
@@ -60,20 +60,20 @@ module Google
|
|
|
60
60
|
# @return [String]
|
|
61
61
|
# ID of this message, assigned by the server when the message is published.
|
|
62
62
|
# Guaranteed to be unique within the topic. This value may be read by a
|
|
63
|
-
# subscriber that receives a
|
|
64
|
-
# delivery. It must not be populated by the publisher in 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
65
|
# @!attribute [rw] publish_time
|
|
66
66
|
# @return [Google::Protobuf::Timestamp]
|
|
67
67
|
# The time at which the message was published, populated by the server when
|
|
68
|
-
# it receives the
|
|
69
|
-
# publisher in a
|
|
68
|
+
# it receives the `Publish` call. It must not be populated by the
|
|
69
|
+
# publisher in a `Publish` call.
|
|
70
70
|
class PubsubMessage; end
|
|
71
71
|
|
|
72
72
|
# Request for the GetTopic method.
|
|
73
73
|
# @!attribute [rw] topic
|
|
74
74
|
# @return [String]
|
|
75
75
|
# The name of the topic to get.
|
|
76
|
-
# Format is
|
|
76
|
+
# Format is `projects/{project}/topics/{topic}`.
|
|
77
77
|
class GetTopicRequest; end
|
|
78
78
|
|
|
79
79
|
# Request for the UpdateTopic method.
|
|
@@ -83,23 +83,23 @@ module Google
|
|
|
83
83
|
# @!attribute [rw] update_mask
|
|
84
84
|
# @return [Google::Protobuf::FieldMask]
|
|
85
85
|
# Indicates which fields in the provided topic to update. Must be specified
|
|
86
|
-
# and non-empty. Note that if
|
|
86
|
+
# and non-empty. Note that if `update_mask` contains
|
|
87
87
|
# "message_storage_policy" then the new value will be determined based on the
|
|
88
88
|
# policy configured at the project or organization level. The
|
|
89
|
-
#
|
|
89
|
+
# `message_storage_policy` must not be set in the `topic` provided above.
|
|
90
90
|
class UpdateTopicRequest; end
|
|
91
91
|
|
|
92
92
|
# Request for the Publish method.
|
|
93
93
|
# @!attribute [rw] topic
|
|
94
94
|
# @return [String]
|
|
95
95
|
# The messages in the request will be published on this topic.
|
|
96
|
-
# Format is
|
|
96
|
+
# Format is `projects/{project}/topics/{topic}`.
|
|
97
97
|
# @!attribute [rw] messages
|
|
98
98
|
# @return [Array<Google::Pubsub::V1::PubsubMessage>]
|
|
99
99
|
# The messages to publish.
|
|
100
100
|
class PublishRequest; end
|
|
101
101
|
|
|
102
|
-
# Response for the
|
|
102
|
+
# Response for the `Publish` method.
|
|
103
103
|
# @!attribute [rw] message_ids
|
|
104
104
|
# @return [Array<String>]
|
|
105
105
|
# The server-assigned ID of each published message, in the same order as
|
|
@@ -107,47 +107,47 @@ module Google
|
|
|
107
107
|
# the topic.
|
|
108
108
|
class PublishResponse; end
|
|
109
109
|
|
|
110
|
-
# Request for the
|
|
110
|
+
# Request for the `ListTopics` method.
|
|
111
111
|
# @!attribute [rw] project
|
|
112
112
|
# @return [String]
|
|
113
113
|
# The name of the cloud project that topics belong to.
|
|
114
|
-
# Format is
|
|
114
|
+
# Format is `projects/{project}`.
|
|
115
115
|
# @!attribute [rw] page_size
|
|
116
116
|
# @return [Integer]
|
|
117
117
|
# Maximum number of topics to return.
|
|
118
118
|
# @!attribute [rw] page_token
|
|
119
119
|
# @return [String]
|
|
120
|
-
# The value returned by the last
|
|
121
|
-
# a continuation of a prior
|
|
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
122
|
# return the next page of data.
|
|
123
123
|
class ListTopicsRequest; end
|
|
124
124
|
|
|
125
|
-
# Response for the
|
|
125
|
+
# Response for the `ListTopics` method.
|
|
126
126
|
# @!attribute [rw] topics
|
|
127
127
|
# @return [Array<Google::Pubsub::V1::Topic>]
|
|
128
128
|
# The resulting topics.
|
|
129
129
|
# @!attribute [rw] next_page_token
|
|
130
130
|
# @return [String]
|
|
131
131
|
# If not empty, indicates that there may be more topics that match the
|
|
132
|
-
# request; this value should be passed in a new
|
|
132
|
+
# request; this value should be passed in a new `ListTopicsRequest`.
|
|
133
133
|
class ListTopicsResponse; end
|
|
134
134
|
|
|
135
|
-
# Request for the
|
|
135
|
+
# Request for the `ListTopicSubscriptions` method.
|
|
136
136
|
# @!attribute [rw] topic
|
|
137
137
|
# @return [String]
|
|
138
138
|
# The name of the topic that subscriptions are attached to.
|
|
139
|
-
# Format is
|
|
139
|
+
# Format is `projects/{project}/topics/{topic}`.
|
|
140
140
|
# @!attribute [rw] page_size
|
|
141
141
|
# @return [Integer]
|
|
142
142
|
# Maximum number of subscription names to return.
|
|
143
143
|
# @!attribute [rw] page_token
|
|
144
144
|
# @return [String]
|
|
145
|
-
# The value returned by the last
|
|
146
|
-
# that this is a continuation of a prior
|
|
145
|
+
# The value returned by the last `ListTopicSubscriptionsResponse`; indicates
|
|
146
|
+
# that this is a continuation of a prior `ListTopicSubscriptions` call, and
|
|
147
147
|
# that the system should return the next page of data.
|
|
148
148
|
class ListTopicSubscriptionsRequest; end
|
|
149
149
|
|
|
150
|
-
# Response for the
|
|
150
|
+
# Response for the `ListTopicSubscriptions` method.
|
|
151
151
|
# @!attribute [rw] subscriptions
|
|
152
152
|
# @return [Array<String>]
|
|
153
153
|
# The names of the subscriptions that match the request.
|
|
@@ -155,28 +155,28 @@ module Google
|
|
|
155
155
|
# @return [String]
|
|
156
156
|
# If not empty, indicates that there may be more subscriptions that match
|
|
157
157
|
# the request; this value should be passed in a new
|
|
158
|
-
#
|
|
158
|
+
# `ListTopicSubscriptionsRequest` to get more subscriptions.
|
|
159
159
|
class ListTopicSubscriptionsResponse; end
|
|
160
160
|
|
|
161
|
-
# Request for the
|
|
161
|
+
# Request for the `ListTopicSnapshots` method.<br><br>
|
|
162
162
|
# <b>ALPHA:</b> This feature is part of an alpha release. This API might be
|
|
163
163
|
# changed in backward-incompatible ways and is not recommended for production
|
|
164
164
|
# use. It is not subject to any SLA or deprecation policy.
|
|
165
165
|
# @!attribute [rw] topic
|
|
166
166
|
# @return [String]
|
|
167
167
|
# The name of the topic that snapshots are attached to.
|
|
168
|
-
# Format is
|
|
168
|
+
# Format is `projects/{project}/topics/{topic}`.
|
|
169
169
|
# @!attribute [rw] page_size
|
|
170
170
|
# @return [Integer]
|
|
171
171
|
# Maximum number of snapshot names to return.
|
|
172
172
|
# @!attribute [rw] page_token
|
|
173
173
|
# @return [String]
|
|
174
|
-
# The value returned by the last
|
|
175
|
-
# that this is a continuation of a prior
|
|
174
|
+
# The value returned by the last `ListTopicSnapshotsResponse`; indicates
|
|
175
|
+
# that this is a continuation of a prior `ListTopicSnapshots` call, and
|
|
176
176
|
# that the system should return the next page of data.
|
|
177
177
|
class ListTopicSnapshotsRequest; end
|
|
178
178
|
|
|
179
|
-
# Response for the
|
|
179
|
+
# Response for the `ListTopicSnapshots` method.<br><br>
|
|
180
180
|
# <b>ALPHA:</b> This feature is part of an alpha release. This API might be
|
|
181
181
|
# changed in backward-incompatible ways and is not recommended for production
|
|
182
182
|
# use. It is not subject to any SLA or deprecation policy.
|
|
@@ -187,35 +187,35 @@ module Google
|
|
|
187
187
|
# @return [String]
|
|
188
188
|
# If not empty, indicates that there may be more snapshots that match
|
|
189
189
|
# the request; this value should be passed in a new
|
|
190
|
-
#
|
|
190
|
+
# `ListTopicSnapshotsRequest` to get more snapshots.
|
|
191
191
|
class ListTopicSnapshotsResponse; end
|
|
192
192
|
|
|
193
|
-
# Request for the
|
|
193
|
+
# Request for the `DeleteTopic` method.
|
|
194
194
|
# @!attribute [rw] topic
|
|
195
195
|
# @return [String]
|
|
196
196
|
# Name of the topic to delete.
|
|
197
|
-
# Format is
|
|
197
|
+
# Format is `projects/{project}/topics/{topic}`.
|
|
198
198
|
class DeleteTopicRequest; end
|
|
199
199
|
|
|
200
200
|
# A subscription resource.
|
|
201
201
|
# @!attribute [rw] name
|
|
202
202
|
# @return [String]
|
|
203
203
|
# The name of the subscription. It must have the format
|
|
204
|
-
#
|
|
205
|
-
# start with a letter, and contain only letters (
|
|
206
|
-
# (
|
|
207
|
-
# plus (
|
|
208
|
-
# in length, and it must not start with
|
|
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
209
|
# @!attribute [rw] topic
|
|
210
210
|
# @return [String]
|
|
211
211
|
# The name of the topic from which this subscription is receiving messages.
|
|
212
|
-
# Format is
|
|
213
|
-
# The value of this field will be
|
|
212
|
+
# Format is `projects/{project}/topics/{topic}`.
|
|
213
|
+
# The value of this field will be `_deleted-topic_` if the topic has been
|
|
214
214
|
# deleted.
|
|
215
215
|
# @!attribute [rw] push_config
|
|
216
216
|
# @return [Google::Pubsub::V1::PushConfig]
|
|
217
217
|
# If push delivery is used with this subscription, this field is
|
|
218
|
-
# used to configure it. An empty
|
|
218
|
+
# used to configure it. An empty `pushConfig` signifies that the subscriber
|
|
219
219
|
# will pull and ack messages using API methods.
|
|
220
220
|
# @!attribute [rw] ack_deadline_seconds
|
|
221
221
|
# @return [Integer]
|
|
@@ -227,9 +227,9 @@ module Google
|
|
|
227
227
|
#
|
|
228
228
|
# For pull subscriptions, this value is used as the initial value for the ack
|
|
229
229
|
# deadline. To override this value for a given message, call
|
|
230
|
-
#
|
|
231
|
-
# non-streaming pull or send the
|
|
232
|
-
#
|
|
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
233
|
# The minimum custom deadline you can specify is 10 seconds.
|
|
234
234
|
# The maximum custom deadline you can specify is 600 seconds (10 minutes).
|
|
235
235
|
# If this parameter is 0, a default value of 10 seconds is used.
|
|
@@ -243,7 +243,7 @@ module Google
|
|
|
243
243
|
# @return [true, false]
|
|
244
244
|
# Indicates whether to retain acknowledged messages. If true, then
|
|
245
245
|
# messages are not expunged from the subscription's backlog, even if they are
|
|
246
|
-
# acknowledged, until they fall out of the
|
|
246
|
+
# acknowledged, until they fall out of the `message_retention_duration`
|
|
247
247
|
# window.<br><br>
|
|
248
248
|
# <b>ALPHA:</b> This feature is part of an alpha release. This API might be
|
|
249
249
|
# changed in backward-incompatible ways and is not recommended for production
|
|
@@ -252,8 +252,8 @@ module Google
|
|
|
252
252
|
# @return [Google::Protobuf::Duration]
|
|
253
253
|
# How long to retain unacknowledged messages in the subscription's backlog,
|
|
254
254
|
# from the moment a message is published.
|
|
255
|
-
# If
|
|
256
|
-
# of acknowledged messages, and thus configures how far back in time a
|
|
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
257
|
# can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10
|
|
258
258
|
# minutes.<br><br>
|
|
259
259
|
# <b>ALPHA:</b> This feature is part of an alpha release. This API might be
|
|
@@ -276,22 +276,22 @@ module Google
|
|
|
276
276
|
# Every endpoint has a set of API supported attributes that can be used to
|
|
277
277
|
# control different aspects of the message delivery.
|
|
278
278
|
#
|
|
279
|
-
# The currently supported attribute is
|
|
279
|
+
# The currently supported attribute is `x-goog-version`, which you can
|
|
280
280
|
# use to change the format of the pushed message. This attribute
|
|
281
281
|
# indicates the version of the data expected by the endpoint. This
|
|
282
282
|
# controls the shape of the pushed message (i.e., its fields and metadata).
|
|
283
283
|
# The endpoint version is based on the version of the Pub/Sub API.
|
|
284
284
|
#
|
|
285
|
-
# If not present during the
|
|
285
|
+
# If not present during the `CreateSubscription` call, it will default to
|
|
286
286
|
# the version of the API used to make such call. If not present during a
|
|
287
|
-
#
|
|
287
|
+
# `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
|
|
288
288
|
# calls will always return a valid version, even if the subscription was
|
|
289
289
|
# created without this attribute.
|
|
290
290
|
#
|
|
291
291
|
# The possible values for this attribute are:
|
|
292
292
|
#
|
|
293
|
-
# *
|
|
294
|
-
# *
|
|
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
295
|
class PushConfig; end
|
|
296
296
|
|
|
297
297
|
# A message and its corresponding acknowledgment ID.
|
|
@@ -307,7 +307,7 @@ module Google
|
|
|
307
307
|
# @!attribute [rw] subscription
|
|
308
308
|
# @return [String]
|
|
309
309
|
# The name of the subscription to get.
|
|
310
|
-
# Format is
|
|
310
|
+
# Format is `projects/{project}/subscriptions/{sub}`.
|
|
311
311
|
class GetSubscriptionRequest; end
|
|
312
312
|
|
|
313
313
|
# Request for the UpdateSubscription method.
|
|
@@ -320,22 +320,22 @@ module Google
|
|
|
320
320
|
# Must be specified and non-empty.
|
|
321
321
|
class UpdateSubscriptionRequest; end
|
|
322
322
|
|
|
323
|
-
# Request for the
|
|
323
|
+
# Request for the `ListSubscriptions` method.
|
|
324
324
|
# @!attribute [rw] project
|
|
325
325
|
# @return [String]
|
|
326
326
|
# The name of the cloud project that subscriptions belong to.
|
|
327
|
-
# Format is
|
|
327
|
+
# Format is `projects/{project}`.
|
|
328
328
|
# @!attribute [rw] page_size
|
|
329
329
|
# @return [Integer]
|
|
330
330
|
# Maximum number of subscriptions to return.
|
|
331
331
|
# @!attribute [rw] page_token
|
|
332
332
|
# @return [String]
|
|
333
|
-
# The value returned by the last
|
|
334
|
-
# this is a continuation of a prior
|
|
333
|
+
# The value returned by the last `ListSubscriptionsResponse`; indicates that
|
|
334
|
+
# this is a continuation of a prior `ListSubscriptions` call, and that the
|
|
335
335
|
# system should return the next page of data.
|
|
336
336
|
class ListSubscriptionsRequest; end
|
|
337
337
|
|
|
338
|
-
# Response for the
|
|
338
|
+
# Response for the `ListSubscriptions` method.
|
|
339
339
|
# @!attribute [rw] subscriptions
|
|
340
340
|
# @return [Array<Google::Pubsub::V1::Subscription>]
|
|
341
341
|
# The subscriptions that match the request.
|
|
@@ -343,40 +343,40 @@ module Google
|
|
|
343
343
|
# @return [String]
|
|
344
344
|
# If not empty, indicates that there may be more subscriptions that match
|
|
345
345
|
# the request; this value should be passed in a new
|
|
346
|
-
#
|
|
346
|
+
# `ListSubscriptionsRequest` to get more subscriptions.
|
|
347
347
|
class ListSubscriptionsResponse; end
|
|
348
348
|
|
|
349
349
|
# Request for the DeleteSubscription method.
|
|
350
350
|
# @!attribute [rw] subscription
|
|
351
351
|
# @return [String]
|
|
352
352
|
# The subscription to delete.
|
|
353
|
-
# Format is
|
|
353
|
+
# Format is `projects/{project}/subscriptions/{sub}`.
|
|
354
354
|
class DeleteSubscriptionRequest; end
|
|
355
355
|
|
|
356
356
|
# Request for the ModifyPushConfig method.
|
|
357
357
|
# @!attribute [rw] subscription
|
|
358
358
|
# @return [String]
|
|
359
359
|
# The name of the subscription.
|
|
360
|
-
# Format is
|
|
360
|
+
# Format is `projects/{project}/subscriptions/{sub}`.
|
|
361
361
|
# @!attribute [rw] push_config
|
|
362
362
|
# @return [Google::Pubsub::V1::PushConfig]
|
|
363
363
|
# The push configuration for future deliveries.
|
|
364
364
|
#
|
|
365
|
-
# An empty
|
|
365
|
+
# An empty `pushConfig` indicates that the Pub/Sub system should
|
|
366
366
|
# stop pushing messages from the given subscription and allow
|
|
367
367
|
# messages to be pulled and acknowledged - effectively pausing
|
|
368
|
-
# the subscription if
|
|
368
|
+
# the subscription if `Pull` or `StreamingPull` is not called.
|
|
369
369
|
class ModifyPushConfigRequest; end
|
|
370
370
|
|
|
371
|
-
# Request for the
|
|
371
|
+
# Request for the `Pull` method.
|
|
372
372
|
# @!attribute [rw] subscription
|
|
373
373
|
# @return [String]
|
|
374
374
|
# The subscription from which messages should be pulled.
|
|
375
|
-
# Format is
|
|
375
|
+
# Format is `projects/{project}/subscriptions/{sub}`.
|
|
376
376
|
# @!attribute [rw] return_immediately
|
|
377
377
|
# @return [true, false]
|
|
378
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
|
|
379
|
+
# it there are no messages available to return in the `Pull` response.
|
|
380
380
|
# Otherwise, the system may wait (for a bounded amount of time) until at
|
|
381
381
|
# least one message is available, rather than returning no messages. The
|
|
382
382
|
# client may cancel the request if it does not wish to wait any longer for
|
|
@@ -387,12 +387,12 @@ module Google
|
|
|
387
387
|
# system may return fewer than the number specified.
|
|
388
388
|
class PullRequest; end
|
|
389
389
|
|
|
390
|
-
# Response for the
|
|
390
|
+
# Response for the `Pull` method.
|
|
391
391
|
# @!attribute [rw] received_messages
|
|
392
392
|
# @return [Array<Google::Pubsub::V1::ReceivedMessage>]
|
|
393
393
|
# Received Pub/Sub messages. The Pub/Sub system will return zero messages if
|
|
394
394
|
# there are no more available in the backlog. The Pub/Sub system may return
|
|
395
|
-
# fewer than the
|
|
395
|
+
# fewer than the `maxMessages` requested even if there are more messages
|
|
396
396
|
# available in the backlog.
|
|
397
397
|
class PullResponse; end
|
|
398
398
|
|
|
@@ -400,7 +400,7 @@ module Google
|
|
|
400
400
|
# @!attribute [rw] subscription
|
|
401
401
|
# @return [String]
|
|
402
402
|
# The name of the subscription.
|
|
403
|
-
# Format is
|
|
403
|
+
# Format is `projects/{project}/subscriptions/{sub}`.
|
|
404
404
|
# @!attribute [rw] ack_ids
|
|
405
405
|
# @return [Array<String>]
|
|
406
406
|
# List of acknowledgment IDs.
|
|
@@ -408,7 +408,7 @@ module Google
|
|
|
408
408
|
# @return [Integer]
|
|
409
409
|
# The new ack deadline with respect to the time this request was sent to
|
|
410
410
|
# the Pub/Sub system. For example, if the value is 10, the new
|
|
411
|
-
# ack deadline will expire 10 seconds after the
|
|
411
|
+
# ack deadline will expire 10 seconds after the `ModifyAckDeadline` call
|
|
412
412
|
# was made. Specifying zero may immediately make the message available for
|
|
413
413
|
# another pull request.
|
|
414
414
|
# The minimum deadline you can specify is 0 seconds.
|
|
@@ -419,14 +419,14 @@ module Google
|
|
|
419
419
|
# @!attribute [rw] subscription
|
|
420
420
|
# @return [String]
|
|
421
421
|
# The subscription whose message is being acknowledged.
|
|
422
|
-
# Format is
|
|
422
|
+
# Format is `projects/{project}/subscriptions/{sub}`.
|
|
423
423
|
# @!attribute [rw] ack_ids
|
|
424
424
|
# @return [Array<String>]
|
|
425
425
|
# The acknowledgment ID for the messages being acknowledged that was returned
|
|
426
|
-
# by the Pub/Sub system in the
|
|
426
|
+
# by the Pub/Sub system in the `Pull` response. Must not be empty.
|
|
427
427
|
class AcknowledgeRequest; end
|
|
428
428
|
|
|
429
|
-
# Request for the
|
|
429
|
+
# Request for the `StreamingPull` streaming RPC method. This request is used to
|
|
430
430
|
# establish the initial stream as well as to stream acknowledgements and ack
|
|
431
431
|
# deadline modifications from the client to the server.
|
|
432
432
|
# @!attribute [rw] subscription
|
|
@@ -434,31 +434,31 @@ module Google
|
|
|
434
434
|
# The subscription for which to initialize the new stream. This must be
|
|
435
435
|
# provided in the first request on the stream, and must not be set in
|
|
436
436
|
# subsequent requests from client to server.
|
|
437
|
-
# Format is
|
|
437
|
+
# Format is `projects/{project}/subscriptions/{sub}`.
|
|
438
438
|
# @!attribute [rw] ack_ids
|
|
439
439
|
# @return [Array<String>]
|
|
440
440
|
# List of acknowledgement IDs for acknowledging previously received messages
|
|
441
441
|
# (received on this stream or a different stream). If an ack ID has expired,
|
|
442
442
|
# the corresponding message may be redelivered later. Acknowledging a message
|
|
443
443
|
# more than once will not result in an error. If the acknowledgement ID is
|
|
444
|
-
# malformed, the stream will be aborted with status
|
|
444
|
+
# malformed, the stream will be aborted with status `INVALID_ARGUMENT`.
|
|
445
445
|
# @!attribute [rw] modify_deadline_seconds
|
|
446
446
|
# @return [Array<Integer>]
|
|
447
447
|
# The list of new ack deadlines for the IDs listed in
|
|
448
|
-
#
|
|
449
|
-
# size of
|
|
450
|
-
# with
|
|
451
|
-
# element in the same position 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
452
|
# deadline is with respect to the time this request was sent to the Pub/Sub
|
|
453
453
|
# system. Must be >= 0. For example, if the value is 10, the new ack deadline
|
|
454
454
|
# will expire 10 seconds after this request is received. If the value is 0,
|
|
455
455
|
# the message is immediately made available for another streaming or
|
|
456
456
|
# non-streaming pull request. If the value is < 0 (an error), the stream will
|
|
457
|
-
# be aborted with status
|
|
457
|
+
# be aborted with status `INVALID_ARGUMENT`.
|
|
458
458
|
# @!attribute [rw] modify_deadline_ack_ids
|
|
459
459
|
# @return [Array<String>]
|
|
460
460
|
# List of acknowledgement IDs whose deadline will be modified based on the
|
|
461
|
-
# corresponding element in
|
|
461
|
+
# corresponding element in `modify_deadline_seconds`. This field can be used
|
|
462
462
|
# to indicate that more time is needed to process a message by the
|
|
463
463
|
# subscriber, or to make the message available for redelivery if the
|
|
464
464
|
# processing was interrupted.
|
|
@@ -470,14 +470,14 @@ module Google
|
|
|
470
470
|
# seconds. The maximum deadline you can specify is 600 seconds (10 minutes).
|
|
471
471
|
class StreamingPullRequest; end
|
|
472
472
|
|
|
473
|
-
# Response for the
|
|
473
|
+
# Response for the `StreamingPull` method. This response is used to stream
|
|
474
474
|
# messages from the server to the client.
|
|
475
475
|
# @!attribute [rw] received_messages
|
|
476
476
|
# @return [Array<Google::Pubsub::V1::ReceivedMessage>]
|
|
477
477
|
# Received Pub/Sub messages. This will not be empty.
|
|
478
478
|
class StreamingPullResponse; end
|
|
479
479
|
|
|
480
|
-
# Request for the
|
|
480
|
+
# Request for the `CreateSnapshot` method.<br><br>
|
|
481
481
|
# <b>ALPHA:</b> This feature is part of an alpha release. This API might be changed in
|
|
482
482
|
# backward-incompatible ways and is not recommended for production use.
|
|
483
483
|
# It is not subject to any SLA or deprecation policy.
|
|
@@ -487,7 +487,7 @@ module Google
|
|
|
487
487
|
# If the name is not provided in the request, the server will assign a random
|
|
488
488
|
# name for this snapshot on the same project as the subscription.
|
|
489
489
|
# Note that for REST API requests, you must specify a name.
|
|
490
|
-
# Format is
|
|
490
|
+
# Format is `projects/{project}/snapshots/{snap}`.
|
|
491
491
|
# @!attribute [rw] subscription
|
|
492
492
|
# @return [String]
|
|
493
493
|
# The subscription whose backlog the snapshot retains.
|
|
@@ -495,10 +495,10 @@ module Google
|
|
|
495
495
|
# (a) The existing backlog on the subscription. More precisely, this is
|
|
496
496
|
# defined as the messages in the subscription's backlog that are
|
|
497
497
|
# unacknowledged upon the successful completion of the
|
|
498
|
-
#
|
|
498
|
+
# `CreateSnapshot` request; as well as:
|
|
499
499
|
# (b) Any messages published to the subscription's topic following the
|
|
500
500
|
# successful completion of the CreateSnapshot request.
|
|
501
|
-
# Format is
|
|
501
|
+
# Format is `projects/{project}/subscriptions/{sub}`.
|
|
502
502
|
# @!attribute [rw] labels
|
|
503
503
|
# @return [Hash{String => String}]
|
|
504
504
|
# User labels.
|
|
@@ -533,7 +533,7 @@ module Google
|
|
|
533
533
|
# A newly-created snapshot expires no later than 7 days from the time of its
|
|
534
534
|
# creation. Its exact lifetime is determined at creation by the existing
|
|
535
535
|
# backlog in the source subscription. Specifically, the lifetime of the
|
|
536
|
-
# snapshot is
|
|
536
|
+
# snapshot is `7 days - (age of oldest unacked message in the subscription)`.
|
|
537
537
|
# For example, consider a subscription whose oldest unacked message is 3 days
|
|
538
538
|
# old. If a snapshot is created from this subscription, the snapshot -- which
|
|
539
539
|
# will always capture this 3-day-old backlog as long as the snapshot
|
|
@@ -551,28 +551,28 @@ module Google
|
|
|
551
551
|
# @!attribute [rw] snapshot
|
|
552
552
|
# @return [String]
|
|
553
553
|
# The name of the snapshot to get.
|
|
554
|
-
# Format is
|
|
554
|
+
# Format is `projects/{project}/snapshots/{snap}`.
|
|
555
555
|
class GetSnapshotRequest; end
|
|
556
556
|
|
|
557
|
-
# Request for the
|
|
557
|
+
# Request for the `ListSnapshots` method.<br><br>
|
|
558
558
|
# <b>ALPHA:</b> This feature is part of an alpha release. This API might be
|
|
559
559
|
# changed in backward-incompatible ways and is not recommended for production
|
|
560
560
|
# use. It is not subject to any SLA or deprecation policy.
|
|
561
561
|
# @!attribute [rw] project
|
|
562
562
|
# @return [String]
|
|
563
563
|
# The name of the cloud project that snapshots belong to.
|
|
564
|
-
# Format is
|
|
564
|
+
# Format is `projects/{project}`.
|
|
565
565
|
# @!attribute [rw] page_size
|
|
566
566
|
# @return [Integer]
|
|
567
567
|
# Maximum number of snapshots to return.
|
|
568
568
|
# @!attribute [rw] page_token
|
|
569
569
|
# @return [String]
|
|
570
|
-
# The value returned by the last
|
|
571
|
-
# is a continuation of a prior
|
|
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
572
|
# should return the next page of data.
|
|
573
573
|
class ListSnapshotsRequest; end
|
|
574
574
|
|
|
575
|
-
# Response for the
|
|
575
|
+
# Response for the `ListSnapshots` method.<br><br>
|
|
576
576
|
# <b>ALPHA:</b> This feature is part of an alpha release. This API might be
|
|
577
577
|
# changed in backward-incompatible ways and is not recommended for production
|
|
578
578
|
# use. It is not subject to any SLA or deprecation policy.
|
|
@@ -582,20 +582,20 @@ module Google
|
|
|
582
582
|
# @!attribute [rw] next_page_token
|
|
583
583
|
# @return [String]
|
|
584
584
|
# If not empty, indicates that there may be more snapshot that match the
|
|
585
|
-
# request; this value should be passed in a new
|
|
585
|
+
# request; this value should be passed in a new `ListSnapshotsRequest`.
|
|
586
586
|
class ListSnapshotsResponse; end
|
|
587
587
|
|
|
588
|
-
# Request for the
|
|
588
|
+
# Request for the `DeleteSnapshot` method.<br><br>
|
|
589
589
|
# <b>ALPHA:</b> This feature is part of an alpha release. This API might be
|
|
590
590
|
# changed in backward-incompatible ways and is not recommended for production
|
|
591
591
|
# use. It is not subject to any SLA or deprecation policy.
|
|
592
592
|
# @!attribute [rw] snapshot
|
|
593
593
|
# @return [String]
|
|
594
594
|
# The name of the snapshot to delete.
|
|
595
|
-
# Format is
|
|
595
|
+
# Format is `projects/{project}/snapshots/{snap}`.
|
|
596
596
|
class DeleteSnapshotRequest; end
|
|
597
597
|
|
|
598
|
-
# Request for the
|
|
598
|
+
# Request for the `Seek` method.<br><br>
|
|
599
599
|
# <b>ALPHA:</b> This feature is part of an alpha release. This API might be
|
|
600
600
|
# changed in backward-incompatible ways and is not recommended for production
|
|
601
601
|
# use. It is not subject to any SLA or deprecation policy.
|
|
@@ -610,8 +610,8 @@ module Google
|
|
|
610
610
|
# subscription that were published after this time are marked as
|
|
611
611
|
# unacknowledged. Note that this operation affects only those messages
|
|
612
612
|
# retained in the subscription (configured by the combination of
|
|
613
|
-
#
|
|
614
|
-
# if
|
|
613
|
+
# `message_retention_duration` and `retain_acked_messages`). For example,
|
|
614
|
+
# if `time` corresponds to a point before the message retention
|
|
615
615
|
# window (or to a point before the system's notion of the subscription
|
|
616
616
|
# creation time), only retained messages will be marked as unacknowledged,
|
|
617
617
|
# and already-expunged messages will not be restored.
|
|
@@ -619,7 +619,7 @@ module Google
|
|
|
619
619
|
# @return [String]
|
|
620
620
|
# The snapshot to seek to. The snapshot's topic must be the same as that of
|
|
621
621
|
# the provided subscription.
|
|
622
|
-
# Format is
|
|
622
|
+
# Format is `projects/{project}/snapshots/{snap}`.
|
|
623
623
|
class SeekRequest; end
|
|
624
624
|
|
|
625
625
|
class SeekResponse; end
|