google-cloud-discovery_engine-v1 0.7.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/discovery_engine/v1/completion_service/client.rb +228 -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 +214 -3
  5. data/lib/google/cloud/discovery_engine/v1/completion_service/rest/operations.rb +28 -5
  6. data/lib/google/cloud/discovery_engine/v1/completion_service/rest/service_stub.rb +136 -0
  7. data/lib/google/cloud/discovery_engine/v1/control_service/client.rb +875 -0
  8. data/lib/google/cloud/discovery_engine/v1/control_service/credentials.rb +47 -0
  9. data/lib/google/cloud/discovery_engine/v1/control_service/paths.rb +167 -0
  10. data/lib/google/cloud/discovery_engine/v1/control_service/rest/client.rb +814 -0
  11. data/lib/google/cloud/discovery_engine/v1/control_service/rest/service_stub.rb +440 -0
  12. data/lib/google/cloud/discovery_engine/v1/control_service/rest.rb +55 -0
  13. data/lib/google/cloud/discovery_engine/v1/control_service.rb +58 -0
  14. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb +911 -135
  15. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/paths.rb +199 -0
  16. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb +733 -6
  17. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/service_stub.rb +520 -0
  18. data/lib/google/cloud/discovery_engine/v1/data_store_service/client.rb +15 -7
  19. data/lib/google/cloud/discovery_engine/v1/data_store_service/operations.rb +13 -5
  20. data/lib/google/cloud/discovery_engine/v1/data_store_service/paths.rb +45 -0
  21. data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/client.rb +15 -7
  22. data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/operations.rb +28 -5
  23. data/lib/google/cloud/discovery_engine/v1/document_service/client.rb +26 -14
  24. data/lib/google/cloud/discovery_engine/v1/document_service/operations.rb +13 -5
  25. data/lib/google/cloud/discovery_engine/v1/document_service/rest/client.rb +26 -14
  26. data/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb +28 -5
  27. data/lib/google/cloud/discovery_engine/v1/engine_service/client.rb +13 -5
  28. data/lib/google/cloud/discovery_engine/v1/engine_service/operations.rb +13 -5
  29. data/lib/google/cloud/discovery_engine/v1/engine_service/rest/client.rb +13 -5
  30. data/lib/google/cloud/discovery_engine/v1/engine_service/rest/operations.rb +28 -5
  31. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/client.rb +471 -0
  32. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/credentials.rb +47 -0
  33. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/paths.rb +52 -0
  34. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/client.rb +438 -0
  35. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/service_stub.rb +129 -0
  36. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest.rb +52 -0
  37. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service.rb +55 -0
  38. data/lib/google/cloud/discovery_engine/v1/project_service/client.rb +485 -0
  39. data/lib/google/cloud/discovery_engine/v1/project_service/credentials.rb +47 -0
  40. data/lib/google/cloud/discovery_engine/v1/project_service/operations.rb +809 -0
  41. data/lib/google/cloud/discovery_engine/v1/project_service/paths.rb +47 -0
  42. data/lib/google/cloud/discovery_engine/v1/project_service/rest/client.rb +452 -0
  43. data/lib/google/cloud/discovery_engine/v1/project_service/rest/operations.rb +1114 -0
  44. data/lib/google/cloud/discovery_engine/v1/project_service/rest/service_stub.rb +129 -0
  45. data/lib/google/cloud/discovery_engine/v1/project_service/rest.rb +54 -0
  46. data/lib/google/cloud/discovery_engine/v1/project_service.rb +57 -0
  47. data/lib/google/cloud/discovery_engine/v1/rank_service/client.rb +481 -0
  48. data/lib/google/cloud/discovery_engine/v1/rank_service/credentials.rb +47 -0
  49. data/lib/google/cloud/discovery_engine/v1/rank_service/paths.rb +52 -0
  50. data/lib/google/cloud/discovery_engine/v1/rank_service/rest/client.rb +448 -0
  51. data/lib/google/cloud/discovery_engine/v1/rank_service/rest/service_stub.rb +129 -0
  52. data/lib/google/cloud/discovery_engine/v1/rank_service/rest.rb +52 -0
  53. data/lib/google/cloud/discovery_engine/v1/rank_service.rb +55 -0
  54. data/lib/google/cloud/discovery_engine/v1/recommendation_service/client.rb +24 -19
  55. data/lib/google/cloud/discovery_engine/v1/recommendation_service/paths.rb +66 -0
  56. data/lib/google/cloud/discovery_engine/v1/recommendation_service/rest/client.rb +24 -19
  57. data/lib/google/cloud/discovery_engine/v1/rest.rb +4 -0
  58. data/lib/google/cloud/discovery_engine/v1/schema_service/client.rb +18 -10
  59. data/lib/google/cloud/discovery_engine/v1/schema_service/operations.rb +13 -5
  60. data/lib/google/cloud/discovery_engine/v1/schema_service/rest/client.rb +18 -10
  61. data/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb +28 -5
  62. data/lib/google/cloud/discovery_engine/v1/search_service/client.rb +57 -9
  63. data/lib/google/cloud/discovery_engine/v1/search_service/paths.rb +68 -0
  64. data/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +57 -9
  65. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/client.rb +27 -12
  66. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/operations.rb +13 -5
  67. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/client.rb +27 -12
  68. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/operations.rb +28 -5
  69. data/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb +23 -6
  70. data/lib/google/cloud/discovery_engine/v1/user_event_service/operations.rb +13 -5
  71. data/lib/google/cloud/discovery_engine/v1/user_event_service/paths.rb +21 -0
  72. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb +23 -6
  73. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb +28 -5
  74. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/service_stub.rb +15 -0
  75. data/lib/google/cloud/discovery_engine/v1/version.rb +1 -1
  76. data/lib/google/cloud/discovery_engine/v1.rb +4 -0
  77. data/lib/google/cloud/discoveryengine/v1/answer_pb.rb +69 -0
  78. data/lib/google/cloud/discoveryengine/v1/chunk_pb.rb +50 -0
  79. data/lib/google/cloud/discoveryengine/v1/common_pb.rb +2 -1
  80. data/lib/google/cloud/discoveryengine/v1/completion_pb.rb +2 -1
  81. data/lib/google/cloud/discoveryengine/v1/completion_service_pb.rb +1 -1
  82. data/lib/google/cloud/discoveryengine/v1/completion_service_services_pb.rb +8 -0
  83. data/lib/google/cloud/discoveryengine/v1/control_pb.rb +55 -0
  84. data/lib/google/cloud/discoveryengine/v1/control_service_pb.rb +57 -0
  85. data/lib/google/cloud/discoveryengine/v1/control_service_services_pb.rb +69 -0
  86. data/lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb +32 -1
  87. data/lib/google/cloud/discoveryengine/v1/conversational_search_service_services_pb.rb +25 -0
  88. data/lib/google/cloud/discoveryengine/v1/data_store_pb.rb +3 -1
  89. data/lib/google/cloud/discoveryengine/v1/document_processing_config_pb.rb +51 -0
  90. data/lib/google/cloud/discoveryengine/v1/document_service_services_pb.rb +1 -1
  91. data/lib/google/cloud/discoveryengine/v1/engine_pb.rb +1 -1
  92. data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_pb.rb +52 -0
  93. data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_services_pb.rb +45 -0
  94. data/lib/google/cloud/discoveryengine/v1/grounding_pb.rb +46 -0
  95. data/lib/google/cloud/discoveryengine/v1/import_config_pb.rb +6 -1
  96. data/lib/google/cloud/discoveryengine/v1/project_pb.rb +49 -0
  97. data/lib/google/cloud/discoveryengine/v1/project_service_pb.rb +50 -0
  98. data/lib/google/cloud/discoveryengine/v1/project_service_services_pb.rb +51 -0
  99. data/lib/google/cloud/discoveryengine/v1/purge_config_pb.rb +4 -1
  100. data/lib/google/cloud/discoveryengine/v1/rank_service_pb.rb +49 -0
  101. data/lib/google/cloud/discoveryengine/v1/rank_service_services_pb.rb +45 -0
  102. data/lib/google/cloud/discoveryengine/v1/search_service_pb.rb +9 -1
  103. data/lib/google/cloud/discoveryengine/v1/session_pb.rb +50 -0
  104. data/lib/google/cloud/discoveryengine/v1/site_search_engine_pb.rb +1 -1
  105. data/lib/google/cloud/discoveryengine/v1/user_event_pb.rb +1 -1
  106. data/lib/google/cloud/discoveryengine/v1/user_event_service_pb.rb +1 -1
  107. data/lib/google/cloud/discoveryengine/v1/user_event_service_services_pb.rb +1 -1
  108. data/proto_docs/google/cloud/discoveryengine/v1/answer.rb +375 -0
  109. data/proto_docs/google/cloud/discoveryengine/v1/chunk.rb +119 -0
  110. data/proto_docs/google/cloud/discoveryengine/v1/common.rb +16 -0
  111. data/proto_docs/google/cloud/discoveryengine/v1/completion.rb +31 -0
  112. data/proto_docs/google/cloud/discoveryengine/v1/control.rb +207 -0
  113. data/proto_docs/google/cloud/discoveryengine/v1/control_service.rb +126 -0
  114. data/proto_docs/google/cloud/discoveryengine/v1/conversation.rb +2 -2
  115. data/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb +529 -0
  116. data/proto_docs/google/cloud/discoveryengine/v1/data_store.rb +3 -0
  117. data/proto_docs/google/cloud/discoveryengine/v1/data_store_service.rb +2 -2
  118. data/proto_docs/google/cloud/discoveryengine/v1/document.rb +1 -1
  119. data/proto_docs/google/cloud/discoveryengine/v1/document_processing_config.rb +143 -0
  120. data/proto_docs/google/cloud/discoveryengine/v1/document_service.rb +5 -5
  121. data/proto_docs/google/cloud/discoveryengine/v1/engine.rb +3 -3
  122. data/proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb +144 -0
  123. data/proto_docs/google/cloud/discoveryengine/v1/grounding.rb +79 -0
  124. data/proto_docs/google/cloud/discoveryengine/v1/import_config.rb +118 -4
  125. data/proto_docs/google/cloud/discoveryengine/v1/project.rb +106 -0
  126. data/proto_docs/google/cloud/discoveryengine/v1/project_service.rb +57 -0
  127. data/proto_docs/google/cloud/discoveryengine/v1/purge_config.rb +42 -0
  128. data/proto_docs/google/cloud/discoveryengine/v1/rank_service.rb +124 -0
  129. data/proto_docs/google/cloud/discoveryengine/v1/recommendation_service.rb +20 -19
  130. data/proto_docs/google/cloud/discoveryengine/v1/schema_service.rb +5 -5
  131. data/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +230 -20
  132. data/proto_docs/google/cloud/discoveryengine/v1/session.rb +88 -0
  133. data/proto_docs/google/cloud/discoveryengine/v1/site_search_engine.rb +3 -0
  134. data/proto_docs/google/cloud/discoveryengine/v1/user_event.rb +24 -3
  135. data/proto_docs/google/cloud/discoveryengine/v1/user_event_service.rb +13 -1
  136. metadata +58 -2
