google-cloud-retail-v2 0.20.0 → 0.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/retail/v2/analytics_service/client.rb +5 -1
  4. data/lib/google/cloud/retail/v2/analytics_service/operations.rb +13 -5
  5. data/lib/google/cloud/retail/v2/analytics_service/rest/client.rb +5 -1
  6. data/lib/google/cloud/retail/v2/analytics_service/rest/operations.rb +11 -4
  7. data/lib/google/cloud/retail/v2/catalog_pb.rb +9 -1
  8. data/lib/google/cloud/retail/v2/catalog_service/client.rb +25 -11
  9. data/lib/google/cloud/retail/v2/catalog_service/rest/client.rb +25 -11
  10. data/lib/google/cloud/retail/v2/common_pb.rb +4 -1
  11. data/lib/google/cloud/retail/v2/completion_service/client.rb +15 -6
  12. data/lib/google/cloud/retail/v2/completion_service/operations.rb +13 -5
  13. data/lib/google/cloud/retail/v2/completion_service/rest/client.rb +15 -6
  14. data/lib/google/cloud/retail/v2/completion_service/rest/operations.rb +11 -4
  15. data/lib/google/cloud/retail/v2/completion_service_pb.rb +1 -1
  16. data/lib/google/cloud/retail/v2/control_service/client.rb +13 -5
  17. data/lib/google/cloud/retail/v2/control_service/rest/client.rb +13 -5
  18. data/lib/google/cloud/retail/v2/model_pb.rb +4 -1
  19. data/lib/google/cloud/retail/v2/model_service/client.rb +19 -8
  20. data/lib/google/cloud/retail/v2/model_service/operations.rb +13 -5
  21. data/lib/google/cloud/retail/v2/model_service/rest/client.rb +19 -8
  22. data/lib/google/cloud/retail/v2/model_service/rest/operations.rb +11 -4
  23. data/lib/google/cloud/retail/v2/prediction_service/client.rb +5 -1
  24. data/lib/google/cloud/retail/v2/prediction_service/rest/client.rb +5 -1
  25. data/lib/google/cloud/retail/v2/product_service/client.rb +206 -21
  26. data/lib/google/cloud/retail/v2/product_service/operations.rb +13 -5
  27. data/lib/google/cloud/retail/v2/product_service/rest/client.rb +199 -21
  28. data/lib/google/cloud/retail/v2/product_service/rest/operations.rb +11 -4
  29. data/lib/google/cloud/retail/v2/product_service/rest/service_stub.rb +60 -0
  30. data/lib/google/cloud/retail/v2/product_service_pb.rb +2 -1
  31. data/lib/google/cloud/retail/v2/product_service_services_pb.rb +26 -6
  32. data/lib/google/cloud/retail/v2/purge_config_pb.rb +6 -1
  33. data/lib/google/cloud/retail/v2/search_service/client.rb +27 -23
  34. data/lib/google/cloud/retail/v2/search_service/rest/client.rb +27 -23
  35. data/lib/google/cloud/retail/v2/serving_config_pb.rb +1 -1
  36. data/lib/google/cloud/retail/v2/serving_config_service/client.rb +17 -7
  37. data/lib/google/cloud/retail/v2/serving_config_service/rest/client.rb +17 -7
  38. data/lib/google/cloud/retail/v2/user_event_service/client.rb +14 -6
  39. data/lib/google/cloud/retail/v2/user_event_service/operations.rb +13 -5
  40. data/lib/google/cloud/retail/v2/user_event_service/rest/client.rb +14 -6
  41. data/lib/google/cloud/retail/v2/user_event_service/rest/operations.rb +11 -4
  42. data/lib/google/cloud/retail/v2/version.rb +1 -1
  43. data/proto_docs/google/api/client.rb +4 -0
  44. data/proto_docs/google/cloud/retail/v2/catalog.rb +143 -4
  45. data/proto_docs/google/cloud/retail/v2/common.rb +104 -10
  46. data/proto_docs/google/cloud/retail/v2/completion_service.rb +14 -7
  47. data/proto_docs/google/cloud/retail/v2/import_config.rb +10 -4
  48. data/proto_docs/google/cloud/retail/v2/model.rb +40 -0
  49. data/proto_docs/google/cloud/retail/v2/product.rb +23 -22
  50. data/proto_docs/google/cloud/retail/v2/promotion.rb +2 -2
  51. data/proto_docs/google/cloud/retail/v2/purge_config.rb +93 -0
  52. data/proto_docs/google/cloud/retail/v2/search_service.rb +42 -42
  53. data/proto_docs/google/cloud/retail/v2/serving_config.rb +4 -0
  54. data/proto_docs/google/cloud/retail/v2/user_event.rb +3 -2
  55. metadata +6 -5
