google-cloud-discovery_engine-v1 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/discovery_engine/v1/completion_service/client.rb +9 -3
  3. data/lib/google/cloud/discovery_engine/v1/completion_service/operations.rb +13 -5
  4. data/lib/google/cloud/discovery_engine/v1/completion_service/rest/client.rb +9 -3
  5. data/lib/google/cloud/discovery_engine/v1/completion_service/rest/operations.rb +28 -5
  6. data/lib/google/cloud/discovery_engine/v1/control_service/client.rb +875 -0
  7. data/lib/google/cloud/discovery_engine/v1/control_service/credentials.rb +47 -0
  8. data/lib/google/cloud/discovery_engine/v1/control_service/paths.rb +167 -0
  9. data/lib/google/cloud/discovery_engine/v1/control_service/rest/client.rb +814 -0
  10. data/lib/google/cloud/discovery_engine/v1/control_service/rest/service_stub.rb +440 -0
  11. data/lib/google/cloud/discovery_engine/v1/control_service/rest.rb +55 -0
  12. data/lib/google/cloud/discovery_engine/v1/control_service.rb +58 -0
  13. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb +764 -6
  14. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/paths.rb +199 -0
  15. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb +715 -6
  16. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/service_stub.rb +520 -0
  17. data/lib/google/cloud/discovery_engine/v1/data_store_service/client.rb +15 -7
  18. data/lib/google/cloud/discovery_engine/v1/data_store_service/operations.rb +13 -5
  19. data/lib/google/cloud/discovery_engine/v1/data_store_service/paths.rb +45 -0
  20. data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/client.rb +15 -7
  21. data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/operations.rb +28 -5
  22. data/lib/google/cloud/discovery_engine/v1/document_service/client.rb +23 -13
  23. data/lib/google/cloud/discovery_engine/v1/document_service/operations.rb +13 -5
  24. data/lib/google/cloud/discovery_engine/v1/document_service/rest/client.rb +23 -13
  25. data/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb +28 -5
  26. data/lib/google/cloud/discovery_engine/v1/engine_service/client.rb +13 -5
  27. data/lib/google/cloud/discovery_engine/v1/engine_service/operations.rb +13 -5
  28. data/lib/google/cloud/discovery_engine/v1/engine_service/rest/client.rb +13 -5
  29. data/lib/google/cloud/discovery_engine/v1/engine_service/rest/operations.rb +28 -5
  30. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/client.rb +471 -0
  31. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/credentials.rb +47 -0
  32. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/paths.rb +52 -0
  33. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/client.rb +438 -0
  34. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/service_stub.rb +129 -0
  35. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest.rb +52 -0
  36. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service.rb +55 -0
  37. data/lib/google/cloud/discovery_engine/v1/project_service/client.rb +485 -0
  38. data/lib/google/cloud/discovery_engine/v1/project_service/credentials.rb +47 -0
  39. data/lib/google/cloud/discovery_engine/v1/project_service/operations.rb +809 -0
  40. data/lib/google/cloud/discovery_engine/v1/project_service/paths.rb +47 -0
  41. data/lib/google/cloud/discovery_engine/v1/project_service/rest/client.rb +452 -0
  42. data/lib/google/cloud/discovery_engine/v1/project_service/rest/operations.rb +1114 -0
  43. data/lib/google/cloud/discovery_engine/v1/project_service/rest/service_stub.rb +129 -0
  44. data/lib/google/cloud/discovery_engine/v1/project_service/rest.rb +54 -0
  45. data/lib/google/cloud/discovery_engine/v1/project_service.rb +57 -0
  46. data/lib/google/cloud/discovery_engine/v1/rank_service/client.rb +481 -0
  47. data/lib/google/cloud/discovery_engine/v1/rank_service/credentials.rb +47 -0
  48. data/lib/google/cloud/discovery_engine/v1/rank_service/paths.rb +52 -0
  49. data/lib/google/cloud/discovery_engine/v1/rank_service/rest/client.rb +448 -0
  50. data/lib/google/cloud/discovery_engine/v1/rank_service/rest/service_stub.rb +129 -0
  51. data/lib/google/cloud/discovery_engine/v1/rank_service/rest.rb +52 -0
  52. data/lib/google/cloud/discovery_engine/v1/rank_service.rb +55 -0
  53. data/lib/google/cloud/discovery_engine/v1/recommendation_service/client.rb +24 -19
  54. data/lib/google/cloud/discovery_engine/v1/recommendation_service/paths.rb +66 -0
  55. data/lib/google/cloud/discovery_engine/v1/recommendation_service/rest/client.rb +24 -19
  56. data/lib/google/cloud/discovery_engine/v1/rest.rb +4 -0
  57. data/lib/google/cloud/discovery_engine/v1/schema_service/client.rb +18 -10
  58. data/lib/google/cloud/discovery_engine/v1/schema_service/operations.rb +13 -5
  59. data/lib/google/cloud/discovery_engine/v1/schema_service/rest/client.rb +18 -10
  60. data/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb +28 -5
  61. data/lib/google/cloud/discovery_engine/v1/search_service/client.rb +15 -8
  62. data/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +15 -8
  63. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/client.rb +27 -12
  64. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/operations.rb +13 -5
  65. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/client.rb +27 -12
  66. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/operations.rb +28 -5
  67. data/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb +23 -6
  68. data/lib/google/cloud/discovery_engine/v1/user_event_service/operations.rb +13 -5
  69. data/lib/google/cloud/discovery_engine/v1/user_event_service/paths.rb +21 -0
  70. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb +23 -6
  71. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb +28 -5
  72. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/service_stub.rb +8 -0
  73. data/lib/google/cloud/discovery_engine/v1/version.rb +1 -1
  74. data/lib/google/cloud/discovery_engine/v1.rb +4 -0
  75. data/lib/google/cloud/discoveryengine/v1/answer_pb.rb +69 -0
  76. data/lib/google/cloud/discoveryengine/v1/common_pb.rb +2 -1
  77. data/lib/google/cloud/discoveryengine/v1/control_pb.rb +55 -0
  78. data/lib/google/cloud/discoveryengine/v1/control_service_pb.rb +57 -0
  79. data/lib/google/cloud/discoveryengine/v1/control_service_services_pb.rb +69 -0
  80. data/lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb +32 -1
  81. data/lib/google/cloud/discoveryengine/v1/conversational_search_service_services_pb.rb +25 -0
  82. data/lib/google/cloud/discoveryengine/v1/data_store_pb.rb +3 -1
  83. data/lib/google/cloud/discoveryengine/v1/document_processing_config_pb.rb +48 -0
  84. data/lib/google/cloud/discoveryengine/v1/document_service_services_pb.rb +1 -1
  85. data/lib/google/cloud/discoveryengine/v1/engine_pb.rb +1 -1
  86. data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_pb.rb +52 -0
  87. data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_services_pb.rb +45 -0
  88. data/lib/google/cloud/discoveryengine/v1/grounding_pb.rb +46 -0
  89. data/lib/google/cloud/discoveryengine/v1/project_pb.rb +49 -0
  90. data/lib/google/cloud/discoveryengine/v1/project_service_pb.rb +50 -0
  91. data/lib/google/cloud/discoveryengine/v1/project_service_services_pb.rb +51 -0
  92. data/lib/google/cloud/discoveryengine/v1/rank_service_pb.rb +49 -0
  93. data/lib/google/cloud/discoveryengine/v1/rank_service_services_pb.rb +45 -0
  94. data/lib/google/cloud/discoveryengine/v1/session_pb.rb +50 -0
  95. data/lib/google/cloud/discoveryengine/v1/site_search_engine_pb.rb +1 -1
  96. data/lib/google/cloud/discoveryengine/v1/user_event_pb.rb +1 -1
  97. data/lib/google/cloud/discoveryengine/v1/user_event_service_pb.rb +1 -1
  98. data/lib/google/cloud/discoveryengine/v1/user_event_service_services_pb.rb +1 -1
  99. data/proto_docs/google/cloud/discoveryengine/v1/answer.rb +362 -0
  100. data/proto_docs/google/cloud/discoveryengine/v1/common.rb +16 -0
  101. data/proto_docs/google/cloud/discoveryengine/v1/control.rb +207 -0
  102. data/proto_docs/google/cloud/discoveryengine/v1/control_service.rb +126 -0
  103. data/proto_docs/google/cloud/discoveryengine/v1/conversation.rb +2 -2
  104. data/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb +485 -0
  105. data/proto_docs/google/cloud/discoveryengine/v1/data_store.rb +3 -0
  106. data/proto_docs/google/cloud/discoveryengine/v1/data_store_service.rb +2 -2
  107. data/proto_docs/google/cloud/discoveryengine/v1/document_processing_config.rb +102 -0
  108. data/proto_docs/google/cloud/discoveryengine/v1/document_service.rb +5 -5
  109. data/proto_docs/google/cloud/discoveryengine/v1/engine.rb +3 -3
  110. data/proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb +144 -0
  111. data/proto_docs/google/cloud/discoveryengine/v1/grounding.rb +79 -0
  112. data/proto_docs/google/cloud/discoveryengine/v1/import_config.rb +4 -4
  113. data/proto_docs/google/cloud/discoveryengine/v1/project.rb +106 -0
  114. data/proto_docs/google/cloud/discoveryengine/v1/project_service.rb +57 -0
  115. data/proto_docs/google/cloud/discoveryengine/v1/rank_service.rb +124 -0
  116. data/proto_docs/google/cloud/discoveryengine/v1/recommendation_service.rb +20 -19
  117. data/proto_docs/google/cloud/discoveryengine/v1/schema_service.rb +5 -5
  118. data/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +23 -18
  119. data/proto_docs/google/cloud/discoveryengine/v1/session.rb +88 -0
  120. data/proto_docs/google/cloud/discoveryengine/v1/site_search_engine.rb +3 -0
  121. data/proto_docs/google/cloud/discoveryengine/v1/user_event.rb +24 -3
  122. data/proto_docs/google/cloud/discoveryengine/v1/user_event_service.rb +13 -1
  123. metadata +56 -2
