@google-cloud/pubsub 2.18.0 → 2.18.4
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.
- package/CHANGELOG.md +29 -0
- package/build/src/iam.d.ts +180 -0
- package/build/src/iam.js +2 -172
- package/build/src/iam.js.map +1 -1
- package/build/src/index.d.ts +12 -4
- package/build/src/index.js +12 -4
- package/build/src/index.js.map +1 -1
- package/build/src/lease-manager.d.ts +7 -2
- package/build/src/lease-manager.js +19 -4
- package/build/src/lease-manager.js.map +1 -1
- package/build/src/publisher/flow-publisher.d.ts +6 -0
- package/build/src/publisher/flow-publisher.js +6 -0
- package/build/src/publisher/flow-publisher.js.map +1 -1
- package/build/src/publisher/index.d.ts +35 -0
- package/build/src/publisher/index.js +0 -35
- package/build/src/publisher/index.js.map +1 -1
- package/build/src/pubsub.d.ts +354 -4
- package/build/src/pubsub.js +28 -322
- package/build/src/pubsub.js.map +1 -1
- package/build/src/schema.d.ts +9 -4
- package/build/src/schema.js +9 -4
- package/build/src/schema.js.map +1 -1
- package/build/src/snapshot.d.ts +87 -0
- package/build/src/snapshot.js +2 -79
- package/build/src/snapshot.js.map +1 -1
- package/build/src/subscriber.d.ts +6 -0
- package/build/src/subscriber.js +6 -0
- package/build/src/subscriber.js.map +1 -1
- package/build/src/subscription.d.ts +439 -9
- package/build/src/subscription.js +24 -400
- package/build/src/subscription.js.map +1 -1
- package/build/src/topic.d.ts +466 -1
- package/build/src/topic.js +17 -417
- package/build/src/topic.js.map +1 -1
- package/build/src/v1/publisher_client.d.ts +246 -15
- package/build/src/v1/publisher_client.js +18 -264
- package/build/src/v1/publisher_client.js.map +1 -1
- package/build/src/v1/publisher_client_config.json +3 -3
- package/build/src/v1/schema_service_client.d.ts +151 -5
- package/build/src/v1/schema_service_client.js +6 -157
- package/build/src/v1/schema_service_client.js.map +1 -1
- package/build/src/v1/subscriber_client.d.ts +536 -16
- package/build/src/v1/subscriber_client.js +14 -552
- package/build/src/v1/subscriber_client.js.map +1 -1
- package/package.json +3 -3
|
@@ -263,132 +263,6 @@ class SubscriberClient {
|
|
|
263
263
|
}
|
|
264
264
|
return this.auth.getProjectId();
|
|
265
265
|
}
|
|
266
|
-
/**
|
|
267
|
-
* Creates a subscription to a given topic. See the [resource name rules]
|
|
268
|
-
* (https://cloud.google.com/pubsub/docs/admin#resource_names).
|
|
269
|
-
* If the subscription already exists, returns `ALREADY_EXISTS`.
|
|
270
|
-
* If the corresponding topic doesn't exist, returns `NOT_FOUND`.
|
|
271
|
-
*
|
|
272
|
-
* If the name is not provided in the request, the server will assign a random
|
|
273
|
-
* name for this subscription on the same project as the topic, conforming
|
|
274
|
-
* to the [resource name format]
|
|
275
|
-
* (https://cloud.google.com/pubsub/docs/admin#resource_names). The generated
|
|
276
|
-
* name is populated in the returned Subscription object. Note that for REST
|
|
277
|
-
* API requests, you must specify a name in the request.
|
|
278
|
-
*
|
|
279
|
-
* @param {Object} request
|
|
280
|
-
* The request object that will be sent.
|
|
281
|
-
* @param {string} request.name
|
|
282
|
-
* Required. The name of the subscription. It must have the format
|
|
283
|
-
* `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
|
|
284
|
-
* start with a letter, and contain only letters (`[A-Za-z]`), numbers
|
|
285
|
-
* (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
|
|
286
|
-
* plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
|
|
287
|
-
* in length, and it must not start with `"goog"`.
|
|
288
|
-
* @param {string} request.topic
|
|
289
|
-
* Required. The name of the topic from which this subscription is receiving
|
|
290
|
-
* messages. Format is `projects/{project}/topics/{topic}`. The value of this
|
|
291
|
-
* field will be `_deleted-topic_` if the topic has been deleted.
|
|
292
|
-
* @param {google.pubsub.v1.PushConfig} request.pushConfig
|
|
293
|
-
* If push delivery is used with this subscription, this field is
|
|
294
|
-
* used to configure it. An empty `pushConfig` signifies that the subscriber
|
|
295
|
-
* will pull and ack messages using API methods.
|
|
296
|
-
* @param {number} request.ackDeadlineSeconds
|
|
297
|
-
* The approximate amount of time (on a best-effort basis) Pub/Sub waits for
|
|
298
|
-
* the subscriber to acknowledge receipt before resending the message. In the
|
|
299
|
-
* interval after the message is delivered and before it is acknowledged, it
|
|
300
|
-
* is considered to be <i>outstanding</i>. During that time period, the
|
|
301
|
-
* message will not be redelivered (on a best-effort basis).
|
|
302
|
-
*
|
|
303
|
-
* For pull subscriptions, this value is used as the initial value for the ack
|
|
304
|
-
* deadline. To override this value for a given message, call
|
|
305
|
-
* `ModifyAckDeadline` with the corresponding `ack_id` if using
|
|
306
|
-
* non-streaming pull or send the `ack_id` in a
|
|
307
|
-
* `StreamingModifyAckDeadlineRequest` if using streaming pull.
|
|
308
|
-
* The minimum custom deadline you can specify is 10 seconds.
|
|
309
|
-
* The maximum custom deadline you can specify is 600 seconds (10 minutes).
|
|
310
|
-
* If this parameter is 0, a default value of 10 seconds is used.
|
|
311
|
-
*
|
|
312
|
-
* For push delivery, this value is also used to set the request timeout for
|
|
313
|
-
* the call to the push endpoint.
|
|
314
|
-
*
|
|
315
|
-
* If the subscriber never acknowledges the message, the Pub/Sub
|
|
316
|
-
* system will eventually redeliver the message.
|
|
317
|
-
* @param {boolean} request.retainAckedMessages
|
|
318
|
-
* Indicates whether to retain acknowledged messages. If true, then
|
|
319
|
-
* messages are not expunged from the subscription's backlog, even if they are
|
|
320
|
-
* acknowledged, until they fall out of the `message_retention_duration`
|
|
321
|
-
* window. This must be true if you would like to [`Seek` to a timestamp]
|
|
322
|
-
* (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) in
|
|
323
|
-
* the past to replay previously-acknowledged messages.
|
|
324
|
-
* @param {google.protobuf.Duration} request.messageRetentionDuration
|
|
325
|
-
* How long to retain unacknowledged messages in the subscription's backlog,
|
|
326
|
-
* from the moment a message is published.
|
|
327
|
-
* If `retain_acked_messages` is true, then this also configures the retention
|
|
328
|
-
* of acknowledged messages, and thus configures how far back in time a `Seek`
|
|
329
|
-
* can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10
|
|
330
|
-
* minutes.
|
|
331
|
-
* @param {number[]} request.labels
|
|
332
|
-
* See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
|
|
333
|
-
* managing labels</a>.
|
|
334
|
-
* @param {boolean} request.enableMessageOrdering
|
|
335
|
-
* If true, messages published with the same `ordering_key` in `PubsubMessage`
|
|
336
|
-
* will be delivered to the subscribers in the order in which they
|
|
337
|
-
* are received by the Pub/Sub system. Otherwise, they may be delivered in
|
|
338
|
-
* any order.
|
|
339
|
-
* @param {google.pubsub.v1.ExpirationPolicy} request.expirationPolicy
|
|
340
|
-
* A policy that specifies the conditions for this subscription's expiration.
|
|
341
|
-
* A subscription is considered active as long as any connected subscriber is
|
|
342
|
-
* successfully consuming messages from the subscription or is issuing
|
|
343
|
-
* operations on the subscription. If `expiration_policy` is not set, a
|
|
344
|
-
* *default policy* with `ttl` of 31 days will be used. The minimum allowed
|
|
345
|
-
* value for `expiration_policy.ttl` is 1 day.
|
|
346
|
-
* @param {string} request.filter
|
|
347
|
-
* An expression written in the Pub/Sub [filter
|
|
348
|
-
* language](https://cloud.google.com/pubsub/docs/filtering). If non-empty,
|
|
349
|
-
* then only `PubsubMessage`s whose `attributes` field matches the filter are
|
|
350
|
-
* delivered on this subscription. If empty, then no messages are filtered
|
|
351
|
-
* out.
|
|
352
|
-
* @param {google.pubsub.v1.DeadLetterPolicy} request.deadLetterPolicy
|
|
353
|
-
* A policy that specifies the conditions for dead lettering messages in
|
|
354
|
-
* this subscription. If dead_letter_policy is not set, dead lettering
|
|
355
|
-
* is disabled.
|
|
356
|
-
*
|
|
357
|
-
* The Cloud Pub/Sub service account associated with this subscriptions's
|
|
358
|
-
* parent project (i.e.,
|
|
359
|
-
* service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
|
|
360
|
-
* permission to Acknowledge() messages on this subscription.
|
|
361
|
-
* @param {google.pubsub.v1.RetryPolicy} request.retryPolicy
|
|
362
|
-
* A policy that specifies how Pub/Sub retries message delivery for this
|
|
363
|
-
* subscription.
|
|
364
|
-
*
|
|
365
|
-
* If not set, the default retry policy is applied. This generally implies
|
|
366
|
-
* that messages will be retried as soon as possible for healthy subscribers.
|
|
367
|
-
* RetryPolicy will be triggered on NACKs or acknowledgement deadline
|
|
368
|
-
* exceeded events for a given message.
|
|
369
|
-
* @param {boolean} request.detached
|
|
370
|
-
* Indicates whether the subscription is detached from its topic. Detached
|
|
371
|
-
* subscriptions don't receive messages from their topic and don't retain any
|
|
372
|
-
* backlog. `Pull` and `StreamingPull` requests will return
|
|
373
|
-
* FAILED_PRECONDITION. If the subscription is a push subscription, pushes to
|
|
374
|
-
* the endpoint will not be made.
|
|
375
|
-
* @param {google.protobuf.Duration} request.topicMessageRetentionDuration
|
|
376
|
-
* Output only. Indicates the minimum duration for which a message is retained
|
|
377
|
-
* after it is published to the subscription's topic. If this field is set,
|
|
378
|
-
* messages published to the subscription's topic in the last
|
|
379
|
-
* `topic_message_retention_duration` are always available to subscribers. See
|
|
380
|
-
* the `message_retention_duration` field in `Topic`. This field is set only
|
|
381
|
-
* in responses from the server; it is ignored if it is set in any requests.
|
|
382
|
-
* @param {object} [options]
|
|
383
|
-
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
384
|
-
* @returns {Promise} - The promise which resolves to an array.
|
|
385
|
-
* The first element of the array is an object representing [Subscription]{@link google.pubsub.v1.Subscription}.
|
|
386
|
-
* Please see the
|
|
387
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
388
|
-
* for more details and examples.
|
|
389
|
-
* @example
|
|
390
|
-
* const [response] = await client.createSubscription(request);
|
|
391
|
-
*/
|
|
392
266
|
createSubscription(request, optionsOrCallback, callback) {
|
|
393
267
|
request = request || {};
|
|
394
268
|
let options;
|
|
@@ -409,24 +283,6 @@ class SubscriberClient {
|
|
|
409
283
|
this.initialize();
|
|
410
284
|
return this.innerApiCalls.createSubscription(request, options, callback);
|
|
411
285
|
}
|
|
412
|
-
/**
|
|
413
|
-
* Gets the configuration details of a subscription.
|
|
414
|
-
*
|
|
415
|
-
* @param {Object} request
|
|
416
|
-
* The request object that will be sent.
|
|
417
|
-
* @param {string} request.subscription
|
|
418
|
-
* Required. The name of the subscription to get.
|
|
419
|
-
* Format is `projects/{project}/subscriptions/{sub}`.
|
|
420
|
-
* @param {object} [options]
|
|
421
|
-
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
422
|
-
* @returns {Promise} - The promise which resolves to an array.
|
|
423
|
-
* The first element of the array is an object representing [Subscription]{@link google.pubsub.v1.Subscription}.
|
|
424
|
-
* Please see the
|
|
425
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
426
|
-
* for more details and examples.
|
|
427
|
-
* @example
|
|
428
|
-
* const [response] = await client.getSubscription(request);
|
|
429
|
-
*/
|
|
430
286
|
getSubscription(request, optionsOrCallback, callback) {
|
|
431
287
|
request = request || {};
|
|
432
288
|
let options;
|
|
@@ -447,27 +303,6 @@ class SubscriberClient {
|
|
|
447
303
|
this.initialize();
|
|
448
304
|
return this.innerApiCalls.getSubscription(request, options, callback);
|
|
449
305
|
}
|
|
450
|
-
/**
|
|
451
|
-
* Updates an existing subscription. Note that certain properties of a
|
|
452
|
-
* subscription, such as its topic, are not modifiable.
|
|
453
|
-
*
|
|
454
|
-
* @param {Object} request
|
|
455
|
-
* The request object that will be sent.
|
|
456
|
-
* @param {google.pubsub.v1.Subscription} request.subscription
|
|
457
|
-
* Required. The updated subscription object.
|
|
458
|
-
* @param {google.protobuf.FieldMask} request.updateMask
|
|
459
|
-
* Required. Indicates which fields in the provided subscription to update.
|
|
460
|
-
* Must be specified and non-empty.
|
|
461
|
-
* @param {object} [options]
|
|
462
|
-
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
463
|
-
* @returns {Promise} - The promise which resolves to an array.
|
|
464
|
-
* The first element of the array is an object representing [Subscription]{@link google.pubsub.v1.Subscription}.
|
|
465
|
-
* Please see the
|
|
466
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
467
|
-
* for more details and examples.
|
|
468
|
-
* @example
|
|
469
|
-
* const [response] = await client.updateSubscription(request);
|
|
470
|
-
*/
|
|
471
306
|
updateSubscription(request, optionsOrCallback, callback) {
|
|
472
307
|
request = request || {};
|
|
473
308
|
let options;
|
|
@@ -488,28 +323,6 @@ class SubscriberClient {
|
|
|
488
323
|
this.initialize();
|
|
489
324
|
return this.innerApiCalls.updateSubscription(request, options, callback);
|
|
490
325
|
}
|
|
491
|
-
/**
|
|
492
|
-
* Deletes an existing subscription. All messages retained in the subscription
|
|
493
|
-
* are immediately dropped. Calls to `Pull` after deletion will return
|
|
494
|
-
* `NOT_FOUND`. After a subscription is deleted, a new one may be created with
|
|
495
|
-
* the same name, but the new one has no association with the old
|
|
496
|
-
* subscription or its topic unless the same topic is specified.
|
|
497
|
-
*
|
|
498
|
-
* @param {Object} request
|
|
499
|
-
* The request object that will be sent.
|
|
500
|
-
* @param {string} request.subscription
|
|
501
|
-
* Required. The subscription to delete.
|
|
502
|
-
* Format is `projects/{project}/subscriptions/{sub}`.
|
|
503
|
-
* @param {object} [options]
|
|
504
|
-
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
505
|
-
* @returns {Promise} - The promise which resolves to an array.
|
|
506
|
-
* The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}.
|
|
507
|
-
* Please see the
|
|
508
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
509
|
-
* for more details and examples.
|
|
510
|
-
* @example
|
|
511
|
-
* const [response] = await client.deleteSubscription(request);
|
|
512
|
-
*/
|
|
513
326
|
deleteSubscription(request, optionsOrCallback, callback) {
|
|
514
327
|
request = request || {};
|
|
515
328
|
let options;
|
|
@@ -530,39 +343,6 @@ class SubscriberClient {
|
|
|
530
343
|
this.initialize();
|
|
531
344
|
return this.innerApiCalls.deleteSubscription(request, options, callback);
|
|
532
345
|
}
|
|
533
|
-
/**
|
|
534
|
-
* Modifies the ack deadline for a specific message. This method is useful
|
|
535
|
-
* to indicate that more time is needed to process a message by the
|
|
536
|
-
* subscriber, or to make the message available for redelivery if the
|
|
537
|
-
* processing was interrupted. Note that this does not modify the
|
|
538
|
-
* subscription-level `ackDeadlineSeconds` used for subsequent messages.
|
|
539
|
-
*
|
|
540
|
-
* @param {Object} request
|
|
541
|
-
* The request object that will be sent.
|
|
542
|
-
* @param {string} request.subscription
|
|
543
|
-
* Required. The name of the subscription.
|
|
544
|
-
* Format is `projects/{project}/subscriptions/{sub}`.
|
|
545
|
-
* @param {string[]} request.ackIds
|
|
546
|
-
* Required. List of acknowledgment IDs.
|
|
547
|
-
* @param {number} request.ackDeadlineSeconds
|
|
548
|
-
* Required. The new ack deadline with respect to the time this request was
|
|
549
|
-
* sent to the Pub/Sub system. For example, if the value is 10, the new ack
|
|
550
|
-
* deadline will expire 10 seconds after the `ModifyAckDeadline` call was
|
|
551
|
-
* made. Specifying zero might immediately make the message available for
|
|
552
|
-
* delivery to another subscriber client. This typically results in an
|
|
553
|
-
* increase in the rate of message redeliveries (that is, duplicates).
|
|
554
|
-
* The minimum deadline you can specify is 0 seconds.
|
|
555
|
-
* The maximum deadline you can specify is 600 seconds (10 minutes).
|
|
556
|
-
* @param {object} [options]
|
|
557
|
-
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
558
|
-
* @returns {Promise} - The promise which resolves to an array.
|
|
559
|
-
* The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}.
|
|
560
|
-
* Please see the
|
|
561
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
562
|
-
* for more details and examples.
|
|
563
|
-
* @example
|
|
564
|
-
* const [response] = await client.modifyAckDeadline(request);
|
|
565
|
-
*/
|
|
566
346
|
modifyAckDeadline(request, optionsOrCallback, callback) {
|
|
567
347
|
request = request || {};
|
|
568
348
|
let options;
|
|
@@ -583,34 +363,6 @@ class SubscriberClient {
|
|
|
583
363
|
this.initialize();
|
|
584
364
|
return this.innerApiCalls.modifyAckDeadline(request, options, callback);
|
|
585
365
|
}
|
|
586
|
-
/**
|
|
587
|
-
* Acknowledges the messages associated with the `ack_ids` in the
|
|
588
|
-
* `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages
|
|
589
|
-
* from the subscription.
|
|
590
|
-
*
|
|
591
|
-
* Acknowledging a message whose ack deadline has expired may succeed,
|
|
592
|
-
* but such a message may be redelivered later. Acknowledging a message more
|
|
593
|
-
* than once will not result in an error.
|
|
594
|
-
*
|
|
595
|
-
* @param {Object} request
|
|
596
|
-
* The request object that will be sent.
|
|
597
|
-
* @param {string} request.subscription
|
|
598
|
-
* Required. The subscription whose message is being acknowledged.
|
|
599
|
-
* Format is `projects/{project}/subscriptions/{sub}`.
|
|
600
|
-
* @param {string[]} request.ackIds
|
|
601
|
-
* Required. The acknowledgment ID for the messages being acknowledged that
|
|
602
|
-
* was returned by the Pub/Sub system in the `Pull` response. Must not be
|
|
603
|
-
* empty.
|
|
604
|
-
* @param {object} [options]
|
|
605
|
-
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
606
|
-
* @returns {Promise} - The promise which resolves to an array.
|
|
607
|
-
* The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}.
|
|
608
|
-
* Please see the
|
|
609
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
610
|
-
* for more details and examples.
|
|
611
|
-
* @example
|
|
612
|
-
* const [response] = await client.acknowledge(request);
|
|
613
|
-
*/
|
|
614
366
|
acknowledge(request, optionsOrCallback, callback) {
|
|
615
367
|
request = request || {};
|
|
616
368
|
let options;
|
|
@@ -631,38 +383,6 @@ class SubscriberClient {
|
|
|
631
383
|
this.initialize();
|
|
632
384
|
return this.innerApiCalls.acknowledge(request, options, callback);
|
|
633
385
|
}
|
|
634
|
-
/**
|
|
635
|
-
* Pulls messages from the server. The server may return `UNAVAILABLE` if
|
|
636
|
-
* there are too many concurrent pull requests pending for the given
|
|
637
|
-
* subscription.
|
|
638
|
-
*
|
|
639
|
-
* @param {Object} request
|
|
640
|
-
* The request object that will be sent.
|
|
641
|
-
* @param {string} request.subscription
|
|
642
|
-
* Required. The subscription from which messages should be pulled.
|
|
643
|
-
* Format is `projects/{project}/subscriptions/{sub}`.
|
|
644
|
-
* @param {boolean} [request.returnImmediately]
|
|
645
|
-
* Optional. If this field set to true, the system will respond immediately
|
|
646
|
-
* even if it there are no messages available to return in the `Pull`
|
|
647
|
-
* response. Otherwise, the system may wait (for a bounded amount of time)
|
|
648
|
-
* until at least one message is available, rather than returning no messages.
|
|
649
|
-
* Warning: setting this field to `true` is discouraged because it adversely
|
|
650
|
-
* impacts the performance of `Pull` operations. We recommend that users do
|
|
651
|
-
* not set this field.
|
|
652
|
-
* @param {number} request.maxMessages
|
|
653
|
-
* Required. The maximum number of messages to return for this request. Must
|
|
654
|
-
* be a positive integer. The Pub/Sub system may return fewer than the number
|
|
655
|
-
* specified.
|
|
656
|
-
* @param {object} [options]
|
|
657
|
-
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
658
|
-
* @returns {Promise} - The promise which resolves to an array.
|
|
659
|
-
* The first element of the array is an object representing [PullResponse]{@link google.pubsub.v1.PullResponse}.
|
|
660
|
-
* Please see the
|
|
661
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
662
|
-
* for more details and examples.
|
|
663
|
-
* @example
|
|
664
|
-
* const [response] = await client.pull(request);
|
|
665
|
-
*/
|
|
666
386
|
pull(request, optionsOrCallback, callback) {
|
|
667
387
|
request = request || {};
|
|
668
388
|
let options;
|
|
@@ -683,36 +403,6 @@ class SubscriberClient {
|
|
|
683
403
|
this.initialize();
|
|
684
404
|
return this.innerApiCalls.pull(request, options, callback);
|
|
685
405
|
}
|
|
686
|
-
/**
|
|
687
|
-
* Modifies the `PushConfig` for a specified subscription.
|
|
688
|
-
*
|
|
689
|
-
* This may be used to change a push subscription to a pull one (signified by
|
|
690
|
-
* an empty `PushConfig`) or vice versa, or change the endpoint URL and other
|
|
691
|
-
* attributes of a push subscription. Messages will accumulate for delivery
|
|
692
|
-
* continuously through the call regardless of changes to the `PushConfig`.
|
|
693
|
-
*
|
|
694
|
-
* @param {Object} request
|
|
695
|
-
* The request object that will be sent.
|
|
696
|
-
* @param {string} request.subscription
|
|
697
|
-
* Required. The name of the subscription.
|
|
698
|
-
* Format is `projects/{project}/subscriptions/{sub}`.
|
|
699
|
-
* @param {google.pubsub.v1.PushConfig} request.pushConfig
|
|
700
|
-
* Required. The push configuration for future deliveries.
|
|
701
|
-
*
|
|
702
|
-
* An empty `pushConfig` indicates that the Pub/Sub system should
|
|
703
|
-
* stop pushing messages from the given subscription and allow
|
|
704
|
-
* messages to be pulled and acknowledged - effectively pausing
|
|
705
|
-
* the subscription if `Pull` or `StreamingPull` is not called.
|
|
706
|
-
* @param {object} [options]
|
|
707
|
-
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
708
|
-
* @returns {Promise} - The promise which resolves to an array.
|
|
709
|
-
* The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}.
|
|
710
|
-
* Please see the
|
|
711
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
712
|
-
* for more details and examples.
|
|
713
|
-
* @example
|
|
714
|
-
* const [response] = await client.modifyPushConfig(request);
|
|
715
|
-
*/
|
|
716
406
|
modifyPushConfig(request, optionsOrCallback, callback) {
|
|
717
407
|
request = request || {};
|
|
718
408
|
let options;
|
|
@@ -733,28 +423,6 @@ class SubscriberClient {
|
|
|
733
423
|
this.initialize();
|
|
734
424
|
return this.innerApiCalls.modifyPushConfig(request, options, callback);
|
|
735
425
|
}
|
|
736
|
-
/**
|
|
737
|
-
* Gets the configuration details of a snapshot. Snapshots are used in
|
|
738
|
-
* <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
|
|
739
|
-
* operations, which allow you to manage message acknowledgments in bulk. That
|
|
740
|
-
* is, you can set the acknowledgment state of messages in an existing
|
|
741
|
-
* subscription to the state captured by a snapshot.
|
|
742
|
-
*
|
|
743
|
-
* @param {Object} request
|
|
744
|
-
* The request object that will be sent.
|
|
745
|
-
* @param {string} request.snapshot
|
|
746
|
-
* Required. The name of the snapshot to get.
|
|
747
|
-
* Format is `projects/{project}/snapshots/{snap}`.
|
|
748
|
-
* @param {object} [options]
|
|
749
|
-
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
750
|
-
* @returns {Promise} - The promise which resolves to an array.
|
|
751
|
-
* The first element of the array is an object representing [Snapshot]{@link google.pubsub.v1.Snapshot}.
|
|
752
|
-
* Please see the
|
|
753
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
754
|
-
* for more details and examples.
|
|
755
|
-
* @example
|
|
756
|
-
* const [response] = await client.getSnapshot(request);
|
|
757
|
-
*/
|
|
758
426
|
getSnapshot(request, optionsOrCallback, callback) {
|
|
759
427
|
request = request || {};
|
|
760
428
|
let options;
|
|
@@ -775,56 +443,6 @@ class SubscriberClient {
|
|
|
775
443
|
this.initialize();
|
|
776
444
|
return this.innerApiCalls.getSnapshot(request, options, callback);
|
|
777
445
|
}
|
|
778
|
-
/**
|
|
779
|
-
* Creates a snapshot from the requested subscription. Snapshots are used in
|
|
780
|
-
* [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
|
|
781
|
-
* which allow you to manage message acknowledgments in bulk. That is, you can
|
|
782
|
-
* set the acknowledgment state of messages in an existing subscription to the
|
|
783
|
-
* state captured by a snapshot.
|
|
784
|
-
* If the snapshot already exists, returns `ALREADY_EXISTS`.
|
|
785
|
-
* If the requested subscription doesn't exist, returns `NOT_FOUND`.
|
|
786
|
-
* If the backlog in the subscription is too old -- and the resulting snapshot
|
|
787
|
-
* would expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned.
|
|
788
|
-
* See also the `Snapshot.expire_time` field. If the name is not provided in
|
|
789
|
-
* the request, the server will assign a random
|
|
790
|
-
* name for this snapshot on the same project as the subscription, conforming
|
|
791
|
-
* to the [resource name format]
|
|
792
|
-
* (https://cloud.google.com/pubsub/docs/admin#resource_names). The
|
|
793
|
-
* generated name is populated in the returned Snapshot object. Note that for
|
|
794
|
-
* REST API requests, you must specify a name in the request.
|
|
795
|
-
*
|
|
796
|
-
* @param {Object} request
|
|
797
|
-
* The request object that will be sent.
|
|
798
|
-
* @param {string} request.name
|
|
799
|
-
* Required. User-provided name for this snapshot. If the name is not provided
|
|
800
|
-
* in the request, the server will assign a random name for this snapshot on
|
|
801
|
-
* the same project as the subscription. Note that for REST API requests, you
|
|
802
|
-
* must specify a name. See the <a
|
|
803
|
-
* href="https://cloud.google.com/pubsub/docs/admin#resource_names"> resource
|
|
804
|
-
* name rules</a>. Format is `projects/{project}/snapshots/{snap}`.
|
|
805
|
-
* @param {string} request.subscription
|
|
806
|
-
* Required. The subscription whose backlog the snapshot retains.
|
|
807
|
-
* Specifically, the created snapshot is guaranteed to retain:
|
|
808
|
-
* (a) The existing backlog on the subscription. More precisely, this is
|
|
809
|
-
* defined as the messages in the subscription's backlog that are
|
|
810
|
-
* unacknowledged upon the successful completion of the
|
|
811
|
-
* `CreateSnapshot` request; as well as:
|
|
812
|
-
* (b) Any messages published to the subscription's topic following the
|
|
813
|
-
* successful completion of the CreateSnapshot request.
|
|
814
|
-
* Format is `projects/{project}/subscriptions/{sub}`.
|
|
815
|
-
* @param {number[]} request.labels
|
|
816
|
-
* See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
|
|
817
|
-
* managing labels</a>.
|
|
818
|
-
* @param {object} [options]
|
|
819
|
-
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
820
|
-
* @returns {Promise} - The promise which resolves to an array.
|
|
821
|
-
* The first element of the array is an object representing [Snapshot]{@link google.pubsub.v1.Snapshot}.
|
|
822
|
-
* Please see the
|
|
823
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
824
|
-
* for more details and examples.
|
|
825
|
-
* @example
|
|
826
|
-
* const [response] = await client.createSnapshot(request);
|
|
827
|
-
*/
|
|
828
446
|
createSnapshot(request, optionsOrCallback, callback) {
|
|
829
447
|
request = request || {};
|
|
830
448
|
let options;
|
|
@@ -845,31 +463,6 @@ class SubscriberClient {
|
|
|
845
463
|
this.initialize();
|
|
846
464
|
return this.innerApiCalls.createSnapshot(request, options, callback);
|
|
847
465
|
}
|
|
848
|
-
/**
|
|
849
|
-
* Updates an existing snapshot. Snapshots are used in
|
|
850
|
-
* <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
|
|
851
|
-
* operations, which allow
|
|
852
|
-
* you to manage message acknowledgments in bulk. That is, you can set the
|
|
853
|
-
* acknowledgment state of messages in an existing subscription to the state
|
|
854
|
-
* captured by a snapshot.
|
|
855
|
-
*
|
|
856
|
-
* @param {Object} request
|
|
857
|
-
* The request object that will be sent.
|
|
858
|
-
* @param {google.pubsub.v1.Snapshot} request.snapshot
|
|
859
|
-
* Required. The updated snapshot object.
|
|
860
|
-
* @param {google.protobuf.FieldMask} request.updateMask
|
|
861
|
-
* Required. Indicates which fields in the provided snapshot to update.
|
|
862
|
-
* Must be specified and non-empty.
|
|
863
|
-
* @param {object} [options]
|
|
864
|
-
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
865
|
-
* @returns {Promise} - The promise which resolves to an array.
|
|
866
|
-
* The first element of the array is an object representing [Snapshot]{@link google.pubsub.v1.Snapshot}.
|
|
867
|
-
* Please see the
|
|
868
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
869
|
-
* for more details and examples.
|
|
870
|
-
* @example
|
|
871
|
-
* const [response] = await client.updateSnapshot(request);
|
|
872
|
-
*/
|
|
873
466
|
updateSnapshot(request, optionsOrCallback, callback) {
|
|
874
467
|
request = request || {};
|
|
875
468
|
let options;
|
|
@@ -890,32 +483,6 @@ class SubscriberClient {
|
|
|
890
483
|
this.initialize();
|
|
891
484
|
return this.innerApiCalls.updateSnapshot(request, options, callback);
|
|
892
485
|
}
|
|
893
|
-
/**
|
|
894
|
-
* Removes an existing snapshot. Snapshots are used in [Seek]
|
|
895
|
-
* (https://cloud.google.com/pubsub/docs/replay-overview) operations, which
|
|
896
|
-
* allow you to manage message acknowledgments in bulk. That is, you can set
|
|
897
|
-
* the acknowledgment state of messages in an existing subscription to the
|
|
898
|
-
* state captured by a snapshot.
|
|
899
|
-
* When the snapshot is deleted, all messages retained in the snapshot
|
|
900
|
-
* are immediately dropped. After a snapshot is deleted, a new one may be
|
|
901
|
-
* created with the same name, but the new one has no association with the old
|
|
902
|
-
* snapshot or its subscription, unless the same subscription is specified.
|
|
903
|
-
*
|
|
904
|
-
* @param {Object} request
|
|
905
|
-
* The request object that will be sent.
|
|
906
|
-
* @param {string} request.snapshot
|
|
907
|
-
* Required. The name of the snapshot to delete.
|
|
908
|
-
* Format is `projects/{project}/snapshots/{snap}`.
|
|
909
|
-
* @param {object} [options]
|
|
910
|
-
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
911
|
-
* @returns {Promise} - The promise which resolves to an array.
|
|
912
|
-
* The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}.
|
|
913
|
-
* Please see the
|
|
914
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
915
|
-
* for more details and examples.
|
|
916
|
-
* @example
|
|
917
|
-
* const [response] = await client.deleteSnapshot(request);
|
|
918
|
-
*/
|
|
919
486
|
deleteSnapshot(request, optionsOrCallback, callback) {
|
|
920
487
|
request = request || {};
|
|
921
488
|
let options;
|
|
@@ -936,45 +503,6 @@ class SubscriberClient {
|
|
|
936
503
|
this.initialize();
|
|
937
504
|
return this.innerApiCalls.deleteSnapshot(request, options, callback);
|
|
938
505
|
}
|
|
939
|
-
/**
|
|
940
|
-
* Seeks an existing subscription to a point in time or to a given snapshot,
|
|
941
|
-
* whichever is provided in the request. Snapshots are used in [Seek]
|
|
942
|
-
* (https://cloud.google.com/pubsub/docs/replay-overview) operations, which
|
|
943
|
-
* allow you to manage message acknowledgments in bulk. That is, you can set
|
|
944
|
-
* the acknowledgment state of messages in an existing subscription to the
|
|
945
|
-
* state captured by a snapshot. Note that both the subscription and the
|
|
946
|
-
* snapshot must be on the same topic.
|
|
947
|
-
*
|
|
948
|
-
* @param {Object} request
|
|
949
|
-
* The request object that will be sent.
|
|
950
|
-
* @param {string} request.subscription
|
|
951
|
-
* Required. The subscription to affect.
|
|
952
|
-
* @param {google.protobuf.Timestamp} request.time
|
|
953
|
-
* The time to seek to.
|
|
954
|
-
* Messages retained in the subscription that were published before this
|
|
955
|
-
* time are marked as acknowledged, and messages retained in the
|
|
956
|
-
* subscription that were published after this time are marked as
|
|
957
|
-
* unacknowledged. Note that this operation affects only those messages
|
|
958
|
-
* retained in the subscription (configured by the combination of
|
|
959
|
-
* `message_retention_duration` and `retain_acked_messages`). For example,
|
|
960
|
-
* if `time` corresponds to a point before the message retention
|
|
961
|
-
* window (or to a point before the system's notion of the subscription
|
|
962
|
-
* creation time), only retained messages will be marked as unacknowledged,
|
|
963
|
-
* and already-expunged messages will not be restored.
|
|
964
|
-
* @param {string} request.snapshot
|
|
965
|
-
* The snapshot to seek to. The snapshot's topic must be the same as that of
|
|
966
|
-
* the provided subscription.
|
|
967
|
-
* Format is `projects/{project}/snapshots/{snap}`.
|
|
968
|
-
* @param {object} [options]
|
|
969
|
-
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
970
|
-
* @returns {Promise} - The promise which resolves to an array.
|
|
971
|
-
* The first element of the array is an object representing [SeekResponse]{@link google.pubsub.v1.SeekResponse}.
|
|
972
|
-
* Please see the
|
|
973
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
974
|
-
* for more details and examples.
|
|
975
|
-
* @example
|
|
976
|
-
* const [response] = await client.seek(request);
|
|
977
|
-
*/
|
|
978
506
|
seek(request, optionsOrCallback, callback) {
|
|
979
507
|
request = request || {};
|
|
980
508
|
let options;
|
|
@@ -1013,44 +541,13 @@ class SubscriberClient {
|
|
|
1013
541
|
* Please see the
|
|
1014
542
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#bi-directional-streaming)
|
|
1015
543
|
* for more details and examples.
|
|
1016
|
-
* @example
|
|
1017
|
-
*
|
|
1018
|
-
* stream.on('data', (response) => { ... });
|
|
1019
|
-
* stream.on('end', () => { ... });
|
|
1020
|
-
* stream.write(request);
|
|
1021
|
-
* stream.end();
|
|
544
|
+
* @example <caption>include:samples/generated/v1/subscriber.streaming_pull.js</caption>
|
|
545
|
+
* region_tag:pubsub_v1_generated_Subscriber_StreamingPull_async
|
|
1022
546
|
*/
|
|
1023
547
|
streamingPull(options) {
|
|
1024
548
|
this.initialize();
|
|
1025
549
|
return this.innerApiCalls.streamingPull(options);
|
|
1026
550
|
}
|
|
1027
|
-
/**
|
|
1028
|
-
* Lists matching subscriptions.
|
|
1029
|
-
*
|
|
1030
|
-
* @param {Object} request
|
|
1031
|
-
* The request object that will be sent.
|
|
1032
|
-
* @param {string} request.project
|
|
1033
|
-
* Required. The name of the project in which to list subscriptions.
|
|
1034
|
-
* Format is `projects/{project-id}`.
|
|
1035
|
-
* @param {number} request.pageSize
|
|
1036
|
-
* Maximum number of subscriptions to return.
|
|
1037
|
-
* @param {string} request.pageToken
|
|
1038
|
-
* The value returned by the last `ListSubscriptionsResponse`; indicates that
|
|
1039
|
-
* this is a continuation of a prior `ListSubscriptions` call, and that the
|
|
1040
|
-
* system should return the next page of data.
|
|
1041
|
-
* @param {object} [options]
|
|
1042
|
-
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1043
|
-
* @returns {Promise} - The promise which resolves to an array.
|
|
1044
|
-
* The first element of the array is Array of [Subscription]{@link google.pubsub.v1.Subscription}.
|
|
1045
|
-
* The client library will perform auto-pagination by default: it will call the API as many
|
|
1046
|
-
* times as needed and will merge results from all the pages into this array.
|
|
1047
|
-
* Note that it can affect your quota.
|
|
1048
|
-
* We recommend using `listSubscriptionsAsync()`
|
|
1049
|
-
* method described below for async iteration which you can stop as needed.
|
|
1050
|
-
* Please see the
|
|
1051
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
|
|
1052
|
-
* for more details and examples.
|
|
1053
|
-
*/
|
|
1054
551
|
listSubscriptions(request, optionsOrCallback, callback) {
|
|
1055
552
|
request = request || {};
|
|
1056
553
|
let options;
|
|
@@ -1105,7 +602,8 @@ class SubscriberClient {
|
|
|
1105
602
|
gax.routingHeader.fromParams({
|
|
1106
603
|
project: request.project || '',
|
|
1107
604
|
});
|
|
1108
|
-
const
|
|
605
|
+
const defaultCallSettings = this._defaults['listSubscriptions'];
|
|
606
|
+
const callSettings = defaultCallSettings.merge(options);
|
|
1109
607
|
this.initialize();
|
|
1110
608
|
return this.descriptors.page.listSubscriptions.createStream(this.innerApiCalls.listSubscriptions, request, callSettings);
|
|
1111
609
|
}
|
|
@@ -1134,11 +632,8 @@ class SubscriberClient {
|
|
|
1134
632
|
* Please see the
|
|
1135
633
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
|
|
1136
634
|
* for more details and examples.
|
|
1137
|
-
* @example
|
|
1138
|
-
*
|
|
1139
|
-
* for await (const response of iterable) {
|
|
1140
|
-
* // process response
|
|
1141
|
-
* }
|
|
635
|
+
* @example <caption>include:samples/generated/v1/subscriber.list_subscriptions.js</caption>
|
|
636
|
+
* region_tag:pubsub_v1_generated_Subscriber_ListSubscriptions_async
|
|
1142
637
|
*/
|
|
1143
638
|
listSubscriptionsAsync(request, options) {
|
|
1144
639
|
request = request || {};
|
|
@@ -1149,42 +644,11 @@ class SubscriberClient {
|
|
|
1149
644
|
gax.routingHeader.fromParams({
|
|
1150
645
|
project: request.project || '',
|
|
1151
646
|
});
|
|
1152
|
-
|
|
1153
|
-
const callSettings =
|
|
647
|
+
const defaultCallSettings = this._defaults['listSubscriptions'];
|
|
648
|
+
const callSettings = defaultCallSettings.merge(options);
|
|
1154
649
|
this.initialize();
|
|
1155
650
|
return this.descriptors.page.listSubscriptions.asyncIterate(this.innerApiCalls['listSubscriptions'], request, callSettings);
|
|
1156
651
|
}
|
|
1157
|
-
/**
|
|
1158
|
-
* Lists the existing snapshots. Snapshots are used in [Seek](
|
|
1159
|
-
* https://cloud.google.com/pubsub/docs/replay-overview) operations, which
|
|
1160
|
-
* allow you to manage message acknowledgments in bulk. That is, you can set
|
|
1161
|
-
* the acknowledgment state of messages in an existing subscription to the
|
|
1162
|
-
* state captured by a snapshot.
|
|
1163
|
-
*
|
|
1164
|
-
* @param {Object} request
|
|
1165
|
-
* The request object that will be sent.
|
|
1166
|
-
* @param {string} request.project
|
|
1167
|
-
* Required. The name of the project in which to list snapshots.
|
|
1168
|
-
* Format is `projects/{project-id}`.
|
|
1169
|
-
* @param {number} request.pageSize
|
|
1170
|
-
* Maximum number of snapshots to return.
|
|
1171
|
-
* @param {string} request.pageToken
|
|
1172
|
-
* The value returned by the last `ListSnapshotsResponse`; indicates that this
|
|
1173
|
-
* is a continuation of a prior `ListSnapshots` call, and that the system
|
|
1174
|
-
* should return the next page of data.
|
|
1175
|
-
* @param {object} [options]
|
|
1176
|
-
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1177
|
-
* @returns {Promise} - The promise which resolves to an array.
|
|
1178
|
-
* The first element of the array is Array of [Snapshot]{@link google.pubsub.v1.Snapshot}.
|
|
1179
|
-
* The client library will perform auto-pagination by default: it will call the API as many
|
|
1180
|
-
* times as needed and will merge results from all the pages into this array.
|
|
1181
|
-
* Note that it can affect your quota.
|
|
1182
|
-
* We recommend using `listSnapshotsAsync()`
|
|
1183
|
-
* method described below for async iteration which you can stop as needed.
|
|
1184
|
-
* Please see the
|
|
1185
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
|
|
1186
|
-
* for more details and examples.
|
|
1187
|
-
*/
|
|
1188
652
|
listSnapshots(request, optionsOrCallback, callback) {
|
|
1189
653
|
request = request || {};
|
|
1190
654
|
let options;
|
|
@@ -1239,7 +703,8 @@ class SubscriberClient {
|
|
|
1239
703
|
gax.routingHeader.fromParams({
|
|
1240
704
|
project: request.project || '',
|
|
1241
705
|
});
|
|
1242
|
-
const
|
|
706
|
+
const defaultCallSettings = this._defaults['listSnapshots'];
|
|
707
|
+
const callSettings = defaultCallSettings.merge(options);
|
|
1243
708
|
this.initialize();
|
|
1244
709
|
return this.descriptors.page.listSnapshots.createStream(this.innerApiCalls.listSnapshots, request, callSettings);
|
|
1245
710
|
}
|
|
@@ -1268,11 +733,8 @@ class SubscriberClient {
|
|
|
1268
733
|
* Please see the
|
|
1269
734
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
|
|
1270
735
|
* for more details and examples.
|
|
1271
|
-
* @example
|
|
1272
|
-
*
|
|
1273
|
-
* for await (const response of iterable) {
|
|
1274
|
-
* // process response
|
|
1275
|
-
* }
|
|
736
|
+
* @example <caption>include:samples/generated/v1/subscriber.list_snapshots.js</caption>
|
|
737
|
+
* region_tag:pubsub_v1_generated_Subscriber_ListSnapshots_async
|
|
1276
738
|
*/
|
|
1277
739
|
listSnapshotsAsync(request, options) {
|
|
1278
740
|
request = request || {};
|
|
@@ -1283,8 +745,8 @@ class SubscriberClient {
|
|
|
1283
745
|
gax.routingHeader.fromParams({
|
|
1284
746
|
project: request.project || '',
|
|
1285
747
|
});
|
|
1286
|
-
|
|
1287
|
-
const callSettings =
|
|
748
|
+
const defaultCallSettings = this._defaults['listSnapshots'];
|
|
749
|
+
const callSettings = defaultCallSettings.merge(options);
|
|
1288
750
|
this.initialize();
|
|
1289
751
|
return this.descriptors.page.listSnapshots.asyncIterate(this.innerApiCalls['listSnapshots'], request, callSettings);
|
|
1290
752
|
}
|