google-cloud-pubsub-v1 0.4.1 → 0.6.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.
@@ -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,14 +121,13 @@ 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
136
- if credentials.is_a?(String) || credentials.is_a?(Hash)
130
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
137
131
  credentials = Credentials.new credentials, scope: @config.scope
138
132
  end
139
133
  @quota_project_id = @config.quota_project
@@ -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]
@@ -69,130 +68,82 @@ module Google
69
68
 
70
69
  default_config.rpcs.create_subscription.timeout = 60.0
71
70
  default_config.rpcs.create_subscription.retry_policy = {
72
- initial_delay: 0.1,
73
- max_delay: 60.0,
74
- multiplier: 1.3,
75
- retry_codes: [2, 10, 14]
71
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [2, 10, 14]
76
72
  }
77
73
 
78
74
  default_config.rpcs.get_subscription.timeout = 60.0
79
75
  default_config.rpcs.get_subscription.retry_policy = {
80
- initial_delay: 0.1,
81
- max_delay: 60.0,
82
- multiplier: 1.3,
83
- retry_codes: [2, 10, 14]
76
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [2, 10, 14]
84
77
  }
85
78
 
86
79
  default_config.rpcs.update_subscription.timeout = 60.0
87
80
  default_config.rpcs.update_subscription.retry_policy = {
88
- initial_delay: 0.1,
89
- max_delay: 60.0,
90
- multiplier: 1.3,
91
- retry_codes: [14]
81
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
92
82
  }
93
83
 
94
84
  default_config.rpcs.list_subscriptions.timeout = 60.0
95
85
  default_config.rpcs.list_subscriptions.retry_policy = {
96
- initial_delay: 0.1,
97
- max_delay: 60.0,
98
- multiplier: 1.3,
99
- retry_codes: [2, 10, 14]
86
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [2, 10, 14]
100
87
  }
101
88
 
102
89
  default_config.rpcs.delete_subscription.timeout = 60.0
103
90
  default_config.rpcs.delete_subscription.retry_policy = {
104
- initial_delay: 0.1,
105
- max_delay: 60.0,
106
- multiplier: 1.3,
107
- retry_codes: [14]
91
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
108
92
  }
109
93
 
110
94
  default_config.rpcs.modify_ack_deadline.timeout = 60.0
111
95
  default_config.rpcs.modify_ack_deadline.retry_policy = {
112
- initial_delay: 0.1,
113
- max_delay: 60.0,
114
- multiplier: 1.3,
115
- retry_codes: [14]
96
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
116
97
  }
117
98
 
118
99
  default_config.rpcs.acknowledge.timeout = 60.0
119
100
  default_config.rpcs.acknowledge.retry_policy = {
120
- initial_delay: 0.1,
121
- max_delay: 60.0,
122
- multiplier: 1.3,
123
- retry_codes: [14]
101
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
124
102
  }
125
103
 
126
104
  default_config.rpcs.pull.timeout = 60.0
127
105
  default_config.rpcs.pull.retry_policy = {
128
- initial_delay: 0.1,
129
- max_delay: 60.0,
130
- multiplier: 1.3,
131
- retry_codes: [2, 10, 14]
106
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [2, 10, 14]
132
107
  }
133
108
 
134
109
  default_config.rpcs.streaming_pull.timeout = 900.0
135
110
  default_config.rpcs.streaming_pull.retry_policy = {
136
- initial_delay: 0.1,
137
- max_delay: 60.0,
138
- multiplier: 1.3,
139
- retry_codes: [4, 8, 10, 13, 14]
111
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 8, 10, 13, 14]
140
112
  }
141
113
 
142
114
  default_config.rpcs.modify_push_config.timeout = 60.0
143
115
  default_config.rpcs.modify_push_config.retry_policy = {
144
- initial_delay: 0.1,
145
- max_delay: 60.0,
146
- multiplier: 1.3,
147
- retry_codes: [14]
116
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
148
117
  }
149
118
 
150
119
  default_config.rpcs.get_snapshot.timeout = 60.0
151
120
  default_config.rpcs.get_snapshot.retry_policy = {
152
- initial_delay: 0.1,
153
- max_delay: 60.0,
154
- multiplier: 1.3,
155
- retry_codes: [2, 10, 14]
121
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [2, 10, 14]
156
122
  }
157
123
 
158
124
  default_config.rpcs.list_snapshots.timeout = 60.0
159
125
  default_config.rpcs.list_snapshots.retry_policy = {
160
- initial_delay: 0.1,
161
- max_delay: 60.0,
162
- multiplier: 1.3,
163
- retry_codes: [2, 10, 14]
126
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [2, 10, 14]
164
127
  }
165
128
 