@@ -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::V1::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::V1::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::V1::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::V1::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,
@@ -1077,7 +1084,23 @@ module Google
1077
1084
  uri_template: "/v1/{name}:cancel",
1078
1085
  body: "*",
1079
1086
  matches: [
1080
- ["name", %r{^operations(?:/.*)?$}, true]
1087
+ ["name", %r{^projects/[^/]+/operations/[^/]+/?$}, false]
1088
+ ]
1089
+ )
1090
+ .with_bindings(
1091
+ uri_method: :post,
1092
+ uri_template: "/v1/{name}:cancel",
1093
+ body: "*",
1094
+ matches: [
1095
+ ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+/?$}, false]
1096
+ ]
1097
+ )
1098
+ .with_bindings(
1099
+ uri_method: :post,
1100
+ uri_template: "/v1/{name}:cancel",
1101
+ body: "*",
1102
+ matches: [
1103
+ ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+/?$}, false]
1081
1104
  ]
1082
1105
  )
1083
1106
  transcoder.transcode request_pb
@@ -31,6 +31,9 @@ module Google
31
31
  # Service for search.
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
 
@@ -244,7 +247,10 @@ module Google
244
247
  #
245
248
  # If this field is negative, an `INVALID_ARGUMENT` is returned.
246
249
  # @param data_store_specs [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DataStoreSpec, ::Hash>]
