google-cloud-recommendation_engine-v1beta1 0.3.3 → 0.3.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/AUTHENTICATION.md +7 -25
  4. data/lib/google/cloud/recommendation_engine/v1beta1/catalog_service/client.rb +181 -60
  5. data/lib/google/cloud/recommendation_engine/v1beta1/catalog_service/operations.rb +145 -33
  6. data/lib/google/cloud/recommendation_engine/v1beta1/prediction_api_key_registry/client.rb +104 -48
  7. data/lib/google/cloud/recommendation_engine/v1beta1/prediction_service/client.rb +58 -40
  8. data/lib/google/cloud/recommendation_engine/v1beta1/user_event_service/client.rb +165 -56
  9. data/lib/google/cloud/recommendation_engine/v1beta1/user_event_service/operations.rb +145 -33
  10. data/lib/google/cloud/recommendation_engine/v1beta1/version.rb +1 -1
  11. data/lib/google/cloud/recommendationengine/v1beta1/catalog_pb.rb +2 -2
  12. data/lib/google/cloud/recommendationengine/v1beta1/catalog_service_pb.rb +2 -2
  13. data/lib/google/cloud/recommendationengine/v1beta1/catalog_service_services_pb.rb +1 -1
  14. data/lib/google/cloud/recommendationengine/v1beta1/common_pb.rb +1 -1
  15. data/lib/google/cloud/recommendationengine/v1beta1/import_pb.rb +2 -2
  16. data/lib/google/cloud/recommendationengine/v1beta1/prediction_apikey_registry_service_pb.rb +2 -2
  17. data/lib/google/cloud/recommendationengine/v1beta1/prediction_apikey_registry_service_services_pb.rb +1 -1
  18. data/lib/google/cloud/recommendationengine/v1beta1/prediction_service_pb.rb +2 -2
  19. data/lib/google/cloud/recommendationengine/v1beta1/prediction_service_services_pb.rb +1 -1
  20. data/lib/google/cloud/recommendationengine/v1beta1/recommendationengine_resources_pb.rb +1 -1
  21. data/lib/google/cloud/recommendationengine/v1beta1/user_event_pb.rb +2 -2
  22. data/lib/google/cloud/recommendationengine/v1beta1/user_event_service_pb.rb +2 -2
  23. data/lib/google/cloud/recommendationengine/v1beta1/user_event_service_services_pb.rb +1 -1
  24. data/proto_docs/google/api/httpbody.rb +7 -3
  25. data/proto_docs/google/api/resource.rb +10 -71
  26. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 18034d005b58dc867dce5358c4bb055465a61adcbd37719e9931c6e6b4718faf
4
- data.tar.gz: a7ae76acd6694f49e07212ece8a375cb65eaebc7efa5df9e27f0ece6608ae692
3
+ metadata.gz: 4aec482a16bd6c769e8f96f26b1b370797da150f28c3cd0ad359b4c8d223cc0c
4
+ data.tar.gz: 32a34716aa09bc233216112fa8c2111ee4c3f6c9136c2fce61f72ae9ab513bda
5
5
  SHA512:
6
- metadata.gz: 97cf9761beb2520124a17dc9247ce77a290d78aee04c0db4a5d6d4a61f8dd5bb1d07a206f7245ef7ed22e8a7d99f9d8ed8d3b3cf21ff2915f40af0a716d44097
7
- data.tar.gz: e8f83f6da6ce636e9a34c24c8a47fb1d2996f821959c23953dd501f893d9af3b2ab18a90941a881ef8fafb51a5e0c0d627d29b8603e05f68fc4129d46908d6e5
6
+ metadata.gz: 78e99c3ce43a1b972267f7b66a570bb24716821fd6497abb4bdf5f5ea6d90addf66b8f3220329e2bacf27bf7d9783cf464afbba739926830041989a57d5dcd94
7
+ data.tar.gz: afff6d63f2e5d3205f290c4fcc0fda77bfd0c419d6bc858fe7d6c47b880b7bcc9654e16b6c1d827b223cf65497b6db8c311ec1fc59fbdd2464f087b02266a44b
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --no-private
2
- --title=Recommendations AI V1beta1 API
2
+ --title="Recommendations AI V1beta1 API"
3
3
  --exclude _pb\.rb$
