google-cloud-discovery_engine-v1 0.4.2 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/discovery_engine/v1/completion_service/client.rb +235 -4
  3. data/lib/google/cloud/discovery_engine/v1/completion_service/operations.rb +801 -0
  4. data/lib/google/cloud/discovery_engine/v1/completion_service/rest/client.rb +221 -4
  5. data/lib/google/cloud/discovery_engine/v1/completion_service/rest/operations.rb +1091 -0
  6. data/lib/google/cloud/discovery_engine/v1/completion_service/rest/service_stub.rb +136 -0
  7. data/lib/google/cloud/discovery_engine/v1/completion_service/rest.rb +1 -0
  8. data/lib/google/cloud/discovery_engine/v1/completion_service.rb +1 -0
  9. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb +20 -3
  10. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/paths.rb +91 -0
  11. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb +20 -3
  12. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/service_stub.rb +45 -0
  13. data/lib/google/cloud/discovery_engine/v1/data_store_service/client.rb +924 -0
  14. data/lib/google/cloud/discovery_engine/v1/data_store_service/credentials.rb +47 -0
  15. data/lib/google/cloud/discovery_engine/v1/data_store_service/operations.rb +801 -0
  16. data/lib/google/cloud/discovery_engine/v1/data_store_service/paths.rb +97 -0
  17. data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/client.rb +863 -0
  18. data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/operations.rb +1091 -0
  19. data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/service_stub.rb +403 -0
  20. data/lib/google/cloud/discovery_engine/v1/data_store_service/rest.rb +54 -0
  21. data/lib/google/cloud/discovery_engine/v1/data_store_service.rb +57 -0
  22. data/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb +14 -0
  23. data/lib/google/cloud/discovery_engine/v1/engine_service/client.rb +885 -0
  24. data/lib/google/cloud/discovery_engine/v1/engine_service/credentials.rb +47 -0
  25. data/lib/google/cloud/discovery_engine/v1/engine_service/operations.rb +801 -0
  26. data/lib/google/cloud/discovery_engine/v1/engine_service/paths.rb +73 -0
  27. data/lib/google/cloud/discovery_engine/v1/engine_service/rest/client.rb +824 -0
  28. data/lib/google/cloud/discovery_engine/v1/engine_service/rest/operations.rb +1091 -0
  29. data/lib/google/cloud/discovery_engine/v1/engine_service/rest/service_stub.rb +366 -0
  30. data/lib/google/cloud/discovery_engine/v1/engine_service/rest.rb +54 -0
  31. data/lib/google/cloud/discovery_engine/v1/engine_service.rb +57 -0
  32. data/lib/google/cloud/discovery_engine/v1/rest.rb +3 -0
  33. data/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb +14 -0
  34. data/lib/google/cloud/discovery_engine/v1/search_service/client.rb +40 -4
  35. data/lib/google/cloud/discovery_engine/v1/search_service/paths.rb +19 -0
  36. data/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +40 -4
  37. data/lib/google/cloud/discovery_engine/v1/search_service/rest/service_stub.rb +8 -0
  38. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/client.rb +1631 -0
  39. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/credentials.rb +47 -0
  40. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/operations.rb +801 -0
  41. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/paths.rb +127 -0
  42. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/client.rb +1521 -0
  43. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/operations.rb +1091 -0
  44. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/service_stub.rb +860 -0
  45. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest.rb +53 -0
  46. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service.rb +56 -0
  47. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb +14 -0
  48. data/lib/google/cloud/discovery_engine/v1/version.rb +1 -1
  49. data/lib/google/cloud/discovery_engine/v1.rb +3 -0
  50. data/lib/google/cloud/discoveryengine/v1/common_pb.rb +5 -1
  51. data/lib/google/cloud/discoveryengine/v1/completion_pb.rb +45 -0
  52. data/lib/google/cloud/discoveryengine/v1/completion_service_pb.rb +4 -1
  53. data/lib/google/cloud/discoveryengine/v1/completion_service_services_pb.rb +8 -0
  54. data/lib/google/cloud/discoveryengine/v1/conversation_pb.rb +1 -1
  55. data/lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb +1 -1
  56. data/lib/google/cloud/discoveryengine/v1/data_store_pb.rb +49 -0
  57. data/lib/google/cloud/discoveryengine/v1/data_store_service_pb.rb +62 -0
  58. data/lib/google/cloud/discoveryengine/v1/data_store_service_services_pb.rb +61 -0
  59. data/lib/google/cloud/discoveryengine/v1/document_pb.rb +1 -1
  60. data/lib/google/cloud/discoveryengine/v1/document_service_pb.rb +1 -1
  61. data/lib/google/cloud/discoveryengine/v1/engine_pb.rb +53 -0
  62. data/lib/google/cloud/discoveryengine/v1/engine_service_pb.rb +62 -0
  63. data/lib/google/cloud/discoveryengine/v1/engine_service_services_pb.rb +55 -0
  64. data/lib/google/cloud/discoveryengine/v1/import_config_pb.rb +7 -1
  65. data/lib/google/cloud/discoveryengine/v1/purge_config_pb.rb +6 -1
  66. data/lib/google/cloud/discoveryengine/v1/schema_pb.rb +1 -1
  67. data/lib/google/cloud/discoveryengine/v1/schema_service_pb.rb +1 -1
  68. data/lib/google/cloud/discoveryengine/v1/search_service_pb.rb +8 -1
  69. data/lib/google/cloud/discoveryengine/v1/site_search_engine_pb.rb +54 -0
  70. data/lib/google/cloud/discoveryengine/v1/site_search_engine_service_pb.rb +82 -0
  71. data/lib/google/cloud/discoveryengine/v1/site_search_engine_service_services_pb.rb +73 -0
  72. data/lib/google/cloud/discoveryengine/v1/user_event_pb.rb +1 -1
  73. data/lib/google/cloud/discoveryengine/v1/user_event_service_pb.rb +1 -1
  74. data/proto_docs/google/cloud/discoveryengine/v1/common.rb +51 -0
  75. data/proto_docs/google/cloud/discoveryengine/v1/completion.rb +53 -0
  76. data/proto_docs/google/cloud/discoveryengine/v1/completion_service.rb +10 -4
  77. data/proto_docs/google/cloud/discoveryengine/v1/conversation.rb +2 -0
  78. data/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb +19 -1
  79. data/proto_docs/google/cloud/discoveryengine/v1/data_store.rb +88 -0
  80. data/proto_docs/google/cloud/discoveryengine/v1/data_store_service.rb +214 -0
  81. data/proto_docs/google/cloud/discoveryengine/v1/document.rb +1 -1
  82. data/proto_docs/google/cloud/discoveryengine/v1/engine.rb +214 -0
  83. data/proto_docs/google/cloud/discoveryengine/v1/engine_service.rb +177 -0
  84. data/proto_docs/google/cloud/discoveryengine/v1/import_config.rb +66 -0
  85. data/proto_docs/google/cloud/discoveryengine/v1/purge_config.rb +41 -0
  86. data/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +149 -4
  87. data/proto_docs/google/cloud/discoveryengine/v1/site_search_engine.rb +160 -0
  88. data/proto_docs/google/cloud/discoveryengine/v1/site_search_engine_service.rb +525 -0
  89. data/proto_docs/google/cloud/discoveryengine/v1/user_event.rb +3 -3
  90. metadata +48 -2
@@ -186,13 +186,15 @@ module Google
186
186
  # @param options [::Gapic::CallOptions, ::Hash]
187
187
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
188
188
  #
189
- # @overload search(serving_config: nil, branch: nil, query: nil, image_query: nil, page_size: nil, page_token: nil, offset: nil, filter: nil, order_by: nil, user_info: nil, facet_specs: nil, boost_spec: nil, params: nil, query_expansion_spec: nil, spell_correction_spec: nil, user_pseudo_id: nil, content_search_spec: nil, safe_search: nil, user_labels: nil)
189
+ # @overload search(serving_config: nil, branch: nil, query: nil, image_query: nil, page_size: nil, page_token: nil, offset: nil, filter: nil, canonical_filter: nil, order_by: nil, user_info: nil, facet_specs: nil, boost_spec: nil, params: nil, query_expansion_spec: nil, spell_correction_spec: nil, user_pseudo_id: nil, content_search_spec: nil, safe_search: nil, user_labels: nil)
190
190
  # Pass arguments to `search` via keyword arguments. Note that at
191
191
  # least one keyword argument is required. To specify no parameters, or to keep all
192
192
  # the default parameter values, pass an empty Hash as a request object (see above).
193
193
  #
194
194
  # @param serving_config [::String]
195
195
  # Required. The resource name of the Search serving config, such as
196
+ # `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`,
197
+ # or
196
198
  # `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
197
199
  # This field is used to identify the serving configuration name, set
198
200
  # of models used to make the search.
@@ -236,11 +238,35 @@ module Google
236
238
  # expression is case-sensitive.
237
239
  #
238
240
  # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
241
+ #
242
+ # Filtering in Vertex AI Search is done by mapping the LHS filter key to a
243
+ # key property defined in the Vertex AI Search backend -- this mapping is
244
+ # defined by the customer in their schema. For example a media customer might
245
+ # have a field 'name' in their schema. In this case the filter would look
246
+ # like this: filter --> name:'ANY("king kong")'
247
+ #
248
+ # For more information about filtering including syntax and filter
249
+ # operators, see
250
+ # [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
251
+ # @param canonical_filter [::String]
252
+ # The default filter that is applied when a user performs a search without
253
+ # checking any filters on the search page.
254
+ #
255
+ # The filter applied to every search request when quality improvement such as
256
+ # query expansion is needed. In the case a query does not have a sufficient
257
+ # amount of results this filter will be used to determine whether or not to
258
+ # enable the query expansion flow. The original filter will still be used for
259
+ # the query expanded search.
260
+ # This field is strongly recommended to achieve high search quality.
261
+ #
262
+ # For more information about filter syntax, see
263
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest#filter SearchRequest.filter}.
239
264
  # @param order_by [::String]
240
265
  # The order in which documents are returned. Documents can be ordered by
241
266
  # a field in an {::Google::Cloud::DiscoveryEngine::V1::Document Document} object.
242
267
  # Leave it unset if ordered by relevance. `order_by` expression is
243
- # case-sensitive.
268
+ # case-sensitive. For more information on ordering, see
269
+ # [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
244
270
  #
245
271
  # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
246
272
  # @param user_info [::Google::Cloud::DiscoveryEngine::V1::UserInfo, ::Hash]
@@ -255,6 +281,8 @@ module Google
255
281
  # error is returned.
256
282
  # @param boost_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::BoostSpec, ::Hash]
257
283
  # Boost specification to boost certain documents.
284
+ # For more information on boosting, see
285
+ # [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
258
286
  # @param params [::Hash{::String => ::Google::Protobuf::Value, ::Hash}]
259
287
  # Additional search parameters.
260
288
  #
@@ -262,9 +290,17 @@ module Google
262
290
  #
263
291
  # * `user_country_code`: string. Default empty. If set to non-empty, results
264
292
  # are restricted or boosted based on the location provided.
293
+ # Example:
294
+ # user_country_code: "au"
295
+ #
296
+ # For available codes see [Country
297
+ # Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
298
+ #
265
299
  # * `search_type`: double. Default empty. Enables non-webpage searching
266
- # depending on the value. The only valid non-default value is 1,
267
- # which enables image searching.
300
+ # depending on the value. The only valid non-default value is 1,
301
+ # which enables image searching.
302
+ # Example:
303
+ # search_type: 1
268
304
  # @param query_expansion_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::QueryExpansionSpec, ::Hash]
269
305
  # The query expansion specification that specifies the conditions under which
270
306
  # query expansion occurs.
@@ -126,6 +126,14 @@ module Google
126
126
  ["serving_config", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+/?$}, false]
127
127
  ]
128
128
  )
129
+ .with_bindings(
130
+ uri_method: :post,
131
+ uri_template: "/v1/{serving_config}:search",
132
+ body: "*",
133
+ matches: [
134
+ ["serving_config", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+/?$}, false]
135
+ ]
136
+ )
129
137
  transcoder.transcode request_pb
130
138
  end
131
139
  end