247
- # A list of data store specs to apply on a search call.
250
+ # Specs defining dataStores to filter on in a search call and configurations
251
+ # for those dataStores. This is only considered for engines with multiple
252
+ # dataStores use case. For single dataStore within an engine, they should
253
+ # use the specs at the top level.
248
254
  # @param filter [::String]
249
255
  # The filter syntax consists of an expression language for constructing a
250
256
  # predicate from one or more fields of the documents being filtered. Filter
@@ -278,7 +284,9 @@ module Google
278
284
  # The order in which documents are returned. Documents can be ordered by
279
285
  # a field in an {::Google::Cloud::DiscoveryEngine::V1::Document Document} object.
280
286
  # Leave it unset if ordered by relevance. `order_by` expression is
281
- # case-sensitive. For more information on ordering, see
287
+ # case-sensitive.
288
+ #
289
+ # For more information on ordering for retail search, see
282
290
  # [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
283
291
  #
284
292
  # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
@@ -295,7 +303,7 @@ module Google
295
303
  # @param boost_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::BoostSpec, ::Hash]
296
304
  # Boost specification to boost certain documents.
297
305
  # For more information on boosting, see
298
- # [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
306
+ # [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
299
307
  # @param params [::Hash{::String => ::Google::Protobuf::Value, ::Hash}]
300
308
  # Additional search parameters.
301
309
  #
@@ -303,8 +311,7 @@ module Google
303
311
  #
304
312
  # * `user_country_code`: string. Default empty. If set to non-empty, results
305
313
  # are restricted or boosted based on the location provided.
306
- # Example:
307
- # user_country_code: "au"
314
+ # For example, `user_country_code: "au"`
308
315
  #
309
316
  # For available codes see [Country
310
317
  # Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
@@ -312,8 +319,7 @@ module Google
312
319
  # * `search_type`: double. Default empty. Enables non-webpage searching
313
320
  # depending on the value. The only valid non-default value is 1,
314
321
  # which enables image searching.
