google-cloud-pubsub 0.34.1 → 0.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -237,52 +237,82 @@ module Google
237
237
  @create_topic = Google::Gax.create_api_call(
238
238
  @publisher_stub.method(:create_topic),
239
239
  defaults["create_topic"],
240
- exception_transformer: exception_transformer
240
+ exception_transformer: exception_transformer,
241
+ params_extractor: proc do |request|
242
+ {'name' => request.name}
243
+ end
241
244
  )
242
245
  @update_topic = Google::Gax.create_api_call(
243
246
  @publisher_stub.method(:update_topic),
244
247
  defaults["update_topic"],
245
- exception_transformer: exception_transformer
248
+ exception_transformer: exception_transformer,
249
+ params_extractor: proc do |request|
250
+ {'topic.name' => request.topic.name}
251
+ end
246
252
  )
247
253
  @publish = Google::Gax.create_api_call(
248
254
  @publisher_stub.method(:publish),
249
255
  defaults["publish"],
250
- exception_transformer: exception_transformer
256
+ exception_transformer: exception_transformer,
257
+ params_extractor: proc do |request|
258
+ {'topic' => request.topic}
259
+ end
251
260
  )
252
261
  @get_topic = Google::Gax.create_api_call(
253
262
  @publisher_stub.method(:get_topic),
254
263
  defaults["get_topic"],
255
- exception_transformer: exception_transformer
264
+ exception_transformer: exception_transformer,
265
+ params_extractor: proc do |request|
266
+ {'topic' => request.topic}
267
+ end
256
268
  )
257
269
  @list_topics = Google::Gax.create_api_call(
258
270
  @publisher_stub.method(:list_topics),
259
271
  defaults["list_topics"],
260
- exception_transformer: exception_transformer
272
+ exception_transformer: exception_transformer,
273
+ params_extractor: proc do |request|
274
+ {'project' => request.project}
275
+ end
261
276
  )
262
277
  @list_topic_subscriptions = Google::Gax.create_api_call(
263
278
  @publisher_stub.method(:list_topic_subscriptions),
264
279
  defaults["list_topic_subscriptions"],
265
- exception_transformer: exception_transformer
280
+ exception_transformer: exception_transformer,
281
+ params_extractor: proc do |request|
282
+ {'topic' => request.topic}
283
+ end
266
284
  )
267
285
  @delete_topic = Google::Gax.create_api_call(
268
286
  @publisher_stub.method(:delete_topic),
269
287
  defaults["delete_topic"],
270
- exception_transformer: exception_transformer
288
+ exception_transformer: exception_transformer,
289
+ params_extractor: proc do |request|
290
+ {'topic' => request.topic}
291
+ end
271
292
  )
272
293
  @set_iam_policy = Google::Gax.create_api_call(
273
294
  @iam_policy_stub.method(:set_iam_policy),
274
295
  defaults["set_iam_policy"],
275
- exception_transformer: exception_transformer
296
+ exception_transformer: exception_transformer,
297
+ params_extractor: proc do |request|
298
+ {'resource' => request.resource}
299
+ end
276
300
  )
277
301
  @get_iam_policy = Google::Gax.create_api_call(
278
302
  @iam_policy_stub.method(:get_iam_policy),
279
303
  defaults["get_iam_policy"],
280
- exception_transformer: exception_transformer
304
+ exception_transformer: exception_transformer,
305
+ params_extractor: proc do |request|
306
+ {'resource' => request.resource}
307
+ end
281
308
  )
282
309
  @test_iam_permissions = Google::Gax.create_api_call(
283
310
  @iam_policy_stub.method(:test_iam_permissions),
284
311
  defaults["test_iam_permissions"],
285
- exception_transformer: exception_transformer
312
+ exception_transformer: exception_transformer,
313
+ params_extractor: proc do |request|
314
+ {'resource' => request.resource}
315
+ end
286
316
  )
287
317
  end
288
318
 
