google-cloud-pubsub-v1 0.11.0 → 1.11.1

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.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +72 -101
  3. data/README.md +32 -22
  4. data/lib/google/cloud/pubsub/v1/{publisher/helpers.rb → _helpers.rb} +4 -10
  5. data/lib/google/cloud/pubsub/v1/iam_policy/client.rb +33 -337
  6. data/lib/google/cloud/pubsub/v1/iam_policy/credentials.rb +6 -2
  7. data/lib/google/cloud/pubsub/v1/iam_policy.rb +5 -31
  8. data/lib/google/cloud/pubsub/v1/publisher/credentials.rb +2 -37
  9. data/lib/google/cloud/pubsub/v1/publisher.rb +2 -35
  10. data/lib/google/cloud/pubsub/v1/schema_service/client.rb +571 -35
  11. data/lib/google/cloud/pubsub/v1/schema_service.rb +1 -1
  12. data/lib/google/cloud/pubsub/v1/subscriber/credentials.rb +2 -37
  13. data/lib/google/cloud/pubsub/v1/subscriber.rb +2 -36
  14. data/lib/google/cloud/pubsub/v1/{subscriber → subscription_admin}/client.rb +299 -208
  15. data/lib/google/cloud/pubsub/v1/subscription_admin/credentials.rb +52 -0
  16. data/lib/google/cloud/pubsub/v1/subscription_admin/helpers.rb +50 -0
  17. data/lib/google/cloud/pubsub/v1/{subscriber → subscription_admin}/paths.rb +3 -3
  18. data/lib/google/cloud/pubsub/v1/subscription_admin.rb +51 -0
  19. data/lib/google/cloud/pubsub/v1/{publisher → topic_admin}/client.rb +199 -108
  20. data/lib/google/cloud/pubsub/v1/topic_admin/credentials.rb +52 -0
  21. data/lib/google/cloud/pubsub/v1/topic_admin/helpers.rb +50 -0
  22. data/lib/google/cloud/pubsub/v1/{publisher → topic_admin}/paths.rb +3 -3
  23. data/lib/google/cloud/pubsub/v1/topic_admin.rb +50 -0
  24. data/lib/google/cloud/pubsub/v1/version.rb +1 -1
  25. data/lib/google/cloud/pubsub/v1.rb +4 -5
  26. data/lib/google/pubsub/v1/pubsub_pb.rb +63 -246
  27. data/lib/google/pubsub/v1/pubsub_services_pb.rb +23 -24
  28. data/lib/google/pubsub/v1/schema_pb.rb +31 -60
  29. data/lib/google/pubsub/v1/schema_services_pb.rb +8 -0
  30. data/proto_docs/google/api/client.rb +473 -0
  31. data/proto_docs/google/api/field_behavior.rb +14 -0
  32. data/proto_docs/google/api/launch_stage.rb +71 -0
  33. data/proto_docs/google/api/resource.rb +7 -2
  34. data/proto_docs/google/protobuf/empty.rb +0 -2
  35. data/proto_docs/google/protobuf/timestamp.rb +1 -3
  36. data/proto_docs/google/pubsub/v1/pubsub.rb +1189 -227
  37. data/proto_docs/google/pubsub/v1/schema.rb +93 -4
  38. metadata +25 -142
  39. data/lib/google/cloud/pubsub/v1/subscriber/helpers.rb +0 -25
  40. data/proto_docs/google/iam/v1/iam_policy.rb +0 -87
  41. data/proto_docs/google/iam/v1/options.rb +0 -50
  42. data/proto_docs/google/iam/v1/policy.rb +0 -418
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2020 Google LLC
3
+ # Copyright 2025 Google LLC
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -18,35 +18,42 @@
18
18
 
19
19
  require "google/cloud/errors"
20
20
  require "google/pubsub/v1/pubsub_pb"
21
+ require "google/iam/v1"
21
22
 
22
23
  module Google
23
24
  module Cloud
24
25
  module PubSub
25
26
  module V1
26
- module Subscriber
27
+ module SubscriptionAdmin
27
28
  ##
28
- # Client for the Subscriber service.
29
+ # Client for the SubscriptionAdmin service.
29
30
  #
30
31
  # The service that an application uses to manipulate subscriptions and to
31
32
  # consume messages from a subscription via the `Pull` method or by
32
33
  # establishing a bi-directional stream using the `StreamingPull` method.
33
34
  #
34
35
  class Client
36
+ # @private
37
+ API_VERSION = ""
38
+
39
+ # @private
40
+ DEFAULT_ENDPOINT_TEMPLATE = "pubsub.$UNIVERSE_DOMAIN$"
41
+
35
42
  include Paths
36
43
 
37
44
  # @private
38
- attr_reader :subscriber_stub
45
+ attr_reader :subscription_admin_stub
39
46
 
40
47
  ##
41
- # Configure the Subscriber Client class.
48
+ # Configure the SubscriptionAdmin Client class.
42
49
  #
43
- # See {::Google::Cloud::PubSub::V1::Subscriber::Client::Configuration}
50
+ # See {::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client::Configuration}
44
51
  # for a description of the configuration fields.
45
52
  #
46
53
  # @example
47
54
  #
48
- # # Modify the configuration for all Subscriber clients
49
- # ::Google::Cloud::PubSub::V1::Subscriber::Client.configure do |config|
55
+ # # Modify the configuration for all SubscriptionAdmin clients
56
+ # ::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.configure do |config|
50
57
  # config.timeout = 10.0
51
58
  # end
52
59
  #
@@ -103,12 +110,12 @@ module Google
103
110
 
104
111
  default_config.rpcs.pull.timeout = 60.0
105
112
  default_config.rpcs.pull.retry_policy = {
106
- initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [2, 10, 14]
113
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [2, 10, 14, 13]
107
114
  }
108
115
 
109
116
  default_config.rpcs.streaming_pull.timeout = 900.0
110
117
  default_config.rpcs.streaming_pull.retry_policy = {
111
- initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 8, 10, 13, 14]
118
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 4, retry_codes: [4, 8, 10, 13, 14]
112
119
  }
113
120
 
114
121
  default_config.rpcs.modify_push_config.timeout = 60.0
@@ -153,13 +160,13 @@ module Google
153
160
  end
154
161
 
155
162
  ##
156
- # Configure the Subscriber Client instance.
163
+ # Configure the SubscriptionAdmin Client instance.
157
164
  #
158
165
  # The configuration is set to the derived mode, meaning that values can be changed,
159
166
  # but structural changes (adding new fields, etc.) are not allowed. Structural changes
160
167
  # should be made on {Client.configure}.
161
168
  #
162
- # See {::Google::Cloud::PubSub::V1::Subscriber::Client::Configuration}
169
+ # See {::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client::Configuration}
163
170
  # for a description of the configuration fields.
164
171
  #
165
172
  # @yield [config] Configure the Client client.
@@ -173,19 +180,28 @@ module Google
173
180
  end
174
181
 
175
182
  ##
176
- # Create a new Subscriber client object.
183
+ # The effective universe domain
184
+ #
185
+ # @return [String]
186
+ #
187
+ def universe_domain
188
+ @subscription_admin_stub.universe_domain
189
+ end
190
+
191
+ ##
192
+ # Create a new SubscriptionAdmin client object.
177
193
  #
178
194
  # @example
179
195
  #
180
196
  # # Create a client using the default configuration
181
- # client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new
197
+ # client = ::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new
182
198
  #
183
199
  # # Create a client using a custom configuration
184
- # client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new do |config|
200
+ # client = ::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new do |config|
185
201
  # config.timeout = 10.0
186
202
  # end
187
203
  #
188
- # @yield [config] Configure the Subscriber client.
204
+ # @yield [config] Configure the SubscriptionAdmin client.
189
205
  # @yieldparam config [Client::Configuration]
190
206
  #
191
207
  def initialize
@@ -205,8 +221,9 @@ module Google
205
221
  credentials = @config.credentials
206
222
  # Use self-signed JWT if the endpoint is unchanged from default,
207
223
  # but only if the default endpoint does not have a region prefix.
