blob: d8041684fa792cf283aee705975dbd89c8ddd0d6 [file] [log] [blame]
Craig Citro065b5302014-08-14 00:47:23 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070075<h1><a href="pubsub_v1beta1a.html">Cloud Pub/Sub API</a> . <a href="pubsub_v1beta1a.subscriptions.html">subscriptions</a></h1>
Craig Citro065b5302014-08-14 00:47:23 -070076<h2>Instance Methods</h2>
77<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -070078 <code><a href="#acknowledge">acknowledge(body, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080079<p class="firstline">Acknowledges a particular received message: the Pub/Sub system can remove</p>
Craig Citro065b5302014-08-14 00:47:23 -070080<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -070081 <code><a href="#create">create(body, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080082<p class="firstline">Creates a subscription on a given topic for a given subscriber.</p>
Craig Citro065b5302014-08-14 00:47:23 -070083<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -070084 <code><a href="#delete">delete(subscription, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080085<p class="firstline">Deletes an existing subscription. All pending messages in the subscription</p>
Craig Citro065b5302014-08-14 00:47:23 -070086<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -070087 <code><a href="#get">get(subscription, x__xgafv=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -070088<p class="firstline">Gets the configuration details of a subscription.</p>
89<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -070090 <code><a href="#list">list(maxResults=None, pageToken=None, query=None, x__xgafv=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -070091<p class="firstline">Lists matching subscriptions.</p>
92<p class="toc_element">
93 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
95<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -070096 <code><a href="#modifyAckDeadline">modifyAckDeadline(body, x__xgafv=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -070097<p class="firstline">Modifies the Ack deadline for a message received from a pull request.</p>
98<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -070099 <code><a href="#modifyPushConfig">modifyPushConfig(body, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800100<p class="firstline">Modifies the <code>PushConfig</code> for a specified subscription.</p>
Craig Citro065b5302014-08-14 00:47:23 -0700101<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700102 <code><a href="#pull">pull(body, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800103<p class="firstline">Pulls a single message from the server.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800104<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700105 <code><a href="#pullBatch">pullBatch(body, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800106<p class="firstline">Pulls messages from the server. Returns an empty list if there are no</p>
Craig Citro065b5302014-08-14 00:47:23 -0700107<h3>Method Details</h3>
108<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700109 <code class="details" id="acknowledge">acknowledge(body, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800110 <pre>Acknowledges a particular received message: the Pub/Sub system can remove
111the given message from the subscription. Acknowledging a message whose
112Ack deadline has expired may succeed, but the message could have been
113already redelivered. Acknowledging a message more than once will not
114result in an error. This is only used for messages received via pull.
Craig Citro065b5302014-08-14 00:47:23 -0700115
116Args:
117 body: object, The request body. (required)
118 The object takes the form of:
119
Craig Citroe633be12015-03-02 13:40:36 -0800120{ # Request for the Acknowledge method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800121 "ackId": [ # The acknowledgment ID for the message being acknowledged. This was
122 # returned by the Pub/Sub system in the Pull response.
Craig Citro065b5302014-08-14 00:47:23 -0700123 "A String",
124 ],
125 "subscription": "A String", # The subscription whose message is being acknowledged.
126 }
127
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700128 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800129 Allowed values
130 1 - v1 error format
131 2 - v2 error format
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700132
133Returns:
134 An object of the form:
135
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800136 { # An empty message that you can re-use to avoid defining duplicated empty
137 # messages in your project. A typical example is to use it as argument or the
138 # return value of a service API. For instance:
139 #
140 # service Foo {
141 # rpc Bar (proto2.Empty) returns (proto2.Empty) { };
142 # };
143 #
144 # BEGIN GOOGLE-INTERNAL
145 # The difference between this one and net/rpc/empty-message.proto is that
146 # 1) The generated message here is in proto2 C++ API.
147 # 2) The proto2.Empty has minimum dependencies
148 # (no message_set or net/rpc dependencies)
149 # END GOOGLE-INTERNAL
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700150 }</pre>
Craig Citro065b5302014-08-14 00:47:23 -0700151</div>
152
153<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700154 <code class="details" id="create">create(body, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800155 <pre>Creates a subscription on a given topic for a given subscriber.
156If the subscription already exists, returns ALREADY_EXISTS.
157If the corresponding topic doesn't exist, returns NOT_FOUND.
158
159If the name is not provided in the request, the server will assign a random
160name for this subscription on the same project as the topic.
Craig Citroe633be12015-03-02 13:40:36 -0800161
Craig Citro065b5302014-08-14 00:47:23 -0700162Args:
163 body: object, The request body. (required)
164 The object takes the form of:
165
166{ # A subscription resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700167 "topic": "A String", # The name of the topic from which this subscription is receiving messages.
168 "ackDeadlineSeconds": 42, # For either push or pull delivery, the value is the maximum time after a
169 # subscriber receives a message before the subscriber should acknowledge or
170 # Nack the message. If the Ack deadline for a message passes without an
171 # Ack or a Nack, the Pub/Sub system will eventually redeliver the message.
172 # If a subscriber acknowledges after the deadline, the Pub/Sub system may
173 # accept the Ack, but it is possible that the message has been already
174 # delivered again. Multiple Acks to the message are allowed and will
175 # succeed.
176 #
177 # For push delivery, this value is used to set the request timeout for
178 # the call to the push endpoint.
179 #
180 # For pull delivery, this value is used as the initial value for the Ack
181 # deadline. It may be overridden for each message using its corresponding
182 # ack_id with <code>ModifyAckDeadline</code>.
183 # While a message is outstanding (i.e. it has been delivered to a pull
184 # subscriber and the subscriber has not yet Acked or Nacked), the Pub/Sub
185 # system will not deliver that message to another pull subscriber
186 # (on a best-effort basis).
187 "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is
188 # used to configure it.
189 "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed.
190 # For example, a Webhook endpoint might use "https://example.com/push".
191 },
192 "name": "A String", # Name of the subscription.
193 }
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700194
195 x__xgafv: string, V1 error format.
196 Allowed values
197 1 - v1 error format
198 2 - v2 error format
199
200Returns:
201 An object of the form:
202
203 { # A subscription resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700204 "topic": "A String", # The name of the topic from which this subscription is receiving messages.
205 "ackDeadlineSeconds": 42, # For either push or pull delivery, the value is the maximum time after a
206 # subscriber receives a message before the subscriber should acknowledge or
207 # Nack the message. If the Ack deadline for a message passes without an
208 # Ack or a Nack, the Pub/Sub system will eventually redeliver the message.
209 # If a subscriber acknowledges after the deadline, the Pub/Sub system may
210 # accept the Ack, but it is possible that the message has been already
211 # delivered again. Multiple Acks to the message are allowed and will
212 # succeed.
213 #
214 # For push delivery, this value is used to set the request timeout for
215 # the call to the push endpoint.
216 #
217 # For pull delivery, this value is used as the initial value for the Ack
218 # deadline. It may be overridden for each message using its corresponding
219 # ack_id with <code>ModifyAckDeadline</code>.
220 # While a message is outstanding (i.e. it has been delivered to a pull
221 # subscriber and the subscriber has not yet Acked or Nacked), the Pub/Sub
222 # system will not deliver that message to another pull subscriber
223 # (on a best-effort basis).
224 "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is
225 # used to configure it.
226 "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed.
227 # For example, a Webhook endpoint might use "https://example.com/push".
228 },
229 "name": "A String", # Name of the subscription.
230 }</pre>
Craig Citro065b5302014-08-14 00:47:23 -0700231</div>
232
233<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700234 <code class="details" id="delete">delete(subscription, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800235 <pre>Deletes an existing subscription. All pending messages in the subscription
236are immediately dropped. Calls to Pull after deletion will return
237NOT_FOUND.
Craig Citro065b5302014-08-14 00:47:23 -0700238
239Args:
240 subscription: string, The subscription to delete. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700241 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800242 Allowed values
243 1 - v1 error format
244 2 - v2 error format
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700245
246Returns:
247 An object of the form:
248
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800249 { # An empty message that you can re-use to avoid defining duplicated empty
250 # messages in your project. A typical example is to use it as argument or the
251 # return value of a service API. For instance:
252 #
253 # service Foo {
254 # rpc Bar (proto2.Empty) returns (proto2.Empty) { };
255 # };
256 #
257 # BEGIN GOOGLE-INTERNAL
258 # The difference between this one and net/rpc/empty-message.proto is that
259 # 1) The generated message here is in proto2 C++ API.
260 # 2) The proto2.Empty has minimum dependencies
261 # (no message_set or net/rpc dependencies)
262 # END GOOGLE-INTERNAL
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700263 }</pre>
Craig Citro065b5302014-08-14 00:47:23 -0700264</div>
265
266<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700267 <code class="details" id="get">get(subscription, x__xgafv=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -0700268 <pre>Gets the configuration details of a subscription.
269
270Args:
271 subscription: string, The name of the subscription to get. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700272 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800273 Allowed values
274 1 - v1 error format
275 2 - v2 error format
Craig Citro065b5302014-08-14 00:47:23 -0700276
277Returns:
278 An object of the form:
279
280 { # A subscription resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700281 "topic": "A String", # The name of the topic from which this subscription is receiving messages.
282 "ackDeadlineSeconds": 42, # For either push or pull delivery, the value is the maximum time after a
283 # subscriber receives a message before the subscriber should acknowledge or
284 # Nack the message. If the Ack deadline for a message passes without an
285 # Ack or a Nack, the Pub/Sub system will eventually redeliver the message.
286 # If a subscriber acknowledges after the deadline, the Pub/Sub system may
287 # accept the Ack, but it is possible that the message has been already
288 # delivered again. Multiple Acks to the message are allowed and will
289 # succeed.
290 #
291 # For push delivery, this value is used to set the request timeout for
292 # the call to the push endpoint.
293 #
294 # For pull delivery, this value is used as the initial value for the Ack
295 # deadline. It may be overridden for each message using its corresponding
296 # ack_id with <code>ModifyAckDeadline</code>.
297 # While a message is outstanding (i.e. it has been delivered to a pull
298 # subscriber and the subscriber has not yet Acked or Nacked), the Pub/Sub
299 # system will not deliver that message to another pull subscriber
300 # (on a best-effort basis).
301 "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is
302 # used to configure it.
303 "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed.
304 # For example, a Webhook endpoint might use "https://example.com/push".
305 },
306 "name": "A String", # Name of the subscription.
307 }</pre>
Craig Citro065b5302014-08-14 00:47:23 -0700308</div>
309
310<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700311 <code class="details" id="list">list(maxResults=None, pageToken=None, query=None, x__xgafv=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -0700312 <pre>Lists matching subscriptions.
313
314Args:
Craig Citro065b5302014-08-14 00:47:23 -0700315 maxResults: integer, Maximum number of subscriptions to return.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800316 pageToken: string, The value obtained in the last <code>ListSubscriptionsResponse</code>
317for continuation.
Craig Citro065b5302014-08-14 00:47:23 -0700318 query: string, A valid label query expression.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700319 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800320 Allowed values
321 1 - v1 error format
322 2 - v2 error format
Craig Citro065b5302014-08-14 00:47:23 -0700323
324Returns:
325 An object of the form:
326
Craig Citroe633be12015-03-02 13:40:36 -0800327 { # Response for the ListSubscriptions method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800328 "nextPageToken": "A String", # If not empty, indicates that there are more subscriptions that match the
329 # request and this value should be passed to the next
330 # <code>ListSubscriptionsRequest</code> to continue.
Craig Citro065b5302014-08-14 00:47:23 -0700331 "subscription": [ # The subscriptions that match the request.
332 { # A subscription resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700333 "topic": "A String", # The name of the topic from which this subscription is receiving messages.
334 "ackDeadlineSeconds": 42, # For either push or pull delivery, the value is the maximum time after a
335 # subscriber receives a message before the subscriber should acknowledge or
336 # Nack the message. If the Ack deadline for a message passes without an
337 # Ack or a Nack, the Pub/Sub system will eventually redeliver the message.
338 # If a subscriber acknowledges after the deadline, the Pub/Sub system may
339 # accept the Ack, but it is possible that the message has been already
340 # delivered again. Multiple Acks to the message are allowed and will
341 # succeed.
342 #
343 # For push delivery, this value is used to set the request timeout for
344 # the call to the push endpoint.
345 #
346 # For pull delivery, this value is used as the initial value for the Ack
347 # deadline. It may be overridden for each message using its corresponding
348 # ack_id with <code>ModifyAckDeadline</code>.
349 # While a message is outstanding (i.e. it has been delivered to a pull
350 # subscriber and the subscriber has not yet Acked or Nacked), the Pub/Sub
351 # system will not deliver that message to another pull subscriber
352 # (on a best-effort basis).
353 "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is
354 # used to configure it.
355 "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed.
356 # For example, a Webhook endpoint might use "https://example.com/push".
357 },
358 "name": "A String", # Name of the subscription.
Craig Citro065b5302014-08-14 00:47:23 -0700359 },
Craig Citro065b5302014-08-14 00:47:23 -0700360 ],
361 }</pre>
362</div>
363
364<div class="method">
365 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
366 <pre>Retrieves the next page of results.
367
368Args:
369 previous_request: The request for the previous page. (required)
370 previous_response: The response from the request for the previous page. (required)
371
372Returns:
373 A request object that you can call 'execute()' on to request the next
374 page. Returns None if there are no more items in the collection.
375 </pre>
376</div>
377
378<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700379 <code class="details" id="modifyAckDeadline">modifyAckDeadline(body, x__xgafv=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -0700380 <pre>Modifies the Ack deadline for a message received from a pull request.
381
382Args:
383 body: object, The request body. (required)
384 The object takes the form of:
385
Craig Citroe633be12015-03-02 13:40:36 -0800386{ # Request for the ModifyAckDeadline method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800387 "ackDeadlineSeconds": 42, # The new ack deadline with respect to the time this request was sent to the
388 # Pub/Sub system. Must be >= 0. For example, if the value is 10, the new ack
389 # deadline will expire 10 seconds after the ModifyAckDeadline call was made.
390 # Specifying zero may immediately make the message available for another pull
391 # request.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700392 "ackId": "A String", # The acknowledgment ID. Either this or ack_ids must be populated,
393 # not both.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800394 "ackIds": [ # List of acknowledgment IDs. Either this field or ack_id
395 # should be populated, not both.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000396 "A String",
397 ],
Thomas Coffee2f245372017-03-27 10:39:26 -0700398 "subscription": "A String", # Next Index: 5
399 # The name of the subscription from which messages are being pulled.
Craig Citro065b5302014-08-14 00:47:23 -0700400 }
401
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700402 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800403 Allowed values
404 1 - v1 error format
405 2 - v2 error format
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700406
407Returns:
408 An object of the form:
409
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800410 { # An empty message that you can re-use to avoid defining duplicated empty
411 # messages in your project. A typical example is to use it as argument or the
412 # return value of a service API. For instance:
413 #
414 # service Foo {
415 # rpc Bar (proto2.Empty) returns (proto2.Empty) { };
416 # };
417 #
418 # BEGIN GOOGLE-INTERNAL
419 # The difference between this one and net/rpc/empty-message.proto is that
420 # 1) The generated message here is in proto2 C++ API.
421 # 2) The proto2.Empty has minimum dependencies
422 # (no message_set or net/rpc dependencies)
423 # END GOOGLE-INTERNAL
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700424 }</pre>
Craig Citro065b5302014-08-14 00:47:23 -0700425</div>
426
427<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700428 <code class="details" id="modifyPushConfig">modifyPushConfig(body, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800429 <pre>Modifies the <code>PushConfig</code> for a specified subscription.
430This method can be used to suspend the flow of messages to an endpoint
431by clearing the <code>PushConfig</code> field in the request. Messages
432will be accumulated for delivery even if no push configuration is
433defined or while the configuration is modified.
Craig Citro065b5302014-08-14 00:47:23 -0700434
435Args:
436 body: object, The request body. (required)
437 The object takes the form of:
438
Craig Citroe633be12015-03-02 13:40:36 -0800439{ # Request for the ModifyPushConfig method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800440 "pushConfig": { # Configuration for a push delivery endpoint. # An empty <code>push_config</code> indicates that the Pub/Sub system should
441 # pause pushing messages from the given subscription.
442 "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed.
443 # For example, a Webhook endpoint might use "https://example.com/push".
Craig Citro065b5302014-08-14 00:47:23 -0700444 },
445 "subscription": "A String", # The name of the subscription.
446 }
447
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700448 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800449 Allowed values
450 1 - v1 error format
451 2 - v2 error format
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700452
453Returns:
454 An object of the form:
455
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800456 { # An empty message that you can re-use to avoid defining duplicated empty
457 # messages in your project. A typical example is to use it as argument or the
458 # return value of a service API. For instance:
459 #
460 # service Foo {
461 # rpc Bar (proto2.Empty) returns (proto2.Empty) { };
462 # };
463 #
464 # BEGIN GOOGLE-INTERNAL
465 # The difference between this one and net/rpc/empty-message.proto is that
466 # 1) The generated message here is in proto2 C++ API.
467 # 2) The proto2.Empty has minimum dependencies
468 # (no message_set or net/rpc dependencies)
469 # END GOOGLE-INTERNAL
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700470 }</pre>
Craig Citro065b5302014-08-14 00:47:23 -0700471</div>
472
473<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700474 <code class="details" id="pull">pull(body, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800475 <pre>Pulls a single message from the server.
476If return_immediately is true, and no messages are available in the
477subscription, this method returns FAILED_PRECONDITION. The system is free
478to return an UNAVAILABLE error if no messages are available in a
479reasonable amount of time (to reduce system load).
Craig Citro065b5302014-08-14 00:47:23 -0700480
481Args:
482 body: object, The request body. (required)
483 The object takes the form of:
484
Craig Citroe633be12015-03-02 13:40:36 -0800485{ # Request for the Pull method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800486 "returnImmediately": True or False, # If this is specified as true the system will respond immediately even if
487 # it is not able to return a message in the Pull response. Otherwise the
488 # system is allowed to wait until at least one message is available rather
489 # than returning FAILED_PRECONDITION. The client may cancel the request if
490 # it does not wish to wait any longer for the response.
Craig Citro065b5302014-08-14 00:47:23 -0700491 "subscription": "A String", # The subscription from which a message should be pulled.
492 }
493
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700494 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800495 Allowed values
496 1 - v1 error format
497 2 - v2 error format
Craig Citro065b5302014-08-14 00:47:23 -0700498
499Returns:
500 An object of the form:
501
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800502 { # Either a <code>PubsubMessage</code> or a truncation event. One of these two
503 # must be populated.
Craig Citro065b5302014-08-14 00:47:23 -0700504 "pubsubEvent": { # An event indicating a received message or truncation event. # A pubsub message or truncation event.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800505 "deleted": True or False, # Indicates that this subscription has been deleted. (Note that pull
506 # subscribers will always receive NOT_FOUND in response in their pull
507 # request on the subscription, rather than seeing this boolean.)
Craig Citro065b5302014-08-14 00:47:23 -0700508 "message": { # A message data and its labels. # A received message.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800509 "label": [ # Optional list of labels for this message. Keys in this collection must
510 # be unique.
Craig Citro065b5302014-08-14 00:47:23 -0700511 { # A key-value pair applied to a given object.
512 "numValue": "A String", # An integer value.
513 "strValue": "A String", # A string value.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800514 "key": "A String", # The key of a label is a syntactically valid URL (as per RFC 1738) with
515 # the "scheme" and initial slashes omitted and with the additional
516 # restrictions noted below. Each key should be globally unique. The
517 # "host" portion is called the "namespace" and is not necessarily
518 # resolvable to a network endpoint. Instead, the namespace indicates what
519 # system or entity defines the semantics of the label. Namespaces do not
520 # restrict the set of objects to which a label may be associated.
521 #
522 # Keys are defined by the following grammar:
523 #
524 # key = hostname "/" kpath
525 # kpath = ksegment *[ "/" ksegment ]
526 # ksegment = alphadigit | *[ alphadigit | "-" | "_" | "." ]
527 #
528 # where "hostname" and "alphadigit" are defined as in RFC 1738.
529 #
530 # Example key:
531 # spanner.google.com/universe
Craig Citro065b5302014-08-14 00:47:23 -0700532 },
533 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800534 "data": "A String", # The message payload.
535 "publishTime": "A String", # The time at which the message was published.
536 # The time is milliseconds since the UNIX epoch.
537 "messageId": "A String", # ID of this message assigned by the server at publication time. Guaranteed
538 # to be unique within the topic. This value may be read by a subscriber
539 # that receives a PubsubMessage via a Pull call or a push delivery. It must
540 # not be populated by a publisher in a Publish call.
Craig Citro065b5302014-08-14 00:47:23 -0700541 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400542 "truncated": True or False, # Indicates that this subscription has been truncated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700543 "subscription": "A String", # The subscription that received the event.
Craig Citro065b5302014-08-14 00:47:23 -0700544 },
545 "ackId": "A String", # This ID must be used to acknowledge the received event or message.
546 }</pre>
547</div>
548
Craig Citroe633be12015-03-02 13:40:36 -0800549<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700550 <code class="details" id="pullBatch">pullBatch(body, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800551 <pre>Pulls messages from the server. Returns an empty list if there are no
552messages available in the backlog. The system is free to return UNAVAILABLE
553if there are too many pull requests outstanding for the given subscription.
Craig Citroe633be12015-03-02 13:40:36 -0800554
555Args:
556 body: object, The request body. (required)
557 The object takes the form of:
558
559{ # Request for the PullBatch method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800560 "maxEvents": 42, # The maximum number of PubsubEvents returned for this request. The Pub/Sub
561 # system may return fewer than the number of events specified.
562 "returnImmediately": True or False, # If this is specified as true the system will respond immediately even if
563 # it is not able to return a message in the Pull response. Otherwise the
564 # system is allowed to wait until at least one message is available rather
565 # than returning no messages. The client may cancel the request if it does
566 # not wish to wait any longer for the response.
Craig Citroe633be12015-03-02 13:40:36 -0800567 "subscription": "A String", # The subscription from which messages should be pulled.
568 }
569
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700570 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800571 Allowed values
572 1 - v1 error format
573 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800574
575Returns:
576 An object of the form:
577
578 { # Response for the PullBatch method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800579 "pullResponses": [ # Received Pub/Sub messages or status events. The Pub/Sub system will return
580 # zero messages if there are no more messages available in the backlog. The
581 # Pub/Sub system may return fewer than the max_events requested even if
582 # there are more messages available in the backlog.
583 { # Either a <code>PubsubMessage</code> or a truncation event. One of these two
584 # must be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800585 "pubsubEvent": { # An event indicating a received message or truncation event. # A pubsub message or truncation event.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800586 "deleted": True or False, # Indicates that this subscription has been deleted. (Note that pull
587 # subscribers will always receive NOT_FOUND in response in their pull
588 # request on the subscription, rather than seeing this boolean.)
Craig Citroe633be12015-03-02 13:40:36 -0800589 "message": { # A message data and its labels. # A received message.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800590 "label": [ # Optional list of labels for this message. Keys in this collection must
591 # be unique.
Craig Citroe633be12015-03-02 13:40:36 -0800592 { # A key-value pair applied to a given object.
593 "numValue": "A String", # An integer value.
594 "strValue": "A String", # A string value.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800595 "key": "A String", # The key of a label is a syntactically valid URL (as per RFC 1738) with
596 # the "scheme" and initial slashes omitted and with the additional
597 # restrictions noted below. Each key should be globally unique. The
598 # "host" portion is called the "namespace" and is not necessarily
599 # resolvable to a network endpoint. Instead, the namespace indicates what
600 # system or entity defines the semantics of the label. Namespaces do not
601 # restrict the set of objects to which a label may be associated.
602 #
603 # Keys are defined by the following grammar:
604 #
605 # key = hostname "/" kpath
606 # kpath = ksegment *[ "/" ksegment ]
607 # ksegment = alphadigit | *[ alphadigit | "-" | "_" | "." ]
608 #
609 # where "hostname" and "alphadigit" are defined as in RFC 1738.
610 #
611 # Example key:
612 # spanner.google.com/universe
Craig Citroe633be12015-03-02 13:40:36 -0800613 },
614 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800615 "data": "A String", # The message payload.
616 "publishTime": "A String", # The time at which the message was published.
617 # The time is milliseconds since the UNIX epoch.
618 "messageId": "A String", # ID of this message assigned by the server at publication time. Guaranteed
619 # to be unique within the topic. This value may be read by a subscriber
620 # that receives a PubsubMessage via a Pull call or a push delivery. It must
621 # not be populated by a publisher in a Publish call.
Craig Citroe633be12015-03-02 13:40:36 -0800622 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400623 "truncated": True or False, # Indicates that this subscription has been truncated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700624 "subscription": "A String", # The subscription that received the event.
Craig Citroe633be12015-03-02 13:40:36 -0800625 },
626 "ackId": "A String", # This ID must be used to acknowledge the received event or message.
627 },
628 ],
629 }</pre>
630</div>
631
Craig Citro065b5302014-08-14 00:47:23 -0700632</body></html>