@@ -260,42 +260,66 @@ module Google
260
260
  @create_subscription = Google::Gax.create_api_call(
261
261
  @subscriber_stub.method(:create_subscription),
262
262
  defaults["create_subscription"],
263
- exception_transformer: exception_transformer
263
+ exception_transformer: exception_transformer,
264
+ params_extractor: proc do |request|
265
+ {'name' => request.name}
266
+ end
264
267
  )
265
268
  @get_subscription = Google::Gax.create_api_call(
266
269
  @subscriber_stub.method(:get_subscription),
267
270
  defaults["get_subscription"],
268
- exception_transformer: exception_transformer
271
+ exception_transformer: exception_transformer,
272
+ params_extractor: proc do |request|
273
+ {'subscription' => request.subscription}
274
+ end
269
275
  )
270
276
  @update_subscription = Google::Gax.create_api_call(
271
277
  @subscriber_stub.method(:update_subscription),
272
278
  defaults["update_subscription"],
273
- exception_transformer: exception_transformer
279
+ exception_transformer: exception_transformer,
280
+ params_extractor: proc do |request|
281
+ {'subscription.name' => request.subscription.name}
282
+ end
274
283
  )
275
284
  @list_subscriptions = Google::Gax.create_api_call(
276
285
  @subscriber_stub.method(:list_subscriptions),
277
286
  defaults["list_subscriptions"],
278
- exception_transformer: exception_transformer
287
+ exception_transformer: exception_transformer,
288
+ params_extractor: proc do |request|
289
+ {'project' => request.project}
290
+ end
279
291
  )
280
292
  @delete_subscription = Google::Gax.create_api_call(
281
293
  @subscriber_stub.method(:delete_subscription),
282
294
  defaults["delete_subscription"],
283
- exception_transformer: exception_transformer
295
+ exception_transformer: exception_transformer,
296
+ params_extractor: proc do |request|
297
+ {'subscription' => request.subscription}
298
+ end
284
299
  )
285
300
  @modify_ack_deadline = Google::Gax.create_api_call(
286
301
  @subscriber_stub.method(:modify_ack_deadline),
287
302
  defaults["modify_ack_deadline"],
288
- exception_transformer: exception_transformer
303
+ exception_transformer: exception_transformer,
304
+ params_extractor: proc do |request|
305
+ {'subscription' => request.subscription}
306
+ end
289
307
  )
290
308
  @acknowledge = Google::Gax.create_api_call(
291
309
  @subscriber_stub.method(:acknowledge),
292
310
  defaults["acknowledge"],
293
- exception_transformer: exception_transformer
311
+ exception_transformer: exception_transformer,
312
+ params_extractor: proc do |request|
313
+ {'subscription' => request.subscription}
314
+ end
294
315
  )
295
316
  @pull = Google::Gax.create_api_call(
296
317
  @subscriber_stub.method(:pull),
297
318
  defaults["pull"],
298
- exception_transformer: exception_transformer
319
+ exception_transformer: exception_transformer,
320
+ params_extractor: proc do |request|
321
+ {'subscription' => request.subscription}
322
+ end
299
323
  )