@@ -42,6 +42,9 @@ module Google
42
42
  # * Control their tuning schedule.
43
43
  #
44
44
  class Client
45
+ # @private
46
+ API_VERSION = ""
47
+
45
48
  # @private
46
49
  DEFAULT_ENDPOINT_TEMPLATE = "retail.$UNIVERSE_DOMAIN$"
47
50
 
@@ -274,10 +277,11 @@ module Google
274
277
  # Customize the options with defaults
275
278
  metadata = @config.rpcs.create_model.metadata.to_h
276
279
 
277
- # Set x-goog-api-client and x-goog-user-project headers
280
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
278
281
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
279
282
  lib_name: @config.lib_name, lib_version: @config.lib_version,
280
283
  gapic_version: ::Google::Cloud::Retail::V2::VERSION
284
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
281
285
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
282
286
 
283
287
  header_params = {}
@@ -362,10 +366,11 @@ module Google
362
366
  # Customize the options with defaults
363
367
  metadata = @config.rpcs.get_model.metadata.to_h
364
368
 
365
- # Set x-goog-api-client and x-goog-user-project headers
369
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
366
370
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
367
371
  lib_name: @config.lib_name, lib_version: @config.lib_version,
368
372
  gapic_version: ::Google::Cloud::Retail::V2::VERSION
373
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
369
374
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
370
375
 
371
376
  header_params = {}
@@ -449,10 +454,11 @@ module Google
449
454
  # Customize the options with defaults
450
455
  metadata = @config.rpcs.pause_model.metadata.to_h
451
456
 
452
- # Set x-goog-api-client and x-goog-user-project headers
457
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
453
458
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
454
459
  lib_name: @config.lib_name, lib_version: @config.lib_version,
455
460
  gapic_version: ::Google::Cloud::Retail::V2::VERSION
461
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
456
462
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
457
463
 
458
464
  header_params = {}
@@ -536,10 +542,11 @@ module Google
536
542
  # Customize the options with defaults
537
543
  metadata = @config.rpcs.resume_model.metadata.to_h
538
544
 
539
- # Set x-goog-api-client and x-goog-user-project headers
545
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
540
546
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
541
547
  lib_name: @config.lib_name, lib_version: @config.lib_version,
542
548
  gapic_version: ::Google::Cloud::Retail::V2::VERSION
549
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
543
550
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
544
551
 
545
552
  header_params = {}
@@ -623,10 +630,11 @@ module Google
623
630
  # Customize the options with defaults
624
631
  metadata = @config.rpcs.delete_model.metadata.to_h
625
632
 
626
- # Set x-goog-api-client and x-goog-user-project headers
633
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
627
634
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
628
635
  lib_name: @config.lib_name, lib_version: @config.lib_version,
629
636
  gapic_version: ::Google::Cloud::Retail::V2::VERSION
637
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
630
638
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
631
639
 
632
640
  header_params = {}
@@ -720,10 +728,11 @@ module Google
720
728
  # Customize the options with defaults
721
729
  metadata = @config.rpcs.list_models.metadata.to_h
722
730
 
723
- # Set x-goog-api-client and x-goog-user-project headers
731
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
724
732
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
725
733
  lib_name: @config.lib_name, lib_version: @config.lib_version,
726
734
  gapic_version: ::Google::Cloud::Retail::V2::VERSION
735
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
727
736
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
728
737
 
729
738
  header_params = {}
@@ -812,10 +821,11 @@ module Google
812
821
  # Customize the options with defaults
813
822
  metadata = @config.rpcs.update_model.metadata.to_h
814
823
 
815
- # Set x-goog-api-client and x-goog-user-project headers
824
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
816
825
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
817
826
  lib_name: @config.lib_name, lib_version: @config.lib_version,
818
827
  gapic_version: ::Google::Cloud::Retail::V2::VERSION
828
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
819
829
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
820
830
 
821
831
  header_params = {}
@@ -906,10 +916,11 @@ module Google
906
916
  # Customize the options with defaults
907
917
  metadata = @config.rpcs.tune_model.metadata.to_h