208
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
209
- !@config.endpoint.split(".").first.include?("-")
224
+ enable_self_signed_jwt = @config.endpoint.nil? ||
225
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
226
+ !@config.endpoint.split(".").first.include?("-"))
210
227
  credentials ||= Credentials.default scope: @config.scope,
211
228
  enable_self_signed_jwt: enable_self_signed_jwt
212
229
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
@@ -215,29 +232,67 @@ module Google
215
232
  @quota_project_id = @config.quota_project
216
233
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
217
234
 
218
- @subscriber_stub = ::Gapic::ServiceStub.new(
235
+ @subscription_admin_stub = ::Gapic::ServiceStub.new(
219
236
  ::Google::Cloud::PubSub::V1::Subscriber::Stub,
220
- credentials: credentials,
221
- endpoint: @config.endpoint,
237
+ credentials: credentials,
238
+ endpoint: @config.endpoint,
239
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
240
+ universe_domain: @config.universe_domain,
222
241
  channel_args: @config.channel_args,
223
- interceptors: @config.interceptors
242
+ interceptors: @config.interceptors,
243
+ channel_pool_config: @config.channel_pool,
244
+ logger: @config.logger
224
245
  )
246
+
247
+ @subscription_admin_stub.stub_logger&.info do |entry|
248
+ entry.set_system_name
249
+ entry.set_service
250
+ entry.message = "Created client for #{entry.service}"
251
+ entry.set_credentials_fields credentials
252
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
253
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
254
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
255
+ end
256
+
257
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
258
+ config.credentials = credentials
259
+ config.quota_project = @quota_project_id
260
+ config.endpoint = @subscription_admin_stub.endpoint
261
+ config.universe_domain = @subscription_admin_stub.universe_domain
262
+ config.logger = @subscription_admin_stub.logger if config.respond_to? :logger=
263
+ end
264
+ end
265
+
266
+ ##
267
+ # Get the associated client for mix-in of the IAMPolicy.
268
+ #
269
+ # @return [Google::Iam::V1::IAMPolicy::Client]
270
+ #
271
+ attr_reader :iam_policy_client
272
+
273
+ ##
274
+ # The logger used for request/response debug logging.
275
+ #
276
+ # @return [Logger]
277
+ #
278
+ def logger
279
+ @subscription_admin_stub.logger
225
280
  end
226
281
 
227
282
  # Service calls
228
283
 
229
284
  ##
230
285
  # Creates a subscription to a given topic. See the [resource name rules]
231
- # (https://cloud.google.com/pubsub/docs/admin#resource_names).
286
+ # (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
232
287
  # If the subscription already exists, returns `ALREADY_EXISTS`.
233
288
  # If the corresponding topic doesn't exist, returns `NOT_FOUND`.
234
289
  #
235
290
  # If the name is not provided in the request, the server will assign a random
236
291
  # name for this subscription on the same project as the topic, conforming
237
292
  # to the [resource name format]
238
- # (https://cloud.google.com/pubsub/docs/admin#resource_names). The generated
239
- # name is populated in the returned Subscription object. Note that for REST
240
- # API requests, you must specify a name in the request.
293
+ # (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The
294
+ # generated name is populated in the returned Subscription object. Note that
295
+ # for REST API requests, you must specify a name in the request.
241
296
  #
242
297
  # @overload create_subscription(request, options = nil)
243
298
  # Pass arguments to `create_subscription` via a request object, either of type
@@ -249,7 +304,7 @@ module Google
249
304
  # @param options [::Gapic::CallOptions, ::Hash]
250
305
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
251
306
  #
252
- # @overload create_subscription(name: nil, topic: nil, push_config: nil, bigquery_config: nil, ack_deadline_seconds: nil, retain_acked_messages: nil, message_retention_duration: nil, labels: nil, enable_message_ordering: nil, expiration_policy: nil, filter: nil, dead_letter_policy: nil, retry_policy: nil, detached: nil, enable_exactly_once_delivery: nil)
307
+ # @overload create_subscription(name: nil, topic: nil, push_config: nil, bigquery_config: nil, cloud_storage_config: nil, ack_deadline_seconds: nil, retain_acked_messages: nil, message_retention_duration: nil, labels: nil, enable_message_ordering: nil, expiration_policy: nil, filter: nil, dead_letter_policy: nil, retry_policy: nil, detached: nil, enable_exactly_once_delivery: nil, message_transforms: nil)
253
308
  # Pass arguments to `create_subscription` via keyword arguments. Note that at
254
309
  # least one keyword argument is required. To specify no parameters, or to keep all
255
310
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -266,21 +321,20 @@ module Google
266
321
  # messages. Format is `projects/{project}/topics/{topic}`. The value of this
267
322
  # field will be `_deleted-topic_` if the topic has been deleted.
268
323
  # @param push_config [::Google::Cloud::PubSub::V1::PushConfig, ::Hash]
269
- # If push delivery is used with this subscription, this field is
270
- # used to configure it. Either `pushConfig` or `bigQueryConfig` can be set,
271
- # but not both. If both are empty, then the subscriber will pull and ack
272
- # messages using API methods.
324
+ # Optional. If push delivery is used with this subscription, this field is
325
+ # used to configure it.
273
326
  # @param bigquery_config [::Google::Cloud::PubSub::V1::BigQueryConfig, ::Hash]
274
- # If delivery to BigQuery is used with this subscription, this field is
275
- # used to configure it. Either `pushConfig` or `bigQueryConfig` can be set,
276
- # but not both. If both are empty, then the subscriber will pull and ack
277
- # messages using API methods.
327
+ # Optional. If delivery to BigQuery is used with this subscription, this
328
+ # field is used to configure it.
329
+ # @param cloud_storage_config [::Google::Cloud::PubSub::V1::CloudStorageConfig, ::Hash]
330
+ # Optional. If delivery to Google Cloud Storage is used with this
331
+ # subscription, this field is used to configure it.
278
332
  # @param ack_deadline_seconds [::Integer]
279
- # The approximate amount of time (on a best-effort basis) Pub/Sub waits for
280
- # the subscriber to acknowledge receipt before resending the message. In the
281
- # interval after the message is delivered and before it is acknowledged, it
282
- # is considered to be <i>outstanding</i>. During that time period, the
283
- # message will not be redelivered (on a best-effort basis).
333
+ # Optional. The approximate amount of time (on a best-effort basis) Pub/Sub
334
+ # waits for the subscriber to acknowledge receipt before resending the
335
+ # message. In the interval after the message is delivered and before it is
336
+ # acknowledged, it is considered to be _outstanding_. During that time
337
+ # period, the message will not be redelivered (on a best-effort basis).
284
338
  #
285
339
  # For pull subscriptions, this value is used as the initial value for the ack
286
340
  # deadline. To override this value for a given message, call
@@ -297,75 +351,79 @@ module Google
297
351
  # If the subscriber never acknowledges the message, the Pub/Sub
298
352
  # system will eventually redeliver the message.
299
353
  # @param retain_acked_messages [::Boolean]
300
- # Indicates whether to retain acknowledged messages. If true, then
354
+ # Optional. Indicates whether to retain acknowledged messages. If true, then
301
355
  # messages are not expunged from the subscription's backlog, even if they are
302
356
  # acknowledged, until they fall out of the `message_retention_duration`
303
357
  # window. This must be true if you would like to [`Seek` to a timestamp]
304
358
  # (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) in
305
359
  # the past to replay previously-acknowledged messages.
306
360
  # @param message_retention_duration [::Google::Protobuf::Duration, ::Hash]
307
- # How long to retain unacknowledged messages in the subscription's backlog,
308
- # from the moment a message is published.
309
- # If `retain_acked_messages` is true, then this also configures the retention
310
- # of acknowledged messages, and thus configures how far back in time a `Seek`
311
- # can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10
312
- # minutes.
361
+ # Optional. How long to retain unacknowledged messages in the subscription's
362
+ # backlog, from the moment a message is published. If `retain_acked_messages`
363
+ # is true, then this also configures the retention of acknowledged messages,
364
+ # and thus configures how far back in time a `Seek` can be done. Defaults to
365
+ # 7 days. Cannot be more than 31 days or less than 10 minutes.
313
366
  # @param labels [::Hash{::String => ::String}]
314
- # See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
315
- # managing labels</a>.
367
+ # Optional. See [Creating and managing
368
+ # labels](https://cloud.google.com/pubsub/docs/labels).
316
369
  # @param enable_message_ordering [::Boolean]
317
- # If true, messages published with the same `ordering_key` in `PubsubMessage`
318
- # will be delivered to the subscribers in the order in which they
319
- # are received by the Pub/Sub system. Otherwise, they may be delivered in
320
- # any order.
370
+ # Optional. If true, messages published with the same `ordering_key` in
371
+ # `PubsubMessage` will be delivered to the subscribers in the order in which
372
+ # they are received by the Pub/Sub system. Otherwise, they may be delivered
373
+ # in any order.
321
374
  # @param expiration_policy [::Google::Cloud::PubSub::V1::ExpirationPolicy, ::Hash]
322
- # A policy that specifies the conditions for this subscription's expiration.
323
- # A subscription is considered active as long as any connected subscriber is
324
- # successfully consuming messages from the subscription or is issuing
325
- # operations on the subscription. If `expiration_policy` is not set, a
326
- # *default policy* with `ttl` of 31 days will be used. The minimum allowed
327
- # value for `expiration_policy.ttl` is 1 day.
375
+ # Optional. A policy that specifies the conditions for this subscription's
376
+ # expiration. A subscription is considered active as long as any connected
377
+ # subscriber is successfully consuming messages from the subscription or is
378
+ # issuing operations on the subscription. If `expiration_policy` is not set,
379
+ # a *default policy* with `ttl` of 31 days will be used. The minimum allowed
380
+ # value for `expiration_policy.ttl` is 1 day. If `expiration_policy` is set,
381
+ # but `expiration_policy.ttl` is not set, the subscription never expires.
328
382
  # @param filter [::String]
329
- # An expression written in the Pub/Sub [filter
383
+ # Optional. An expression written in the Pub/Sub [filter
330
384
  # language](https://cloud.google.com/pubsub/docs/filtering). If non-empty,
331
385
  # then only `PubsubMessage`s whose `attributes` field matches the filter are
332
386
  # delivered on this subscription. If empty, then no messages are filtered
333
387
  # out.
334
388
  # @param dead_letter_policy [::Google::Cloud::PubSub::V1::DeadLetterPolicy, ::Hash]
335
- # A policy that specifies the conditions for dead lettering messages in
336
- # this subscription. If dead_letter_policy is not set, dead lettering
337
- # is disabled.
389
+ # Optional. A policy that specifies the conditions for dead lettering
390
+ # messages in this subscription. If dead_letter_policy is not set, dead
391
+ # lettering is disabled.
338
392
  #
339
- # The Cloud Pub/Sub service account associated with this subscriptions's
393
+ # The Pub/Sub service account associated with this subscriptions's
340
394
  # parent project (i.e.,
341
395
  # service-\\{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
342
396
  # permission to Acknowledge() messages on this subscription.
343
397
  # @param retry_policy [::Google::Cloud::PubSub::V1::RetryPolicy, ::Hash]
344
- # A policy that specifies how Pub/Sub retries message delivery for this
345
- # subscription.
398
+ # Optional. A policy that specifies how Pub/Sub retries message delivery for
399
+ # this subscription.
346
400
  #
347
401
  # If not set, the default retry policy is applied. This generally implies
348
402
  # that messages will be retried as soon as possible for healthy subscribers.
349
- # RetryPolicy will be triggered on NACKs or acknowledgement deadline
350
- # exceeded events for a given message.
403
+ # RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded
404
+ # events for a given message.
351
405
  # @param detached [::Boolean]
352
- # Indicates whether the subscription is detached from its topic. Detached
353
- # subscriptions don't receive messages from their topic and don't retain any
354
- # backlog. `Pull` and `StreamingPull` requests will return
406
+ # Optional. Indicates whether the subscription is detached from its topic.
407
+ # Detached subscriptions don't receive messages from their topic and don't
408
+ # retain any backlog. `Pull` and `StreamingPull` requests will return
355
409
  # FAILED_PRECONDITION. If the subscription is a push subscription, pushes to
356
410
  # the endpoint will not be made.
357
411
  # @param enable_exactly_once_delivery [::Boolean]
358
- # If true, Pub/Sub provides the following guarantees for the delivery of
359
- # a message with a given value of `message_id` on this subscription:
412
+ # Optional. If true, Pub/Sub provides the following guarantees for the
413
+ # delivery of a message with a given value of `message_id` on this
414
+ # subscription:
360
415
  #
361
416
  # * The message sent to a subscriber is guaranteed not to be resent
362
- # before the message's acknowledgement deadline expires.
417
+ # before the message's acknowledgment deadline expires.
363
418
  # * An acknowledged message will not be resent to a subscriber.
364
419
  #
365
420
  # Note that subscribers may still receive multiple copies of a message
366
421
  # when `enable_exactly_once_delivery` is true if the message was published
367
422
  # multiple times by a publisher client. These copies are considered distinct
368
423
  # by Pub/Sub and have distinct `message_id` values.
424
+ # @param message_transforms [::Array<::Google::Cloud::PubSub::V1::MessageTransform, ::Hash>]
425
+ # Optional. Transforms to be applied to messages before they are delivered to
426
+ # subscribers. Transforms are applied in the order specified.
369
427
  #
370
428
  # @yield [response, operation] Access the result along with the RPC operation
371
429
  # @yieldparam response [::Google::Cloud::PubSub::V1::Subscription]
@@ -379,7 +437,7 @@ module Google
379
437
  # require "google/cloud/pubsub/v1"
380
438
  #
381
439
  # # Create a client object. The client can be reused for multiple calls.
382
- # client = Google::Cloud::PubSub::V1::Subscriber::Client.new
440
+ # client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new
383
441
  #
384
442
  # # Create a request. To set request fields, pass in keyword arguments.
385
443
  # request = Google::Cloud::PubSub::V1::Subscription.new
@@ -401,10 +459,11 @@ module Google
401
459
  # Customize the options with defaults
402
460
  metadata = @config.rpcs.create_subscription.metadata.to_h
403
461
 
404
- # Set x-goog-api-client and x-goog-user-project headers
462
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
405
463
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
406
464
  lib_name: @config.lib_name, lib_version: @config.lib_version,
407
465
  gapic_version: ::Google::Cloud::PubSub::V1::VERSION
466
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
408
467
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
409
468
 
410
469
  header_params = {}
@@ -423,9 +482,8 @@ module Google
423
482
  metadata: @config.metadata,
424
483
  retry_policy: @config.retry_policy
425
484
 
426
- @subscriber_stub.call_rpc :create_subscription, request, options: options do |response, operation|
485
+ @subscription_admin_stub.call_rpc :create_subscription, request, options: options do |response, operation|
427
486
  yield response, operation if block_given?
428
- return response
429
487
  end
430
488
  rescue ::GRPC::BadStatus => e
431
489
  raise ::Google::Cloud::Error.from_error(e)
@@ -465,7 +523,7 @@ module Google
465
523
  # require "google/cloud/pubsub/v1"
466
524
  #
467
525
  # # Create a client object. The client can be reused for multiple calls.
468
- # client = Google::Cloud::PubSub::V1::Subscriber::Client.new
526
+ # client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new
469
527
  #
470
528
  # # Create a request. To set request fields, pass in keyword arguments.
471
529
  # request = Google::Cloud::PubSub::V1::GetSubscriptionRequest.new
@@ -487,10 +545,11 @@ module Google
487
545
  # Customize the options with defaults
488
546
  metadata = @config.rpcs.get_subscription.metadata.to_h
489
547
 
490
- # Set x-goog-api-client and x-goog-user-project headers
548
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
491
549
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
492
550
  lib_name: @config.lib_name, lib_version: @config.lib_version,
493
551
  gapic_version: ::Google::Cloud::PubSub::V1::VERSION
552
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
494
553
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
495
554
 
496
555
  header_params = {}
@@ -509,17 +568,17 @@ module Google
509
568
  metadata: @config.metadata,
510
569
  retry_policy: @config.retry_policy
511
570
 
512
- @subscriber_stub.call_rpc :get_subscription, request, options: options do |response, operation|
571
+ @subscription_admin_stub.call_rpc :get_subscription, request, options: options do |response, operation|
513
572
  yield response, operation if block_given?
514
- return response
515
573
  end
516
574
  rescue ::GRPC::BadStatus => e
517
575
  raise ::Google::Cloud::Error.from_error(e)
518
576
  end
519
577
 
520
578
  ##
521
- # Updates an existing subscription. Note that certain properties of a
522
- # subscription, such as its topic, are not modifiable.
579
+ # Updates an existing subscription by updating the fields specified in the
580
+ # update mask. Note that certain properties of a subscription, such as its
581
+ # topic, are not modifiable.
523
582
  #
524
583
  # @overload update_subscription(request, options = nil)
525
584
  # Pass arguments to `update_subscription` via a request object, either of type
@@ -554,7 +613,7 @@ module Google
554
613
  # require "google/cloud/pubsub/v1"
555
614
  #
556
615
  # # Create a client object. The client can be reused for multiple calls.
557
- # client = Google::Cloud::PubSub::V1::Subscriber::Client.new
616
+ # client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new
558
617
  #
559
618
  # # Create a request. To set request fields, pass in keyword arguments.
560
619
  # request = Google::Cloud::PubSub::V1::UpdateSubscriptionRequest.new
@@ -576,10 +635,11 @@ module Google
576
635
  # Customize the options with defaults
577
636
  metadata = @config.rpcs.update_subscription.metadata.to_h
578
637
 
579
- # Set x-goog-api-client and x-goog-user-project headers
638
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
580
639
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
581
640
  lib_name: @config.lib_name, lib_version: @config.lib_version,
582
641
  gapic_version: ::Google::Cloud::PubSub::V1::VERSION
642
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
583
643
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
584
644
 
585
645
  header_params = {}
@@ -598,9 +658,8 @@ module Google
598
658
  metadata: @config.metadata,
599
659
  retry_policy: @config.retry_policy
600
660
 
601
- @subscriber_stub.call_rpc :update_subscription, request, options: options do |response, operation|
661
+ @subscription_admin_stub.call_rpc :update_subscription, request, options: options do |response, operation|
602
662
  yield response, operation if block_given?
603
- return response
604
663
  end
605
664
  rescue ::GRPC::BadStatus => e
606
665
  raise ::Google::Cloud::Error.from_error(e)
@@ -628,11 +687,11 @@ module Google
628
687
  # Required. The name of the project in which to list subscriptions.
629
688
  # Format is `projects/{project-id}`.
630
689
  # @param page_size [::Integer]
631
- # Maximum number of subscriptions to return.
690
+ # Optional. Maximum number of subscriptions to return.
632
691
  # @param page_token [::String]
633
- # The value returned by the last `ListSubscriptionsResponse`; indicates that
634
- # this is a continuation of a prior `ListSubscriptions` call, and that the
635
- # system should return the next page of data.
692
+ # Optional. The value returned by the last `ListSubscriptionsResponse`;
693
+ # indicates that this is a continuation of a prior `ListSubscriptions` call,
694
+ # and that the system should return the next page of data.
636
695
  #
637
696
  # @yield [response, operation] Access the result along with the RPC operation
638
697
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::PubSub::V1::Subscription>]
@@ -646,7 +705,7 @@ module Google
646
705
  # require "google/cloud/pubsub/v1"
