google-cloud-discovery_engine-v1beta 0.10.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (140) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/discovery_engine/v1beta/completion_service/client.rb +9 -3
  3. data/lib/google/cloud/discovery_engine/v1beta/completion_service/operations.rb +13 -5
  4. data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/client.rb +9 -3
  5. data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/operations.rb +21 -6
  6. data/lib/google/cloud/discovery_engine/v1beta/control_service/client.rb +875 -0
  7. data/lib/google/cloud/discovery_engine/v1beta/control_service/credentials.rb +47 -0
  8. data/lib/google/cloud/discovery_engine/v1beta/control_service/paths.rb +167 -0
  9. data/lib/google/cloud/discovery_engine/v1beta/control_service/rest/client.rb +814 -0
  10. data/lib/google/cloud/discovery_engine/v1beta/control_service/rest/service_stub.rb +440 -0
  11. data/lib/google/cloud/discovery_engine/v1beta/control_service/rest.rb +55 -0
  12. data/lib/google/cloud/discovery_engine/v1beta/control_service.rb +58 -0
  13. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/client.rb +764 -6
  14. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/paths.rb +199 -0
  15. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/client.rb +715 -6
  16. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/service_stub.rb +520 -0
  17. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/client.rb +15 -7
  18. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/operations.rb +13 -5
  19. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest/client.rb +15 -7
  20. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest/operations.rb +21 -6
  21. data/lib/google/cloud/discovery_engine/v1beta/document_service/client.rb +71 -37
  22. data/lib/google/cloud/discovery_engine/v1beta/document_service/operations.rb +13 -5
  23. data/lib/google/cloud/discovery_engine/v1beta/document_service/paths.rb +21 -0
  24. data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/client.rb +71 -37
  25. data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/operations.rb +21 -6
  26. data/lib/google/cloud/discovery_engine/v1beta/engine_service/client.rb +312 -5
  27. data/lib/google/cloud/discovery_engine/v1beta/engine_service/operations.rb +13 -5
  28. data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/client.rb +291 -5
  29. data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/operations.rb +21 -6
  30. data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/service_stub.rb +180 -0
  31. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/client.rb +471 -0
  32. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/credentials.rb +47 -0
  33. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/paths.rb +52 -0
  34. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest/client.rb +438 -0
  35. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest/service_stub.rb +129 -0
  36. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest.rb +52 -0
  37. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service.rb +55 -0
  38. data/lib/google/cloud/discovery_engine/v1beta/project_service/client.rb +485 -0
  39. data/lib/google/cloud/discovery_engine/v1beta/project_service/credentials.rb +47 -0
  40. data/lib/google/cloud/discovery_engine/v1beta/project_service/operations.rb +809 -0
  41. data/lib/google/cloud/discovery_engine/v1beta/project_service/paths.rb +47 -0
  42. data/lib/google/cloud/discovery_engine/v1beta/project_service/rest/client.rb +452 -0
  43. data/lib/google/cloud/discovery_engine/v1beta/project_service/rest/operations.rb +1092 -0
  44. data/lib/google/cloud/discovery_engine/v1beta/project_service/rest/service_stub.rb +129 -0
  45. data/lib/google/cloud/discovery_engine/v1beta/project_service/rest.rb +54 -0
  46. data/lib/google/cloud/discovery_engine/v1beta/project_service.rb +57 -0
  47. data/lib/google/cloud/discovery_engine/v1beta/rank_service/client.rb +481 -0
  48. data/lib/google/cloud/discovery_engine/v1beta/rank_service/credentials.rb +47 -0
  49. data/lib/google/cloud/discovery_engine/v1beta/rank_service/paths.rb +52 -0
  50. data/lib/google/cloud/discovery_engine/v1beta/rank_service/rest/client.rb +448 -0
  51. data/lib/google/cloud/discovery_engine/v1beta/rank_service/rest/service_stub.rb +129 -0
  52. data/lib/google/cloud/discovery_engine/v1beta/rank_service/rest.rb +52 -0
  53. data/lib/google/cloud/discovery_engine/v1beta/rank_service.rb +55 -0
  54. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/client.rb +24 -19
  55. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/paths.rb +66 -0
  56. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/rest/client.rb +24 -19
  57. data/lib/google/cloud/discovery_engine/v1beta/rest.rb +4 -0
  58. data/lib/google/cloud/discovery_engine/v1beta/schema_service/client.rb +18 -10
  59. data/lib/google/cloud/discovery_engine/v1beta/schema_service/operations.rb +13 -5
  60. data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/client.rb +18 -10
  61. data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/operations.rb +21 -6
  62. data/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb +26 -14
  63. data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb +26 -14
  64. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/client.rb +104 -2
  65. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/operations.rb +13 -5
  66. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/client.rb +97 -2
  67. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/operations.rb +21 -6
  68. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/service_stub.rb +59 -0
  69. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/client.rb +9 -3
  70. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/rest/client.rb +9 -3
  71. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/client.rb +27 -12
  72. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/operations.rb +13 -5
  73. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/client.rb +27 -12
  74. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/operations.rb +21 -6
  75. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/client.rb +23 -6
  76. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/operations.rb +13 -5
  77. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/paths.rb +21 -0
  78. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/client.rb +23 -6
  79. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/operations.rb +21 -6
  80. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/service_stub.rb +8 -0
  81. data/lib/google/cloud/discovery_engine/v1beta/version.rb +1 -1
  82. data/lib/google/cloud/discovery_engine/v1beta.rb +4 -0
  83. data/lib/google/cloud/discoveryengine/v1beta/answer_pb.rb +69 -0
  84. data/lib/google/cloud/discoveryengine/v1beta/common_pb.rb +2 -1
  85. data/lib/google/cloud/discoveryengine/v1beta/control_pb.rb +55 -0
  86. data/lib/google/cloud/discoveryengine/v1beta/control_service_pb.rb +57 -0
  87. data/lib/google/cloud/discoveryengine/v1beta/control_service_services_pb.rb +69 -0
  88. data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_pb.rb +32 -1
  89. data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_services_pb.rb +25 -0
  90. data/lib/google/cloud/discoveryengine/v1beta/custom_tuning_model_pb.rb +48 -0
  91. data/lib/google/cloud/discoveryengine/v1beta/document_processing_config_pb.rb +1 -1
  92. data/lib/google/cloud/discoveryengine/v1beta/document_service_pb.rb +3 -1
  93. data/lib/google/cloud/discoveryengine/v1beta/document_service_services_pb.rb +1 -1
  94. data/lib/google/cloud/discoveryengine/v1beta/engine_pb.rb +1 -1
  95. data/lib/google/cloud/discoveryengine/v1beta/engine_service_pb.rb +6 -1
  96. data/lib/google/cloud/discoveryengine/v1beta/engine_service_services_pb.rb +12 -0
  97. data/lib/google/cloud/discoveryengine/v1beta/grounded_generation_service_pb.rb +52 -0
  98. data/lib/google/cloud/discoveryengine/v1beta/grounded_generation_service_services_pb.rb +45 -0
  99. data/lib/google/cloud/discoveryengine/v1beta/grounding_pb.rb +46 -0
  100. data/lib/google/cloud/discoveryengine/v1beta/import_config_pb.rb +13 -1
  101. data/lib/google/cloud/discoveryengine/v1beta/project_pb.rb +49 -0
  102. data/lib/google/cloud/discoveryengine/v1beta/project_service_pb.rb +50 -0
  103. data/lib/google/cloud/discoveryengine/v1beta/project_service_services_pb.rb +51 -0
  104. data/lib/google/cloud/discoveryengine/v1beta/rank_service_pb.rb +49 -0
  105. data/lib/google/cloud/discoveryengine/v1beta/rank_service_services_pb.rb +45 -0
  106. data/lib/google/cloud/discoveryengine/v1beta/search_service_pb.rb +7 -1
  107. data/lib/google/cloud/discoveryengine/v1beta/search_tuning_service_pb.rb +5 -1
  108. data/lib/google/cloud/discoveryengine/v1beta/search_tuning_service_services_pb.rb +2 -0
  109. data/lib/google/cloud/discoveryengine/v1beta/session_pb.rb +50 -0
  110. data/lib/google/cloud/discoveryengine/v1beta/site_search_engine_pb.rb +1 -1
  111. data/lib/google/cloud/discoveryengine/v1beta/user_event_pb.rb +1 -1
  112. data/lib/google/cloud/discoveryengine/v1beta/user_event_service_pb.rb +1 -1
  113. data/lib/google/cloud/discoveryengine/v1beta/user_event_service_services_pb.rb +1 -1
  114. data/proto_docs/google/cloud/discoveryengine/v1beta/answer.rb +362 -0
  115. data/proto_docs/google/cloud/discoveryengine/v1beta/common.rb +25 -1
  116. data/proto_docs/google/cloud/discoveryengine/v1beta/control.rb +209 -0
  117. data/proto_docs/google/cloud/discoveryengine/v1beta/control_service.rb +126 -0
  118. data/proto_docs/google/cloud/discoveryengine/v1beta/conversation.rb +2 -2
  119. data/proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb +491 -0
  120. data/proto_docs/google/cloud/discoveryengine/v1beta/custom_tuning_model.rb +75 -0
  121. data/proto_docs/google/cloud/discoveryengine/v1beta/data_store_service.rb +2 -2
  122. data/proto_docs/google/cloud/discoveryengine/v1beta/document_processing_config.rb +4 -5
  123. data/proto_docs/google/cloud/discoveryengine/v1beta/document_service.rb +9 -6
  124. data/proto_docs/google/cloud/discoveryengine/v1beta/engine.rb +5 -5
  125. data/proto_docs/google/cloud/discoveryengine/v1beta/engine_service.rb +51 -0
  126. data/proto_docs/google/cloud/discoveryengine/v1beta/grounded_generation_service.rb +144 -0
  127. data/proto_docs/google/cloud/discoveryengine/v1beta/grounding.rb +79 -0
  128. data/proto_docs/google/cloud/discoveryengine/v1beta/import_config.rb +312 -26
  129. data/proto_docs/google/cloud/discoveryengine/v1beta/project.rb +106 -0
  130. data/proto_docs/google/cloud/discoveryengine/v1beta/project_service.rb +57 -0
  131. data/proto_docs/google/cloud/discoveryengine/v1beta/rank_service.rb +127 -0
  132. data/proto_docs/google/cloud/discoveryengine/v1beta/recommendation_service.rb +20 -19
  133. data/proto_docs/google/cloud/discoveryengine/v1beta/schema_service.rb +5 -5
  134. data/proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb +181 -43
  135. data/proto_docs/google/cloud/discoveryengine/v1beta/search_tuning_service.rb +47 -1
  136. data/proto_docs/google/cloud/discoveryengine/v1beta/session.rb +88 -0
  137. data/proto_docs/google/cloud/discoveryengine/v1beta/site_search_engine.rb +3 -0
  138. data/proto_docs/google/cloud/discoveryengine/v1beta/user_event.rb +25 -4
  139. data/proto_docs/google/cloud/discoveryengine/v1beta/user_event_service.rb +13 -1
  140. metadata +56 -2