@@ -223,6 +223,535 @@ module Google
223
223
  include ::Google::Protobuf::MessageExts
224
224
  extend ::Google::Protobuf::MessageExts::ClassMethods
225
225
  end
226
+
227
+ # Request message for
228
+ # {::Google::Cloud::DiscoveryEngine::V1::ConversationalSearchService::Client#answer_query ConversationalSearchService.AnswerQuery}
229
+ # method.
230
+ # @!attribute [rw] serving_config
231
+ # @return [::String]
232
+ # Required. The resource name of the Search serving config, such as
233
+ # `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`,
234
+ # or
235
+ # `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`.
236
+ # This field is used to identify the serving configuration name, set
237
+ # of models used to make the search.
238
+ # @!attribute [rw] query
239
+ # @return [::Google::Cloud::DiscoveryEngine::V1::Query]
240
+ # Required. Current user query.
241
+ # @!attribute [rw] session
242
+ # @return [::String]
243
+ # The session resource name. Not required.
244
+ #
245
+ # When session field is not set, the API is in sessionless mode.
246
+ #
247
+ # We support auto session mode: users can use the wildcard symbol `-` as
248
+ # session ID. A new ID will be automatically generated and assigned.
249
+ # @!attribute [rw] safety_spec
250
+ # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec]
251
+ # Model specification.
252
+ # @!attribute [rw] related_questions_spec
253
+ # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::RelatedQuestionsSpec]
254
+ # Related questions specification.
255
+ # @!attribute [rw] answer_generation_spec
256
+ # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::AnswerGenerationSpec]
257
+ # Answer generation specification.
258
+ # @!attribute [rw] search_spec
259
+ # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec]
260
+ # Search specification.
261
+ # @!attribute [rw] query_understanding_spec
262
+ # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec]
263
+ # Query understanding specification.
264
+ # @!attribute [rw] asynchronous_mode
265
+ # @return [::Boolean]
266
+ # Asynchronous mode control.
267
+ #
268
+ # If enabled, the response will be returned with answer/session resource
269
+ # name without final answer. The API users need to do the polling to get
270
+ # the latest status of answer/session by calling
271
+ # {::Google::Cloud::DiscoveryEngine::V1::ConversationalSearchService::Client#get_answer ConversationalSearchService.GetAnswer}
272
+ # or
273
+ # {::Google::Cloud::DiscoveryEngine::V1::ConversationalSearchService::Client#get_session ConversationalSearchService.GetSession}
274
+ # method.
275
+ # @!attribute [rw] user_pseudo_id
276
+ # @return [::String]
277
+ # A unique identifier for tracking visitors. For example, this could be
278
+ # implemented with an HTTP cookie, which should be able to uniquely identify
279
+ # a visitor on a single device. This unique identifier should not change if
280
+ # the visitor logs in or out of the website.
281
+ #
282
+ # This field should NOT have a fixed value such as `unknown_visitor`.
283
+ #
284
+ # The field must be a UTF-8 encoded string with a length limit of 128
285
+ # characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
286
+ # @!attribute [rw] user_labels
287
+ # @return [::Google::Protobuf::Map{::String => ::String}]
288
+ # The user labels applied to a resource must meet the following requirements:
289
+ #
290
+ # * Each resource can have multiple labels, up to a maximum of 64.
291
+ # * Each label must be a key-value pair.
292
+ # * Keys have a minimum length of 1 character and a maximum length of 63
293
+ # characters and cannot be empty. Values can be empty and have a maximum
294
+ # length of 63 characters.
295
+ # * Keys and values can contain only lowercase letters, numeric characters,
296
+ # underscores, and dashes. All characters must use UTF-8 encoding, and
297
+ # international characters are allowed.
298
+ # * The key portion of a label must be unique. However, you can use the same
299
+ # key with multiple resources.
300
+ # * Keys must start with a lowercase letter or international character.
301
+ #
302
+ # See [Google Cloud
303
+ # Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
304
+ # for more details.
305
+ class AnswerQueryRequest
306
+ include ::Google::Protobuf::MessageExts
307
+ extend ::Google::Protobuf::MessageExts::ClassMethods
308
+
309
+ # Safety specification.
310
+ # @!attribute [rw] enable
311
+ # @return [::Boolean]
312
+ # Enable the safety filtering on the answer response. It is false by
313
+ # default.
314
+ class SafetySpec
315
+ include ::Google::Protobuf::MessageExts
316
+ extend ::Google::Protobuf::MessageExts::ClassMethods
317
+ end
318
+
319
+ # Related questions specification.
320
+ # @!attribute [rw] enable
321
+ # @return [::Boolean]
322
+ # Enable related questions feature if true.
323
+ class RelatedQuestionsSpec
324
+ include ::Google::Protobuf::MessageExts
325
+ extend ::Google::Protobuf::MessageExts::ClassMethods
326
+ end
327
+
328
+ # Answer generation specification.
329
+ # @!attribute [rw] model_spec
330
+ # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::AnswerGenerationSpec::ModelSpec]
331
+ # Answer generation model specification.
332
+ # @!attribute [rw] prompt_spec
333
+ # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::AnswerGenerationSpec::PromptSpec]
334
+ # Answer generation prompt specification.
335
+ # @!attribute [rw] include_citations
336
+ # @return [::Boolean]
337
+ # Specifies whether to include citation metadata in the answer. The default
338
+ # value is `false`.
339
+ # @!attribute [rw] answer_language_code
340
+ # @return [::String]
341
+ # Language code for Answer. Use language tags defined by
342
+ # [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
343
+ # Note: This is an experimental feature.
344
+ # @!attribute [rw] ignore_adversarial_query
345
+ # @return [::Boolean]
346
+ # Specifies whether to filter out adversarial queries. The default value
347
+ # is `false`.
348
+ #
349
+ # Google employs search-query classification to detect adversarial
350
+ # queries. No answer is returned if the search query is classified as an
351
+ # adversarial query. For example, a user might ask a question regarding
352
+ # negative comments about the company or submit a query designed to
353
+ # generate unsafe, policy-violating output. If this field is set to
354
+ # `true`, we skip generating answers for adversarial queries and return
355
+ # fallback messages instead.
356
+ # @!attribute [rw] ignore_non_answer_seeking_query
357
+ # @return [::Boolean]
358
+ # Specifies whether to filter out queries that are not answer-seeking.
359
+ # The default value is `false`.
360
+ #
361
+ # Google employs search-query classification to detect answer-seeking
362
+ # queries. No answer is returned if the search query is classified as a
363
+ # non-answer seeking query. If this field is set to `true`, we skip
364
+ # generating answers for non-answer seeking queries and return
365
+ # fallback messages instead.
366
+ # @!attribute [rw] ignore_low_relevant_content
367
+ # @return [::Boolean]
368
+ # Specifies whether to filter out queries that have low relevance.
369
+ #
370
+ # If this field is set to `false`, all search results are used regardless
371
+ # of relevance to generate answers. If set to `true` or unset, the behavior
372
+ # will be determined automatically by the service.
373
+ class AnswerGenerationSpec
374
+ include ::Google::Protobuf::MessageExts
375
+ extend ::Google::Protobuf::MessageExts::ClassMethods
376
+
377
+ # Answer Generation Model specification.
378
+ # @!attribute [rw] model_version
379
+ # @return [::String]
380
+ # Model version. If not set, it will use the default stable model.
381
+ # Allowed values are: stable, preview.
382
+ class ModelSpec
383
+ include ::Google::Protobuf::MessageExts
384
+ extend ::Google::Protobuf::MessageExts::ClassMethods
385
+ end
386
+
387
+ # Answer generation prompt specification.
388
+ # @!attribute [rw] preamble
389
+ # @return [::String]
390
+ # Customized preamble.
391
+ class PromptSpec
392
+ include ::Google::Protobuf::MessageExts
393
+ extend ::Google::Protobuf::MessageExts::ClassMethods
394
+ end
395
+ end
396
+
397
+ # Search specification.
398
+ # @!attribute [rw] search_params
399
+ # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchParams]
400
+ # Search parameters.
401
+ # @!attribute [rw] search_result_list
402
+ # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList]
403
+ # Search result list.
404
+ class SearchSpec
405
+ include ::Google::Protobuf::MessageExts
406
+ extend ::Google::Protobuf::MessageExts::ClassMethods
407
+
408
+ # Search parameters.
409
+ # @!attribute [rw] max_return_results
410
+ # @return [::Integer]
411
+ # Number of search results to return.
412
+ # The default value is 10.
413
+ # @!attribute [rw] filter
414
+ # @return [::String]
415
+ # The filter syntax consists of an expression language for constructing
416
+ # a predicate from one or more fields of the documents being filtered.
417
+ # Filter expression is case-sensitive. This will be used to filter
418
+ # search results which may affect the Answer response.
419
+ #
420
+ # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
421
+ #
422
+ # Filtering in Vertex AI Search is done by mapping the LHS filter key
423
+ # to a key property defined in the Vertex AI Search backend -- this
424
+ # mapping is defined by the customer in their schema. For example a
425
+ # media customers might have a field 'name' in their schema. In this
426
+ # case the filter would look like this: filter --> name:'ANY("king
427
+ # kong")'
428
+ #
429
+ # For more information about filtering including syntax and filter
430
+ # operators, see
431
+ # [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
432
+ # @!attribute [rw] boost_spec
433
+ # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::BoostSpec]
434
+ # Boost specification to boost certain documents in search results which
435
+ # may affect the answer query response. For more information on boosting,
436
+ # see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
437
+ # @!attribute [rw] order_by
438
+ # @return [::String]
439
+ # The order in which documents are returned. Documents can be ordered
440
+ # by a field in an {::Google::Cloud::DiscoveryEngine::V1::Document Document}
441
+ # object. Leave it unset if ordered by relevance. `order_by` expression
442
+ # is case-sensitive. For more information on ordering, see
443
+ # [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
444
+ #
445
+ # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
446
+ # @!attribute [rw] search_result_mode
447
+ # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SearchResultMode]
448
+ # Specifies the search result mode. If unspecified, the
449
+ # search result mode is based on
450
+ # [DataStore.DocumentProcessingConfig.chunking_config][]:
451
+ # * If [DataStore.DocumentProcessingConfig.chunking_config][] is
452
+ # specified,
453
+ # it defaults to `CHUNKS`.
454
+ # * Otherwise, it defaults to `DOCUMENTS`.
455
+ # See [parse and chunk
456
+ # documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)
457
+ # @!attribute [rw] data_store_specs
458
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DataStoreSpec>]
459
+ # Specs defining dataStores to filter on in a search call and
460
+ # configurations for those dataStores. This is only considered for
461
+ # engines with multiple dataStores use case. For single dataStore within
462
+ # an engine, they should use the specs at the top level.
463
+ class SearchParams
464
+ include ::Google::Protobuf::MessageExts
465
+ extend ::Google::Protobuf::MessageExts::ClassMethods
466
+ end
467
+
468
+ # Search result list.
469
+ # @!attribute [rw] search_results
470
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult>]
471
+ # Search results.
472
+ class SearchResultList
473
+ include ::Google::Protobuf::MessageExts
474
+ extend ::Google::Protobuf::MessageExts::ClassMethods
475
+
476
+ # Search result.
477
+ # @!attribute [rw] unstructured_document_info
478
+ # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo]
479
+ # Unstructured document information.
480
+ # @!attribute [rw] chunk_info
481
+ # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::ChunkInfo]
482
+ # Chunk information.
483
+ class SearchResult
484
+ include ::Google::Protobuf::MessageExts
485
+ extend ::Google::Protobuf::MessageExts::ClassMethods
486
+
487
+ # Unstructured document information.
488
+ # @!attribute [rw] document
489
+ # @return [::String]
490
+ # Document resource name.
491
+ # @!attribute [rw] uri
492
+ # @return [::String]
493
+ # URI for the document.
494
+ # @!attribute [rw] title
495
+ # @return [::String]
496
+ # Title.
497
+ # @!attribute [rw] document_contexts
498
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::DocumentContext>]
499
+ # List of document contexts.
500
+ # @!attribute [rw] extractive_segments
501
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::ExtractiveSegment>]
502
+ # List of extractive segments.
503
+ # @!attribute [rw] extractive_answers
504
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::ExtractiveAnswer>]
505
+ # List of extractive answers.
506
+ class UnstructuredDocumentInfo
507
+ include ::Google::Protobuf::MessageExts
508
+ extend ::Google::Protobuf::MessageExts::ClassMethods
509
+
510
+ # Document context.
511
+ # @!attribute [rw] page_identifier
512
+ # @return [::String]
513
+ # Page identifier.
514
+ # @!attribute [rw] content
515
+ # @return [::String]
516
+ # Document content.
517
+ class DocumentContext
518
+ include ::Google::Protobuf::MessageExts
519
+ extend ::Google::Protobuf::MessageExts::ClassMethods
520
+ end
521
+
522
+ # Extractive segment.
523
+ # [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments)
524
+ # @!attribute [rw] page_identifier
525
+ # @return [::String]
526
+ # Page identifier.
527
+ # @!attribute [rw] content
528
+ # @return [::String]
529
+ # Extractive segment content.
530
+ class ExtractiveSegment
531
+ include ::Google::Protobuf::MessageExts
532
+ extend ::Google::Protobuf::MessageExts::ClassMethods
533
+ end
534
+
535
+ # Extractive answer.
536
+ # [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers)
537
+ # @!attribute [rw] page_identifier
538
+ # @return [::String]
539
+ # Page identifier.
540
+ # @!attribute [rw] content
541
+ # @return [::String]
542
+ # Extractive answer content.
543
+ class ExtractiveAnswer
544
+ include ::Google::Protobuf::MessageExts
545
+ extend ::Google::Protobuf::MessageExts::ClassMethods
546
+ end
547
+ end
548
+
549
+ # Chunk information.
550
+ # @!attribute [rw] chunk
551
+ # @return [::String]
552
+ # Chunk resource name.
553
+ # @!attribute [rw] content
554
+ # @return [::String]
555
+ # Chunk textual content.
556
+ class ChunkInfo
557
+ include ::Google::Protobuf::MessageExts
558
+ extend ::Google::Protobuf::MessageExts::ClassMethods
559
+ end
560
+ end
561
+ end
562
+ end
563
+
564
+ # Query understanding specification.
565
+ # @!attribute [rw] query_classification_spec
566
+ # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryClassificationSpec]
567
+ # Query classification specification.
568
+ # @!attribute [rw] query_rephraser_spec
569
+ # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec]
570
+ # Query rephraser specification.
571
+ class QueryUnderstandingSpec
572
+ include ::Google::Protobuf::MessageExts
573
+ extend ::Google::Protobuf::MessageExts::ClassMethods
574
+
575
+ # Query classification specification.
576
+ # @!attribute [rw] types
577
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryClassificationSpec::Type>]
578
+ # Enabled query classification types.
579
+ class QueryClassificationSpec
580
+ include ::Google::Protobuf::MessageExts
581
+ extend ::Google::Protobuf::MessageExts::ClassMethods
582
+
583
+ # Query classification types.
584
+ module Type
585
+ # Unspecified query classification type.
586
+ TYPE_UNSPECIFIED = 0
587
+
588
+ # Adversarial query classification type.
589
+ ADVERSARIAL_QUERY = 1
590
+
591
+ # Non-answer-seeking query classification type.
592
+ NON_ANSWER_SEEKING_QUERY = 2
593
+ end
594
+ end
595
+
596
+ # Query rephraser specification.
597
+ # @!attribute [rw] disable
598
+ # @return [::Boolean]
599
+ # Disable query rephraser.
600
+ # @!attribute [rw] max_rephrase_steps
601
+ # @return [::Integer]
602
+ # Max rephrase steps.
603
+ # The max number is 5 steps.
604
+ # If not set or set to < 1, it will be set to 1 by default.
605
+ class QueryRephraserSpec
606
+ include ::Google::Protobuf::MessageExts
607
+ extend ::Google::Protobuf::MessageExts::ClassMethods
608
+ end
609
+ end
610
+
611
+ # @!attribute [rw] key
612
+ # @return [::String]
613
+ # @!attribute [rw] value
614
+ # @return [::String]
615
+ class UserLabelsEntry
616
+ include ::Google::Protobuf::MessageExts
617
+ extend ::Google::Protobuf::MessageExts::ClassMethods
618
+ end
619
+ end
620
+
621
+ # Response message for
622
+ # {::Google::Cloud::DiscoveryEngine::V1::ConversationalSearchService::Client#answer_query ConversationalSearchService.AnswerQuery}
623
+ # method.
624
+ # @!attribute [rw] answer
625
+ # @return [::Google::Cloud::DiscoveryEngine::V1::Answer]
626
+ # Answer resource object.
627
+ # If [AnswerQueryRequest.StepSpec.max_step_count][] is greater than 1,
628
+ # use {::Google::Cloud::DiscoveryEngine::V1::Answer#name Answer.name} to fetch
629
+ # answer information using
630
+ # {::Google::Cloud::DiscoveryEngine::V1::ConversationalSearchService::Client#get_answer ConversationalSearchService.GetAnswer}
631
+ # API.
632
+ # @!attribute [rw] session
633
+ # @return [::Google::Cloud::DiscoveryEngine::V1::Session]
634
+ # Session resource object.
635
+ # It will be only available when session field is set and valid in the
636
+ # {::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest AnswerQueryRequest}
637
+ # request.
638
+ # @!attribute [rw] answer_query_token
639
+ # @return [::String]
640
+ # A global unique ID used for logging.
641
+ class AnswerQueryResponse
642
+ include ::Google::Protobuf::MessageExts
643
+ extend ::Google::Protobuf::MessageExts::ClassMethods
644
+ end
645
+
646
+ # Request for GetAnswer method.
647
+ # @!attribute [rw] name
648
+ # @return [::String]
649
+ # Required. The resource name of the Answer to get. Format:
650
+ # `projects/{project_number}/locations/{location_id}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`
651
+ class GetAnswerRequest
652
+ include ::Google::Protobuf::MessageExts
653
+ extend ::Google::Protobuf::MessageExts::ClassMethods
654
+ end
655
+
656
+ # Request for CreateSession method.
657
+ # @!attribute [rw] parent
658
+ # @return [::String]
659
+ # Required. Full resource name of parent data store. Format:
660
+ # `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
661
+ # @!attribute [rw] session
662
+ # @return [::Google::Cloud::DiscoveryEngine::V1::Session]
663
+ # Required. The session to create.
664
+ class CreateSessionRequest
665
+ include ::Google::Protobuf::MessageExts
666
+ extend ::Google::Protobuf::MessageExts::ClassMethods
667
+ end
668
+
669
+ # Request for UpdateSession method.
670
+ # @!attribute [rw] session
671
+ # @return [::Google::Cloud::DiscoveryEngine::V1::Session]
672
+ # Required. The Session to update.
673
+ # @!attribute [rw] update_mask
674
+ # @return [::Google::Protobuf::FieldMask]
675
+ # Indicates which fields in the provided
676
+ # {::Google::Cloud::DiscoveryEngine::V1::Session Session} to update. The following
677
+ # are NOT supported:
678
+ #
679
+ # * {::Google::Cloud::DiscoveryEngine::V1::Session#name Session.name}
680
+ #
681
+ # If not set or empty, all supported fields are updated.
682
+ class UpdateSessionRequest
683
+ include ::Google::Protobuf::MessageExts
684
+ extend ::Google::Protobuf::MessageExts::ClassMethods
685
+ end
686
+
687
+ # Request for DeleteSession method.
688
+ # @!attribute [rw] name
689
+ # @return [::String]
690
+ # Required. The resource name of the Session to delete. Format:
691
+ # `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`
692
+ class DeleteSessionRequest
693
+ include ::Google::Protobuf::MessageExts
694
+ extend ::Google::Protobuf::MessageExts::ClassMethods
695
+ end
696
+
697
+ # Request for GetSession method.
698
+ # @!attribute [rw] name
699
+ # @return [::String]
700
+ # Required. The resource name of the Session to get. Format:
701
+ # `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`
702
+ class GetSessionRequest
703
+ include ::Google::Protobuf::MessageExts
704
+ extend ::Google::Protobuf::MessageExts::ClassMethods
705
+ end
706
+
707
+ # Request for ListSessions method.
708
+ # @!attribute [rw] parent
709
+ # @return [::String]
710
+ # Required. The data store resource name. Format:
711
+ # `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
712
+ # @!attribute [rw] page_size
713
+ # @return [::Integer]
714
+ # Maximum number of results to return. If unspecified, defaults
715
+ # to 50. Max allowed value is 1000.
716
+ # @!attribute [rw] page_token
717
+ # @return [::String]
718
+ # A page token, received from a previous `ListSessions` call.
719
+ # Provide this to retrieve the subsequent page.
720
+ # @!attribute [rw] filter
721
+ # @return [::String]
722
+ # A filter to apply on the list results. The supported features are:
723
+ # user_pseudo_id, state.
724
+ #
725
+ # Example:
726
+ # "user_pseudo_id = some_id"
727
+ # @!attribute [rw] order_by
728
+ # @return [::String]
729
+ # A comma-separated list of fields to order by, sorted in ascending order.
730
+ # Use "desc" after a field name for descending.
731
+ # Supported fields:
732
+ # * `update_time`
733
+ # * `create_time`
734
+ # * `session_name`
735
+ #
736
+ # Example:
737
+ # "update_time desc"
738
+ # "create_time"
739
+ class ListSessionsRequest
740
+ include ::Google::Protobuf::MessageExts
741
+ extend ::Google::Protobuf::MessageExts::ClassMethods
742
+ end
743
+
744
+ # Response for ListSessions method.
745
+ # @!attribute [rw] sessions
746
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::Session>]
747
+ # All the Sessions for a given data store.
748
+ # @!attribute [rw] next_page_token
749
+ # @return [::String]
750
+ # Pagination token, if not returned indicates the last page.
751
+ class ListSessionsResponse
752
+ include ::Google::Protobuf::MessageExts
753
+ extend ::Google::Protobuf::MessageExts::ClassMethods
754
+ end
226
755
  end