300
324
  @streaming_pull = Google::Gax.create_api_call(
301
325
  @subscriber_stub.method(:streaming_pull),
@@ -305,47 +329,74 @@ module Google
305
329
  @modify_push_config = Google::Gax.create_api_call(
306
330
  @subscriber_stub.method(:modify_push_config),
307
331
  defaults["modify_push_config"],
308
- exception_transformer: exception_transformer
332
+ exception_transformer: exception_transformer,
333
+ params_extractor: proc do |request|
334
+ {'subscription' => request.subscription}
335
+ end
309
336
  )
310
337
  @list_snapshots = Google::Gax.create_api_call(
311
338
  @subscriber_stub.method(:list_snapshots),
312
339
  defaults["list_snapshots"],
313
- exception_transformer: exception_transformer
340
+ exception_transformer: exception_transformer,
341
+ params_extractor: proc do |request|
342
+ {'project' => request.project}
343
+ end
314
344
  )
315
345
  @create_snapshot = Google::Gax.create_api_call(
316
346
  @subscriber_stub.method(:create_snapshot),
317
347
  defaults["create_snapshot"],
318
- exception_transformer: exception_transformer
348
+ exception_transformer: exception_transformer,
349
+ params_extractor: proc do |request|
350
+ {'name' => request.name}
351
+ end
319
352
  )
320
353
  @update_snapshot = Google::Gax.create_api_call(
321
354
  @subscriber_stub.method(:update_snapshot),
322
355
  defaults["update_snapshot"],
323
- exception_transformer: exception_transformer
356
+ exception_transformer: exception_transformer,
357
+ params_extractor: proc do |request|
358
+ {'snapshot.name' => request.snapshot.name}
359
+ end
324
360
  )
325
361
  @delete_snapshot = Google::Gax.create_api_call(
326
362
  @subscriber_stub.method(:delete_snapshot),
327
363
  defaults["delete_snapshot"],
328
- exception_transformer: exception_transformer
364
+ exception_transformer: exception_transformer,
365
+ params_extractor: proc do |request|
366
+ {'snapshot' => request.snapshot}
367
+ end
329
368
  )
330
369
  @seek = Google::Gax.create_api_call(
331
370
  @subscriber_stub.method(:seek),
332
371
  defaults["seek"],
333
- exception_transformer: exception_transformer
372
+ exception_transformer: exception_transformer,
373
+ params_extractor: proc do |request|
374
+ {'subscription' => request.subscription}
375
+ end
334
376
  )
335
377
  @set_iam_policy = Google::Gax.create_api_call(
336
378
  @iam_policy_stub.method(:set_iam_policy),
337
379
  defaults["set_iam_policy"],
338
- exception_transformer: exception_transformer
380
+ exception_transformer: exception_transformer,
381
+ params_extractor: proc do |request|
382
+ {'resource' => request.resource}
383
+ end
339
384
  )
340
385
  @get_iam_policy = Google::Gax.create_api_call(
341
386
  @iam_policy_stub.method(:get_iam_policy),
342
387
  defaults["get_iam_policy"],
343
- exception_transformer: exception_transformer
388
+ exception_transformer: exception_transformer,
389
+ params_extractor: proc do |request|
390
+ {'resource' => request.resource}
391
+ end
344
392
  )
345
393
  @test_iam_permissions = Google::Gax.create_api_call(
346
394
  @iam_policy_stub.method(:test_iam_permissions),
347
395
  defaults["test_iam_permissions"],
348
- exception_transformer: exception_transformer
396
+ exception_transformer: exception_transformer,
397
+ params_extractor: proc do |request|
398
+ {'resource' => request.resource}
399
+ end
349
400
  )
350
401
  end
351
402
 
@@ -360,9 +411,10 @@ module Google
360
411
  # If the name is not provided in the request, the server will assign a random
361
412
  # name for this subscription on the same project as the topic, conforming
362
413
  # to the
363
- # [resource name format](https://cloud.google.com/pubsub/docs/admin#resource_names).
364
- # The generated name is populated in the returned Subscription object.
365
- # Note that for REST API requests, you must specify a name in the request.
414
+ # [resource name
415
+ # format](https://cloud.google.com/pubsub/docs/admin#resource_names). The
416
+ # generated name is populated in the returned Subscription object. Note that
417
+ # for REST API requests, you must specify a name in the request.
366
418
  #
367
419
  # @param name [String]
368
420
  # The name of the subscription. It must have the format
@@ -408,7 +460,8 @@ module Google
408
460
  # messages are not expunged from the subscription's backlog, even if they are
409
461
  # acknowledged, until they fall out of the `message_retention_duration`
410
462
  # window. This must be true if you would like to
411
- # <a href="https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time">
463
+ # <a
464
+ # href="https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time">
412
465
  # Seek to a timestamp</a>.
413
466
  # <br><br>
414
467
  # <b>BETA:</b> This feature is part of a beta release. This API might be
@@ -429,6 +482,14 @@ module Google
429
482
  # @param labels [Hash{String => String}]
430
483
  # See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
431
484
  # managing labels</a>.
485
+ # @param enable_message_ordering [true, false]
486
+ # If true, messages published with the same `ordering_key` in `PubsubMessage`
487
+ # will be delivered to the subscribers in the order in which they
488
+ # are received by the Pub/Sub system. Otherwise, they may be delivered in
489
+ # any order.
490
+ # <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This
491
+ # API might be changed in backward-incompatible ways and is not recommended
492
+ # for production use. It is not subject to any SLA or deprecation policy.
432
493
  # @param expiration_policy [Google::Cloud::PubSub::V1::ExpirationPolicy | Hash]
433
494
  # A policy that specifies the conditions for this subscription's expiration.
434
495
  # A subscription is considered active as long as any connected subscriber is
@@ -465,6 +526,7 @@ module Google
465
526
  retain_acked_messages: nil,
466
527
  message_retention_duration: nil,
467
528
  labels: nil,
529
+ enable_message_ordering: nil,
468
530
  expiration_policy: nil,
469
531
  options: nil,
470
532
  &block
@@ -476,6 +538,7 @@ module Google
476
538
  retain_acked_messages: retain_acked_messages,
477
539
  message_retention_duration: message_retention_duration,
478
540
  labels: labels,
541
+ enable_message_ordering: enable_message_ordering,
479
542
  expiration_policy: expiration_policy
480
543
  }.delete_if { |_, v| v.nil? }