@@ -33,6 +33,9 @@ module Google
33
33
  # Service for managing site search related resources.
34
34
  #
35
35
  class Client
36
+ # @private
37
+ API_VERSION = ""
38
+
36
39
  # @private
37
40
  DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$"
38
41
 
@@ -244,12 +247,13 @@ module Google
244
247
  # Customize the options with defaults
245
248
  call_metadata = @config.rpcs.get_site_search_engine.metadata.to_h
246
249
 
247
- # Set x-goog-api-client and x-goog-user-project headers
250
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
248
251
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
249
252
  lib_name: @config.lib_name, lib_version: @config.lib_version,
250
253
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
251
254
  transports_version_send: [:rest]
252
255
 
256
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
253
257
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
254
258
 
255
259
  options.apply_defaults timeout: @config.rpcs.get_site_search_engine.timeout,
@@ -334,12 +338,13 @@ module Google
334
338
  # Customize the options with defaults
335
339
  call_metadata = @config.rpcs.create_target_site.metadata.to_h
336
340
 
337
- # Set x-goog-api-client and x-goog-user-project headers
341
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
338
342
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
339
343
  lib_name: @config.lib_name, lib_version: @config.lib_version,
340
344
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
341
345
  transports_version_send: [:rest]
342
346
 
347
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
343
348
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
344
349
 