166
129
  default_config.rpcs.create_snapshot.timeout = 60.0
167
130
  default_config.rpcs.create_snapshot.retry_policy = {
168
- initial_delay: 0.1,
169
- max_delay: 60.0,
170
- multiplier: 1.3,
171
- retry_codes: [14]
131
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
172
132
  }
173
133
 
174
134
  default_config.rpcs.update_snapshot.timeout = 60.0
175
135
  default_config.rpcs.update_snapshot.retry_policy = {
176
- initial_delay: 0.1,
177
- max_delay: 60.0,
178
- multiplier: 1.3,
179
- retry_codes: [14]
136
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
180
137
  }
181
138
 
182
139
  default_config.rpcs.delete_snapshot.timeout = 60.0
183
140
  default_config.rpcs.delete_snapshot.retry_policy = {
184
- initial_delay: 0.1,
185
- max_delay: 60.0,
186
- multiplier: 1.3,
187
- retry_codes: [14]
141
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
188
142
  }
189
143
 
190
144
  default_config.rpcs.seek.timeout = 60.0
191
145
  default_config.rpcs.seek.retry_policy = {
192
- initial_delay: 0.1,
193
- max_delay: 60.0,
194
- multiplier: 1.3,
195
- retry_codes: [2, 10, 14]
146
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [2, 10, 14]
196
147
  }
197
148
 
198
149
  default_config
@@ -224,19 +175,15 @@ module Google
224
175
  ##
225
176
  # Create a new Subscriber client object.
226
177
  #
227
- # ## Examples
228
- #
229
- # To create a new Subscriber client with the default
230
- # configuration:
231
- #
232
- # client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new
178
+ # @example
233
179
  #
234
- # To create a new Subscriber client with a custom
235
- # configuration:
180
+ # # Create a client using the default configuration
181
+ # client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new
236
182
  #
237
- # client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new do |config|
238
- # config.timeout = 10.0
239
- # 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
240
187
  #
241
188
  # @yield [config] Configure the Subscriber client.
242
189
  # @yieldparam config [Client::Configuration]
@@ -256,14 +203,13 @@ module Google
256
203
 
257
204
  # Create credentials
258
205
  credentials = @config.credentials
259
- # 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,
260
207
  # but only if the default endpoint does not have a region prefix.
261
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
262
- @config.endpoint == Client.configure.endpoint &&
208
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
263
209
  !@config.endpoint.split(".").first.include?("-")
264
210
  credentials ||= Credentials.default scope: @config.scope,
265
211
  enable_self_signed_jwt: enable_self_signed_jwt
266
- if credentials.is_a?(String) || credentials.is_a?(Hash)
212
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
267
213
  credentials = Credentials.new credentials, scope: @config.scope
268
214
  end
269
215
  @quota_project_id = @config.quota_project
@@ -348,8 +294,9 @@ module Google
348
294
  # Indicates whether to retain acknowledged messages. If true, then
349
295
  # messages are not expunged from the subscription's backlog, even if they are
350
296
  # acknowledged, until they fall out of the `message_retention_duration`
351
- # window. This must be true if you would like to [Seek to a timestamp]
352
- # (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.
353
300
  # @param message_retention_duration [::Google::Protobuf::Duration, ::Hash]
354
301
  # How long to retain unacknowledged messages in the subscription's backlog,
355
302
  # from the moment a message is published.
@@ -436,7 +383,9 @@ module Google
436
383
  options.apply_defaults timeout: @config.rpcs.create_subscription.timeout,
437
384
  metadata: metadata,
438
385
  retry_policy: @config.rpcs.create_subscription.retry_policy
439
- options.apply_defaults metadata: @config.metadata,
386
+
387
+ options.apply_defaults timeout: @config.timeout,
388
+ metadata: @config.metadata,
440
389
  retry_policy: @config.retry_policy
441
390
 
442
391
  @subscriber_stub.call_rpc :create_subscription, request, options: options do |response, operation|
@@ -503,7 +452,9 @@ module Google
503
452
  options.apply_defaults timeout: @config.rpcs.get_subscription.timeout,
504
453
  metadata: metadata,
505
454
  retry_policy: @config.rpcs.get_subscription.retry_policy
506
- options.apply_defaults metadata: @config.metadata,
455
+
456
+ options.apply_defaults timeout: @config.timeout,
457
+ metadata: @config.metadata,
507
458
  retry_policy: @config.retry_policy
508
459
 
509
460
  @subscriber_stub.call_rpc :get_subscription, request, options: options do |response, operation|
@@ -573,7 +524,9 @@ module Google
573
524
  options.apply_defaults timeout: @config.rpcs.update_subscription.timeout,
574
525
  metadata: metadata,