908
918
 
909
- # Set x-goog-api-client and x-goog-user-project headers
919
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
910
920
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
911
921
  lib_name: @config.lib_name, lib_version: @config.lib_version,
912
922
  gapic_version: ::Google::Cloud::Retail::V2::VERSION
923
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
913
924
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
914
925
 
915
926
  header_params = {}
@@ -26,6 +26,9 @@ module Google
26
26
  module ModelService
27
27
  # Service that implements Longrunning Operations API.
28
28
  class Operations
29
+ # @private
30
+ API_VERSION = ""
31
+
29
32
  # @private
30
33
  DEFAULT_ENDPOINT_TEMPLATE = "retail.$UNIVERSE_DOMAIN$"
31
34
 
@@ -191,10 +194,11 @@ module Google
191
194
  # Customize the options with defaults
192
195
  metadata = @config.rpcs.list_operations.metadata.to_h
193
196
 
194
- # Set x-goog-api-client and x-goog-user-project headers
197
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
195
198
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
196
199
  lib_name: @config.lib_name, lib_version: @config.lib_version,
197
200
  gapic_version: ::Google::Cloud::Retail::V2::VERSION
201
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
198
202
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
199
203
 
200
204
  header_params = {}
@@ -287,10 +291,11 @@ module Google
287
291
  # Customize the options with defaults
288
292
  metadata = @config.rpcs.get_operation.metadata.to_h
289
293
 
290
- # Set x-goog-api-client and x-goog-user-project headers
294
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
291
295
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
292
296
  lib_name: @config.lib_name, lib_version: @config.lib_version,
293
297
  gapic_version: ::Google::Cloud::Retail::V2::VERSION
298
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
294
299
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
295
300
 
296
301
  header_params = {}
@@ -376,10 +381,11 @@ module Google
376
381
  # Customize the options with defaults
377
382
  metadata = @config.rpcs.delete_operation.metadata.to_h
378
383
 
379
- # Set x-goog-api-client and x-goog-user-project headers
384
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
380
385
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
381
386
  lib_name: @config.lib_name, lib_version: @config.lib_version,
382
387
  gapic_version: ::Google::Cloud::Retail::V2::VERSION
388
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
383
389
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
384
390
 
385
391
  header_params = {}
@@ -470,10 +476,11 @@ module Google
470
476
  # Customize the options with defaults
471
477
  metadata = @config.rpcs.cancel_operation.metadata.to_h
472
478
 
473
- # Set x-goog-api-client and x-goog-user-project headers
479
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
474
480
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
475
481
  lib_name: @config.lib_name, lib_version: @config.lib_version,
476
482
  gapic_version: ::Google::Cloud::Retail::V2::VERSION
483
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
477
484
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
478
485
 
479
486
  header_params = {}
@@ -574,10 +581,11 @@ module Google
574
581
  # Customize the options with defaults
575
582
  metadata = @config.rpcs.wait_operation.metadata.to_h
576
583
 
577
- # Set x-goog-api-client and x-goog-user-project headers
584
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
578
585
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
579
586
  lib_name: @config.lib_name, lib_version: @config.lib_version,
580
587
  gapic_version: ::Google::Cloud::Retail::V2::VERSION
588
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
581
589
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
582
590
 
583
591
  options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
@@ -44,6 +44,9 @@ module Google
44
44
  # * Control their tuning schedule.
45
45
  #
46
46
  class Client
47
+ # @private
48
+ API_VERSION = ""
49
+
47
50
  # @private
48
51
  DEFAULT_ENDPOINT_TEMPLATE = "retail.$UNIVERSE_DOMAIN$"
49
52
 
@@ -266,12 +269,13 @@ module Google
266
269
  # Customize the options with defaults
267
270
  call_metadata = @config.rpcs.create_model.metadata.to_h
268
271
 
269
- # Set x-goog-api-client and x-goog-user-project headers
272
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
270
273
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
271
274
  lib_name: @config.lib_name, lib_version: @config.lib_version,
272
275
  gapic_version: ::Google::Cloud::Retail::V2::VERSION,
273
276
  transports_version_send: [:rest]
274
277
 
278
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
275
279
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
276
280
 
277
281
  options.apply_defaults timeout: @config.rpcs.create_model.timeout,
@@ -347,12 +351,13 @@ module Google
347
351
  # Customize the options with defaults
