google-cloud-pubsub-v1 0.5.2 → 0.6.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: e6e2a4a9f6746191781373c0594d27f8dccef450607d23da6bc9abed9a13730c
4
- data.tar.gz: 5f508e848d394c34604079c27aff3e465d95bee3a176cc89170e09c9fd025b3e
3
+ metadata.gz: 441674812241a0cdd2bfe5571966a5f9893f9f247868b13858e854809d2def9b
4
+ data.tar.gz: 0b1c9adfc174e0a0ced3341c79d8de58e47501347d1295427b2b13a395c59d99
5
5
  SHA512:
6
- metadata.gz: 64c8dd6ad2f2ac7ee7bd85e72a9abc1b6fee01b2b3a35ef208e923d542c5185946f89e721f4987459d4603c096208b07b6db76a4a08e0165d5f9ce7cc95a88b2
7
- data.tar.gz: f0fb04598dc4cdb5ffaa92e045aba68e780afc9b53a7bf9e69d8763082e4cf8fda9565c695bb4173abeadb5a837769541ccb4e9a321fc4b5b395722ba41b021a
6
+ metadata.gz: 892d5ae726abd72028e2915d1d54397afe410bd61fe596edfa06c8ec9e56770dd1be1b3105c6526c1cd34490da2364568083d24650d3f53451efb7b90594aeef
7
+ data.tar.gz: bc38b3afe7a0324650f14816feac655604d375018b53e8ba0667cef087aae86adb390b518c7b40a2f07ee318aa3762bba58771af08d550e6dcd813a8a1e28151
@@ -63,13 +63,12 @@ module Google
63
63
  # See {::Google::Cloud::PubSub::V1::IAMPolicy::Client::Configuration}
64
64
  # for a description of the configuration fields.
65
65
  #
66
- # ## Example
66
+ # @example
67
67
  #
68
- # To modify the configuration for all IAMPolicy clients:
69
- #
70
- # ::Google::Cloud::PubSub::V1::IAMPolicy::Client.configure do |config|
71
- # config.timeout = 10.0
72
- # end
68
+ # # Modify the configuration for all IAMPolicy clients
69
+ # ::Google::Cloud::PubSub::V1::IAMPolicy::Client.configure do |config|
70
+ # config.timeout = 10.0
71
+ # end
73
72
  #
74
73
  # @yield [config] Configure the Client client.
75
74
  # @yieldparam config [Client::Configuration]
@@ -116,19 +115,15 @@ module Google
116
115
  ##
117
116
  # Create a new IAMPolicy client object.
118
117
  #
119
- # ## Examples
120
- #
121
- # To create a new IAMPolicy client with the default
122
- # configuration:
123
- #
124
- # client = ::Google::Cloud::PubSub::V1::IAMPolicy::Client.new
118
+ # @example
125
119
  #
126
- # To create a new IAMPolicy client with a custom
127
- # configuration:
120
+ # # Create a client using the default configuration
121
+ # client = ::Google::Cloud::PubSub::V1::IAMPolicy::Client.new
128
122
  #
129
- # client = ::Google::Cloud::PubSub::V1::IAMPolicy::Client.new do |config|
130
- # config.timeout = 10.0
131
- # end
123
+ # # Create a client using a custom configuration
124
+ # client = ::Google::Cloud::PubSub::V1::IAMPolicy::Client.new do |config|
125
+ # config.timeout = 10.0
126
+ # end
132
127
  #
133
128
  # @yield [config] Configure the IAMPolicy client.
134
129
  # @yieldparam config [Client::Configuration]
@@ -148,10 +143,9 @@ module Google
148
143
 
149
144
  # Create credentials
150
145
  credentials = @config.credentials
151
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
146
+ # Use self-signed JWT if the endpoint is unchanged from default,
152
147
  # but only if the default endpoint does not have a region prefix.
153
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
154
- @config.endpoint == Client.configure.endpoint &&
148
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
155
149
  !@config.endpoint.split(".").first.include?("-")
156
150
  credentials ||= Credentials.default scope: @config.scope,
157
151
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -234,7 +228,9 @@ module Google
234
228
  options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
235
229
  metadata: metadata,
236
230
  retry_policy: @config.rpcs.set_iam_policy.retry_policy
237
- options.apply_defaults metadata: @config.metadata,
231
+
232
+ options.apply_defaults timeout: @config.timeout,
233
+ metadata: @config.metadata,
238
234
  retry_policy: @config.retry_policy
239
235
 
240
236
  @iam_policy_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
@@ -306,7 +302,9 @@ module Google
306
302
  options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
307
303
  metadata: metadata,
308
304
  retry_policy: @config.rpcs.get_iam_policy.retry_policy
309
- options.apply_defaults metadata: @config.metadata,
305
+
306
+ options.apply_defaults timeout: @config.timeout,
307
+ metadata: @config.metadata,
310
308
  retry_policy: @config.retry_policy
311
309
 
312
310
  @iam_policy_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
@@ -384,7 +382,9 @@ module Google
384
382
  options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
385
383
  metadata: metadata,
386
384
  retry_policy: @config.rpcs.test_iam_permissions.retry_policy
387
- options.apply_defaults metadata: @config.metadata,
385
+
386
+ options.apply_defaults timeout: @config.timeout,
387
+ metadata: @config.metadata,
388
388
  retry_policy: @config.retry_policy
389
389
 
390
390
  @iam_policy_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
@@ -408,22 +408,21 @@ module Google
408
408
  # Configuration can be applied globally to all clients, or to a single client
409
409
  # on construction.