647
706
  #
648
707
  # # Create a client object. The client can be reused for multiple calls.
649
- # client = Google::Cloud::PubSub::V1::Subscriber::Client.new
708
+ # client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new
650
709
  #
651
710
  # # Create a request. To set request fields, pass in keyword arguments.
652
711
  # request = Google::Cloud::PubSub::V1::ListSubscriptionsRequest.new
@@ -654,13 +713,11 @@ module Google
654
713
  # # Call the list_subscriptions method.
655
714
  # result = client.list_subscriptions request
656
715
  #
657
- # # The returned object is of type Gapic::PagedEnumerable. You can
658
- # # iterate over all elements by calling #each, and the enumerable
659
- # # will lazily make API calls to fetch subsequent pages. Other
660
- # # methods are also available for managing paging directly.
661
- # result.each do |response|
716
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
717
+ # # over elements, and API calls will be issued to fetch pages as needed.
718
+ # result.each do |item|
662
719
  # # Each element is of type ::Google::Cloud::PubSub::V1::Subscription.
663
- # p response
720
+ # p item
664
721
  # end
665
722
  #
666
723
  def list_subscriptions request, options = nil
@@ -674,10 +731,11 @@ module Google
674
731
  # Customize the options with defaults
675
732
  metadata = @config.rpcs.list_subscriptions.metadata.to_h