315
- # Example:
316
- # search_type: 1
322
+ # For example, `search_type: 1`
317
323
  # @param query_expansion_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::QueryExpansionSpec, ::Hash]
318
324
  # The query expansion specification that specifies the conditions under which
319
325
  # query expansion occurs.
@@ -397,10 +403,11 @@ module Google
397
403
  # Customize the options with defaults
398
404
  metadata = @config.rpcs.search.metadata.to_h
399
405
 
400
- # Set x-goog-api-client and x-goog-user-project headers
406
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
401
407
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
402
408
  lib_name: @config.lib_name, lib_version: @config.lib_version,
403
409
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
410
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
404
411
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
405
412
 
406
413
  header_params = {}
@@ -33,6 +33,9 @@ module Google
33
33
  # Service for search.
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
 
@@ -237,7 +240,10 @@ module Google
237
240
  #
238
241
  # If this field is negative, an `INVALID_ARGUMENT` is returned.
239
242
  # @param data_store_specs [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DataStoreSpec, ::Hash>]
240
- # A list of data store specs to apply on a search call.
243
+ # Specs defining dataStores to filter on in a search call and configurations
244
+ # for those dataStores. This is only considered for engines with multiple
245
+ # dataStores use case. For single dataStore within an engine, they should
246
+ # use the specs at the top level.
241
247
  # @param filter [::String]
242
248
  # The filter syntax consists of an expression language for constructing a
243
249
  # predicate from one or more fields of the documents being filtered. Filter
@@ -271,7 +277,9 @@ module Google
271
277
  # The order in which documents are returned. Documents can be ordered by
272
278
  # a field in an {::Google::Cloud::DiscoveryEngine::V1::Document Document} object.
273
279
  # Leave it unset if ordered by relevance. `order_by` expression is
274
- # case-sensitive. For more information on ordering, see
280
+ # case-sensitive.
281
+ #
282
+ # For more information on ordering for retail search, see
275
283
  # [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
276
284
  #
277
285
  # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
@@ -288,7 +296,7 @@ module Google
288
296
  # @param boost_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::BoostSpec, ::Hash]
289
297
  # Boost specification to boost certain documents.
290
298
  # For more information on boosting, see
291
- # [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
299
+ # [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
292
300
  # @param params [::Hash{::String => ::Google::Protobuf::Value, ::Hash}]
293
301
  # Additional search parameters.
294
302
  #
@@ -296,8 +304,7 @@ module Google
296
304
  #
297
305
  # * `user_country_code`: string. Default empty. If set to non-empty, results
298
306
  # are restricted or boosted based on the location provided.
299
- # Example:
300
- # user_country_code: "au"
307
+ # For example, `user_country_code: "au"`
301
308
  #
302
309
  # For available codes see [Country
303
310
  # Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
@@ -305,8 +312,7 @@ module Google
305
312
  # * `search_type`: double. Default empty. Enables non-webpage searching
306
313
  # depending on the value. The only valid non-default value is 1,
307
314
  # which enables image searching.
308
- # Example:
309
- # search_type: 1
315
+ # For example, `search_type: 1`
310
316
  # @param query_expansion_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::QueryExpansionSpec, ::Hash]
311
317
  # The query expansion specification that specifies the conditions under which
312
318
  # query expansion occurs.
@@ -389,12 +395,13 @@ module Google
389
395
  # Customize the options with defaults
390
396
  call_metadata = @config.rpcs.search.metadata.to_h
391
397
 
392
- # Set x-goog-api-client and x-goog-user-project headers
398
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
393
399
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
394
400
  lib_name: @config.lib_name, lib_version: @config.lib_version,
395
401
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
396
402
  transports_version_send: [:rest]
397
403
 
404
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
398
405
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
399
406
 
400
407
  options.apply_defaults timeout: @config.rpcs.search.timeout,
@@ -31,6 +31,9 @@ module Google
31
31
  # Service for managing site search related resources.
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
 
@@ -252,10 +255,11 @@ module Google
252
255
  # Customize the options with defaults
253
256
  metadata = @config.rpcs.get_site_search_engine.metadata.to_h
254
257
 
255
- # Set x-goog-api-client and x-goog-user-project headers
258
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
256
259
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
257
260
  lib_name: @config.lib_name, lib_version: @config.lib_version,
258
261
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
262
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
259
263
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
260
264
 
261
265
  header_params = {}
@@ -349,10 +353,11 @@ module Google
349
353
  # Customize the options with defaults
350
354
  metadata = @config.rpcs.create_target_site.metadata.to_h
351
355
 