410
410
  #
411
- # # Examples
412
- #
413
- # To modify the global config, setting the timeout for set_iam_policy
414
- # to 20 seconds, and all remaining timeouts to 10 seconds:
415
- #
416
- # ::Google::Cloud::PubSub::V1::IAMPolicy::Client.configure do |config|
417
- # config.timeout = 10.0
418
- # config.rpcs.set_iam_policy.timeout = 20.0
419
- # end
420
- #
421
- # To apply the above configuration only to a new client:
422
- #
423
- # client = ::Google::Cloud::PubSub::V1::IAMPolicy::Client.new do |config|
424
- # config.timeout = 10.0
425
- # config.rpcs.set_iam_policy.timeout = 20.0
426
- # end
411
+ # @example
412
+ #
413
+ # # Modify the global config, setting the timeout for
414
+ # # set_iam_policy to 20 seconds,
415
+ # # and all remaining timeouts to 10 seconds.
416
+ # ::Google::Cloud::PubSub::V1::IAMPolicy::Client.configure do |config|
417
+ # config.timeout = 10.0
418
+ # config.rpcs.set_iam_policy.timeout = 20.0
419
+ # end
420
+ #
421
+ # # Apply the above configuration only to a new client.
422
+ # client = ::Google::Cloud::PubSub::V1::IAMPolicy::Client.new do |config|
423
+ # config.timeout = 10.0
424
+ # config.rpcs.set_iam_policy.timeout = 20.0
425
+ # end
427
426
  #
428
427
  # @!attribute [rw] endpoint
429
428
  # The hostname or hostname:port of the service endpoint.
@@ -42,13 +42,12 @@ module Google
42
42
  # See {::Google::Cloud::PubSub::V1::Publisher::Client::Configuration}
43
43
  # for a description of the configuration fields.
44
44
  #
45
- # ## Example
45
+ # @example
46
46
  #
47
- # To modify the configuration for all Publisher clients:
48
- #
49
- # ::Google::Cloud::PubSub::V1::Publisher::Client.configure do |config|
50
- # config.timeout = 10.0
51
- # end
47
+ # # Modify the configuration for all Publisher clients
48
+ # ::Google::Cloud::PubSub::V1::Publisher::Client.configure do |config|
49
+ # config.timeout = 10.0
50
+ # end
52
51
  #
53
52
  # @yield [config] Configure the Client client.
54
53
  # @yieldparam config [Client::Configuration]
@@ -140,19 +139,15 @@ module Google
140
139
  ##
141
140
  # Create a new Publisher client object.
142
141
  #
143
- # ## Examples
144
- #
145
- # To create a new Publisher client with the default
146
- # configuration:
142
+ # @example
147
143
  #
148
- # client = ::Google::Cloud::PubSub::V1::Publisher::Client.new
144
+ # # Create a client using the default configuration
145
+ # client = ::Google::Cloud::PubSub::V1::Publisher::Client.new
149
146
  #
150
- # To create a new Publisher client with a custom
151
- # configuration:
152
- #
153
- # client = ::Google::Cloud::PubSub::V1::Publisher::Client.new do |config|
154
- # config.timeout = 10.0
155
- # end
147
+ # # Create a client using a custom configuration
148
+ # client = ::Google::Cloud::PubSub::V1::Publisher::Client.new do |config|
149
+ # config.timeout = 10.0
150
+ # end
156
151
  #
157
152
  # @yield [config] Configure the Publisher client.
158
153
  # @yieldparam config [Client::Configuration]
@@ -172,10 +167,9 @@ module Google
172
167
 
173
168
  # Create credentials
174
169
  credentials = @config.credentials
175
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
170
+ # Use self-signed JWT if the endpoint is unchanged from default,
176
171
  # but only if the default endpoint does not have a region prefix.
177
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
178
- @config.endpoint == Client.configure.endpoint &&
172
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
179
173
  !@config.endpoint.split(".").first.include?("-")
180
174
  credentials ||= Credentials.default scope: @config.scope,
181
175
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -210,7 +204,7 @@ module Google
210
204
  # @param options [::Gapic::CallOptions, ::Hash]
211
205
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
212
206
  #
213
- # @overload create_topic(name: nil, labels: nil, message_storage_policy: nil, kms_key_name: nil, schema_settings: nil, satisfies_pzs: nil)
207
+ # @overload create_topic(name: nil, labels: nil, message_storage_policy: nil, kms_key_name: nil, schema_settings: nil, satisfies_pzs: nil, message_retention_duration: nil)
214
208
  # Pass arguments to `create_topic` via keyword arguments. Note that at
215
209
  # least one keyword argument is required. To specify no parameters, or to keep all
216
210
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -239,6 +233,15 @@ module Google
239
233
  # @param satisfies_pzs [::Boolean]
240
234
  # Reserved for future use. This field is set only in responses from the
241
235
  # server; it is ignored if it is set in any requests.
236
+ # @param message_retention_duration [::Google::Protobuf::Duration, ::Hash]
237
+ # Indicates the minimum duration to retain a message after it is published to
238
+ # the topic. If this field is set, messages published to the topic in the
239
+ # last `message_retention_duration` are always available to subscribers. For
240
+ # instance, it allows any attached subscription to [seek to a
241
+ # timestamp](https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time)
242
+ # that is up to `message_retention_duration` in the past. If this field is
243
+ # not set, message retention is controlled by settings on individual
244
+ # subscriptions. Cannot be more than 7 days or less than 10 minutes.
242
245
  #
243
246
  # @yield [response, operation] Access the result along with the RPC operation