345
350
  options.apply_defaults timeout: @config.rpcs.create_target_site.timeout,
@@ -427,12 +432,13 @@ module Google
427
432
  # Customize the options with defaults
428
433
  call_metadata = @config.rpcs.batch_create_target_sites.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::DiscoveryEngine::V1beta::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.batch_create_target_sites.timeout,
@@ -516,12 +522,13 @@ module Google
516
522
  # Customize the options with defaults
517
523
  call_metadata = @config.rpcs.get_target_site.metadata.to_h
518
524
 
519
- # Set x-goog-api-client and x-goog-user-project headers
525
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
520
526
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
521
527
  lib_name: @config.lib_name, lib_version: @config.lib_version,
522
528
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
523
529
  transports_version_send: [:rest]
524
530
 
531
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
525
532
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
526
533
 
527
534
  options.apply_defaults timeout: @config.rpcs.get_target_site.timeout,
@@ -607,12 +614,13 @@ module Google
607
614
  # Customize the options with defaults
608
615
  call_metadata = @config.rpcs.update_target_site.metadata.to_h
609
616
 
610
- # Set x-goog-api-client and x-goog-user-project headers
617
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
611
618
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
612
619
  lib_name: @config.lib_name, lib_version: @config.lib_version,
613
620
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
614
621
  transports_version_send: [:rest]