481
544
  req = Google::Gax::to_proto(req, Google::Cloud::PubSub::V1::Subscription)
@@ -971,9 +1034,10 @@ module Google
971
1034
  # the request, the server will assign a random
972
1035
  # name for this snapshot on the same project as the subscription, conforming
973
1036
  # to the
974
- # [resource name format](https://cloud.google.com/pubsub/docs/admin#resource_names).
975
- # The generated name is populated in the returned Snapshot object. Note that
976
- # for REST API requests, you must specify a name in the request.
1037
+ # [resource name
1038
+ # format](https://cloud.google.com/pubsub/docs/admin#resource_names). The
1039
+ # generated name is populated in the returned Snapshot object. Note that for
1040
+ # REST API requests, you must specify a name in the request.
977
1041
  #
978
1042
  # @param name [String]
979
1043
  # Optional user-provided name for this snapshot.
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module PubSub
19
- VERSION = "0.34.1".freeze
19
+ VERSION = "0.35.0".freeze
20
20
  end
21
21
 
22
22
  Pubsub = PubSub unless const_defined? :Pubsub
@@ -23,6 +23,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
23
23
  map :attributes, :string, :string, 2
24
24
  optional :message_id, :string, 3
25
25
  optional :publish_time, :message, 4, "google.protobuf.Timestamp"
26
+ optional :ordering_key, :string, 5
26
27
  end
27
28
  add_message "google.pubsub.v1.GetTopicRequest" do
28
29
  optional :topic, :string, 1
@@ -76,6 +77,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
76
77
  optional :retain_acked_messages, :bool, 7
77
78
  optional :message_retention_duration, :message, 8, "google.protobuf.Duration"
78
79
  map :labels, :string, :string, 9
80
+ optional :enable_message_ordering, :bool, 10
79
81
  optional :expiration_policy, :message, 11, "google.pubsub.v1.ExpirationPolicy"
80
82
  end
81
83
  add_message "google.pubsub.v1.ExpirationPolicy" do
@@ -84,6 +86,13 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
84
86
  add_message "google.pubsub.v1.PushConfig" do
85
87
  optional :push_endpoint, :string, 1
86
88
  map :attributes, :string, :string, 2
89
+ oneof :authentication_method do
90
+ optional :oidc_token, :message, 3, "google.pubsub.v1.PushConfig.OidcToken"
91
+ end
92
+ end
93
+ add_message "google.pubsub.v1.PushConfig.OidcToken" do
94
+ optional :service_account_email, :string, 1
95
+ optional :audience, :string, 2
87
96
  end
88
97
  add_message "google.pubsub.v1.ReceivedMessage" do
89
98
  optional :ack_id, :string, 1
@@ -205,6 +214,7 @@ module Google::Cloud::PubSub::V1
205
214
  Subscription = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.Subscription").msgclass
206
215
  ExpirationPolicy = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ExpirationPolicy").msgclass
207
216
  PushConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PushConfig").msgclass