352
- # Set x-goog-api-client and x-goog-user-project headers
356
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
353
357
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
354
358
  lib_name: @config.lib_name, lib_version: @config.lib_version,
355
359
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
360
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
356
361
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
357
362
 
358
363
  header_params = {}
@@ -449,10 +454,11 @@ module Google
449
454
  # Customize the options with defaults
450
455
  metadata = @config.rpcs.batch_create_target_sites.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::DiscoveryEngine::V1::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 = {}
@@ -544,10 +550,11 @@ module Google
544
550
  # Customize the options with defaults
545
551
  metadata = @config.rpcs.get_target_site.metadata.to_h
546
552
 
547
- # Set x-goog-api-client and x-goog-user-project headers
553
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
548
554
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
549
555
  lib_name: @config.lib_name, lib_version: @config.lib_version,
550
556
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
557
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
551
558
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
552
559
 
553
560
  header_params = {}
@@ -642,10 +649,11 @@ module Google
642
649
  # Customize the options with defaults
643
650
  metadata = @config.rpcs.update_target_site.metadata.to_h
644
651
 
645
- # Set x-goog-api-client and x-goog-user-project headers
652
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
646
653
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
647
654
  lib_name: @config.lib_name, lib_version: @config.lib_version,
648
655
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
656
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
649
657
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
650
658
 
651
659
  header_params = {}
@@ -744,10 +752,11 @@ module Google
744
752
  # Customize the options with defaults
745
753
  metadata = @config.rpcs.delete_target_site.metadata.to_h
746
754
 
747
- # Set x-goog-api-client and x-goog-user-project headers
755
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
748
756
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
749
757
  lib_name: @config.lib_name, lib_version: @config.lib_version,
750
758
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
759
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
751
760
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
752
761
 
753
762
  header_params = {}
@@ -852,10 +861,11 @@ module Google
852
861
  # Customize the options with defaults
853
862
  metadata = @config.rpcs.list_target_sites.metadata.to_h
854
863
 
855
- # Set x-goog-api-client and x-goog-user-project headers
864
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
856
865
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
857
866
  lib_name: @config.lib_name, lib_version: @config.lib_version,
858
867
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
868
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
859
869
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
860
870
 
861
871
  header_params = {}
@@ -948,10 +958,11 @@ module Google
948
958
  # Customize the options with defaults
949
959
  metadata = @config.rpcs.enable_advanced_site_search.metadata.to_h
950
960
 
951
- # Set x-goog-api-client and x-goog-user-project headers
961
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
952
962
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
953
963
  lib_name: @config.lib_name, lib_version: @config.lib_version,
954
964
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
965
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
955
966
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
956
967
 
957
968
  header_params = {}
@@ -1044,10 +1055,11 @@ module Google
1044
1055
  # Customize the options with defaults
1045
1056
  metadata = @config.rpcs.disable_advanced_site_search.metadata.to_h
1046
1057
 
1047
- # Set x-goog-api-client and x-goog-user-project headers
1058
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1048
1059
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1049
1060
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1050
1061
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
1062
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1051
1063
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1052
1064
 
1053
1065
  header_params = {}
@@ -1144,10 +1156,11 @@ module Google
1144
1156
  # Customize the options with defaults
1145
1157
  metadata = @config.rpcs.recrawl_uris.metadata.to_h
1146
1158
 
1147
- # Set x-goog-api-client and x-goog-user-project headers
1159
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1148
1160
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1149
1161
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1150
1162
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
1163
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1151
1164
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1152
1165
 
1153
1166
  header_params = {}
@@ -1240,10 +1253,11 @@ module Google
1240
1253
  # Customize the options with defaults
1241
1254
  metadata = @config.rpcs.batch_verify_target_sites.metadata.to_h
1242
1255
 
1243
- # Set x-goog-api-client and x-goog-user-project headers
1256
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1244
1257
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1245
1258
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1246
1259
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
1260
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1247
1261
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1248
1262
 
1249
1263
  header_params = {}
@@ -1347,10 +1361,11 @@ module Google
1347
1361
  # Customize the options with defaults
1348
1362
  metadata = @config.rpcs.fetch_domain_verification_status.metadata.to_h
1349
1363
 
1350
- # Set x-goog-api-client and x-goog-user-project headers
1364
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1351
1365
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1352
1366
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1353
1367
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
1368
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1354
1369
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1355
1370
 
1356
1371
  header_params = {}
@@ -26,6 +26,9 @@ module Google
26
26
  module SiteSearchEngineService
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::V1::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::V1::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::V1::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::V1::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::V1::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,