575
526
  retry_policy: @config.rpcs.update_subscription.retry_policy
576
- options.apply_defaults metadata: @config.metadata,
527
+
528
+ options.apply_defaults timeout: @config.timeout,
529
+ metadata: @config.metadata,
577
530
  retry_policy: @config.retry_policy
578
531
 
579
532
  @subscriber_stub.call_rpc :update_subscription, request, options: options do |response, operation|
@@ -646,7 +599,9 @@ module Google
646
599
  options.apply_defaults timeout: @config.rpcs.list_subscriptions.timeout,
647
600
  metadata: metadata,
648
601
  retry_policy: @config.rpcs.list_subscriptions.retry_policy
649
- options.apply_defaults metadata: @config.metadata,
602
+
603
+ options.apply_defaults timeout: @config.timeout,
604
+ metadata: @config.metadata,
650
605
  retry_policy: @config.retry_policy
651
606
 
652
607
  @subscriber_stub.call_rpc :list_subscriptions, request, options: options do |response, operation|
@@ -718,7 +673,9 @@ module Google
718
673
  options.apply_defaults timeout: @config.rpcs.delete_subscription.timeout,
719
674
  metadata: metadata,
720
675
  retry_policy: @config.rpcs.delete_subscription.retry_policy
721
- options.apply_defaults metadata: @config.metadata,
676
+
677
+ options.apply_defaults timeout: @config.timeout,
678
+ metadata: @config.metadata,
722
679
  retry_policy: @config.retry_policy
723
680
 
724
681
  @subscriber_stub.call_rpc :delete_subscription, request, options: options do |response, operation|
@@ -800,7 +757,9 @@ module Google
800
757
  options.apply_defaults timeout: @config.rpcs.modify_ack_deadline.timeout,
801
758
  metadata: metadata,
802
759
  retry_policy: @config.rpcs.modify_ack_deadline.retry_policy
803
- options.apply_defaults metadata: @config.metadata,
760
+
761
+ options.apply_defaults timeout: @config.timeout,
762
+ metadata: @config.metadata,
804
763
  retry_policy: @config.retry_policy
805
764
 
806
765
  @subscriber_stub.call_rpc :modify_ack_deadline, request, options: options do |response, operation|
@@ -877,7 +836,9 @@ module Google
877
836
  options.apply_defaults timeout: @config.rpcs.acknowledge.timeout,
878
837
  metadata: metadata,
879
838
  retry_policy: @config.rpcs.acknowledge.retry_policy
880
- options.apply_defaults metadata: @config.metadata,
839
+
840
+ options.apply_defaults timeout: @config.timeout,
841
+ metadata: @config.metadata,
881
842
  retry_policy: @config.retry_policy
882
843
 
883
844
  @subscriber_stub.call_rpc :acknowledge, request, options: options do |response, operation|
@@ -958,7 +919,9 @@ module Google
958
919
  options.apply_defaults timeout: @config.rpcs.pull.timeout,
959
920
  metadata: metadata,
960
921
  retry_policy: @config.rpcs.pull.retry_policy
961
- options.apply_defaults metadata: @config.metadata,
922
+
923
+ options.apply_defaults timeout: @config.timeout,
924
+ metadata: @config.metadata,
962
925
  retry_policy: @config.retry_policy
963
926
 
964
927
  @subscriber_stub.call_rpc :pull, request, options: options do |response, operation|
@@ -1016,7 +979,9 @@ module Google
1016
979
  options.apply_defaults timeout: @config.rpcs.streaming_pull.timeout,
1017
980
  metadata: metadata,
1018
981
  retry_policy: @config.rpcs.streaming_pull.retry_policy
1019
- options.apply_defaults metadata: @config.metadata,
982
+
983
+ options.apply_defaults timeout: @config.timeout,
984
+ metadata: @config.metadata,
1020
985
  retry_policy: @config.retry_policy
1021
986
 
1022
987
  @subscriber_stub.call_rpc :streaming_pull, request, options: options do |response, operation|
@@ -1095,7 +1060,9 @@ module Google
1095
1060
  options.apply_defaults timeout: @config.rpcs.modify_push_config.timeout,
1096
1061
  metadata: metadata,
1097
1062
  retry_policy: @config.rpcs.modify_push_config.retry_policy
1098
- options.apply_defaults metadata: @config.metadata,
1063
+
1064
+ options.apply_defaults timeout: @config.timeout,
1065
+ metadata: @config.metadata,
1099
1066
  retry_policy: @config.retry_policy
1100
1067
 
1101
1068
  @subscriber_stub.call_rpc :modify_push_config, request, options: options do |response, operation|
@@ -1166,7 +1133,9 @@ module Google
1166
1133
  options.apply_defaults timeout: @config.rpcs.get_snapshot.timeout,
1167
1134
  metadata: metadata,
1168
1135
  retry_policy: @config.rpcs.get_snapshot.retry_policy
1169
- options.apply_defaults metadata: @config.metadata,
1136
+
1137
+ options.apply_defaults timeout: @config.timeout,
1138
+ metadata: @config.metadata,
1170
1139
  retry_policy: @config.retry_policy
1171
1140
 
1172
1141
  @subscriber_stub.call_rpc :get_snapshot, request, options: options do |response, operation|
@@ -1243,7 +1212,9 @@ module Google
1243
1212
  options.apply_defaults timeout: @config.rpcs.list_snapshots.timeout,
1244
1213
  metadata: metadata,
1245
1214
  retry_policy: @config.rpcs.list_snapshots.retry_policy
1246
- options.apply_defaults metadata: @config.metadata,
1215
+
1216
+ options.apply_defaults timeout: @config.timeout,
1217
+ metadata: @config.metadata,
1247
1218
  retry_policy: @config.retry_policy
1248
1219
 
1249
1220
  @subscriber_stub.call_rpc :list_snapshots, request, options: options do |response, operation|
@@ -1343,7 +1314,9 @@ module Google
1343
1314
  options.apply_defaults timeout: @config.rpcs.create_snapshot.timeout,
1344
1315
  metadata: metadata,
1345
1316
  retry_policy: @config.rpcs.create_snapshot.retry_policy
1346
- options.apply_defaults metadata: @config.metadata,
1317
+
1318
+ options.apply_defaults timeout: @config.timeout,
1319
+ metadata: @config.metadata,
1347
1320
  retry_policy: @config.retry_policy
1348
1321
 
1349
1322
  @subscriber_stub.call_rpc :create_snapshot, request, options: options do |response, operation|
@@ -1417,7 +1390,9 @@ module Google
1417
1390
  options.apply_defaults timeout: @config.rpcs.update_snapshot.timeout,
1418
1391
  metadata: metadata,
1419
1392
  retry_policy: @config.rpcs.update_snapshot.retry_policy
1420
- options.apply_defaults metadata: @config.metadata,
1393
+
1394
+ options.apply_defaults timeout: @config.timeout,
1395
+ metadata: @config.metadata,
1421
1396
  retry_policy: @config.retry_policy
1422
1397
 
1423
1398
  @subscriber_stub.call_rpc :update_snapshot, request, options: options do |response, operation|
@@ -1492,7 +1467,9 @@ module Google
1492
1467
  options.apply_defaults timeout: @config.rpcs.delete_snapshot.timeout,
1493
1468
  metadata: metadata,
1494
1469
  retry_policy: @config.rpcs.delete_snapshot.retry_policy
1495
- options.apply_defaults metadata: @config.metadata,
1470
+
1471
+ options.apply_defaults timeout: @config.timeout,
1472
+ metadata: @config.metadata,
1496
1473
  retry_policy: @config.retry_policy
1497
1474
 
1498
1475
  @subscriber_stub.call_rpc :delete_snapshot, request, options: options do |response, operation|
@@ -1580,7 +1557,9 @@ module Google
1580
1557
  options.apply_defaults timeout: @config.rpcs.seek.timeout,
1581
1558
  metadata: metadata,
1582
1559
  retry_policy: @config.rpcs.seek.retry_policy
1583
- options.apply_defaults metadata: @config.metadata,
1560
+
1561
+ options.apply_defaults timeout: @config.timeout,
1562
+ metadata: @config.metadata,
1584
1563
  retry_policy: @config.retry_policy
1585
1564
 
1586
1565
  @subscriber_stub.call_rpc :seek, request, options: options do |response, operation|
@@ -1604,22 +1583,21 @@ module Google
1604
1583
  # Configuration can be applied globally to all clients, or to a single client
1605
1584
  # on construction.
1606
1585
  #
1607
- # # Examples
1608
- #
1609
- # To modify the global config, setting the timeout for create_subscription
1610
- # to 20 seconds, and all remaining timeouts to 10 seconds:
1611
- #
1612
- # ::Google::Cloud::PubSub::V1::Subscriber::Client.configure do |config|
1613
- # config.timeout = 10.0
1614
- # config.rpcs.create_subscription.timeout = 20.0
1615
- # end
1616
- #
1617
- # To apply the above configuration only to a new client:
1618
- #
1619
- # client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new do |config|
1620
- # config.timeout = 10.0
1621
- # config.rpcs.create_subscription.timeout = 20.0
1622
- # 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
1623
1601
  #
1624
1602
  # @!attribute [rw] endpoint
1625
1603
  # The hostname or hostname:port of the service endpoint.