615
622
 
623
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
616
624
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
617
625
 
618
626
  options.apply_defaults timeout: @config.rpcs.update_target_site.timeout,
@@ -703,12 +711,13 @@ module Google
703
711
  # Customize the options with defaults
704
712
  call_metadata = @config.rpcs.delete_target_site.metadata.to_h
705
713
 
706
- # Set x-goog-api-client and x-goog-user-project headers
714
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
707
715
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
708
716
  lib_name: @config.lib_name, lib_version: @config.lib_version,
709
717
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
710
718
  transports_version_send: [:rest]
711
719
 
720
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
712
721
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
713
722
 
714
723
  options.apply_defaults timeout: @config.rpcs.delete_target_site.timeout,
@@ -805,12 +814,13 @@ module Google
805
814
  # Customize the options with defaults
806
815
  call_metadata = @config.rpcs.list_target_sites.metadata.to_h
807
816
 
808
- # Set x-goog-api-client and x-goog-user-project headers
817
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
809
818
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
810
819
  lib_name: @config.lib_name, lib_version: @config.lib_version,
811
820
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
812
821
  transports_version_send: [:rest]
813
822
 
823
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
814
824
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
815
825
 
816
826
  options.apply_defaults timeout: @config.rpcs.list_target_sites.timeout,
@@ -894,12 +904,13 @@ module Google
894
904
  # Customize the options with defaults
895
905
  call_metadata = @config.rpcs.enable_advanced_site_search.metadata.to_h
896
906
 
897
- # Set x-goog-api-client and x-goog-user-project headers
907
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
898
908
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
899
909
  lib_name: @config.lib_name, lib_version: @config.lib_version,
900
910
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
901
911
  transports_version_send: [:rest]
902
912
 
913
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
903
914
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
904
915
 
905
916
  options.apply_defaults timeout: @config.rpcs.enable_advanced_site_search.timeout,
@@ -983,12 +994,13 @@ module Google
983
994
  # Customize the options with defaults
984
995
  call_metadata = @config.rpcs.disable_advanced_site_search.metadata.to_h