217
+ PushConfig::OidcToken = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PushConfig.OidcToken").msgclass
208
218
  ReceivedMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ReceivedMessage").msgclass
209
219
  GetSubscriptionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.GetSubscriptionRequest").msgclass
210
220
  UpdateSubscriptionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.UpdateSubscriptionRequest").msgclass
@@ -1,7 +1,7 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # Source: google/pubsub/v1/pubsub.proto for package 'Google::Cloud::PubSub::V1'
3
3
  # Original file comments:
4
- # Copyright 2018 Google LLC.
4
+ # Copyright 2019 Google LLC.
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
7
7
  # you may not use this file except in compliance with the License.
@@ -97,9 +97,10 @@ module Google::Cloud::PubSub::V1
97
97
  # If the name is not provided in the request, the server will assign a random
98
98
  # name for this subscription on the same project as the topic, conforming
99
99
  # to the
100
- # [resource name format](https://cloud.google.com/pubsub/docs/admin#resource_names).
101
- # The generated name is populated in the returned Subscription object.
102
- # Note that for REST API requests, you must specify a name in the request.
100
+ # [resource name
101
+ # format](https://cloud.google.com/pubsub/docs/admin#resource_names). The
102
+ # generated name is populated in the returned Subscription object. Note that
103
+ # for REST API requests, you must specify a name in the request.
103
104
  rpc :CreateSubscription, Subscription, Subscription
104
105
  # Gets the configuration details of a subscription.
105
106
  rpc :GetSubscription, GetSubscriptionRequest, Subscription
@@ -184,9 +185,10 @@ module Google::Cloud::PubSub::V1
184
185
  # the request, the server will assign a random
185
186
  # name for this snapshot on the same project as the subscription, conforming
186
187
  # to the
187
- # [resource name format](https://cloud.google.com/pubsub/docs/admin#resource_names).
188
- # The generated name is populated in the returned Snapshot object. Note that
189
- # for REST API requests, you must specify a name in the request.
188
+ # [resource name
189
+ # format](https://cloud.google.com/pubsub/docs/admin#resource_names). The
190
+ # generated name is populated in the returned Snapshot object. Note that for
191
+ # REST API requests, you must specify a name in the request.
190
192
  rpc :CreateSnapshot, CreateSnapshotRequest, Snapshot
191
193
  # Updates an existing snapshot. Snapshots are used in
192
194
  # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
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: 0.34.1
4
+ version: 0.35.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: 2019-02-13 00:00:00.000000000 Z
12
+ date: 2019-04-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: google-cloud-core
@@ -157,14 +157,14 @@ dependencies:
157
157
  requirements:
158
158
  - - "~>"
159
159
  - !ruby/object:Gem::Version
160
- version: 0.61.0
160
+ version: 0.64.0
161
161
  type: :development
162
162
  prerelease: false
163
163
  version_requirements: !ruby/object:Gem::Requirement
164
164
  requirements:
165
165
  - - "~>"
166
166
  - !ruby/object:Gem::Version
167
- version: 0.61.0
167
+ version: 0.64.0
168
168
  - !ruby/object:Gem::Dependency
169
169
  name: simplecov
170
170
  requirement: !ruby/object:Gem::Requirement
@@ -246,6 +246,7 @@ files:
246
246
  - lib/google/cloud/pubsub/subscriber/timed_unary_buffer.rb
247
247
  - lib/google/cloud/pubsub/subscription.rb
248
248
  - lib/google/cloud/pubsub/subscription/list.rb
249
+ - lib/google/cloud/pubsub/subscription/push_config.rb
249
250
  - lib/google/cloud/pubsub/topic.rb
250
251
  - lib/google/cloud/pubsub/topic/list.rb
251
252
  - lib/google/cloud/pubsub/v1.rb
@@ -283,8 +284,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
283
284
  - !ruby/object:Gem::Version
284
285
  version: '0'
285
286
  requirements: []
286
- rubyforge_project:
287
- rubygems_version: 2.7.6
287
+ rubygems_version: 3.0.3
288
288
  signing_key:
289
289
  specification_version: 4
290
290
  summary: API Client library for Google Cloud Pub/Sub