244
247
  # @yieldparam response [::Google::Cloud::PubSub::V1::Topic]
@@ -274,7 +277,9 @@ module Google
274
277
  options.apply_defaults timeout: @config.rpcs.create_topic.timeout,
275
278
  metadata: metadata,
276
279
  retry_policy: @config.rpcs.create_topic.retry_policy
277
- options.apply_defaults metadata: @config.metadata,
280
+
281
+ options.apply_defaults timeout: @config.timeout,
282
+ metadata: @config.metadata,
278
283
  retry_policy: @config.retry_policy
279
284
 
280
285
  @publisher_stub.call_rpc :create_topic, request, options: options do |response, operation|
@@ -347,7 +352,9 @@ module Google
347
352
  options.apply_defaults timeout: @config.rpcs.update_topic.timeout,
348
353
  metadata: metadata,
349
354
  retry_policy: @config.rpcs.update_topic.retry_policy
350
- options.apply_defaults metadata: @config.metadata,
355
+
356
+ options.apply_defaults timeout: @config.timeout,
357
+ metadata: @config.metadata,
351
358
  retry_policy: @config.retry_policy
352
359
 
353
360
  @publisher_stub.call_rpc :update_topic, request, options: options do |response, operation|
@@ -417,7 +424,9 @@ module Google
417
424
  options.apply_defaults timeout: @config.rpcs.publish.timeout,
418
425
  metadata: metadata,
419
426
  retry_policy: @config.rpcs.publish.retry_policy
420
- options.apply_defaults metadata: @config.metadata,
427
+
428
+ options.apply_defaults timeout: @config.timeout,
429
+ metadata: @config.metadata,
421
430
  retry_policy: @config.retry_policy
422
431
 
423
432
  @publisher_stub.call_rpc :publish, request, options: options do |response, operation|
@@ -484,7 +493,9 @@ module Google
484
493
  options.apply_defaults timeout: @config.rpcs.get_topic.timeout,
485
494
  metadata: metadata,
486
495
  retry_policy: @config.rpcs.get_topic.retry_policy
487
- options.apply_defaults metadata: @config.metadata,
496
+
497
+ options.apply_defaults timeout: @config.timeout,
498
+ metadata: @config.metadata,
488
499
  retry_policy: @config.retry_policy
489
500
 
490
501
  @publisher_stub.call_rpc :get_topic, request, options: options do |response, operation|
@@ -557,7 +568,9 @@ module Google
557
568
  options.apply_defaults timeout: @config.rpcs.list_topics.timeout,
558
569
  metadata: metadata,
559
570
  retry_policy: @config.rpcs.list_topics.retry_policy
560
- options.apply_defaults metadata: @config.metadata,
571
+
572
+ options.apply_defaults timeout: @config.timeout,
573
+ metadata: @config.metadata,
561
574
  retry_policy: @config.retry_policy
562
575
 
563
576
  @publisher_stub.call_rpc :list_topics, request, options: options do |response, operation|
@@ -631,7 +644,9 @@ module Google
631
644
  options.apply_defaults timeout: @config.rpcs.list_topic_subscriptions.timeout,
632
645
  metadata: metadata,
633
646
  retry_policy: @config.rpcs.list_topic_subscriptions.retry_policy
634
- options.apply_defaults metadata: @config.metadata,
647
+
648
+ options.apply_defaults timeout: @config.timeout,
649
+ metadata: @config.metadata,
635
650
  retry_policy: @config.retry_policy
636
651
 
637
652
  @publisher_stub.call_rpc :list_topic_subscriptions, request, options: options do |response, operation|
@@ -708,7 +723,9 @@ module Google
708
723
  options.apply_defaults timeout: @config.rpcs.list_topic_snapshots.timeout,
709
724
  metadata: metadata,
710
725
  retry_policy: @config.rpcs.list_topic_snapshots.retry_policy
711
- options.apply_defaults metadata: @config.metadata,
726
+
727
+ options.apply_defaults timeout: @config.timeout,
728
+ metadata: @config.metadata,
712
729
  retry_policy: @config.retry_policy
713
730
 
714
731
  @publisher_stub.call_rpc :list_topic_snapshots, request, options: options do |response, operation|
@@ -779,7 +796,9 @@ module Google
779
796
  options.apply_defaults timeout: @config.rpcs.delete_topic.timeout,
780
797
  metadata: metadata,
781
798
  retry_policy: @config.rpcs.delete_topic.retry_policy
782
- options.apply_defaults metadata: @config.metadata,
799
+
800
+ options.apply_defaults timeout: @config.timeout,
801
+ metadata: @config.metadata,
783
802
  retry_policy: @config.retry_policy
784
803
 
785
804
  @publisher_stub.call_rpc :delete_topic, request, options: options do |response, operation|
@@ -849,7 +868,9 @@ module Google
849
868
  options.apply_defaults timeout: @config.rpcs.detach_subscription.timeout,
850
869
  metadata: metadata,
851
870
  retry_policy: @config.rpcs.detach_subscription.retry_policy
852
- options.apply_defaults metadata: @config.metadata,
871
+
872
+ options.apply_defaults timeout: @config.timeout,
873
+ metadata: @config.metadata,
853
874
  retry_policy: @config.retry_policy
854
875
 
855
876
  @publisher_stub.call_rpc :detach_subscription, request, options: options do |response, operation|
@@ -873,22 +894,21 @@ module Google
873
894
  # Configuration can be applied globally to all clients, or to a single client
874
895
  # on construction.
875
896
  #