985
996
 
986
- # Set x-goog-api-client and x-goog-user-project headers
997
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
987
998
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
988
999
  lib_name: @config.lib_name, lib_version: @config.lib_version,
989
1000
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
990
1001
  transports_version_send: [:rest]
991
1002
 
1003
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
992
1004
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
993
1005
 
994
1006
  options.apply_defaults timeout: @config.rpcs.disable_advanced_site_search.timeout,
@@ -1077,12 +1089,13 @@ module Google
1077
1089
  # Customize the options with defaults
1078
1090
  call_metadata = @config.rpcs.recrawl_uris.metadata.to_h
1079
1091
 
1080
- # Set x-goog-api-client and x-goog-user-project headers
1092
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1081
1093
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1082
1094
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1083
1095
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
1084
1096
  transports_version_send: [:rest]
1085
1097
 
1098
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1086
1099
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1087
1100
 
1088
1101
  options.apply_defaults timeout: @config.rpcs.recrawl_uris.timeout,
@@ -1166,12 +1179,13 @@ module Google
1166
1179
  # Customize the options with defaults
1167
1180
  call_metadata = @config.rpcs.batch_verify_target_sites.metadata.to_h
1168
1181
 
1169
- # Set x-goog-api-client and x-goog-user-project headers
1182
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1170
1183
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1171
1184
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1172
1185
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
1173
1186
  transports_version_send: [:rest]
1174
1187
 
1188
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1175
1189
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1176
1190
 
1177
1191
  options.apply_defaults timeout: @config.rpcs.batch_verify_target_sites.timeout,
@@ -1266,12 +1280,13 @@ module Google
1266
1280
  # Customize the options with defaults
1267
1281
  call_metadata = @config.rpcs.fetch_domain_verification_status.metadata.to_h
1268
1282
 
1269
- # Set x-goog-api-client and x-goog-user-project headers
1283
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1270
1284
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1271
1285
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1272
1286
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
1273
1287
  transports_version_send: [:rest]
1274
1288
 
1289
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1275
1290
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1276
1291
 
1277
1292
  options.apply_defaults timeout: @config.rpcs.fetch_domain_verification_status.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 = "discoveryengine.$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::DiscoveryEngine::V1beta::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::DiscoveryEngine::V1beta::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::DiscoveryEngine::V1beta::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::DiscoveryEngine::V1beta::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,
@@ -1060,10 +1067,18 @@ module Google
1060
1067
  transcoder = Gapic::Rest::GrpcTranscoder.new
1061
1068
  .with_bindings(
1062
1069
  uri_method: :post,
1063
- uri_template: "/v1/{name}:cancel",
1070
+ uri_template: "/v1beta/{name}:cancel",
1064
1071
  body: "*",
1065
1072
  matches: [
1066
- ["name", %r{^operations(?:/.*)?$}, true]
1073
+ ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+/?$}, false]
1074
+ ]
1075
+ )
1076
+ .with_bindings(
1077
+ uri_method: :post,
1078
+ uri_template: "/v1beta/{name}:cancel",
1079
+ body: "*",
1080
+ matches: [
1081
+ ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+/?$}, false]
1067
1082
  ]
1068
1083
  )
1069
1084
  transcoder.transcode request_pb
@@ -31,6 +31,9 @@ module Google
31
31
  # Service for ingesting end user actions on a website to Discovery Engine API.
32
32
  #
33
33
  class Client
34
+ # @private
35
+ API_VERSION = ""
36
+
34
37
  # @private
35
38
  DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$"
36
39
 
@@ -212,16 +215,27 @@ module Google
212
215
  # @param options [::Gapic::CallOptions, ::Hash]
213
216
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
214
217
  #
215
- # @overload write_user_event(parent: nil, user_event: nil)
218
+ # @overload write_user_event(parent: nil, user_event: nil, write_async: nil)
216
219
  # Pass arguments to `write_user_event` via keyword arguments. Note that at
217
220
  # least one keyword argument is required. To specify no parameters, or to keep all