348
352
  call_metadata = @config.rpcs.get_model.metadata.to_h
349
353
 
350
- # Set x-goog-api-client and x-goog-user-project headers
354
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
351
355
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
352
356
  lib_name: @config.lib_name, lib_version: @config.lib_version,
353
357
  gapic_version: ::Google::Cloud::Retail::V2::VERSION,
354
358
  transports_version_send: [:rest]
355
359
 
360
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
356
361
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
357
362
 
358
363
  options.apply_defaults timeout: @config.rpcs.get_model.timeout,
@@ -427,12 +432,13 @@ module Google
427
432
  # Customize the options with defaults
428
433
  call_metadata = @config.rpcs.pause_model.metadata.to_h
429
434
 
430
- # Set x-goog-api-client and x-goog-user-project headers
435
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
431
436
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
432
437
  lib_name: @config.lib_name, lib_version: @config.lib_version,
433
438
  gapic_version: ::Google::Cloud::Retail::V2::VERSION,
434
439
  transports_version_send: [:rest]
435
440
 
441
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
436
442
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
437
443
 
438
444
  options.apply_defaults timeout: @config.rpcs.pause_model.timeout,
@@ -507,12 +513,13 @@ module Google
507
513
  # Customize the options with defaults
508
514
  call_metadata = @config.rpcs.resume_model.metadata.to_h
509
515
 
510
- # Set x-goog-api-client and x-goog-user-project headers
516
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
511
517
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
512
518
  lib_name: @config.lib_name, lib_version: @config.lib_version,
513
519
  gapic_version: ::Google::Cloud::Retail::V2::VERSION,
514
520
  transports_version_send: [:rest]
515
521
 
522
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
516
523
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
517
524
 
518
525
  options.apply_defaults timeout: @config.rpcs.resume_model.timeout,
@@ -587,12 +594,13 @@ module Google
587
594
  # Customize the options with defaults
588
595
  call_metadata = @config.rpcs.delete_model.metadata.to_h
589
596
 
590
- # Set x-goog-api-client and x-goog-user-project headers
597
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
591
598
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
592
599
  lib_name: @config.lib_name, lib_version: @config.lib_version,
593
600
  gapic_version: ::Google::Cloud::Retail::V2::VERSION,
594
601
  transports_version_send: [:rest]
595
602
 
603
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
596
604
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
597
605
 
598
606
  options.apply_defaults timeout: @config.rpcs.delete_model.timeout,
@@ -677,12 +685,13 @@ module Google
677
685
  # Customize the options with defaults
678
686
  call_metadata = @config.rpcs.list_models.metadata.to_h
679
687
 
680
- # Set x-goog-api-client and x-goog-user-project headers
688
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
681
689
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
682
690
  lib_name: @config.lib_name, lib_version: @config.lib_version,
683
691
  gapic_version: ::Google::Cloud::Retail::V2::VERSION,
684
692
  transports_version_send: [:rest]
685
693
 
694
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
686
695
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
687
696
 
688
697
  options.apply_defaults timeout: @config.rpcs.list_models.timeout,
@@ -762,12 +771,13 @@ module Google
762
771
  # Customize the options with defaults
763
772
  call_metadata = @config.rpcs.update_model.metadata.to_h
764
773
 
765
- # Set x-goog-api-client and x-goog-user-project headers
774
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
766
775
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
767
776
  lib_name: @config.lib_name, lib_version: @config.lib_version,
768
777
  gapic_version: ::Google::Cloud::Retail::V2::VERSION,
769
778
  transports_version_send: [:rest]
770
779
 
780
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
771
781
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
772
782
 
773
783
  options.apply_defaults timeout: @config.rpcs.update_model.timeout,
@@ -849,12 +859,13 @@ module Google
849
859
  # Customize the options with defaults
850
860
  call_metadata = @config.rpcs.tune_model.metadata.to_h
851
861
 
852
- # Set x-goog-api-client and x-goog-user-project headers
862
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
853
863
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
854
864
  lib_name: @config.lib_name, lib_version: @config.lib_version,
855
865
  gapic_version: ::Google::Cloud::Retail::V2::VERSION,
856
866
  transports_version_send: [:rest]
857
867
 
868
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
858
869
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
859
870
 
860
871
  options.apply_defaults timeout: @config.rpcs.tune_model.timeout,
@@ -26,6 +26,9 @@ module Google
26
26
  module Rest
27
27
  # Service that implements Longrunning Operations API.