676
733
 
677
- # Set x-goog-api-client and x-goog-user-project headers
734
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
678
735
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
679
736
  lib_name: @config.lib_name, lib_version: @config.lib_version,
680
737
  gapic_version: ::Google::Cloud::PubSub::V1::VERSION
738
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
681
739
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
682
740
 
683
741
  header_params = {}
@@ -696,10 +754,10 @@ module Google
696
754
  metadata: @config.metadata,
697
755
  retry_policy: @config.retry_policy
698
756
 
699
- @subscriber_stub.call_rpc :list_subscriptions, request, options: options do |response, operation|
700
- response = ::Gapic::PagedEnumerable.new @subscriber_stub, :list_subscriptions, request, response, operation, options
757
+ @subscription_admin_stub.call_rpc :list_subscriptions, request, options: options do |response, operation|
758
+ response = ::Gapic::PagedEnumerable.new @subscription_admin_stub, :list_subscriptions, request, response, operation, options
701
759
  yield response, operation if block_given?
702
- return response
760
+ throw :response, response
703
761
  end
704
762
  rescue ::GRPC::BadStatus => e
705
763
  raise ::Google::Cloud::Error.from_error(e)
@@ -743,7 +801,7 @@ module Google
743
801
  # require "google/cloud/pubsub/v1"
744
802
  #
745
803
  # # Create a client object. The client can be reused for multiple calls.
746
- # client = Google::Cloud::PubSub::V1::Subscriber::Client.new
804
+ # client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new
747
805
  #
748
806
  # # Create a request. To set request fields, pass in keyword arguments.
749
807
  # request = Google::Cloud::PubSub::V1::DeleteSubscriptionRequest.new
@@ -765,10 +823,11 @@ module Google
765
823
  # Customize the options with defaults
766
824
  metadata = @config.rpcs.delete_subscription.metadata.to_h
767
825
 
768
- # Set x-goog-api-client and x-goog-user-project headers
826
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
769
827
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
770
828
  lib_name: @config.lib_name, lib_version: @config.lib_version,
771
829
  gapic_version: ::Google::Cloud::PubSub::V1::VERSION
830
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
772
831
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
773
832
 
774
833
  header_params = {}
@@ -787,9 +846,8 @@ module Google
787
846
  metadata: @config.metadata,
788
847
  retry_policy: @config.retry_policy
789
848
 
790
- @subscriber_stub.call_rpc :delete_subscription, request, options: options do |response, operation|
849
+ @subscription_admin_stub.call_rpc :delete_subscription, request, options: options do |response, operation|
791
850
  yield response, operation if block_given?
792
- return response
793
851
  end
794
852
  rescue ::GRPC::BadStatus => e
795
853
  raise ::Google::Cloud::Error.from_error(e)
@@ -830,7 +888,8 @@ module Google
830
888
  # delivery to another subscriber client. This typically results in an
831
889
  # increase in the rate of message redeliveries (that is, duplicates).
832
890
  # The minimum deadline you can specify is 0 seconds.
833
- # The maximum deadline you can specify is 600 seconds (10 minutes).
891
+ # The maximum deadline you can specify in a single request is 600 seconds
892
+ # (10 minutes).
834
893
  #
835
894
  # @yield [response, operation] Access the result along with the RPC operation
836
895
  # @yieldparam response [::Google::Protobuf::Empty]
@@ -844,7 +903,7 @@ module Google
844
903
  # require "google/cloud/pubsub/v1"
845
904
  #
846
905
  # # Create a client object. The client can be reused for multiple calls.
847
- # client = Google::Cloud::PubSub::V1::Subscriber::Client.new
906
+ # client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new
848
907
  #
849
908
  # # Create a request. To set request fields, pass in keyword arguments.
850
909
  # request = Google::Cloud::PubSub::V1::ModifyAckDeadlineRequest.new
@@ -866,10 +925,11 @@ module Google
866
925
  # Customize the options with defaults
867
926
  metadata = @config.rpcs.modify_ack_deadline.metadata.to_h
868
927
 
869
- # Set x-goog-api-client and x-goog-user-project headers
928
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
870
929
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
871
930
  lib_name: @config.lib_name, lib_version: @config.lib_version,
872
931
  gapic_version: ::Google::Cloud::PubSub::V1::VERSION
932
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
873
933
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
874
934
 
875
935
  header_params = {}
@@ -888,9 +948,8 @@ module Google
888
948
  metadata: @config.metadata,
889
949
  retry_policy: @config.retry_policy
890
950
 
891
- @subscriber_stub.call_rpc :modify_ack_deadline, request, options: options do |response, operation|
951
+ @subscription_admin_stub.call_rpc :modify_ack_deadline, request, options: options do |response, operation|
892
952
  yield response, operation if block_given?
893
- return response
894
953
  end
895
954
  rescue ::GRPC::BadStatus => e
896
955
  raise ::Google::Cloud::Error.from_error(e)
@@ -940,7 +999,7 @@ module Google
940
999
  # require "google/cloud/pubsub/v1"
941
1000
  #
942
1001
  # # Create a client object. The client can be reused for multiple calls.
943
- # client = Google::Cloud::PubSub::V1::Subscriber::Client.new
1002
+ # client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new
944
1003
  #
945
1004
  # # Create a request. To set request fields, pass in keyword arguments.
946
1005
  # request = Google::Cloud::PubSub::V1::AcknowledgeRequest.new
@@ -962,10 +1021,11 @@ module Google
962
1021
  # Customize the options with defaults
963
1022
  metadata = @config.rpcs.acknowledge.metadata.to_h
964
1023
 
965
- # Set x-goog-api-client and x-goog-user-project headers
1024
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
966
1025
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
967
1026
  lib_name: @config.lib_name, lib_version: @config.lib_version,
968
1027
  gapic_version: ::Google::Cloud::PubSub::V1::VERSION
1028
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
969
1029
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
970
1030
 
971
1031
  header_params = {}
@@ -984,18 +1044,15 @@ module Google
984
1044
  metadata: @config.metadata,
985
1045
  retry_policy: @config.retry_policy
986
1046
 
987
- @subscriber_stub.call_rpc :acknowledge, request, options: options do |response, operation|
1047
+ @subscription_admin_stub.call_rpc :acknowledge, request, options: options do |response, operation|
988
1048
  yield response, operation if block_given?
989
- return response
990
1049
  end
991
1050
  rescue ::GRPC::BadStatus => e
992
1051
  raise ::Google::Cloud::Error.from_error(e)
993
1052
  end
994
1053
 
995
1054
  ##
996
- # Pulls messages from the server. The server may return `UNAVAILABLE` if
997
- # there are too many concurrent pull requests pending for the given
998
- # subscription.
1055
+ # Pulls messages from the server.
999
1056
  #
1000
1057
  # @overload pull(request, options = nil)
1001
1058
  # Pass arguments to `pull` via a request object, either of type
@@ -1040,7 +1097,7 @@ module Google
1040
1097
  # require "google/cloud/pubsub/v1"
1041
1098
  #
1042
1099
  # # Create a client object. The client can be reused for multiple calls.
1043
- # client = Google::Cloud::PubSub::V1::Subscriber::Client.new
1100
+ # client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new
1044
1101
  #
1045
1102
  # # Create a request. To set request fields, pass in keyword arguments.
1046
1103
  # request = Google::Cloud::PubSub::V1::PullRequest.new
@@ -1062,10 +1119,11 @@ module Google
1062
1119
  # Customize the options with defaults
1063
1120
  metadata = @config.rpcs.pull.metadata.to_h
1064
1121
 
1065
- # Set x-goog-api-client and x-goog-user-project headers
1122
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1066
1123
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1067
1124
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1068
1125
  gapic_version: ::Google::Cloud::PubSub::V1::VERSION
1126
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1069
1127
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1070
1128
 
1071
1129
  header_params = {}
@@ -1084,9 +1142,8 @@ module Google
1084
1142
  metadata: @config.metadata,
1085
1143
  retry_policy: @config.retry_policy
1086
1144
 
1087
- @subscriber_stub.call_rpc :pull, request, options: options do |response, operation|
1145
+ @subscription_admin_stub.call_rpc :pull, request, options: options do |response, operation|
1088
1146
  yield response, operation if block_given?
1089
- return response
1090
1147
  end
1091
1148
  rescue ::GRPC::BadStatus => e
1092
1149
  raise ::Google::Cloud::Error.from_error(e)
@@ -1094,7 +1151,7 @@ module Google
1094
1151
 
1095
1152
  ##
1096
1153
  # Establishes a stream with the server, which sends messages down to the
1097
- # client. The client streams acknowledgements and ack deadline modifications
1154
+ # client. The client streams acknowledgments and ack deadline modifications
1098
1155
  # back to the server. The server will close the stream and return the status
1099
1156
  # on any error. The server may close the stream with status `UNAVAILABLE` to
1100
1157
  # reassign server-side resources, in which case, the client should
@@ -1118,24 +1175,24 @@ module Google
1118
1175
  # require "google/cloud/pubsub/v1"
1119
1176
  #
1120
1177
  # # Create a client object. The client can be reused for multiple calls.
1121
- # client = Google::Cloud::PubSub::V1::Subscriber::Client.new
1178
+ # client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new
1122
1179
  #
1123
- # # Create an input stream
1180
+ # # Create an input stream.
1124
1181
  # input = Gapic::StreamInput.new
1125
1182
  #
1126
1183
  # # Call the streaming_pull method to start streaming.
1127
1184
  # output = client.streaming_pull input
1128
1185
  #
1129
- # # Send requests on the stream. For each request, pass in keyword
1130
- # # arguments to set fields. Be sure to close the stream when done.
1186
+ # # Send requests on the stream. For each request object, set fields by
1187
+ # # passing keyword arguments. Be sure to close the stream when done.
1131
1188
  # input << Google::Cloud::PubSub::V1::StreamingPullRequest.new
1132
1189
  # input << Google::Cloud::PubSub::V1::StreamingPullRequest.new
1133
1190
  # input.close
1134
1191
  #
1135
- # # Handle streamed responses. These may be interleaved with inputs.
1136
- # # Each response is of type ::Google::Cloud::PubSub::V1::StreamingPullResponse.
1137
- # output.each do |response|
1138
- # p response
1192
+ # # The returned object is a streamed enumerable yielding elements of type
1193
+ # # ::Google::Cloud::PubSub::V1::StreamingPullResponse
1194
+ # output.each do |current_response|
1195
+ # p current_response
1139
1196
  # end
1140
1197
  #
1141
1198
  def streaming_pull request, options = nil
@@ -1154,10 +1211,11 @@ module Google
1154
1211
  # Customize the options with defaults
1155
1212
  metadata = @config.rpcs.streaming_pull.metadata.to_h
1156
1213
 
1157
- # Set x-goog-api-client and x-goog-user-project headers
1214
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1158
1215
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1159
1216
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1160
1217
  gapic_version: ::Google::Cloud::PubSub::V1::VERSION
1218
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1161
1219
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1162
1220
 
1163
1221
  options.apply_defaults timeout: @config.rpcs.streaming_pull.timeout,
@@ -1168,9 +1226,8 @@ module Google
1168
1226
  metadata: @config.metadata,
1169
1227
  retry_policy: @config.retry_policy
1170
1228
 
1171
- @subscriber_stub.call_rpc :streaming_pull, request, options: options do |response, operation|
1229
+ @subscription_admin_stub.call_rpc :streaming_pull, request, options: options do |response, operation|
1172
1230
  yield response, operation if block_given?
1173
- return response
1174
1231
  end
1175
1232
  rescue ::GRPC::BadStatus => e
1176
1233
  raise ::Google::Cloud::Error.from_error(e)
@@ -1222,7 +1279,7 @@ module Google
1222
1279
  # require "google/cloud/pubsub/v1"
1223
1280
  #
1224
1281
  # # Create a client object. The client can be reused for multiple calls.
1225
- # client = Google::Cloud::PubSub::V1::Subscriber::Client.new
1282
+ # client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new
1226
1283
  #
1227
1284
  # # Create a request. To set request fields, pass in keyword arguments.
1228
1285
  # request = Google::Cloud::PubSub::V1::ModifyPushConfigRequest.new
@@ -1244,10 +1301,11 @@ module Google
1244
1301
  # Customize the options with defaults
1245
1302
  metadata = @config.rpcs.modify_push_config.metadata.to_h
1246
1303
 
1247
- # Set x-goog-api-client and x-goog-user-project headers
1304
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1248
1305
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1249
1306
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1250
1307
  gapic_version: ::Google::Cloud::PubSub::V1::VERSION
1308
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1251
1309
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1252
1310
 
1253
1311
  header_params = {}
@@ -1266,9 +1324,8 @@ module Google
1266
1324
  metadata: @config.metadata,
1267
1325
  retry_policy: @config.retry_policy
1268
1326
 
1269
- @subscriber_stub.call_rpc :modify_push_config, request, options: options do |response, operation|
1327
+ @subscription_admin_stub.call_rpc :modify_push_config, request, options: options do |response, operation|
1270
1328
  yield response, operation if block_given?
1271
- return response
1272
1329
  end
1273
1330
  rescue ::GRPC::BadStatus => e
1274
1331
  raise ::Google::Cloud::Error.from_error(e)
@@ -1276,10 +1333,10 @@ module Google
1276
1333
 
1277
1334
  ##
1278
1335
  # Gets the configuration details of a snapshot. Snapshots are used in
1279
- # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
1280
- # operations, which allow you to manage message acknowledgments in bulk. That
1281
- # is, you can set the acknowledgment state of messages in an existing
1282
- # subscription to the state captured by a snapshot.
1336
+ # [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
1337
+ # which allow you to manage message acknowledgments in bulk. That is, you can
1338
+ # set the acknowledgment state of messages in an existing subscription to the
1339
+ # state captured by a snapshot.
1283
1340
  #
1284
1341
  # @overload get_snapshot(request, options = nil)
1285
1342
  # Pass arguments to `get_snapshot` via a request object, either of type
@@ -1312,7 +1369,7 @@ module Google
1312
1369
  # require "google/cloud/pubsub/v1"
1313
1370
  #
1314
1371
  # # Create a client object. The client can be reused for multiple calls.
1315
- # client = Google::Cloud::PubSub::V1::Subscriber::Client.new
1372
+ # client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new
1316
1373
  #
1317
1374
  # # Create a request. To set request fields, pass in keyword arguments.
1318
1375
  # request = Google::Cloud::PubSub::V1::GetSnapshotRequest.new
@@ -1334,10 +1391,11 @@ module Google
1334
1391
  # Customize the options with defaults
1335
1392
  metadata = @config.rpcs.get_snapshot.metadata.to_h
1336
1393
 
1337
- # Set x-goog-api-client and x-goog-user-project headers
1394
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1338
1395
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1339
1396
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1340
1397
  gapic_version: ::Google::Cloud::PubSub::V1::VERSION
1398
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1341
1399
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1342
1400
 
1343
1401
  header_params = {}
@@ -1356,9 +1414,8 @@ module Google
1356
1414
  metadata: @config.metadata,
1357
1415
  retry_policy: @config.retry_policy
1358
1416
 
1359
- @subscriber_stub.call_rpc :get_snapshot, request, options: options do |response, operation|
1417
+ @subscription_admin_stub.call_rpc :get_snapshot, request, options: options do |response, operation|
1360
1418
  yield response, operation if block_given?
1361
- return response
1362
1419
  end
1363
1420
  rescue ::GRPC::BadStatus => e
1364
1421
  raise ::Google::Cloud::Error.from_error(e)
@@ -1390,11 +1447,11 @@ module Google
1390
1447
  # Required. The name of the project in which to list snapshots.
1391
1448
  # Format is `projects/{project-id}`.
1392
1449
  # @param page_size [::Integer]
1393
- # Maximum number of snapshots to return.
1450
+ # Optional. Maximum number of snapshots to return.
1394
1451
  # @param page_token [::String]
1395
- # The value returned by the last `ListSnapshotsResponse`; indicates that this
1396
- # is a continuation of a prior `ListSnapshots` call, and that the system
1397
- # should return the next page of data.
1452
+ # Optional. The value returned by the last `ListSnapshotsResponse`; indicates
1453
+ # that this is a continuation of a prior `ListSnapshots` call, and that the
1454
+ # system should return the next page of data.
1398
1455
  #
1399
1456
  # @yield [response, operation] Access the result along with the RPC operation
1400
1457
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::PubSub::V1::Snapshot>]
@@ -1408,7 +1465,7 @@ module Google
1408
1465
  # require "google/cloud/pubsub/v1"
1409
1466
  #
1410
1467
  # # Create a client object. The client can be reused for multiple calls.
1411
- # client = Google::Cloud::PubSub::V1::Subscriber::Client.new
1468
+ # client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new
1412
1469
  #
1413
1470
  # # Create a request. To set request fields, pass in keyword arguments.
1414
1471
  # request = Google::Cloud::PubSub::V1::ListSnapshotsRequest.new
@@ -1416,13 +1473,11 @@ module Google
1416
1473
  # # Call the list_snapshots method.
1417
1474
  # result = client.list_snapshots request
1418
1475
  #
1419
- # # The returned object is of type Gapic::PagedEnumerable. You can
1420
- # # iterate over all elements by calling #each, and the enumerable
1421
- # # will lazily make API calls to fetch subsequent pages. Other
1422
- # # methods are also available for managing paging directly.
1423
- # result.each do |response|
1476
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1477
+ # # over elements, and API calls will be issued to fetch pages as needed.
1478
+ # result.each do |item|
1424
1479
  # # Each element is of type ::Google::Cloud::PubSub::V1::Snapshot.
1425
- # p response
1480
+ # p item
1426
1481
  # end
1427
1482
  #
1428
1483
  def list_snapshots request, options = nil
@@ -1436,10 +1491,11 @@ module Google
1436
1491
  # Customize the options with defaults
1437
1492
  metadata = @config.rpcs.list_snapshots.metadata.to_h
1438
1493
 
1439
- # Set x-goog-api-client and x-goog-user-project headers
1494
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1440
1495
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1441
1496
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1442
1497
  gapic_version: ::Google::Cloud::PubSub::V1::VERSION
1498
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1443
1499
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1444
1500
 
1445
1501
  header_params = {}
@@ -1458,10 +1514,10 @@ module Google
1458
1514
  metadata: @config.metadata,
1459
1515
  retry_policy: @config.retry_policy
1460
1516
 
1461
- @subscriber_stub.call_rpc :list_snapshots, request, options: options do |response, operation|
1462
- response = ::Gapic::PagedEnumerable.new @subscriber_stub, :list_snapshots, request, response, operation, options
1517
+ @subscription_admin_stub.call_rpc :list_snapshots, request, options: options do |response, operation|
1518
+ response = ::Gapic::PagedEnumerable.new @subscription_admin_stub, :list_snapshots, request, response, operation, options
1463
1519
  yield response, operation if block_given?
1464
- return response
1520
+ throw :response, response
1465
1521
  end
1466
1522
  rescue ::GRPC::BadStatus => e
1467
1523
  raise ::Google::Cloud::Error.from_error(e)
@@ -1481,7 +1537,7 @@ module Google
1481
1537
  # the request, the server will assign a random
1482
1538
  # name for this snapshot on the same project as the subscription, conforming
1483
1539
  # to the [resource name format]
1484
- # (https://cloud.google.com/pubsub/docs/admin#resource_names). The
1540
+ # (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The
1485
1541
  # generated name is populated in the returned Snapshot object. Note that for
1486
1542
  # REST API requests, you must specify a name in the request.
1487
1543
  #
@@ -1504,9 +1560,9 @@ module Google
1504
1560
  # Required. User-provided name for this snapshot. If the name is not provided
1505
1561
  # in the request, the server will assign a random name for this snapshot on
1506
1562
  # the same project as the subscription. Note that for REST API requests, you
1507
- # must specify a name. See the <a
1508
- # href="https://cloud.google.com/pubsub/docs/admin#resource_names"> resource
1509
- # name rules</a>. Format is `projects/{project}/snapshots/{snap}`.
1563
+ # must specify a name. See the [resource name
1564
+ # rules](https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
1565
+ # Format is `projects/{project}/snapshots/{snap}`.
1510
1566
  # @param subscription [::String]
1511
1567
  # Required. The subscription whose backlog the snapshot retains.
1512
1568
  # Specifically, the created snapshot is guaranteed to retain:
@@ -1518,8 +1574,8 @@ module Google
1518
1574
  # successful completion of the CreateSnapshot request.
1519
1575
  # Format is `projects/{project}/subscriptions/{sub}`.
1520
1576
  # @param labels [::Hash{::String => ::String}]
1521
- # See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
1522
- # managing labels</a>.
1577
+ # Optional. See [Creating and managing
1578
+ # labels](https://cloud.google.com/pubsub/docs/labels).
1523
1579
  #
1524
1580
  # @yield [response, operation] Access the result along with the RPC operation
1525
1581
  # @yieldparam response [::Google::Cloud::PubSub::V1::Snapshot]
@@ -1533,7 +1589,7 @@ module Google
1533
1589
  # require "google/cloud/pubsub/v1"
1534
1590
  #
1535
1591
  # # Create a client object. The client can be reused for multiple calls.
1536
- # client = Google::Cloud::PubSub::V1::Subscriber::Client.new
1592
+ # client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new
1537
1593
  #
1538
1594
  # # Create a request. To set request fields, pass in keyword arguments.
1539
1595
  # request = Google::Cloud::PubSub::V1::CreateSnapshotRequest.new
@@ -1555,10 +1611,11 @@ module Google
1555
1611
  # Customize the options with defaults
1556
1612
  metadata = @config.rpcs.create_snapshot.metadata.to_h
1557
1613
 
1558
- # Set x-goog-api-client and x-goog-user-project headers
1614
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1559
1615
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1560
1616
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1561
1617
  gapic_version: ::Google::Cloud::PubSub::V1::VERSION
1618
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1562
1619
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1563
1620
 
1564
1621
  header_params = {}
@@ -1577,21 +1634,20 @@ module Google
1577
1634
  metadata: @config.metadata,
1578
1635
  retry_policy: @config.retry_policy
1579
1636
 
1580
- @subscriber_stub.call_rpc :create_snapshot, request, options: options do |response, operation|
1637
+ @subscription_admin_stub.call_rpc :create_snapshot, request, options: options do |response, operation|
1581
1638
  yield response, operation if block_given?
1582
- return response
1583
1639
  end
1584
1640
  rescue ::GRPC::BadStatus => e
1585
1641
  raise ::Google::Cloud::Error.from_error(e)
1586
1642
  end
1587
1643
 
1588
1644
  ##
1589
- # Updates an existing snapshot. Snapshots are used in
1590
- # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
1591
- # operations, which allow
1592
- # you to manage message acknowledgments in bulk. That is, you can set the
1593
- # acknowledgment state of messages in an existing subscription to the state
1594
- # captured by a snapshot.
1645
+ # Updates an existing snapshot by updating the fields specified in the update
1646
+ # mask. Snapshots are used in
1647
+ # [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
1648
+ # which allow you to manage message acknowledgments in bulk. That is, you can
1649
+ # set the acknowledgment state of messages in an existing subscription to the
1650
+ # state captured by a snapshot.
1595
1651
  #
1596
1652
  # @overload update_snapshot(request, options = nil)
1597
1653
  # Pass arguments to `update_snapshot` via a request object, either of type
@@ -1626,7 +1682,7 @@ module Google
1626
1682
  # require "google/cloud/pubsub/v1"
1627
1683
  #
1628
1684
  # # Create a client object. The client can be reused for multiple calls.
1629
- # client = Google::Cloud::PubSub::V1::Subscriber::Client.new
1685
+ # client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new
1630
1686
  #
1631
1687
  # # Create a request. To set request fields, pass in keyword arguments.
1632
1688
  # request = Google::Cloud::PubSub::V1::UpdateSnapshotRequest.new
@@ -1648,10 +1704,11 @@ module Google
1648
1704
  # Customize the options with defaults
1649
1705
  metadata = @config.rpcs.update_snapshot.metadata.to_h
1650
1706
 
1651
- # Set x-goog-api-client and x-goog-user-project headers
1707
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1652
1708
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1653
1709
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1654
1710
  gapic_version: ::Google::Cloud::PubSub::V1::VERSION
1711
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1655
1712
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1656
1713
 
1657
1714
  header_params = {}
@@ -1670,9 +1727,8 @@ module Google
1670
1727
  metadata: @config.metadata,
1671
1728
  retry_policy: @config.retry_policy
1672
1729
 
1673
- @subscriber_stub.call_rpc :update_snapshot, request, options: options do |response, operation|
1730
+ @subscription_admin_stub.call_rpc :update_snapshot, request, options: options do |response, operation|
1674
1731
  yield response, operation if block_given?
1675
- return response
1676
1732
  end
1677
1733
  rescue ::GRPC::BadStatus => e
1678
1734
  raise ::Google::Cloud::Error.from_error(e)
@@ -1720,7 +1776,7 @@ module Google
1720
1776
  # require "google/cloud/pubsub/v1"
1721
1777
  #
1722
1778
  # # Create a client object. The client can be reused for multiple calls.
1723
- # client = Google::Cloud::PubSub::V1::Subscriber::Client.new
1779
+ # client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new
1724
1780
  #
1725
1781
  # # Create a request. To set request fields, pass in keyword arguments.
1726
1782
  # request = Google::Cloud::PubSub::V1::DeleteSnapshotRequest.new
@@ -1742,10 +1798,11 @@ module Google
1742
1798
  # Customize the options with defaults
1743
1799
  metadata = @config.rpcs.delete_snapshot.metadata.to_h
1744
1800
 
1745
- # Set x-goog-api-client and x-goog-user-project headers
1801
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1746
1802
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1747
1803
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1748
1804
  gapic_version: ::Google::Cloud::PubSub::V1::VERSION
1805
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1749
1806
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1750
1807
 
1751
1808
  header_params = {}
@@ -1764,9 +1821,8 @@ module Google
1764
1821
  metadata: @config.metadata,
1765
1822
  retry_policy: @config.retry_policy
1766
1823
 
1767
- @subscriber_stub.call_rpc :delete_snapshot, request, options: options do |response, operation|
1824
+ @subscription_admin_stub.call_rpc :delete_snapshot, request, options: options do |response, operation|
1768
1825
  yield response, operation if block_given?
1769
- return response
1770
1826
  end
1771
1827
  rescue ::GRPC::BadStatus => e
1772
1828
  raise ::Google::Cloud::Error.from_error(e)
@@ -1799,7 +1855,7 @@ module Google
1799
1855
  # @param subscription [::String]
1800
1856
  # Required. The subscription to affect.
1801
1857
  # @param time [::Google::Protobuf::Timestamp, ::Hash]
1802
- # The time to seek to.
1858
+ # Optional. The time to seek to.
1803
1859
  # Messages retained in the subscription that were published before this
1804
1860
  # time are marked as acknowledged, and messages retained in the
1805
1861
  # subscription that were published after this time are marked as
@@ -1810,10 +1866,14 @@ module Google
1810
1866
  # window (or to a point before the system's notion of the subscription
1811
1867
  # creation time), only retained messages will be marked as unacknowledged,
1812
1868
  # and already-expunged messages will not be restored.
1869
+ #
1870
+ # Note: The following parameters are mutually exclusive: `time`, `snapshot`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one.
1813
1871
  # @param snapshot [::String]
1814
- # The snapshot to seek to. The snapshot's topic must be the same as that of
1815
- # the provided subscription.
1816
- # Format is `projects/{project}/snapshots/{snap}`.
1872
+ # Optional. The snapshot to seek to. The snapshot's topic must be the same
1873
+ # as that of the provided subscription. Format is
1874
+ # `projects/{project}/snapshots/{snap}`.
1875
+ #
1876
+ # Note: The following parameters are mutually exclusive: `snapshot`, `time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one.
1817
1877
  #
1818
1878
  # @yield [response, operation] Access the result along with the RPC operation
1819
1879
  # @yieldparam response [::Google::Cloud::PubSub::V1::SeekResponse]
@@ -1827,7 +1887,7 @@ module Google
1827
1887
  # require "google/cloud/pubsub/v1"
1828
1888
  #
1829
1889
  # # Create a client object. The client can be reused for multiple calls.
1830
- # client = Google::Cloud::PubSub::V1::Subscriber::Client.new
1890
+ # client = Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new
1831
1891
  #
1832
1892
  # # Create a request. To set request fields, pass in keyword arguments.
1833
1893
  # request = Google::Cloud::PubSub::V1::SeekRequest.new
@@ -1849,10 +1909,11 @@ module Google
1849
1909
  # Customize the options with defaults
1850
1910
  metadata = @config.rpcs.seek.metadata.to_h
1851
1911
 
1852
- # Set x-goog-api-client and x-goog-user-project headers
1912
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1853
1913
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1854
1914
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1855
1915
  gapic_version: ::Google::Cloud::PubSub::V1::VERSION
1916
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1856
1917
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1857
1918
 
1858
1919
  header_params = {}
@@ -1871,22 +1932,21 @@ module Google
1871
1932
  metadata: @config.metadata,
1872
1933
  retry_policy: @config.retry_policy
1873
1934
 
1874
- @subscriber_stub.call_rpc :seek, request, options: options do |response, operation|
1935
+ @subscription_admin_stub.call_rpc :seek, request, options: options do |response, operation|
1875
1936
  yield response, operation if block_given?
1876
- return response
1877
1937
  end
1878
1938
  rescue ::GRPC::BadStatus => e
1879
1939
  raise ::Google::Cloud::Error.from_error(e)
1880
1940
  end
1881
1941
 
1882
1942
  ##
1883
- # Configuration class for the Subscriber API.
1943
+ # Configuration class for the SubscriptionAdmin API.
1884
1944
  #
1885
- # This class represents the configuration for Subscriber,
1945
+ # This class represents the configuration for SubscriptionAdmin,
1886
1946
  # providing control over timeouts, retry behavior, logging, transport
1887
1947
  # parameters, and other low-level controls. Certain parameters can also be
1888
1948
  # applied individually to specific RPCs. See
1889
- # {::Google::Cloud::PubSub::V1::Subscriber::Client::Configuration::Rpcs}
1949
+ # {::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client::Configuration::Rpcs}
1890
1950
  # for a list of RPCs that can be configured independently.
1891
1951
  #
1892
1952
  # Configuration can be applied globally to all clients, or to a single client
@@ -1897,32 +1957,39 @@ module Google
1897
1957
  # # Modify the global config, setting the timeout for
1898
1958
  # # create_subscription to 20 seconds,
1899
1959
  # # and all remaining timeouts to 10 seconds.
1900
- # ::Google::Cloud::PubSub::V1::Subscriber::Client.configure do |config|
1960
+ # ::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.configure do |config|
1901
1961
  # config.timeout = 10.0
1902
1962
  # config.rpcs.create_subscription.timeout = 20.0
1903
1963
  # end
1904
1964
  #
1905
1965
  # # Apply the above configuration only to a new client.
1906
- # client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new do |config|
1966
+ # client = ::Google::Cloud::PubSub::V1::SubscriptionAdmin::Client.new do |config|
1907
1967
  # config.timeout = 10.0
1908
1968
  # config.rpcs.create_subscription.timeout = 20.0
1909
1969
  # end
1910
1970
  #
1911
1971
  # @!attribute [rw] endpoint
1912
- # The hostname or hostname:port of the service endpoint.
1913
- # Defaults to `"pubsub.googleapis.com"`.
1914
- # @return [::String]
1972
+ # A custom service endpoint, as a hostname or hostname:port. The default is
1973
+ # nil, indicating to use the default endpoint in the current universe domain.
1974
+ # @return [::String,nil]
1915
1975
  # @!attribute [rw] credentials
1916
1976
  # Credentials to send with calls. You may provide any of the following types:
1917
1977
  # * (`String`) The path to a service account key file in JSON format
1918
1978
  # * (`Hash`) A service account key as a Hash
1919
1979
  # * (`Google::Auth::Credentials`) A googleauth credentials object
1920
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
1980
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1921
1981
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1922
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
1982
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1923
1983
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
1924
1984
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
1925
1985
  # * (`nil`) indicating no credentials
1986
+ #
1987
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
1988
+ # external source for authentication to Google Cloud, you must validate it before
1989
+ # providing it to a Google API client library. Providing an unvalidated credential
1990
+ # configuration to Google APIs can compromise the security of your systems and data.
1991
+ # For more information, refer to [Validate credential configurations from external
1992
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
1926
1993
  # @return [::Object]
1927
1994
  # @!attribute [rw] scope
1928
1995
  # The OAuth scopes
@@ -1957,14 +2024,28 @@ module Google
1957
2024
  # @!attribute [rw] quota_project
1958
2025
  # A separate project against which to charge quota.
1959
2026
  # @return [::String]
2027
+ # @!attribute [rw] universe_domain
2028
+ # The universe domain within which to make requests. This determines the
2029
+ # default endpoint URL. The default value of nil uses the environment
2030
+ # universe (usually the default "googleapis.com" universe).
2031
+ # @return [::String,nil]
2032
+ # @!attribute [rw] logger
2033
+ # A custom logger to use for request/response debug logging, or the value
2034
+ # `:default` (the default) to construct a default logger, or `nil` to
2035
+ # explicitly disable logging.
2036
+ # @return [::Logger,:default,nil]
1960
2037
  #
1961
2038
  class Configuration
1962
2039
  extend ::Gapic::Config
1963
2040
 
1964
- config_attr :endpoint, "pubsub.googleapis.com", ::String
2041
+ # @private
2042
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
2043
+ DEFAULT_ENDPOINT = "pubsub.googleapis.com"
2044
+
2045
+ config_attr :endpoint, nil, ::String, nil
1965
2046
  config_attr :credentials, nil do |value|
1966
- allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1967
- allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
2047
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
2048
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
1968
2049
  allowed.any? { |klass| klass === value }
1969
2050
  end
1970
2051
  config_attr :scope, nil, ::String, ::Array, nil
@@ -1976,6 +2057,8 @@ module Google
1976
2057
  config_attr :metadata, nil, ::Hash, nil
1977
2058
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1978
2059
  config_attr :quota_project, nil, ::String, nil
2060
+ config_attr :universe_domain, nil, ::String, nil
2061
+ config_attr :logger, :default, ::Logger, nil, :default
1979
2062
 
1980
2063
  # @private
1981
2064
  def initialize parent_config = nil
@@ -1997,7 +2080,15 @@ module Google
1997
2080
  end
1998
2081
 
1999
2082
  ##
2000
- # Configuration RPC class for the Subscriber API.
2083
+ # Configuration for the channel pool
2084
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
2085
+ #
2086
+ def channel_pool
2087
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
2088
+ end
2089
+
2090
+ ##
2091
+ # Configuration RPC class for the SubscriptionAdmin API.
2001
2092
  #
2002
2093
  # Includes fields providing the configuration for each RPC in this service.
2003
2094
  # Each configuration object is of type `Gapic::Config::Method` and includes