876
- # # Examples
877
- #
878
- # To modify the global config, setting the timeout for create_topic
879
- # to 20 seconds, and all remaining timeouts to 10 seconds:
880
- #
881
- # ::Google::Cloud::PubSub::V1::Publisher::Client.configure do |config|
882
- # config.timeout = 10.0
883
- # config.rpcs.create_topic.timeout = 20.0
884
- # end
885
- #
886
- # To apply the above configuration only to a new client:
887
- #
888
- # client = ::Google::Cloud::PubSub::V1::Publisher::Client.new do |config|
889
- # config.timeout = 10.0
890
- # config.rpcs.create_topic.timeout = 20.0
891
- # end
897
+ # @example
898
+ #
899
+ # # Modify the global config, setting the timeout for
900
+ # # create_topic to 20 seconds,
901
+ # # and all remaining timeouts to 10 seconds.
902
+ # ::Google::Cloud::PubSub::V1::Publisher::Client.configure do |config|
903
+ # config.timeout = 10.0
904
+ # config.rpcs.create_topic.timeout = 20.0
905
+ # end
906
+ #
907
+ # # Apply the above configuration only to a new client.
908
+ # client = ::Google::Cloud::PubSub::V1::Publisher::Client.new do |config|
909
+ # config.timeout = 10.0
910
+ # config.rpcs.create_topic.timeout = 20.0
911
+ # end
892
912
  #
893
913
  # @!attribute [rw] endpoint
894
914
  # The hostname or hostname:port of the service endpoint.
@@ -41,13 +41,12 @@ module Google
41
41
  # See {::Google::Cloud::PubSub::V1::SchemaService::Client::Configuration}
42
42
  # for a description of the configuration fields.
43
43
  #
44
- # ## Example
44
+ # @example
45
45
  #
46
- # To modify the configuration for all SchemaService clients:
47
- #
48
- # ::Google::Cloud::PubSub::V1::SchemaService::Client.configure do |config|
49
- # config.timeout = 10.0
50
- # end
46
+ # # Modify the configuration for all SchemaService clients
47
+ # ::Google::Cloud::PubSub::V1::SchemaService::Client.configure do |config|
48
+ # config.timeout = 10.0
49
+ # end
51
50
  #
52
51
  # @yield [config] Configure the Client client.
53
52
  # @yieldparam config [Client::Configuration]
@@ -94,19 +93,15 @@ module Google
94
93
  ##
95
94
  # Create a new SchemaService client object.
96
95
  #
97
- # ## Examples
98
- #
99
- # To create a new SchemaService client with the default
100
- # configuration:
96
+ # @example
101
97
  #
102
- # client = ::Google::Cloud::PubSub::V1::SchemaService::Client.new
98
+ # # Create a client using the default configuration
99
+ # client = ::Google::Cloud::PubSub::V1::SchemaService::Client.new
103
100
  #
104
- # To create a new SchemaService client with a custom
105
- # configuration:
106
- #
107
- # client = ::Google::Cloud::PubSub::V1::SchemaService::Client.new do |config|
108
- # config.timeout = 10.0
109
- # end
101
+ # # Create a client using a custom configuration
102
+ # client = ::Google::Cloud::PubSub::V1::SchemaService::Client.new do |config|
103
+ # config.timeout = 10.0
104
+ # end
110
105
  #
111
106
  # @yield [config] Configure the SchemaService client.
112
107
  # @yieldparam config [Client::Configuration]
@@ -126,10 +121,9 @@ module Google
126
121
 
127
122
  # Create credentials
128
123
  credentials = @config.credentials
129
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
124
+ # Use self-signed JWT if the endpoint is unchanged from default,
130
125
  # but only if the default endpoint does not have a region prefix.
131
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
132
- @config.endpoint == Client.configure.endpoint &&
126
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
133
127
  !@config.endpoint.split(".").first.include?("-")
134
128
  credentials ||= Credentials.default scope: @config.scope,
135
129
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -218,7 +212,9 @@ module Google
218
212
  options.apply_defaults timeout: @config.rpcs.create_schema.timeout,
219
213
  metadata: metadata,
220
214
  retry_policy: @config.rpcs.create_schema.retry_policy
221
- options.apply_defaults metadata: @config.metadata,
215
+
216
+ options.apply_defaults timeout: @config.timeout,
217
+ metadata: @config.metadata,
222
218
  retry_policy: @config.retry_policy
223
219
 
224
220
  @schema_service_stub.call_rpc :create_schema, request, options: options do |response, operation|
@@ -289,7 +285,9 @@ module Google
289
285
  options.apply_defaults timeout: @config.rpcs.get_schema.timeout,
290
286
  metadata: metadata,
291
287
  retry_policy: @config.rpcs.get_schema.retry_policy
292
- options.apply_defaults metadata: @config.metadata,
288
+
289
+ options.apply_defaults timeout: @config.timeout,
290
+ metadata: @config.metadata,
293
291
  retry_policy: @config.retry_policy
294
292
 
295
293
  @schema_service_stub.call_rpc :get_schema, request, options: options do |response, operation|
@@ -366,7 +364,9 @@ module Google
366
364
  options.apply_defaults timeout: @config.rpcs.list_schemas.timeout,
367
365
  metadata: metadata,
368
366
  retry_policy: @config.rpcs.list_schemas.retry_policy
369
- options.apply_defaults metadata: @config.metadata,
367
+
368
+ options.apply_defaults timeout: @config.timeout,
369
+ metadata: @config.metadata,
370
370
  retry_policy: @config.retry_policy
371
371
 