4
4
  --markup markdown
5
5
  --markup-provider redcarpet
data/AUTHENTICATION.md CHANGED
@@ -120,15 +120,6 @@ To configure your system for this, simply:
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
121
121
  *should* only be used during development.
122
122
 
123
- [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
124
- [dev-console]: https://console.cloud.google.com/project
125
-
126
- [enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
127
-
128
- [create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
129
- [create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
130
- [reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
131
-
132
123
  ## Creating a Service Account
133
124
 
134
125
  Google Cloud requires **Service Account Credentials** to
@@ -139,31 +130,22 @@ If you are not running this client within
139
130
  [Google Cloud Platform environments](#google-cloud-platform-environments), you
140
131
  need a Google Developers service account.
141
132
 
142
- 1. Visit the [Google Developers Console][dev-console].
133
+ 1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
143
134
  2. Create a new project or click on an existing project.
144
- 3. Activate the slide-out navigation tray and select **API Manager**. From
135
+ 3. Activate the menu in the upper left and select **APIs & Services**. From
145
136
  here, you will enable the APIs that your application requires.
146
137
 
147
- ![Enable the APIs that your application requires][enable-apis]
148
-
149
138
  *Note: You may need to enable billing in order to use these services.*
150
139
 
151
140
  4. Select **Credentials** from the side navigation.
152
141
 
153
- You should see a screen like one of the following.
154
-
155
- ![Create a new service account][create-new-service-account]
156
-
157
- ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
158
-
159
- Find the "Add credentials" drop down and select "Service account" to be
160
- guided through downloading a new JSON key file.
142
+ Find the "Create credentials" drop down near the top of the page, and select
143
+ "Service account" to be guided through downloading a new JSON key file.
161
144
 
162
145
  If you want to re-use an existing service account, you can easily generate a
163
- new key file. Just select the account you wish to re-use, and click "Generate
164
- new JSON key":
165
-
166
- ![Re-use an existing service account][reuse-service-account]
146
+ new key file. Just select the account you wish to re-use, click the pencil
147
+ tool on the right side to edit the service account, select the **Keys** tab,
148
+ and then select **Add Key**.
167
149
 
168
150
  The key file you download will be used by this library to authenticate API
169
151
  requests and should be stored in a secure location.
@@ -41,13 +41,12 @@ module Google
41
41
  # See {::Google::Cloud::RecommendationEngine::V1beta1::CatalogService::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 CatalogService clients:
47
- #
48
- # ::Google::Cloud::RecommendationEngine::V1beta1::CatalogService::Client.configure do |config|
49
- # config.timeout = 10.0
50
- # end
46
+ # # Modify the configuration for all CatalogService clients
47
+ # ::Google::Cloud::RecommendationEngine::V1beta1::CatalogService::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]
@@ -124,19 +123,15 @@ module Google
124
123
  ##
125
124
  # Create a new CatalogService client object.
126
125
  #
127
- # ## Examples
128
- #
129
- # To create a new CatalogService client with the default
130
- # configuration:
126
+ # @example
131
127
  #
132
- # client = ::Google::Cloud::RecommendationEngine::V1beta1::CatalogService::Client.new
128
+ # # Create a client using the default configuration
129
+ # client = ::Google::Cloud::RecommendationEngine::V1beta1::CatalogService::Client.new
133
130
  #
134
- # To create a new CatalogService client with a custom
135
- # configuration:
136
- #
137
- # client = ::Google::Cloud::RecommendationEngine::V1beta1::CatalogService::Client.new do |config|
138
- # config.timeout = 10.0
139
- # end
131
+ # # Create a client using a custom configuration
132
+ # client = ::Google::Cloud::RecommendationEngine::V1beta1::CatalogService::Client.new do |config|
133
+ # config.timeout = 10.0
134
+ # end
140
135
  #
141
136
  # @yield [config] Configure the CatalogService client.
142
137
  # @yieldparam config [Client::Configuration]
@@ -156,10 +151,9 @@ module Google
156
151
 
157
152
  # Create credentials
158
153
  credentials = @config.credentials
159
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
154
+ # Use self-signed JWT if the endpoint is unchanged from default,
160
155
  # but only if the default endpoint does not have a region prefix.
161
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
162
- @config.endpoint == Client.configure.endpoint &&
156
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
163
157
  !@config.endpoint.split(".").first.include?("-")
164
158
  credentials ||= Credentials.default scope: @config.scope,
165
159
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -171,6 +165,7 @@ module Google
171
165
 
172
166
  @operations_client = Operations.new do |config|
173
167
  config.credentials = credentials
168
+ config.quota_project = @quota_project_id
174
169
  config.endpoint = @config.endpoint
175
170
  end
176
171
 
@@ -224,6 +219,21 @@ module Google
224
219
  #
225
220
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
226
221
  #
222
+ # @example Basic example
223
+ # require "google/cloud/recommendation_engine/v1beta1"
224
+ #
225
+ # # Create a client object. The client can be reused for multiple calls.
226
+ # client = Google::Cloud::RecommendationEngine::V1beta1::CatalogService::Client.new
227
+ #
228
+ # # Create a request. To set request fields, pass in keyword arguments.
229
+ # request = Google::Cloud::RecommendationEngine::V1beta1::CreateCatalogItemRequest.new
230
+ #
231
+ # # Call the create_catalog_item method.
232
+ # result = client.create_catalog_item request
233
+ #
234
+ # # The returned object is of type Google::Cloud::RecommendationEngine::V1beta1::CatalogItem.
235
+ # p result
236
+ #
227
237
  def create_catalog_item request, options = nil
228
238
  raise ::ArgumentError, "request must be provided" if request.nil?
229
239
 
@@ -241,16 +251,20 @@ module Google
241
251
  gapic_version: ::Google::Cloud::RecommendationEngine::V1beta1::VERSION
242
252
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
243
253
 
244
- header_params = {
245
- "parent" => request.parent
246
- }
254
+ header_params = {}
255
+ if request.parent
256
+ header_params["parent"] = request.parent
257
+ end
258
+
247
259
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
248
260
  metadata[:"x-goog-request-params"] ||= request_params_header
249
261
 
250
262
  options.apply_defaults timeout: @config.rpcs.create_catalog_item.timeout,
251
263
  metadata: metadata,
252
264
  retry_policy: @config.rpcs.create_catalog_item.retry_policy
253
- options.apply_defaults metadata: @config.metadata,
265
+
266
+ options.apply_defaults timeout: @config.timeout,
267
+ metadata: @config.metadata,
254
268
  retry_policy: @config.retry_policy
255
269
 
256
270
  @catalog_service_stub.call_rpc :create_catalog_item, request, options: options do |response, operation|
@@ -291,6 +305,21 @@ module Google
291
305
  #
292
306
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
293
307
  #
308
+ # @example Basic example
309
+ # require "google/cloud/recommendation_engine/v1beta1"
310
+ #
311
+ # # Create a client object. The client can be reused for multiple calls.
312
+ # client = Google::Cloud::RecommendationEngine::V1beta1::CatalogService::Client.new
313
+ #
314
+ # # Create a request. To set request fields, pass in keyword arguments.
315
+ # request = Google::Cloud::RecommendationEngine::V1beta1::GetCatalogItemRequest.new
316
+ #
317
+ # # Call the get_catalog_item method.
318
+ # result = client.get_catalog_item request
319
+ #
320
+ # # The returned object is of type Google::Cloud::RecommendationEngine::V1beta1::CatalogItem.
321
+ # p result
322
+ #
294
323
  def get_catalog_item request, options = nil
295
324
  raise ::ArgumentError, "request must be provided" if request.nil?
296
325
 
@@ -308,16 +337,20 @@ module Google
308
337
  gapic_version: ::Google::Cloud::RecommendationEngine::V1beta1::VERSION
309
338
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
310
339
 
311
- header_params = {
312
- "name" => request.name
313
- }
340
+ header_params = {}
341
+ if request.name
342
+ header_params["name"] = request.name
343
+ end
344
+
314
345
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
315
346
  metadata[:"x-goog-request-params"] ||= request_params_header
316
347
 
317
348
  options.apply_defaults timeout: @config.rpcs.get_catalog_item.timeout,
318
349
  metadata: metadata,
319
350
  retry_policy: @config.rpcs.get_catalog_item.retry_policy
320
- options.apply_defaults metadata: @config.metadata,
351
+
352
+ options.apply_defaults timeout: @config.timeout,
353
+ metadata: @config.metadata,
321
354
  retry_policy: @config.retry_policy
322
355
 
323
356
  @catalog_service_stub.call_rpc :get_catalog_item, request, options: options do |response, operation|
@@ -365,6 +398,27 @@ module Google
365
398
  #
366
399
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
367
400
  #
401
+ # @example Basic example
402
+ # require "google/cloud/recommendation_engine/v1beta1"
403
+ #
404
+ # # Create a client object. The client can be reused for multiple calls.
405
+ # client = Google::Cloud::RecommendationEngine::V1beta1::CatalogService::Client.new
406
+ #
407
+ # # Create a request. To set request fields, pass in keyword arguments.
408
+ # request = Google::Cloud::RecommendationEngine::V1beta1::ListCatalogItemsRequest.new
409
+ #
410
+ # # Call the list_catalog_items method.
411
+ # result = client.list_catalog_items request
412
+ #
413
+ # # The returned object is of type Gapic::PagedEnumerable. You can
414
+ # # iterate over all elements by calling #each, and the enumerable
415
+ # # will lazily make API calls to fetch subsequent pages. Other
416
+ # # methods are also available for managing paging directly.
417
+ # result.each do |response|
418
+ # # Each element is of type ::Google::Cloud::RecommendationEngine::V1beta1::CatalogItem.
419
+ # p response
420
+ # end
421
+ #
368
422
  def list_catalog_items request, options = nil
369
423
  raise ::ArgumentError, "request must be provided" if request.nil?
370
424
 
@@ -382,16 +436,20 @@ module Google
382
436
  gapic_version: ::Google::Cloud::RecommendationEngine::V1beta1::VERSION
383
437
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
384
438
 
385
- header_params = {
386
- "parent" => request.parent
387
- }
439
+ header_params = {}
440
+ if request.parent
441
+ header_params["parent"] = request.parent
442
+ end
443
+
388
444
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
389
445
  metadata[:"x-goog-request-params"] ||= request_params_header
390
446
 
391
447
  options.apply_defaults timeout: @config.rpcs.list_catalog_items.timeout,
392
448
  metadata: metadata,
393
449
  retry_policy: @config.rpcs.list_catalog_items.retry_policy
394
- options.apply_defaults metadata: @config.metadata,
450
+
451
+ options.apply_defaults timeout: @config.timeout,
452
+ metadata: @config.metadata,
395
453
  retry_policy: @config.retry_policy
396
454
 
397
455
  @catalog_service_stub.call_rpc :list_catalog_items, request, options: options do |response, operation|
@@ -440,6 +498,21 @@ module Google
440
498
  #
441
499
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
442
500
  #
501
+ # @example Basic example
502
+ # require "google/cloud/recommendation_engine/v1beta1"
503
+ #
504
+ # # Create a client object. The client can be reused for multiple calls.
505
+ # client = Google::Cloud::RecommendationEngine::V1beta1::CatalogService::Client.new
506
+ #
507
+ # # Create a request. To set request fields, pass in keyword arguments.
508
+ # request = Google::Cloud::RecommendationEngine::V1beta1::UpdateCatalogItemRequest.new
509
+ #
510
+ # # Call the update_catalog_item method.
511
+ # result = client.update_catalog_item request
512
+ #
513
+ # # The returned object is of type Google::Cloud::RecommendationEngine::V1beta1::CatalogItem.
514
+ # p result
515
+ #
443
516
  def update_catalog_item request, options = nil
444
517
  raise ::ArgumentError, "request must be provided" if request.nil?
445
518
 
@@ -457,16 +530,20 @@ module Google
457
530
  gapic_version: ::Google::Cloud::RecommendationEngine::V1beta1::VERSION
458
531
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
459
532
 
460
- header_params = {
461
- "name" => request.name
462
- }
533
+ header_params = {}
534
+ if request.name
535
+ header_params["name"] = request.name
536
+ end
537
+
463
538
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
464
539
  metadata[:"x-goog-request-params"] ||= request_params_header
465
540
 
466
541
  options.apply_defaults timeout: @config.rpcs.update_catalog_item.timeout,
467
542
  metadata: metadata,
468
543
  retry_policy: @config.rpcs.update_catalog_item.retry_policy
469
- options.apply_defaults metadata: @config.metadata,
544
+
545
+ options.apply_defaults timeout: @config.timeout,
546
+ metadata: @config.metadata,
470
547
  retry_policy: @config.retry_policy
471
548
 
472
549
  @catalog_service_stub.call_rpc :update_catalog_item, request, options: options do |response, operation|
@@ -507,6 +584,21 @@ module Google
507
584
  #
508
585
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
509
586
  #
587
+ # @example Basic example
588
+ # require "google/cloud/recommendation_engine/v1beta1"
589
+ #
590
+ # # Create a client object. The client can be reused for multiple calls.
591
+ # client = Google::Cloud::RecommendationEngine::V1beta1::CatalogService::Client.new
592
+ #
593
+ # # Create a request. To set request fields, pass in keyword arguments.
594
+ # request = Google::Cloud::RecommendationEngine::V1beta1::DeleteCatalogItemRequest.new
595
+ #
596
+ # # Call the delete_catalog_item method.
597
+ # result = client.delete_catalog_item request
598
+ #
599
+ # # The returned object is of type Google::Protobuf::Empty.
600
+ # p result
601
+ #
510
602
  def delete_catalog_item request, options = nil
511
603
  raise ::ArgumentError, "request must be provided" if request.nil?
512
604
 
@@ -524,16 +616,20 @@ module Google
524
616
  gapic_version: ::Google::Cloud::RecommendationEngine::V1beta1::VERSION
525
617
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
526
618
 
527
- header_params = {
528
- "name" => request.name
529
- }
619
+ header_params = {}
620
+ if request.name
621
+ header_params["name"] = request.name
622
+ end
623
+
530
624
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
531
625
  metadata[:"x-goog-request-params"] ||= request_params_header
532
626
 
533
627
  options.apply_defaults timeout: @config.rpcs.delete_catalog_item.timeout,
534
628
  metadata: metadata,
535
629
  retry_policy: @config.rpcs.delete_catalog_item.retry_policy
536
- options.apply_defaults metadata: @config.metadata,
630
+
631
+ options.apply_defaults timeout: @config.timeout,
632
+ metadata: @config.metadata,
537
633
  retry_policy: @config.retry_policy
538
634
 
539
635
  @catalog_service_stub.call_rpc :delete_catalog_item, request, options: options do |response, operation|
@@ -587,6 +683,28 @@ module Google
587
683
  #
588
684
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
589
685
  #
686
+ # @example Basic example
687
+ # require "google/cloud/recommendation_engine/v1beta1"
688
+ #
689
+ # # Create a client object. The client can be reused for multiple calls.
690
+ # client = Google::Cloud::RecommendationEngine::V1beta1::CatalogService::Client.new
691
+ #
692
+ # # Create a request. To set request fields, pass in keyword arguments.
693
+ # request = Google::Cloud::RecommendationEngine::V1beta1::ImportCatalogItemsRequest.new
694
+ #
695
+ # # Call the import_catalog_items method.
696
+ # result = client.import_catalog_items request
697
+ #
698
+ # # The returned object is of type Gapic::Operation. You can use this
699
+ # # object to check the status of an operation, cancel it, or wait
700
+ # # for results. Here is how to block until completion:
701
+ # result.wait_until_done! timeout: 60
702
+ # if result.response?
703
+ # p result.response
704
+ # else
705
+ # puts "Error!"
706
+ # end
707
+ #
590
708
  def import_catalog_items request, options = nil
591
709
  raise ::ArgumentError, "request must be provided" if request.nil?
592
710
 
@@ -604,16 +722,20 @@ module Google
604
722
  gapic_version: ::Google::Cloud::RecommendationEngine::V1beta1::VERSION
605
723
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
606
724
 
607
- header_params = {
608
- "parent" => request.parent
609
- }
725
+ header_params = {}
726
+ if request.parent
727
+ header_params["parent"] = request.parent
728
+ end
729
+
610
730
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
611
731
  metadata[:"x-goog-request-params"] ||= request_params_header
612
732
 
613
733
  options.apply_defaults timeout: @config.rpcs.import_catalog_items.timeout,
614
734
  metadata: metadata,
615
735
  retry_policy: @config.rpcs.import_catalog_items.retry_policy
616
- options.apply_defaults metadata: @config.metadata,
736
+
737
+ options.apply_defaults timeout: @config.timeout,
738
+ metadata: @config.metadata,
617
739
  retry_policy: @config.retry_policy
618
740
 
619
741
  @catalog_service_stub.call_rpc :import_catalog_items, request, options: options do |response, operation|
@@ -638,22 +760,21 @@ module Google
638
760
  # Configuration can be applied globally to all clients, or to a single client
639
761
  # on construction.
640
762
  #
641
- # # Examples
642
- #
643
- # To modify the global config, setting the timeout for create_catalog_item
644
- # to 20 seconds, and all remaining timeouts to 10 seconds:
645
- #
646
- # ::Google::Cloud::RecommendationEngine::V1beta1::CatalogService::Client.configure do |config|
647
- # config.timeout = 10.0
648
- # config.rpcs.create_catalog_item.timeout = 20.0
649
- # end
650
- #
651
- # To apply the above configuration only to a new client:
652
- #
653
- # client = ::Google::Cloud::RecommendationEngine::V1beta1::CatalogService::Client.new do |config|
654
- # config.timeout = 10.0
655
- # config.rpcs.create_catalog_item.timeout = 20.0
656
- # end
763
+ # @example
764
+ #
765
+ # # Modify the global config, setting the timeout for
766
+ # # create_catalog_item to 20 seconds,
767
+ # # and all remaining timeouts to 10 seconds.
768
+ # ::Google::Cloud::RecommendationEngine::V1beta1::CatalogService::Client.configure do |config|
769
+ # config.timeout = 10.0
770
+ # config.rpcs.create_catalog_item.timeout = 20.0
771
+ # end
772
+ #
773
+ # # Apply the above configuration only to a new client.
774
+ # client = ::Google::Cloud::RecommendationEngine::V1beta1::CatalogService::Client.new do |config|
775
+ # config.timeout = 10.0
776
+ # config.rpcs.create_catalog_item.timeout = 20.0
777
+ # end
657
778
  #
658
779
  # @!attribute [rw] endpoint
659
780
  # The hostname or hostname:port of the service endpoint.