28
28
  class Operations
29
+ # @private
30
+ API_VERSION = ""
31
+
29
32
  # @private
30
33
  DEFAULT_ENDPOINT_TEMPLATE = "retail.$UNIVERSE_DOMAIN$"
31
34
 
@@ -181,12 +184,13 @@ module Google
181
184
  # Customize the options with defaults
182
185
  call_metadata = @config.rpcs.list_operations.metadata.to_h
183
186
 
184
- # Set x-goog-api-client and x-goog-user-project headers
187
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
185
188
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
186
189
  lib_name: @config.lib_name, lib_version: @config.lib_version,
187
190
  gapic_version: ::Google::Cloud::Retail::V2::VERSION,
188
191
  transports_version_send: [:rest]
189
192
 
193
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
190
194
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
191
195
 
192
196
  options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
@@ -269,12 +273,13 @@ module Google
269
273
  # Customize the options with defaults
270
274
  call_metadata = @config.rpcs.get_operation.metadata.to_h
271
275
 
272
- # Set x-goog-api-client and x-goog-user-project headers
276
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
273
277
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
274
278
  lib_name: @config.lib_name, lib_version: @config.lib_version,
275
279
  gapic_version: ::Google::Cloud::Retail::V2::VERSION,
276
280
  transports_version_send: [:rest]
277
281
 
282
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
278
283
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
279
284
 
280
285
  options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
@@ -351,12 +356,13 @@ module Google
351
356
  # Customize the options with defaults
352
357
  call_metadata = @config.rpcs.delete_operation.metadata.to_h
353
358
 
354
- # Set x-goog-api-client and x-goog-user-project headers
359
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
355
360
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
356
361
  lib_name: @config.lib_name, lib_version: @config.lib_version,
357
362
  gapic_version: ::Google::Cloud::Retail::V2::VERSION,
358
363
  transports_version_send: [:rest]
359
364
 
365
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
360
366
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
361
367
 
362
368
  options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
@@ -438,12 +444,13 @@ module Google
438
444
  # Customize the options with defaults
439
445
  call_metadata = @config.rpcs.cancel_operation.metadata.to_h
440
446
 
441
- # Set x-goog-api-client and x-goog-user-project headers
447
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
442
448
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
443
449
  lib_name: @config.lib_name, lib_version: @config.lib_version,
444
450
  gapic_version: ::Google::Cloud::Retail::V2::VERSION,
445
451
  transports_version_send: [:rest]
446
452
 
453
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
447
454
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
448
455
 
449
456
  options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
@@ -31,6 +31,9 @@ module Google
31
31
  # Service for making recommendation prediction.
32
32
  #
33
33
  class Client
34
+ # @private
35
+ API_VERSION = ""
36
+
34
37
  # @private
35
38
  DEFAULT_ENDPOINT_TEMPLATE = "retail.$UNIVERSE_DOMAIN$"
36
39
 
@@ -361,10 +364,11 @@ module Google
361
364
  # Customize the options with defaults
362
365
  metadata = @config.rpcs.predict.metadata.to_h
363
366
 
364
- # Set x-goog-api-client and x-goog-user-project headers
367
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
365
368
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
366
369
  lib_name: @config.lib_name, lib_version: @config.lib_version,
367
370
  gapic_version: ::Google::Cloud::Retail::V2::VERSION
371
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
368
372
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
369
373
 
370
374
  header_params = {}
@@ -33,6 +33,9 @@ module Google
33
33
  # Service for making recommendation prediction.
34
34
  #
35
35
  class Client
36
+ # @private
37
+ API_VERSION = ""
38
+
36
39
  # @private
37
40
  DEFAULT_ENDPOINT_TEMPLATE = "retail.$UNIVERSE_DOMAIN$"
38
41
 
@@ -353,12 +356,13 @@ module Google
353
356
  # Customize the options with defaults
354
357
  call_metadata = @config.rpcs.predict.metadata.to_h
355
358
 
356
- # Set x-goog-api-client and x-goog-user-project headers
359
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
357
360
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
358
361
  lib_name: @config.lib_name, lib_version: @config.lib_version,
359
362
  gapic_version: ::Google::Cloud::Retail::V2::VERSION,
360
363
  transports_version_send: [:rest]
361
364
 
365
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
362
366
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
363
367
 
364
368
  options.apply_defaults timeout: @config.rpcs.predict.timeout,