372
372
  @schema_service_stub.call_rpc :list_schemas, request, options: options do |response, operation|
@@ -434,7 +434,9 @@ module Google
434
434
  options.apply_defaults timeout: @config.rpcs.delete_schema.timeout,
435
435
  metadata: metadata,
436
436
  retry_policy: @config.rpcs.delete_schema.retry_policy
437
- options.apply_defaults metadata: @config.metadata,
437
+
438
+ options.apply_defaults timeout: @config.timeout,
439
+ metadata: @config.metadata,
438
440
  retry_policy: @config.retry_policy
439
441
 
440
442
  @schema_service_stub.call_rpc :delete_schema, request, options: options do |response, operation|
@@ -503,7 +505,9 @@ module Google
503
505
  options.apply_defaults timeout: @config.rpcs.validate_schema.timeout,
504
506
  metadata: metadata,
505
507
  retry_policy: @config.rpcs.validate_schema.retry_policy
506
- options.apply_defaults metadata: @config.metadata,
508
+
509
+ options.apply_defaults timeout: @config.timeout,
510
+ metadata: @config.metadata,
507
511
  retry_policy: @config.retry_policy
508
512
 
509
513
  @schema_service_stub.call_rpc :validate_schema, request, options: options do |response, operation|
@@ -580,7 +584,9 @@ module Google
580
584
  options.apply_defaults timeout: @config.rpcs.validate_message.timeout,
581
585
  metadata: metadata,
582
586
  retry_policy: @config.rpcs.validate_message.retry_policy
583
- options.apply_defaults metadata: @config.metadata,
587
+
588
+ options.apply_defaults timeout: @config.timeout,
589
+ metadata: @config.metadata,
584
590
  retry_policy: @config.retry_policy
585
591
 
586
592
  @schema_service_stub.call_rpc :validate_message, request, options: options do |response, operation|
@@ -604,22 +610,21 @@ module Google
604
610
  # Configuration can be applied globally to all clients, or to a single client
605
611
  # on construction.
606
612
  #
607
- # # Examples
608
- #
609
- # To modify the global config, setting the timeout for create_schema
610
- # to 20 seconds, and all remaining timeouts to 10 seconds:
611
- #
612
- # ::Google::Cloud::PubSub::V1::SchemaService::Client.configure do |config|
613
- # config.timeout = 10.0
614
- # config.rpcs.create_schema.timeout = 20.0
615
- # end
616
- #
617
- # To apply the above configuration only to a new client:
618
- #
619
- # client = ::Google::Cloud::PubSub::V1::SchemaService::Client.new do |config|
620
- # config.timeout = 10.0
621
- # config.rpcs.create_schema.timeout = 20.0
622
- # end
613
+ # @example
614
+ #
615
+ # # Modify the global config, setting the timeout for
616
+ # # create_schema to 20 seconds,
617
+ # # and all remaining timeouts to 10 seconds.
618
+ # ::Google::Cloud::PubSub::V1::SchemaService::Client.configure do |config|
619
+ # config.timeout = 10.0
620
+ # config.rpcs.create_schema.timeout = 20.0
621
+ # end
622
+ #
623
+ # # Apply the above configuration only to a new client.
624
+ # client = ::Google::Cloud::PubSub::V1::SchemaService::Client.new do |config|
625
+ # config.timeout = 10.0
626
+ # config.rpcs.create_schema.timeout = 20.0
627
+ # end
623
628
  #
624
629
  # @!attribute [rw] endpoint
625
630
  # The hostname or hostname:port of the service endpoint.
@@ -43,13 +43,12 @@ module Google
43
43
  # See {::Google::Cloud::PubSub::V1::Subscriber::Client::Configuration}
44
44
  # for a description of the configuration fields.
45
45
  #
46
- # ## Example
46
+ # @example
47
47
  #
48
- # To modify the configuration for all Subscriber clients:
49
- #
50
- # ::Google::Cloud::PubSub::V1::Subscriber::Client.configure do |config|
51
- # config.timeout = 10.0
52
- # end
48
+ # # Modify the configuration for all Subscriber clients
49
+ # ::Google::Cloud::PubSub::V1::Subscriber::Client.configure do |config|
50
+ # config.timeout = 10.0
51
+ # end
53
52
  #
54
53
  # @yield [config] Configure the Client client.
55
54
  # @yieldparam config [Client::Configuration]
@@ -176,19 +175,15 @@ module Google
176
175
  ##
177
176
  # Create a new Subscriber client object.
178
177
  #
179
- # ## Examples
180
- #
181
- # To create a new Subscriber client with the default
182
- # configuration:
183
- #
184
- # client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new
178
+ # @example
185
179
  #
186
- # To create a new Subscriber client with a custom
187
- # configuration:
180
+ # # Create a client using the default configuration
181
+ # client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new
188
182
  #
189
- # client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new do |config|
190
- # config.timeout = 10.0
191
- # end
183
+ # # Create a client using a custom configuration
184
+ # client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new do |config|
185
+ # config.timeout = 10.0
186
+ # end
192
187
  #
193
188
  # @yield [config] Configure the Subscriber client.
194
189
  # @yieldparam config [Client::Configuration]
@@ -208,10 +203,9 @@ module Google
208
203
 
209
204
  # Create credentials
210
205
  credentials = @config.credentials
211
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
206
+ # Use self-signed JWT if the endpoint is unchanged from default,
212
207
  # but only if the default endpoint does not have a region prefix.
213
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
214
- @config.endpoint == Client.configure.endpoint &&
208
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
215
209
  !@config.endpoint.split(".").first.include?("-")
216
210
  credentials ||= Credentials.default scope: @config.scope,
217
211
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -300,8 +294,9 @@ module Google
300
294
  # Indicates whether to retain acknowledged messages. If true, then
301
295
  # messages are not expunged from the subscription's backlog, even if they are
302
296
  # acknowledged, until they fall out of the `message_retention_duration`
303
- # window. This must be true if you would like to [Seek to a timestamp]
304
- # (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time).
297
+ # window. This must be true if you would like to [`Seek` to a timestamp]
298
+ # (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) in
299
+ # the past to replay previously-acknowledged messages.
305
300
  # @param message_retention_duration [::Google::Protobuf::Duration, ::Hash]
306
301
  # How long to retain unacknowledged messages in the subscription's backlog,
307
302
  # from the moment a message is published.
@@ -388,7 +383,9 @@ module Google
388
383
  options.apply_defaults timeout: @config.rpcs.create_subscription.timeout,
389
384
  metadata: metadata,
390
385
  retry_policy: @config.rpcs.create_subscription.retry_policy
391
- options.apply_defaults metadata: @config.metadata,
386
+
387
+ options.apply_defaults timeout: @config.timeout,
388
+ metadata: @config.metadata,
392
389
  retry_policy: @config.retry_policy
393
390
 
394
391
  @subscriber_stub.call_rpc :create_subscription, request, options: options do |response, operation|
@@ -455,7 +452,9 @@ module Google
455
452
  options.apply_defaults timeout: @config.rpcs.get_subscription.timeout,
456
453
  metadata: metadata,
457
454
  retry_policy: @config.rpcs.get_subscription.retry_policy
458
- options.apply_defaults metadata: @config.metadata,
455
+
456
+ options.apply_defaults timeout: @config.timeout,
457
+ metadata: @config.metadata,
459
458
  retry_policy: @config.retry_policy
460
459
 
461
460
  @subscriber_stub.call_rpc :get_subscription, request, options: options do |response, operation|
@@ -525,7 +524,9 @@ module Google
525
524
  options.apply_defaults timeout: @config.rpcs.update_subscription.timeout,
526
525
  metadata: metadata,
527
526
  retry_policy: @config.rpcs.update_subscription.retry_policy
528
- options.apply_defaults metadata: @config.metadata,
527
+
528
+ options.apply_defaults timeout: @config.timeout,
529
+ metadata: @config.metadata,
529
530
  retry_policy: @config.retry_policy
530
531
 
531
532
  @subscriber_stub.call_rpc :update_subscription, request, options: options do |response, operation|
@@ -598,7 +599,9 @@ module Google
598
599
  options.apply_defaults timeout: @config.rpcs.list_subscriptions.timeout,
599
600
  metadata: metadata,
600
601
  retry_policy: @config.rpcs.list_subscriptions.retry_policy
601
- options.apply_defaults metadata: @config.metadata,
602
+
603
+ options.apply_defaults timeout: @config.timeout,
604
+ metadata: @config.metadata,
602
605
  retry_policy: @config.retry_policy
603
606
 
604
607
  @subscriber_stub.call_rpc :list_subscriptions, request, options: options do |response, operation|
@@ -670,7 +673,9 @@ module Google
670
673
  options.apply_defaults timeout: @config.rpcs.delete_subscription.timeout,
671
674
  metadata: metadata,
672
675
  retry_policy: @config.rpcs.delete_subscription.retry_policy
673
- options.apply_defaults metadata: @config.metadata,
676
+
677
+ options.apply_defaults timeout: @config.timeout,
678
+ metadata: @config.metadata,
674
679
  retry_policy: @config.retry_policy
675
680
 
676
681
  @subscriber_stub.call_rpc :delete_subscription, request, options: options do |response, operation|
@@ -752,7 +757,9 @@ module Google
752
757
  options.apply_defaults timeout: @config.rpcs.modify_ack_deadline.timeout,
753
758
  metadata: metadata,
754
759
  retry_policy: @config.rpcs.modify_ack_deadline.retry_policy
755
- options.apply_defaults metadata: @config.metadata,
760
+
761
+ options.apply_defaults timeout: @config.timeout,
762
+ metadata: @config.metadata,
756
763
  retry_policy: @config.retry_policy
757
764
 
758
765
  @subscriber_stub.call_rpc :modify_ack_deadline, request, options: options do |response, operation|
@@ -829,7 +836,9 @@ module Google
829
836
  options.apply_defaults timeout: @config.rpcs.acknowledge.timeout,
830
837
  metadata: metadata,
831
838
  retry_policy: @config.rpcs.acknowledge.retry_policy
832
- options.apply_defaults metadata: @config.metadata,
839
+
840
+ options.apply_defaults timeout: @config.timeout,
841
+ metadata: @config.metadata,
833
842
  retry_policy: @config.retry_policy
834
843
 
835
844
  @subscriber_stub.call_rpc :acknowledge, request, options: options do |response, operation|
@@ -910,7 +919,9 @@ module Google
910
919
  options.apply_defaults timeout: @config.rpcs.pull.timeout,
911
920
  metadata: metadata,
912
921
  retry_policy: @config.rpcs.pull.retry_policy
913
- options.apply_defaults metadata: @config.metadata,
922
+
923
+ options.apply_defaults timeout: @config.timeout,
924
+ metadata: @config.metadata,
914
925
  retry_policy: @config.retry_policy
915
926
 
916
927
  @subscriber_stub.call_rpc :pull, request, options: options do |response, operation|
@@ -968,7 +979,9 @@ module Google
968
979
  options.apply_defaults timeout: @config.rpcs.streaming_pull.timeout,
969
980
  metadata: metadata,
970
981
  retry_policy: @config.rpcs.streaming_pull.retry_policy
971
- options.apply_defaults metadata: @config.metadata,
982
+
983
+ options.apply_defaults timeout: @config.timeout,
984
+ metadata: @config.metadata,
972
985
  retry_policy: @config.retry_policy
973
986
 
974
987
  @subscriber_stub.call_rpc :streaming_pull, request, options: options do |response, operation|
@@ -1047,7 +1060,9 @@ module Google
1047
1060
  options.apply_defaults timeout: @config.rpcs.modify_push_config.timeout,
1048
1061
  metadata: metadata,
1049
1062
  retry_policy: @config.rpcs.modify_push_config.retry_policy
1050
- options.apply_defaults metadata: @config.metadata,
1063
+
1064
+ options.apply_defaults timeout: @config.timeout,
1065
+ metadata: @config.metadata,
1051
1066
  retry_policy: @config.retry_policy
1052
1067
 
1053
1068
  @subscriber_stub.call_rpc :modify_push_config, request, options: options do |response, operation|
@@ -1118,7 +1133,9 @@ module Google
1118
1133
  options.apply_defaults timeout: @config.rpcs.get_snapshot.timeout,
1119
1134
  metadata: metadata,
1120
1135
  retry_policy: @config.rpcs.get_snapshot.retry_policy
1121
- options.apply_defaults metadata: @config.metadata,
1136
+
1137
+ options.apply_defaults timeout: @config.timeout,
1138
+ metadata: @config.metadata,
1122
1139
  retry_policy: @config.retry_policy
1123
1140
 
1124
1141
  @subscriber_stub.call_rpc :get_snapshot, request, options: options do |response, operation|
@@ -1195,7 +1212,9 @@ module Google
1195
1212
  options.apply_defaults timeout: @config.rpcs.list_snapshots.timeout,
1196
1213
  metadata: metadata,
1197
1214
  retry_policy: @config.rpcs.list_snapshots.retry_policy
1198
- options.apply_defaults metadata: @config.metadata,
1215
+
1216
+ options.apply_defaults timeout: @config.timeout,
1217
+ metadata: @config.metadata,
1199
1218
  retry_policy: @config.retry_policy
1200
1219
 
1201
1220
  @subscriber_stub.call_rpc :list_snapshots, request, options: options do |response, operation|
@@ -1295,7 +1314,9 @@ module Google
1295
1314
  options.apply_defaults timeout: @config.rpcs.create_snapshot.timeout,
1296
1315
  metadata: metadata,
1297
1316
  retry_policy: @config.rpcs.create_snapshot.retry_policy
1298
- options.apply_defaults metadata: @config.metadata,
1317
+
1318
+ options.apply_defaults timeout: @config.timeout,
1319
+ metadata: @config.metadata,
1299
1320
  retry_policy: @config.retry_policy
1300
1321
 
1301
1322
  @subscriber_stub.call_rpc :create_snapshot, request, options: options do |response, operation|
@@ -1369,7 +1390,9 @@ module Google
1369
1390
  options.apply_defaults timeout: @config.rpcs.update_snapshot.timeout,
1370
1391
  metadata: metadata,
1371
1392
  retry_policy: @config.rpcs.update_snapshot.retry_policy
1372
- options.apply_defaults metadata: @config.metadata,
1393
+
1394
+ options.apply_defaults timeout: @config.timeout,
1395
+ metadata: @config.metadata,
1373
1396
  retry_policy: @config.retry_policy
1374
1397
 
1375
1398
  @subscriber_stub.call_rpc :update_snapshot, request, options: options do |response, operation|
@@ -1444,7 +1467,9 @@ module Google
1444
1467
  options.apply_defaults timeout: @config.rpcs.delete_snapshot.timeout,
1445
1468
  metadata: metadata,
1446
1469
  retry_policy: @config.rpcs.delete_snapshot.retry_policy
1447
- options.apply_defaults metadata: @config.metadata,
1470
+
1471
+ options.apply_defaults timeout: @config.timeout,
1472
+ metadata: @config.metadata,
1448
1473
  retry_policy: @config.retry_policy
1449
1474
 
1450
1475
  @subscriber_stub.call_rpc :delete_snapshot, request, options: options do |response, operation|
@@ -1532,7 +1557,9 @@ module Google
1532
1557
  options.apply_defaults timeout: @config.rpcs.seek.timeout,
1533
1558
  metadata: metadata,
1534
1559
  retry_policy: @config.rpcs.seek.retry_policy
1535
- options.apply_defaults metadata: @config.metadata,
1560
+
1561
+ options.apply_defaults timeout: @config.timeout,
1562
+ metadata: @config.metadata,
1536
1563
  retry_policy: @config.retry_policy
1537
1564
 
1538
1565
  @subscriber_stub.call_rpc :seek, request, options: options do |response, operation|
@@ -1556,22 +1583,21 @@ module Google
1556
1583
  # Configuration can be applied globally to all clients, or to a single client
1557
1584
  # on construction.
1558
1585
  #
1559
- # # Examples
1560
- #
1561
- # To modify the global config, setting the timeout for create_subscription
1562
- # to 20 seconds, and all remaining timeouts to 10 seconds:
1563
- #
1564
- # ::Google::Cloud::PubSub::V1::Subscriber::Client.configure do |config|
1565
- # config.timeout = 10.0
1566
- # config.rpcs.create_subscription.timeout = 20.0
1567
- # end
1568
- #
1569
- # To apply the above configuration only to a new client:
1570
- #
1571
- # client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new do |config|
1572
- # config.timeout = 10.0
1573
- # config.rpcs.create_subscription.timeout = 20.0
1574
- # end
1586
+ # @example
1587
+ #
1588
+ # # Modify the global config, setting the timeout for
1589
+ # # create_subscription to 20 seconds,
1590
+ # # and all remaining timeouts to 10 seconds.
1591
+ # ::Google::Cloud::PubSub::V1::Subscriber::Client.configure do |config|
1592
+ # config.timeout = 10.0
1593
+ # config.rpcs.create_subscription.timeout = 20.0
1594
+ # end
1595
+ #
1596
+ # # Apply the above configuration only to a new client.
1597
+ # client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new do |config|
1598
+ # config.timeout = 10.0
1599
+ # config.rpcs.create_subscription.timeout = 20.0
1600
+ # end
1575
1601
  #
1576
1602
  # @!attribute [rw] endpoint
1577
1603
  # The hostname or hostname:port of the service endpoint.
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module PubSub
23
23
  module V1
24
- VERSION = "0.5.2"
24
+ VERSION = "0.6.0"
25
25
  end
26
26
  end
27
27
  end
@@ -28,6 +28,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
28
28
  optional :kms_key_name, :string, 5
29
29
  optional :schema_settings, :message, 6, "google.pubsub.v1.SchemaSettings"
30
30
  optional :satisfies_pzs, :bool, 7
31
+ optional :message_retention_duration, :message, 8, "google.protobuf.Duration"
31
32
  end
32
33
  add_message "google.pubsub.v1.PubsubMessage" do
33
34
  optional :data, :bytes, 1
@@ -99,6 +100,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
99
100
  optional :dead_letter_policy, :message, 13, "google.pubsub.v1.DeadLetterPolicy"
100
101
  optional :retry_policy, :message, 14, "google.pubsub.v1.RetryPolicy"
101
102
  optional :detached, :bool, 15
103
+ optional :topic_message_retention_duration, :message, 17, "google.protobuf.Duration"
102
104
  end
103
105
  add_message "google.pubsub.v1.RetryPolicy" do
104
106
  optional :minimum_backoff, :message, 1, "google.protobuf.Duration"
@@ -80,6 +80,16 @@ module Google
80
80
  # @return [::Boolean]
81
81
  # Reserved for future use. This field is set only in responses from the
82
82
  # server; it is ignored if it is set in any requests.
83
+ # @!attribute [rw] message_retention_duration
84
+ # @return [::Google::Protobuf::Duration]
85
+ # Indicates the minimum duration to retain a message after it is published to
86
+ # the topic. If this field is set, messages published to the topic in the
87
+ # last `message_retention_duration` are always available to subscribers. For
88
+ # instance, it allows any attached subscription to [seek to a
89
+ # timestamp](https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time)
90
+ # that is up to `message_retention_duration` in the past. If this field is
91
+ # not set, message retention is controlled by settings on individual
92
+ # subscriptions. Cannot be more than 7 days or less than 10 minutes.
83
93
  class Topic
84
94
  include ::Google::Protobuf::MessageExts
85
95
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -362,8 +372,9 @@ module Google
362
372
  # Indicates whether to retain acknowledged messages. If true, then
363
373
  # messages are not expunged from the subscription's backlog, even if they are
364
374
  # acknowledged, until they fall out of the `message_retention_duration`
365
- # window. This must be true if you would like to [Seek to a timestamp]
366
- # (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time).
375
+ # window. This must be true if you would like to [`Seek` to a timestamp]
376
+ # (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) in
377
+ # the past to replay previously-acknowledged messages.
367
378
  # @!attribute [rw] message_retention_duration
368
379
  # @return [::Google::Protobuf::Duration]
369
380
  # How long to retain unacknowledged messages in the subscription's backlog,
@@ -423,6 +434,14 @@ module Google
423
434
  # backlog. `Pull` and `StreamingPull` requests will return
424
435
  # FAILED_PRECONDITION. If the subscription is a push subscription, pushes to
425
436
  # the endpoint will not be made.
437
+ # @!attribute [r] topic_message_retention_duration
438
+ # @return [::Google::Protobuf::Duration]
439
+ # Output only. Indicates the minimum duration for which a message is retained
440
+ # after it is published to the subscription's topic. If this field is set,
441
+ # messages published to the subscription's topic in the last
442
+ # `topic_message_retention_duration` are always available to subscribers. See
443
+ # the `message_retention_duration` field in `Topic`. This field is set only
444
+ # in responses from the server; it is ignored if it is set in any requests.
426
445
  class Subscription
427
446
  include ::Google::Protobuf::MessageExts
428
447
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -150,6 +150,7 @@ module Google
150
150
  end
151
151
 
152
152
  # Response for the `ValidateSchema` method.
153
+ # Empty for now.
153
154
  class ValidateSchemaResponse
154
155
  include ::Google::Protobuf::MessageExts
155
156
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -180,6 +181,7 @@ module Google
180
181
  end
181
182
 
182
183
  # Response for the `ValidateMessage` method.
184
+ # Empty for now.
183
185
  class ValidateMessageResponse
184
186
  include ::Google::Protobuf::MessageExts
185
187
  extend ::Google::Protobuf::MessageExts::ClassMethods
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-pubsub-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-12 00:00:00.000000000 Z
11
+ date: 2021-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.5'
19
+ version: '0.7'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.5'
29
+ version: '0.7'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a