227
756
  end
228
757
  end
@@ -61,6 +61,9 @@ module Google
61
61
  # @return [::Google::Protobuf::Timestamp]
62
62
  # Output only. Timestamp the
63
63
  # {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore} was created at.
64
+ # @!attribute [rw] document_processing_config
65
+ # @return [::Google::Cloud::DiscoveryEngine::V1::DocumentProcessingConfig]
66
+ # Configuration for Document understanding and enrichment.
64
67
  # @!attribute [rw] starting_schema
65
68
  # @return [::Google::Cloud::DiscoveryEngine::V1::Schema]
66
69
  # The start schema to use for this
@@ -123,8 +123,8 @@ module Google
123
123
  # INVALID_ARGUMENT error is returned.
124
124
  # @!attribute [rw] filter
125
125
  # @return [::String]
126
- # Filter by solution type. For example: filter =
127
- # 'solution_type:SOLUTION_TYPE_SEARCH'
126
+ # Filter by solution type .
127
+ # For example: `filter = 'solution_type:SOLUTION_TYPE_SEARCH'`
128
128
  class ListDataStoresRequest
129
129
  include ::Google::Protobuf::MessageExts
130
130
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -92,7 +92,7 @@ module Google
92
92
  # @return [::String]
93
93
  # The URI of the content. Only Cloud Storage URIs (e.g.
94
94
  # `gs://bucket-name/path/to/file`) are supported. The maximum file size
95
- # is 2.5 MB for text-based formats, 100 MB for other formats.
95
+ # is 2.5 MB for text-based formats, 200 MB for other formats.
96
96
  # @!attribute [rw] mime_type
97
97
  # @return [::String]
98
98
  # The MIME type of the content. Supported types: