google-cloud-pubsub 2.12.1 → 2.13.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: afdce505d87a251a0408c830e80728cf68506cf5631013cfcdae0bc18dba549b
4
- data.tar.gz: c46a1e91681598c21d1b4014b6fb0aadb7f8575c9c08e2c9a13ac8b91de87ed6
3
+ metadata.gz: 06c05b51b56c92420e68bd4decf6cbcf91f2027c572cb89302bcae505e6a3f5b
4
+ data.tar.gz: b2072f171d8fcf1e3d7506ef86c278b5d7d60faa4dbbb0092b16fe759e1d4245
5
5
  SHA512:
6
- metadata.gz: 6a31118080d4ad3a6a03b1911f6ec192dfe51021140bea354568c128856bd86cfbea79fd75d6fc6457a68e7266f018f9ef1e23868ee074576539f71916f8bc57
7
- data.tar.gz: 4b9ff30c34dd3e08456dce04434e7e9da0552048dc86980d3b82f0af1114377601c7a96d71e1738973df0a506302dc5a7919ac900616b7b2fca58951891e5dfc
6
+ metadata.gz: 65446317085d8522281bbfbf84f923f6a6efa98342afd4ac4900995436ad57b91d11ce77498fda558d3f37de9fb540ac99bfd38d825bbc54267e2b0490c5c1ca
7
+ data.tar.gz: 5a421f55fd6f75449162b1c7fbba30e78bd99409a6af3e62861e9cf95e5de2699fdd76ae23dbd4806123086fa1f25077590313ddc36adeea9d9d993e34c01293
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Release History
2
2
 
3
+ ### 2.13.0 (2022-10-18)
4
+
5
+ #### Features
6
+
7
+ * Added support for bigquery subscription ([#19221](https://github.com/googleapis/google-cloud-ruby/issues/19221))
8
+
3
9
  ### 2.12.1 (2022-08-21)
4
10
 
5
11
  #### Bug Fixes
@@ -303,6 +303,56 @@ module Google
303
303
  config.freeze
304
304
  end
305
305
 
306
+ ##
307
+ # Inspect the Subscription's bigquery configuration settings. The
308
+ # configuration can be changed by modifying the values in the method's
309
+ # block.
310
+ #
311
+ # @yield [bigquery_config] a block for modifying the bigquery configuration
312
+ # @yieldparam [Google::Cloud::PubSub::V1::BigQueryConfig] bigquery_config
313
+ #
314
+ # @return [Google::Cloud::PubSub::V1::BigQueryConfig]
315
+ #
316
+ # @example
317
+ # require "google/cloud/pubsub"
318
+ #
319
+ # pubsub = Google::Cloud::PubSub.new
320
+ #
321
+ # sub = pubsub.subscription "my-topic-sub"
322
+ # sub.bigquery_config.table #=> "my-project:dataset-id.table-id"
323
+ # sub.bigquery_config.use_topic_schema #=> true
324
+ # sub.bigquery_config.write_metadata #=> false
325
+ #
326
+ # @example Update the bigquery configuration by passing a block:
327
+ # require "google/cloud/pubsub"
328
+ #
329
+ # pubsub = Google::Cloud::PubSub.new
330
+ # sub = pubsub.subscription "my-subscription"
331
+ #
332
+ # sub.bigquery_config do |bc|
333
+ # bc.write_metadata = true
334
+ # bc.use_topic_schema = false
335
+ # end
336
+ #
337
+ def bigquery_config
338
+ ensure_service!
339
+
340
+ config = reference? ? Google::Cloud::PubSub::V1::BigQueryConfig.new : @grpc.bigquery_config
341
+
342
+ if block_given?
343
+ old_config = config.dup
344
+ yield config
345
+ new_config = config
346
+
347
+ if old_config != new_config # has the object been changed?
348
+ update_grpc = Google::Cloud::PubSub::V1::Subscription.new name: name, bigquery_config: new_config
349
+ @grpc = service.update_subscription update_grpc, :bigquery_config
350
+ end
351
+ end
352
+
353
+ config.freeze
354
+ end
355
+
306
356
  ##
307
357
  # A hash of user-provided labels associated with this subscription.
308
358
  # Labels can be used to organize and group subscriptions.See [Creating
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module PubSub
19
- VERSION = "2.12.1".freeze
19
+ VERSION = "2.13.0".freeze
20
20
  end
21
21
 
22
22
  Pubsub = PubSub unless const_defined? :Pubsub
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-pubsub
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.12.1
4
+ version: 2.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Moore
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-08-22 00:00:00.000000000 Z
12
+ date: 2022-10-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: concurrent-ruby