218
221
  # the default parameter values, pass an empty Hash as a request object (see above).
219
222
  #
220
223
  # @param parent [::String]
221
- # Required. The parent DataStore resource name, such as
224
+ # Required. The parent resource name.
225
+ # If the write user event action is applied in
226
+ # {::Google::Cloud::DiscoveryEngine::V1beta::DataStore DataStore} level, the
227
+ # format is:
222
228
  # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
229
+ # If the write user event action is applied in [Location][] level, for
230
+ # example, the event with
231
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Document Document} across multiple
232
+ # {::Google::Cloud::DiscoveryEngine::V1beta::DataStore DataStore}, the format is:
233
+ # `projects/{project}/locations/{location}`.
223
234
  # @param user_event [::Google::Cloud::DiscoveryEngine::V1beta::UserEvent, ::Hash]
224
235
  # Required. User event to write.
236
+ # @param write_async [::Boolean]
237
+ # If set to true, the user event is written asynchronously after
238
+ # validation, and the API responds without waiting for the write.
225
239
  #
226
240
  # @yield [response, operation] Access the result along with the RPC operation
227
241
  # @yieldparam response [::Google::Cloud::DiscoveryEngine::V1beta::UserEvent]
@@ -257,10 +271,11 @@ module Google
257
271
  # Customize the options with defaults
258
272
  metadata = @config.rpcs.write_user_event.metadata.to_h
259
273
 
260
- # Set x-goog-api-client and x-goog-user-project headers
274
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
261
275
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
262
276
  lib_name: @config.lib_name, lib_version: @config.lib_version,
263
277
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
278
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
264
279
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
265
280
 
266
281
  header_params = {}
@@ -359,10 +374,11 @@ module Google
359
374
  # Customize the options with defaults
360
375
  metadata = @config.rpcs.collect_user_event.metadata.to_h
361
376
 
362
- # Set x-goog-api-client and x-goog-user-project headers
377
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
363
378
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
364
379
  lib_name: @config.lib_name, lib_version: @config.lib_version,
365
380
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
381
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
366
382
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
367
383
 
368
384
  header_params = {}
@@ -390,7 +406,7 @@ module Google
390
406
  end
391
407
 
392
408
  ##
393
- # Bulk import of User events. Request processing might be
409
+ # Bulk import of user events. Request processing might be
394
410
  # synchronous. Events that already exist are skipped.
395
411
  # Use this method for backfilling historical user events.
396
412
  #
@@ -467,10 +483,11 @@ module Google
467
483
  # Customize the options with defaults
468
484
  metadata = @config.rpcs.import_user_events.metadata.to_h
469
485
 
470
- # Set x-goog-api-client and x-goog-user-project headers
486
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
471
487
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
472
488
  lib_name: @config.lib_name, lib_version: @config.lib_version,
473
489
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
490
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
474
491
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
475
492
 
476
493
  header_params = {}
@@ -26,6 +26,9 @@ module Google
26
26
  module UserEventService
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 = "discoveryengine.$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::DiscoveryEngine::V1beta::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::DiscoveryEngine::V1beta::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::DiscoveryEngine::V1beta::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::DiscoveryEngine::V1beta::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::DiscoveryEngine::V1beta::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,
@@ -122,6 +122,27 @@ module Google
122
122
  resource.call(**args)
123
123
  end
124
124
 
125
+ ##
126
+ # Create a fully-qualified Engine resource string.
127
+ #
128
+ # The resource will be in the following format:
129
+ #
130
+ # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
131
+ #
132
+ # @param project [String]
133
+ # @param location [String]
134
+ # @param collection [String]
135
+ # @param engine [String]
136
+ #
137
+ # @return [::String]
138
+ def engine_path project:, location:, collection:, engine:
139
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
140
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
141
+ raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/"
142
+
143
+ "projects/#{project}/locations/#{location}/collections/#{collection}/engines/#{engine}"
144
+ end
145
+
125
146
  extend self
126
147
  end
127
148
  end
@@ -33,6 +33,9 @@ module Google
33
33
  # Service for ingesting end user actions on a website to Discovery Engine API.
34
34
  #
35
35
  class Client
36
+ # @private
37
+ API_VERSION = ""
38
+
36
39
  # @private
37
40
  DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$"
38
41
 
@@ -205,16 +208,27 @@ module Google
205
208
  # @param options [::Gapic::CallOptions, ::Hash]
206
209
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
207
210
  #
208
- # @overload write_user_event(parent: nil, user_event: nil)
211
+ # @overload write_user_event(parent: nil, user_event: nil, write_async: nil)
209
212
  # Pass arguments to `write_user_event` via keyword arguments. Note that at
210
213
  # least one keyword argument is required. To specify no parameters, or to keep all
211
214
  # the default parameter values, pass an empty Hash as a request object (see above).
212
215
  #
213
216
  # @param parent [::String]
214
- # Required. The parent DataStore resource name, such as
217
+ # Required. The parent resource name.
218
+ # If the write user event action is applied in
219
+ # {::Google::Cloud::DiscoveryEngine::V1beta::DataStore DataStore} level, the
220
+ # format is:
215
221
  # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
222
+ # If the write user event action is applied in [Location][] level, for
223
+ # example, the event with
224
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Document Document} across multiple
225
+ # {::Google::Cloud::DiscoveryEngine::V1beta::DataStore DataStore}, the format is:
226
+ # `projects/{project}/locations/{location}`.
216
227
  # @param user_event [::Google::Cloud::DiscoveryEngine::V1beta::UserEvent, ::Hash]
217
228
  # Required. User event to write.
229
+ # @param write_async [::Boolean]
230
+ # If set to true, the user event is written asynchronously after
231
+ # validation, and the API responds without waiting for the write.
218
232
  # @yield [result, operation] Access the result along with the TransportOperation object
219
233
  # @yieldparam result [::Google::Cloud::DiscoveryEngine::V1beta::UserEvent]
220
234
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -249,12 +263,13 @@ module Google
249
263
  # Customize the options with defaults
250
264
  call_metadata = @config.rpcs.write_user_event.metadata.to_h
251
265
 
252
- # Set x-goog-api-client and x-goog-user-project headers
266
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
253
267
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
254
268
  lib_name: @config.lib_name, lib_version: @config.lib_version,
255
269
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
256
270
  transports_version_send: [:rest]
257
271
 
272
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
258
273
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
259
274
 
260
275
  options.apply_defaults timeout: @config.rpcs.write_user_event.timeout,
@@ -344,12 +359,13 @@ module Google
344
359
  # Customize the options with defaults
345
360
  call_metadata = @config.rpcs.collect_user_event.metadata.to_h
346
361
 
347
- # Set x-goog-api-client and x-goog-user-project headers
362
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
348
363
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
349
364
  lib_name: @config.lib_name, lib_version: @config.lib_version,
350
365
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
351
366
  transports_version_send: [:rest]
352
367
 
368
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
353
369
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
354
370
 
355
371
  options.apply_defaults timeout: @config.rpcs.collect_user_event.timeout,
@@ -369,7 +385,7 @@ module Google
369
385
  end
370
386
 
371
387
  ##
372
- # Bulk import of User events. Request processing might be
388
+ # Bulk import of user events. Request processing might be
373
389
  # synchronous. Events that already exist are skipped.
374
390
  # Use this method for backfilling historical user events.
375
391
  #
@@ -445,12 +461,13 @@ module Google
445
461
  # Customize the options with defaults
446
462
  call_metadata = @config.rpcs.import_user_events.metadata.to_h
447
463
 
448
- # Set x-goog-api-client and x-goog-user-project headers
464
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
449
465
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
450
466
  lib_name: @config.lib_name, lib_version: @config.lib_version,
451
467
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
452
468
  transports_version_send: [:rest]
453
469
 
470
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
454
471
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
455
472
 
456
473
  options.apply_defaults timeout: @config.rpcs.import_user_events.timeout,