google-apis-discoveryengine_v1 0.2.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -276,6 +276,1136 @@ module Google
276
276
  end
277
277
  end
278
278
 
279
+ # Defines an answer.
280
+ class GoogleCloudDiscoveryengineV1Answer
281
+ include Google::Apis::Core::Hashable
282
+
283
+ # Additional answer-skipped reasons. This provides the reason for ignored cases.
284
+ # If nothing is skipped, this field is not set.
285
+ # Corresponds to the JSON property `answerSkippedReasons`
286
+ # @return [Array<String>]
287
+ attr_accessor :answer_skipped_reasons
288
+
289
+ # The textual answer.
290
+ # Corresponds to the JSON property `answerText`
291
+ # @return [String]
292
+ attr_accessor :answer_text
293
+
294
+ # Citations.
295
+ # Corresponds to the JSON property `citations`
296
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerCitation>]
297
+ attr_accessor :citations
298
+
299
+ # Output only. Answer completed timestamp.
300
+ # Corresponds to the JSON property `completeTime`
301
+ # @return [String]
302
+ attr_accessor :complete_time
303
+
304
+ # Output only. Answer creation timestamp.
305
+ # Corresponds to the JSON property `createTime`
306
+ # @return [String]
307
+ attr_accessor :create_time
308
+
309
+ # Immutable. Fully qualified name `projects/`project`/locations/global/
310
+ # collections/`collection`/engines/`engine`/sessions/*/answers/*`
311
+ # Corresponds to the JSON property `name`
312
+ # @return [String]
313
+ attr_accessor :name
314
+
315
+ # Query understanding information.
316
+ # Corresponds to the JSON property `queryUnderstandingInfo`
317
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerQueryUnderstandingInfo]
318
+ attr_accessor :query_understanding_info
319
+
320
+ # References.
321
+ # Corresponds to the JSON property `references`
322
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerReference>]
323
+ attr_accessor :references
324
+
325
+ # Suggested related questions.
326
+ # Corresponds to the JSON property `relatedQuestions`
327
+ # @return [Array<String>]
328
+ attr_accessor :related_questions
329
+
330
+ # The state of the answer generation.
331
+ # Corresponds to the JSON property `state`
332
+ # @return [String]
333
+ attr_accessor :state
334
+
335
+ # Answer generation steps.
336
+ # Corresponds to the JSON property `steps`
337
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerStep>]
338
+ attr_accessor :steps
339
+
340
+ def initialize(**args)
341
+ update!(**args)
342
+ end
343
+
344
+ # Update properties of this object
345
+ def update!(**args)
346
+ @answer_skipped_reasons = args[:answer_skipped_reasons] if args.key?(:answer_skipped_reasons)
347
+ @answer_text = args[:answer_text] if args.key?(:answer_text)
348
+ @citations = args[:citations] if args.key?(:citations)
349
+ @complete_time = args[:complete_time] if args.key?(:complete_time)
350
+ @create_time = args[:create_time] if args.key?(:create_time)
351
+ @name = args[:name] if args.key?(:name)
352
+ @query_understanding_info = args[:query_understanding_info] if args.key?(:query_understanding_info)
353
+ @references = args[:references] if args.key?(:references)
354
+ @related_questions = args[:related_questions] if args.key?(:related_questions)
355
+ @state = args[:state] if args.key?(:state)
356
+ @steps = args[:steps] if args.key?(:steps)
357
+ end
358
+ end
359
+
360
+ # Citation info for a segment.
361
+ class GoogleCloudDiscoveryengineV1AnswerCitation
362
+ include Google::Apis::Core::Hashable
363
+
364
+ # End of the attributed segment, exclusive.
365
+ # Corresponds to the JSON property `endIndex`
366
+ # @return [Fixnum]
367
+ attr_accessor :end_index
368
+
369
+ # Citation sources for the attributed segment.
370
+ # Corresponds to the JSON property `sources`
371
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerCitationSource>]
372
+ attr_accessor :sources
373
+
374
+ # Index indicates the start of the segment, measured in bytes (UTF-8 unicode).
375
+ # Corresponds to the JSON property `startIndex`
376
+ # @return [Fixnum]
377
+ attr_accessor :start_index
378
+
379
+ def initialize(**args)
380
+ update!(**args)
381
+ end
382
+
383
+ # Update properties of this object
384
+ def update!(**args)
385
+ @end_index = args[:end_index] if args.key?(:end_index)
386
+ @sources = args[:sources] if args.key?(:sources)
387
+ @start_index = args[:start_index] if args.key?(:start_index)
388
+ end
389
+ end
390
+
391
+ # Citation source.
392
+ class GoogleCloudDiscoveryengineV1AnswerCitationSource
393
+ include Google::Apis::Core::Hashable
394
+
395
+ # ID of the citation source.
396
+ # Corresponds to the JSON property `referenceId`
397
+ # @return [String]
398
+ attr_accessor :reference_id
399
+
400
+ def initialize(**args)
401
+ update!(**args)
402
+ end
403
+
404
+ # Update properties of this object
405
+ def update!(**args)
406
+ @reference_id = args[:reference_id] if args.key?(:reference_id)
407
+ end
408
+ end
409
+
410
+ # Request message for ConversationalSearchService.AnswerQuery method.
411
+ class GoogleCloudDiscoveryengineV1AnswerQueryRequest
412
+ include Google::Apis::Core::Hashable
413
+
414
+ # Answer generation specification.
415
+ # Corresponds to the JSON property `answerGenerationSpec`
416
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerQueryRequestAnswerGenerationSpec]
417
+ attr_accessor :answer_generation_spec
418
+
419
+ # Asynchronous mode control. If enabled, the response will be returned with
420
+ # answer/session resource name without final answer. The API users need to do
421
+ # the polling to get the latest status of answer/session by calling
422
+ # ConversationalSearchService.GetAnswer or ConversationalSearchService.
423
+ # GetSession method.
424
+ # Corresponds to the JSON property `asynchronousMode`
425
+ # @return [Boolean]
426
+ attr_accessor :asynchronous_mode
427
+ alias_method :asynchronous_mode?, :asynchronous_mode
428
+
429
+ # Defines a user inputed query.
430
+ # Corresponds to the JSON property `query`
431
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1Query]
432
+ attr_accessor :query
433
+
434
+ # Query understanding specification.
435
+ # Corresponds to the JSON property `queryUnderstandingSpec`
436
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpec]
437
+ attr_accessor :query_understanding_spec
438
+
439
+ # Related questions specification.
440
+ # Corresponds to the JSON property `relatedQuestionsSpec`
441
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerQueryRequestRelatedQuestionsSpec]
442
+ attr_accessor :related_questions_spec
443
+
444
+ # Safety specification.
445
+ # Corresponds to the JSON property `safetySpec`
446
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerQueryRequestSafetySpec]
447
+ attr_accessor :safety_spec
448
+
449
+ # Search specification.
450
+ # Corresponds to the JSON property `searchSpec`
451
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpec]
452
+ attr_accessor :search_spec
453
+
454
+ # The session resource name. Not required. When session field is not set, the
455
+ # API is in sessionless mode. We support auto session mode: users can use the
456
+ # wildcard symbol `-` as session ID. A new ID will be automatically generated
457
+ # and assigned.
458
+ # Corresponds to the JSON property `session`
459
+ # @return [String]
460
+ attr_accessor :session
461
+
462
+ # A unique identifier for tracking visitors. For example, this could be
463
+ # implemented with an HTTP cookie, which should be able to uniquely identify a
464
+ # visitor on a single device. This unique identifier should not change if the
465
+ # visitor logs in or out of the website. This field should NOT have a fixed
466
+ # value such as `unknown_visitor`. The field must be a UTF-8 encoded string with
467
+ # a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is
468
+ # returned.
469
+ # Corresponds to the JSON property `userPseudoId`
470
+ # @return [String]
471
+ attr_accessor :user_pseudo_id
472
+
473
+ def initialize(**args)
474
+ update!(**args)
475
+ end
476
+
477
+ # Update properties of this object
478
+ def update!(**args)
479
+ @answer_generation_spec = args[:answer_generation_spec] if args.key?(:answer_generation_spec)
480
+ @asynchronous_mode = args[:asynchronous_mode] if args.key?(:asynchronous_mode)
481
+ @query = args[:query] if args.key?(:query)
482
+ @query_understanding_spec = args[:query_understanding_spec] if args.key?(:query_understanding_spec)
483
+ @related_questions_spec = args[:related_questions_spec] if args.key?(:related_questions_spec)
484
+ @safety_spec = args[:safety_spec] if args.key?(:safety_spec)
485
+ @search_spec = args[:search_spec] if args.key?(:search_spec)
486
+ @session = args[:session] if args.key?(:session)
487
+ @user_pseudo_id = args[:user_pseudo_id] if args.key?(:user_pseudo_id)
488
+ end
489
+ end
490
+
491
+ # Answer generation specification.
492
+ class GoogleCloudDiscoveryengineV1AnswerQueryRequestAnswerGenerationSpec
493
+ include Google::Apis::Core::Hashable
494
+
495
+ # Language code for Answer. Use language tags defined by [BCP47](https://www.rfc-
496
+ # editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature.
497
+ # Corresponds to the JSON property `answerLanguageCode`
498
+ # @return [String]
499
+ attr_accessor :answer_language_code
500
+
501
+ # Specifies whether to filter out adversarial queries. The default value is `
502
+ # false`. Google employs search-query classification to detect adversarial
503
+ # queries. No answer is returned if the search query is classified as an
504
+ # adversarial query. For example, a user might ask a question regarding negative
505
+ # comments about the company or submit a query designed to generate unsafe,
506
+ # policy-violating output. If this field is set to `true`, we skip generating
507
+ # answers for adversarial queries and return fallback messages instead.
508
+ # Corresponds to the JSON property `ignoreAdversarialQuery`
509
+ # @return [Boolean]
510
+ attr_accessor :ignore_adversarial_query
511
+ alias_method :ignore_adversarial_query?, :ignore_adversarial_query
512
+
513
+ # Specifies whether to filter out queries that are not answer-seeking. The
514
+ # default value is `false`. Google employs search-query classification to detect
515
+ # answer-seeking queries. No answer is returned if the search query is
516
+ # classified as a non-answer seeking query. If this field is set to `true`, we
517
+ # skip generating answers for non-answer seeking queries and return fallback
518
+ # messages instead.
519
+ # Corresponds to the JSON property `ignoreNonAnswerSeekingQuery`
520
+ # @return [Boolean]
521
+ attr_accessor :ignore_non_answer_seeking_query
522
+ alias_method :ignore_non_answer_seeking_query?, :ignore_non_answer_seeking_query
523
+
524
+ # Specifies whether to include citation metadata in the answer. The default
525
+ # value is `false`.
526
+ # Corresponds to the JSON property `includeCitations`
527
+ # @return [Boolean]
528
+ attr_accessor :include_citations
529
+ alias_method :include_citations?, :include_citations
530
+
531
+ # Answer Generation Model specification.
532
+ # Corresponds to the JSON property `modelSpec`
533
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerQueryRequestAnswerGenerationSpecModelSpec]
534
+ attr_accessor :model_spec
535
+
536
+ # Answer generation prompt specification.
537
+ # Corresponds to the JSON property `promptSpec`
538
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerQueryRequestAnswerGenerationSpecPromptSpec]
539
+ attr_accessor :prompt_spec
540
+
541
+ def initialize(**args)
542
+ update!(**args)
543
+ end
544
+
545
+ # Update properties of this object
546
+ def update!(**args)
547
+ @answer_language_code = args[:answer_language_code] if args.key?(:answer_language_code)
548
+ @ignore_adversarial_query = args[:ignore_adversarial_query] if args.key?(:ignore_adversarial_query)
549
+ @ignore_non_answer_seeking_query = args[:ignore_non_answer_seeking_query] if args.key?(:ignore_non_answer_seeking_query)
550
+ @include_citations = args[:include_citations] if args.key?(:include_citations)
551
+ @model_spec = args[:model_spec] if args.key?(:model_spec)
552
+ @prompt_spec = args[:prompt_spec] if args.key?(:prompt_spec)
553
+ end
554
+ end
555
+
556
+ # Answer Generation Model specification.
557
+ class GoogleCloudDiscoveryengineV1AnswerQueryRequestAnswerGenerationSpecModelSpec
558
+ include Google::Apis::Core::Hashable
559
+
560
+ # Model version. If not set, it will use the default stable model. Allowed
561
+ # values are: stable, preview.
562
+ # Corresponds to the JSON property `modelVersion`
563
+ # @return [String]
564
+ attr_accessor :model_version
565
+
566
+ def initialize(**args)
567
+ update!(**args)
568
+ end
569
+
570
+ # Update properties of this object
571
+ def update!(**args)
572
+ @model_version = args[:model_version] if args.key?(:model_version)
573
+ end
574
+ end
575
+
576
+ # Answer generation prompt specification.
577
+ class GoogleCloudDiscoveryengineV1AnswerQueryRequestAnswerGenerationSpecPromptSpec
578
+ include Google::Apis::Core::Hashable
579
+
580
+ # Customized preamble.
581
+ # Corresponds to the JSON property `preamble`
582
+ # @return [String]
583
+ attr_accessor :preamble
584
+
585
+ def initialize(**args)
586
+ update!(**args)
587
+ end
588
+
589
+ # Update properties of this object
590
+ def update!(**args)
591
+ @preamble = args[:preamble] if args.key?(:preamble)
592
+ end
593
+ end
594
+
595
+ # Query understanding specification.
596
+ class GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpec
597
+ include Google::Apis::Core::Hashable
598
+
599
+ # Query classification specification.
600
+ # Corresponds to the JSON property `queryClassificationSpec`
601
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryClassificationSpec]
602
+ attr_accessor :query_classification_spec
603
+
604
+ # Query rephraser specification.
605
+ # Corresponds to the JSON property `queryRephraserSpec`
606
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpec]
607
+ attr_accessor :query_rephraser_spec
608
+
609
+ def initialize(**args)
610
+ update!(**args)
611
+ end
612
+
613
+ # Update properties of this object
614
+ def update!(**args)
615
+ @query_classification_spec = args[:query_classification_spec] if args.key?(:query_classification_spec)
616
+ @query_rephraser_spec = args[:query_rephraser_spec] if args.key?(:query_rephraser_spec)
617
+ end
618
+ end
619
+
620
+ # Query classification specification.
621
+ class GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryClassificationSpec
622
+ include Google::Apis::Core::Hashable
623
+
624
+ # Enabled query classification types.
625
+ # Corresponds to the JSON property `types`
626
+ # @return [Array<String>]
627
+ attr_accessor :types
628
+
629
+ def initialize(**args)
630
+ update!(**args)
631
+ end
632
+
633
+ # Update properties of this object
634
+ def update!(**args)
635
+ @types = args[:types] if args.key?(:types)
636
+ end
637
+ end
638
+
639
+ # Query rephraser specification.
640
+ class GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpec
641
+ include Google::Apis::Core::Hashable
642
+
643
+ # Disable query rephraser.
644
+ # Corresponds to the JSON property `disable`
645
+ # @return [Boolean]
646
+ attr_accessor :disable
647
+ alias_method :disable?, :disable
648
+
649
+ def initialize(**args)
650
+ update!(**args)
651
+ end
652
+
653
+ # Update properties of this object
654
+ def update!(**args)
655
+ @disable = args[:disable] if args.key?(:disable)
656
+ end
657
+ end
658
+
659
+ # Related questions specification.
660
+ class GoogleCloudDiscoveryengineV1AnswerQueryRequestRelatedQuestionsSpec
661
+ include Google::Apis::Core::Hashable
662
+
663
+ # Enable related questions feature if true.
664
+ # Corresponds to the JSON property `enable`
665
+ # @return [Boolean]
666
+ attr_accessor :enable
667
+ alias_method :enable?, :enable
668
+
669
+ def initialize(**args)
670
+ update!(**args)
671
+ end
672
+
673
+ # Update properties of this object
674
+ def update!(**args)
675
+ @enable = args[:enable] if args.key?(:enable)
676
+ end
677
+ end
678
+
679
+ # Safety specification.
680
+ class GoogleCloudDiscoveryengineV1AnswerQueryRequestSafetySpec
681
+ include Google::Apis::Core::Hashable
682
+
683
+ # Enable the safety filtering on the answer response. It is false by default.
684
+ # Corresponds to the JSON property `enable`
685
+ # @return [Boolean]
686
+ attr_accessor :enable
687
+ alias_method :enable?, :enable
688
+
689
+ def initialize(**args)
690
+ update!(**args)
691
+ end
692
+
693
+ # Update properties of this object
694
+ def update!(**args)
695
+ @enable = args[:enable] if args.key?(:enable)
696
+ end
697
+ end
698
+
699
+ # Search specification.
700
+ class GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpec
701
+ include Google::Apis::Core::Hashable
702
+
703
+ # Search parameters.
704
+ # Corresponds to the JSON property `searchParams`
705
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchParams]
706
+ attr_accessor :search_params
707
+
708
+ # Search result list.
709
+ # Corresponds to the JSON property `searchResultList`
710
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultList]
711
+ attr_accessor :search_result_list
712
+
713
+ def initialize(**args)
714
+ update!(**args)
715
+ end
716
+
717
+ # Update properties of this object
718
+ def update!(**args)
719
+ @search_params = args[:search_params] if args.key?(:search_params)
720
+ @search_result_list = args[:search_result_list] if args.key?(:search_result_list)
721
+ end
722
+ end
723
+
724
+ # Search parameters.
725
+ class GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchParams
726
+ include Google::Apis::Core::Hashable
727
+
728
+ # Boost specification to boost certain documents.
729
+ # Corresponds to the JSON property `boostSpec`
730
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1SearchRequestBoostSpec]
731
+ attr_accessor :boost_spec
732
+
733
+ # The filter syntax consists of an expression language for constructing a
734
+ # predicate from one or more fields of the documents being filtered. Filter
735
+ # expression is case-sensitive. This will be used to filter search results which
736
+ # may affect the Answer response. If this field is unrecognizable, an `
737
+ # INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by
738
+ # mapping the LHS filter key to a key property defined in the Vertex AI Search
739
+ # backend -- this mapping is defined by the customer in their schema. For
740
+ # example a media customers might have a field 'name' in their schema. In this
741
+ # case the filter would look like this: filter --> name:'ANY("king kong")' For
742
+ # more information about filtering including syntax and filter operators, see [
743
+ # Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-
744
+ # metadata)
745
+ # Corresponds to the JSON property `filter`
746
+ # @return [String]
747
+ attr_accessor :filter
748
+
749
+ # Number of search results to return. The default value is 10.
750
+ # Corresponds to the JSON property `maxReturnResults`
751
+ # @return [Fixnum]
752
+ attr_accessor :max_return_results
753
+
754
+ # The order in which documents are returned. Documents can be ordered by a field
755
+ # in an Document object. Leave it unset if ordered by relevance. `order_by`
756
+ # expression is case-sensitive. For more information on ordering, see [Ordering](
757
+ # https://cloud.google.com/retail/docs/filter-and-order#order) If this field is
758
+ # unrecognizable, an `INVALID_ARGUMENT` is returned.
759
+ # Corresponds to the JSON property `orderBy`
760
+ # @return [String]
761
+ attr_accessor :order_by
762
+
763
+ def initialize(**args)
764
+ update!(**args)
765
+ end
766
+
767
+ # Update properties of this object
768
+ def update!(**args)
769
+ @boost_spec = args[:boost_spec] if args.key?(:boost_spec)
770
+ @filter = args[:filter] if args.key?(:filter)
771
+ @max_return_results = args[:max_return_results] if args.key?(:max_return_results)
772
+ @order_by = args[:order_by] if args.key?(:order_by)
773
+ end
774
+ end
775
+
776
+ # Search result list.
777
+ class GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultList
778
+ include Google::Apis::Core::Hashable
779
+
780
+ # Search results.
781
+ # Corresponds to the JSON property `searchResults`
782
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResult>]
783
+ attr_accessor :search_results
784
+
785
+ def initialize(**args)
786
+ update!(**args)
787
+ end
788
+
789
+ # Update properties of this object
790
+ def update!(**args)
791
+ @search_results = args[:search_results] if args.key?(:search_results)
792
+ end
793
+ end
794
+
795
+ # Search result.
796
+ class GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResult
797
+ include Google::Apis::Core::Hashable
798
+
799
+ # Chunk information.
800
+ # Corresponds to the JSON property `chunkInfo`
801
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfo]
802
+ attr_accessor :chunk_info
803
+
804
+ # Unstructured document information.
805
+ # Corresponds to the JSON property `unstructuredDocumentInfo`
806
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfo]
807
+ attr_accessor :unstructured_document_info
808
+
809
+ def initialize(**args)
810
+ update!(**args)
811
+ end
812
+
813
+ # Update properties of this object
814
+ def update!(**args)
815
+ @chunk_info = args[:chunk_info] if args.key?(:chunk_info)
816
+ @unstructured_document_info = args[:unstructured_document_info] if args.key?(:unstructured_document_info)
817
+ end
818
+ end
819
+
820
+ # Chunk information.
821
+ class GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfo
822
+ include Google::Apis::Core::Hashable
823
+
824
+ # Chunk resource name.
825
+ # Corresponds to the JSON property `chunk`
826
+ # @return [String]
827
+ attr_accessor :chunk
828
+
829
+ # Chunk textual content.
830
+ # Corresponds to the JSON property `content`
831
+ # @return [String]
832
+ attr_accessor :content
833
+
834
+ def initialize(**args)
835
+ update!(**args)
836
+ end
837
+
838
+ # Update properties of this object
839
+ def update!(**args)
840
+ @chunk = args[:chunk] if args.key?(:chunk)
841
+ @content = args[:content] if args.key?(:content)
842
+ end
843
+ end
844
+
845
+ # Unstructured document information.
846
+ class GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfo
847
+ include Google::Apis::Core::Hashable
848
+
849
+ # Document resource name.
850
+ # Corresponds to the JSON property `document`
851
+ # @return [String]
852
+ attr_accessor :document
853
+
854
+ # List of document contexts.
855
+ # Corresponds to the JSON property `documentContexts`
856
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext>]
857
+ attr_accessor :document_contexts
858
+
859
+ # List of extractive answers.
860
+ # Corresponds to the JSON property `extractiveAnswers`
861
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer>]
862
+ attr_accessor :extractive_answers
863
+
864
+ # List of extractive segments.
865
+ # Corresponds to the JSON property `extractiveSegments`
866
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment>]
867
+ attr_accessor :extractive_segments
868
+
869
+ # Title.
870
+ # Corresponds to the JSON property `title`
871
+ # @return [String]
872
+ attr_accessor :title
873
+
874
+ # URI for the document.
875
+ # Corresponds to the JSON property `uri`
876
+ # @return [String]
877
+ attr_accessor :uri
878
+
879
+ def initialize(**args)
880
+ update!(**args)
881
+ end
882
+
883
+ # Update properties of this object
884
+ def update!(**args)
885
+ @document = args[:document] if args.key?(:document)
886
+ @document_contexts = args[:document_contexts] if args.key?(:document_contexts)
887
+ @extractive_answers = args[:extractive_answers] if args.key?(:extractive_answers)
888
+ @extractive_segments = args[:extractive_segments] if args.key?(:extractive_segments)
889
+ @title = args[:title] if args.key?(:title)
890
+ @uri = args[:uri] if args.key?(:uri)
891
+ end
892
+ end
893
+
894
+ # Document context.
895
+ class GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext
896
+ include Google::Apis::Core::Hashable
897
+
898
+ # Document content.
899
+ # Corresponds to the JSON property `content`
900
+ # @return [String]
901
+ attr_accessor :content
902
+
903
+ # Page identifier.
904
+ # Corresponds to the JSON property `pageIdentifier`
905
+ # @return [String]
906
+ attr_accessor :page_identifier
907
+
908
+ def initialize(**args)
909
+ update!(**args)
910
+ end
911
+
912
+ # Update properties of this object
913
+ def update!(**args)
914
+ @content = args[:content] if args.key?(:content)
915
+ @page_identifier = args[:page_identifier] if args.key?(:page_identifier)
916
+ end
917
+ end
918
+
919
+ # Extractive answer. [Guide](https://cloud.google.com/generative-ai-app-builder/
920
+ # docs/snippets#get-answers)
921
+ class GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer
922
+ include Google::Apis::Core::Hashable
923
+
924
+ # Extractive answer content.
925
+ # Corresponds to the JSON property `content`
926
+ # @return [String]
927
+ attr_accessor :content
928
+
929
+ # Page identifier.
930
+ # Corresponds to the JSON property `pageIdentifier`
931
+ # @return [String]
932
+ attr_accessor :page_identifier
933
+
934
+ def initialize(**args)
935
+ update!(**args)
936
+ end
937
+
938
+ # Update properties of this object
939
+ def update!(**args)
940
+ @content = args[:content] if args.key?(:content)
941
+ @page_identifier = args[:page_identifier] if args.key?(:page_identifier)
942
+ end
943
+ end
944
+
945
+ # Extractive segment. [Guide](https://cloud.google.com/generative-ai-app-builder/
946
+ # docs/snippets#extractive-segments)
947
+ class GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment
948
+ include Google::Apis::Core::Hashable
949
+
950
+ # Extractive segment content.
951
+ # Corresponds to the JSON property `content`
952
+ # @return [String]
953
+ attr_accessor :content
954
+
955
+ # Page identifier.
956
+ # Corresponds to the JSON property `pageIdentifier`
957
+ # @return [String]
958
+ attr_accessor :page_identifier
959
+
960
+ def initialize(**args)
961
+ update!(**args)
962
+ end
963
+
964
+ # Update properties of this object
965
+ def update!(**args)
966
+ @content = args[:content] if args.key?(:content)
967
+ @page_identifier = args[:page_identifier] if args.key?(:page_identifier)
968
+ end
969
+ end
970
+
971
+ # Response message for ConversationalSearchService.AnswerQuery method.
972
+ class GoogleCloudDiscoveryengineV1AnswerQueryResponse
973
+ include Google::Apis::Core::Hashable
974
+
975
+ # Defines an answer.
976
+ # Corresponds to the JSON property `answer`
977
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1Answer]
978
+ attr_accessor :answer
979
+
980
+ # A global unique ID used for logging.
981
+ # Corresponds to the JSON property `answerQueryToken`
982
+ # @return [String]
983
+ attr_accessor :answer_query_token
984
+
985
+ # External session proto definition.
986
+ # Corresponds to the JSON property `session`
987
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1Session]
988
+ attr_accessor :session
989
+
990
+ def initialize(**args)
991
+ update!(**args)
992
+ end
993
+
994
+ # Update properties of this object
995
+ def update!(**args)
996
+ @answer = args[:answer] if args.key?(:answer)
997
+ @answer_query_token = args[:answer_query_token] if args.key?(:answer_query_token)
998
+ @session = args[:session] if args.key?(:session)
999
+ end
1000
+ end
1001
+
1002
+ # Query understanding information.
1003
+ class GoogleCloudDiscoveryengineV1AnswerQueryUnderstandingInfo
1004
+ include Google::Apis::Core::Hashable
1005
+
1006
+ # Query classification information.
1007
+ # Corresponds to the JSON property `queryClassificationInfo`
1008
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerQueryUnderstandingInfoQueryClassificationInfo>]
1009
+ attr_accessor :query_classification_info
1010
+
1011
+ def initialize(**args)
1012
+ update!(**args)
1013
+ end
1014
+
1015
+ # Update properties of this object
1016
+ def update!(**args)
1017
+ @query_classification_info = args[:query_classification_info] if args.key?(:query_classification_info)
1018
+ end
1019
+ end
1020
+
1021
+ # Query classification information.
1022
+ class GoogleCloudDiscoveryengineV1AnswerQueryUnderstandingInfoQueryClassificationInfo
1023
+ include Google::Apis::Core::Hashable
1024
+
1025
+ # Classification output.
1026
+ # Corresponds to the JSON property `positive`
1027
+ # @return [Boolean]
1028
+ attr_accessor :positive
1029
+ alias_method :positive?, :positive
1030
+
1031
+ # Query classification type.
1032
+ # Corresponds to the JSON property `type`
1033
+ # @return [String]
1034
+ attr_accessor :type
1035
+
1036
+ def initialize(**args)
1037
+ update!(**args)
1038
+ end
1039
+
1040
+ # Update properties of this object
1041
+ def update!(**args)
1042
+ @positive = args[:positive] if args.key?(:positive)
1043
+ @type = args[:type] if args.key?(:type)
1044
+ end
1045
+ end
1046
+
1047
+ # Reference.
1048
+ class GoogleCloudDiscoveryengineV1AnswerReference
1049
+ include Google::Apis::Core::Hashable
1050
+
1051
+ # Chunk information.
1052
+ # Corresponds to the JSON property `chunkInfo`
1053
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerReferenceChunkInfo]
1054
+ attr_accessor :chunk_info
1055
+
1056
+ # Unstructured document information.
1057
+ # Corresponds to the JSON property `unstructuredDocumentInfo`
1058
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerReferenceUnstructuredDocumentInfo]
1059
+ attr_accessor :unstructured_document_info
1060
+
1061
+ def initialize(**args)
1062
+ update!(**args)
1063
+ end
1064
+
1065
+ # Update properties of this object
1066
+ def update!(**args)
1067
+ @chunk_info = args[:chunk_info] if args.key?(:chunk_info)
1068
+ @unstructured_document_info = args[:unstructured_document_info] if args.key?(:unstructured_document_info)
1069
+ end
1070
+ end
1071
+
1072
+ # Chunk information.
1073
+ class GoogleCloudDiscoveryengineV1AnswerReferenceChunkInfo
1074
+ include Google::Apis::Core::Hashable
1075
+
1076
+ # Chunk resource name.
1077
+ # Corresponds to the JSON property `chunk`
1078
+ # @return [String]
1079
+ attr_accessor :chunk
1080
+
1081
+ # Chunk textual content.
1082
+ # Corresponds to the JSON property `content`
1083
+ # @return [String]
1084
+ attr_accessor :content
1085
+
1086
+ # Document metadata.
1087
+ # Corresponds to the JSON property `documentMetadata`
1088
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerReferenceChunkInfoDocumentMetadata]
1089
+ attr_accessor :document_metadata
1090
+
1091
+ # Relevance score.
1092
+ # Corresponds to the JSON property `relevanceScore`
1093
+ # @return [Float]
1094
+ attr_accessor :relevance_score
1095
+
1096
+ def initialize(**args)
1097
+ update!(**args)
1098
+ end
1099
+
1100
+ # Update properties of this object
1101
+ def update!(**args)
1102
+ @chunk = args[:chunk] if args.key?(:chunk)
1103
+ @content = args[:content] if args.key?(:content)
1104
+ @document_metadata = args[:document_metadata] if args.key?(:document_metadata)
1105
+ @relevance_score = args[:relevance_score] if args.key?(:relevance_score)
1106
+ end
1107
+ end
1108
+
1109
+ # Document metadata.
1110
+ class GoogleCloudDiscoveryengineV1AnswerReferenceChunkInfoDocumentMetadata
1111
+ include Google::Apis::Core::Hashable
1112
+
1113
+ # Document resource name.
1114
+ # Corresponds to the JSON property `document`
1115
+ # @return [String]
1116
+ attr_accessor :document
1117
+
1118
+ # Page identifier.
1119
+ # Corresponds to the JSON property `pageIdentifier`
1120
+ # @return [String]
1121
+ attr_accessor :page_identifier
1122
+
1123
+ # Title.
1124
+ # Corresponds to the JSON property `title`
1125
+ # @return [String]
1126
+ attr_accessor :title
1127
+
1128
+ # URI for the document.
1129
+ # Corresponds to the JSON property `uri`
1130
+ # @return [String]
1131
+ attr_accessor :uri
1132
+
1133
+ def initialize(**args)
1134
+ update!(**args)
1135
+ end
1136
+
1137
+ # Update properties of this object
1138
+ def update!(**args)
1139
+ @document = args[:document] if args.key?(:document)
1140
+ @page_identifier = args[:page_identifier] if args.key?(:page_identifier)
1141
+ @title = args[:title] if args.key?(:title)
1142
+ @uri = args[:uri] if args.key?(:uri)
1143
+ end
1144
+ end
1145
+
1146
+ # Unstructured document information.
1147
+ class GoogleCloudDiscoveryengineV1AnswerReferenceUnstructuredDocumentInfo
1148
+ include Google::Apis::Core::Hashable
1149
+
1150
+ # List of cited chunk contents derived from document content.
1151
+ # Corresponds to the JSON property `chunkContents`
1152
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerReferenceUnstructuredDocumentInfoChunkContent>]
1153
+ attr_accessor :chunk_contents
1154
+
1155
+ # Document resource name.
1156
+ # Corresponds to the JSON property `document`
1157
+ # @return [String]
1158
+ attr_accessor :document
1159
+
1160
+ # Title.
1161
+ # Corresponds to the JSON property `title`
1162
+ # @return [String]
1163
+ attr_accessor :title
1164
+
1165
+ # URI for the document.
1166
+ # Corresponds to the JSON property `uri`
1167
+ # @return [String]
1168
+ attr_accessor :uri
1169
+
1170
+ def initialize(**args)
1171
+ update!(**args)
1172
+ end
1173
+
1174
+ # Update properties of this object
1175
+ def update!(**args)
1176
+ @chunk_contents = args[:chunk_contents] if args.key?(:chunk_contents)
1177
+ @document = args[:document] if args.key?(:document)
1178
+ @title = args[:title] if args.key?(:title)
1179
+ @uri = args[:uri] if args.key?(:uri)
1180
+ end
1181
+ end
1182
+
1183
+ # Chunk content.
1184
+ class GoogleCloudDiscoveryengineV1AnswerReferenceUnstructuredDocumentInfoChunkContent
1185
+ include Google::Apis::Core::Hashable
1186
+
1187
+ # Chunk textual content.
1188
+ # Corresponds to the JSON property `content`
1189
+ # @return [String]
1190
+ attr_accessor :content
1191
+
1192
+ # Page identifier.
1193
+ # Corresponds to the JSON property `pageIdentifier`
1194
+ # @return [String]
1195
+ attr_accessor :page_identifier
1196
+
1197
+ def initialize(**args)
1198
+ update!(**args)
1199
+ end
1200
+
1201
+ # Update properties of this object
1202
+ def update!(**args)
1203
+ @content = args[:content] if args.key?(:content)
1204
+ @page_identifier = args[:page_identifier] if args.key?(:page_identifier)
1205
+ end
1206
+ end
1207
+
1208
+ # Step information.
1209
+ class GoogleCloudDiscoveryengineV1AnswerStep
1210
+ include Google::Apis::Core::Hashable
1211
+
1212
+ # Actions.
1213
+ # Corresponds to the JSON property `actions`
1214
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerStepAction>]
1215
+ attr_accessor :actions
1216
+
1217
+ # The description of the step.
1218
+ # Corresponds to the JSON property `description`
1219
+ # @return [String]
1220
+ attr_accessor :description
1221
+
1222
+ # The state of the step.
1223
+ # Corresponds to the JSON property `state`
1224
+ # @return [String]
1225
+ attr_accessor :state
1226
+
1227
+ # The thought of the step.
1228
+ # Corresponds to the JSON property `thought`
1229
+ # @return [String]
1230
+ attr_accessor :thought
1231
+
1232
+ def initialize(**args)
1233
+ update!(**args)
1234
+ end
1235
+
1236
+ # Update properties of this object
1237
+ def update!(**args)
1238
+ @actions = args[:actions] if args.key?(:actions)
1239
+ @description = args[:description] if args.key?(:description)
1240
+ @state = args[:state] if args.key?(:state)
1241
+ @thought = args[:thought] if args.key?(:thought)
1242
+ end
1243
+ end
1244
+
1245
+ # Action.
1246
+ class GoogleCloudDiscoveryengineV1AnswerStepAction
1247
+ include Google::Apis::Core::Hashable
1248
+
1249
+ # Observation.
1250
+ # Corresponds to the JSON property `observation`
1251
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerStepActionObservation]
1252
+ attr_accessor :observation
1253
+
1254
+ # Search action.
1255
+ # Corresponds to the JSON property `searchAction`
1256
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerStepActionSearchAction]
1257
+ attr_accessor :search_action
1258
+
1259
+ def initialize(**args)
1260
+ update!(**args)
1261
+ end
1262
+
1263
+ # Update properties of this object
1264
+ def update!(**args)
1265
+ @observation = args[:observation] if args.key?(:observation)
1266
+ @search_action = args[:search_action] if args.key?(:search_action)
1267
+ end
1268
+ end
1269
+
1270
+ # Observation.
1271
+ class GoogleCloudDiscoveryengineV1AnswerStepActionObservation
1272
+ include Google::Apis::Core::Hashable
1273
+
1274
+ # Search results observed by the search action, it can be snippets info or chunk
1275
+ # info, depending on the citation type set by the user.
1276
+ # Corresponds to the JSON property `searchResults`
1277
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerStepActionObservationSearchResult>]
1278
+ attr_accessor :search_results
1279
+
1280
+ def initialize(**args)
1281
+ update!(**args)
1282
+ end
1283
+
1284
+ # Update properties of this object
1285
+ def update!(**args)
1286
+ @search_results = args[:search_results] if args.key?(:search_results)
1287
+ end
1288
+ end
1289
+
1290
+ #
1291
+ class GoogleCloudDiscoveryengineV1AnswerStepActionObservationSearchResult
1292
+ include Google::Apis::Core::Hashable
1293
+
1294
+ # If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, populate chunk
1295
+ # info.
1296
+ # Corresponds to the JSON property `chunkInfo`
1297
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerStepActionObservationSearchResultChunkInfo>]
1298
+ attr_accessor :chunk_info
1299
+
1300
+ # Document resource name.
1301
+ # Corresponds to the JSON property `document`
1302
+ # @return [String]
1303
+ attr_accessor :document
1304
+
1305
+ # If citation_type is DOCUMENT_LEVEL_CITATION, populate document level snippets.
1306
+ # Corresponds to the JSON property `snippetInfo`
1307
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerStepActionObservationSearchResultSnippetInfo>]
1308
+ attr_accessor :snippet_info
1309
+
1310
+ # Title.
1311
+ # Corresponds to the JSON property `title`
1312
+ # @return [String]
1313
+ attr_accessor :title
1314
+
1315
+ # URI for the document.
1316
+ # Corresponds to the JSON property `uri`
1317
+ # @return [String]
1318
+ attr_accessor :uri
1319
+
1320
+ def initialize(**args)
1321
+ update!(**args)
1322
+ end
1323
+
1324
+ # Update properties of this object
1325
+ def update!(**args)
1326
+ @chunk_info = args[:chunk_info] if args.key?(:chunk_info)
1327
+ @document = args[:document] if args.key?(:document)
1328
+ @snippet_info = args[:snippet_info] if args.key?(:snippet_info)
1329
+ @title = args[:title] if args.key?(:title)
1330
+ @uri = args[:uri] if args.key?(:uri)
1331
+ end
1332
+ end
1333
+
1334
+ # Chunk information.
1335
+ class GoogleCloudDiscoveryengineV1AnswerStepActionObservationSearchResultChunkInfo
1336
+ include Google::Apis::Core::Hashable
1337
+
1338
+ # Chunk resource name.
1339
+ # Corresponds to the JSON property `chunk`
1340
+ # @return [String]
1341
+ attr_accessor :chunk
1342
+
1343
+ # Chunk textual content.
1344
+ # Corresponds to the JSON property `content`
1345
+ # @return [String]
1346
+ attr_accessor :content
1347
+
1348
+ # Relevance score.
1349
+ # Corresponds to the JSON property `relevanceScore`
1350
+ # @return [Float]
1351
+ attr_accessor :relevance_score
1352
+
1353
+ def initialize(**args)
1354
+ update!(**args)
1355
+ end
1356
+
1357
+ # Update properties of this object
1358
+ def update!(**args)
1359
+ @chunk = args[:chunk] if args.key?(:chunk)
1360
+ @content = args[:content] if args.key?(:content)
1361
+ @relevance_score = args[:relevance_score] if args.key?(:relevance_score)
1362
+ end
1363
+ end
1364
+
1365
+ # Snippet information.
1366
+ class GoogleCloudDiscoveryengineV1AnswerStepActionObservationSearchResultSnippetInfo
1367
+ include Google::Apis::Core::Hashable
1368
+
1369
+ # Snippet content.
1370
+ # Corresponds to the JSON property `snippet`
1371
+ # @return [String]
1372
+ attr_accessor :snippet
1373
+
1374
+ # Status of the snippet defined by the search team.
1375
+ # Corresponds to the JSON property `snippetStatus`
1376
+ # @return [String]
1377
+ attr_accessor :snippet_status
1378
+
1379
+ def initialize(**args)
1380
+ update!(**args)
1381
+ end
1382
+
1383
+ # Update properties of this object
1384
+ def update!(**args)
1385
+ @snippet = args[:snippet] if args.key?(:snippet)
1386
+ @snippet_status = args[:snippet_status] if args.key?(:snippet_status)
1387
+ end
1388
+ end
1389
+
1390
+ # Search action.
1391
+ class GoogleCloudDiscoveryengineV1AnswerStepActionSearchAction
1392
+ include Google::Apis::Core::Hashable
1393
+
1394
+ # The query to search.
1395
+ # Corresponds to the JSON property `query`
1396
+ # @return [String]
1397
+ attr_accessor :query
1398
+
1399
+ def initialize(**args)
1400
+ update!(**args)
1401
+ end
1402
+
1403
+ # Update properties of this object
1404
+ def update!(**args)
1405
+ @query = args[:query] if args.key?(:query)
1406
+ end
1407
+ end
1408
+
279
1409
  # Metadata related to the progress of the SiteSearchEngineService.
280
1410
  # BatchCreateTargetSites operation. This will be returned by the google.
281
1411
  # longrunning.Operation.metadata field.
@@ -540,37 +1670,196 @@ module Google
540
1670
 
541
1671
  # Update properties of this object
542
1672
  def update!(**args)
543
- @columns = args[:columns] if args.key?(:columns)
544
- @encoding = args[:encoding] if args.key?(:encoding)
545
- @field_name = args[:field_name] if args.key?(:field_name)
546
- @type = args[:type] if args.key?(:type)
1673
+ @columns = args[:columns] if args.key?(:columns)
1674
+ @encoding = args[:encoding] if args.key?(:encoding)
1675
+ @field_name = args[:field_name] if args.key?(:field_name)
1676
+ @type = args[:type] if args.key?(:type)
1677
+ end
1678
+ end
1679
+
1680
+ # The Cloud Bigtable source for importing data.
1681
+ class GoogleCloudDiscoveryengineV1BigtableSource
1682
+ include Google::Apis::Core::Hashable
1683
+
1684
+ # The Bigtable Options object that contains information to support the import.
1685
+ # Corresponds to the JSON property `bigtableOptions`
1686
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1BigtableOptions]
1687
+ attr_accessor :bigtable_options
1688
+
1689
+ # Required. The instance ID of the Cloud Bigtable that needs to be imported.
1690
+ # Corresponds to the JSON property `instanceId`
1691
+ # @return [String]
1692
+ attr_accessor :instance_id
1693
+
1694
+ # The project ID that the Bigtable source is in with a length limit of 128
1695
+ # characters. If not specified, inherits the project ID from the parent request.
1696
+ # Corresponds to the JSON property `projectId`
1697
+ # @return [String]
1698
+ attr_accessor :project_id
1699
+
1700
+ # Required. The table ID of the Cloud Bigtable that needs to be imported.
1701
+ # Corresponds to the JSON property `tableId`
1702
+ # @return [String]
1703
+ attr_accessor :table_id
1704
+
1705
+ def initialize(**args)
1706
+ update!(**args)
1707
+ end
1708
+
1709
+ # Update properties of this object
1710
+ def update!(**args)
1711
+ @bigtable_options = args[:bigtable_options] if args.key?(:bigtable_options)
1712
+ @instance_id = args[:instance_id] if args.key?(:instance_id)
1713
+ @project_id = args[:project_id] if args.key?(:project_id)
1714
+ @table_id = args[:table_id] if args.key?(:table_id)
1715
+ end
1716
+ end
1717
+
1718
+ # Request message for GroundedGenerationService.CheckGrounding method.
1719
+ class GoogleCloudDiscoveryengineV1CheckGroundingRequest
1720
+ include Google::Apis::Core::Hashable
1721
+
1722
+ # Answer candidate to check. Can have a maximum length of 1024 characters.
1723
+ # Corresponds to the JSON property `answerCandidate`
1724
+ # @return [String]
1725
+ attr_accessor :answer_candidate
1726
+
1727
+ # List of facts for the grounding check. We support up to 200 facts.
1728
+ # Corresponds to the JSON property `facts`
1729
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1GroundingFact>]
1730
+ attr_accessor :facts
1731
+
1732
+ # Specification for the grounding check.
1733
+ # Corresponds to the JSON property `groundingSpec`
1734
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1CheckGroundingSpec]
1735
+ attr_accessor :grounding_spec
1736
+
1737
+ # The user labels applied to a resource must meet the following requirements: *
1738
+ # Each resource can have multiple labels, up to a maximum of 64. * Each label
1739
+ # must be a key-value pair. * Keys have a minimum length of 1 character and a
1740
+ # maximum length of 63 characters and cannot be empty. Values can be empty and
1741
+ # have a maximum length of 63 characters. * Keys and values can contain only
1742
+ # lowercase letters, numeric characters, underscores, and dashes. All characters
1743
+ # must use UTF-8 encoding, and international characters are allowed. * The key
1744
+ # portion of a label must be unique. However, you can use the same key with
1745
+ # multiple resources. * Keys must start with a lowercase letter or international
1746
+ # character. See [Google Cloud Document](https://cloud.google.com/resource-
1747
+ # manager/docs/creating-managing-labels#requirements) for more details.
1748
+ # Corresponds to the JSON property `userLabels`
1749
+ # @return [Hash<String,String>]
1750
+ attr_accessor :user_labels
1751
+
1752
+ def initialize(**args)
1753
+ update!(**args)
1754
+ end
1755
+
1756
+ # Update properties of this object
1757
+ def update!(**args)
1758
+ @answer_candidate = args[:answer_candidate] if args.key?(:answer_candidate)
1759
+ @facts = args[:facts] if args.key?(:facts)
1760
+ @grounding_spec = args[:grounding_spec] if args.key?(:grounding_spec)
1761
+ @user_labels = args[:user_labels] if args.key?(:user_labels)
1762
+ end
1763
+ end
1764
+
1765
+ # Response message for the GroundedGenerationService.CheckGrounding method.
1766
+ class GoogleCloudDiscoveryengineV1CheckGroundingResponse
1767
+ include Google::Apis::Core::Hashable
1768
+
1769
+ # List of facts cited across all claims in the answer candidate. These are
1770
+ # derived from the facts supplied in the request.
1771
+ # Corresponds to the JSON property `citedChunks`
1772
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1FactChunk>]
1773
+ attr_accessor :cited_chunks
1774
+
1775
+ # Claim texts and citation info across all claims in the answer candidate.
1776
+ # Corresponds to the JSON property `claims`
1777
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1CheckGroundingResponseClaim>]
1778
+ attr_accessor :claims
1779
+
1780
+ # The support score for the input answer candidate. Higher the score, higher is
1781
+ # the fraction of claims that are supported by the provided facts. This is
1782
+ # always set when a response is returned.
1783
+ # Corresponds to the JSON property `supportScore`
1784
+ # @return [Float]
1785
+ attr_accessor :support_score
1786
+
1787
+ def initialize(**args)
1788
+ update!(**args)
1789
+ end
1790
+
1791
+ # Update properties of this object
1792
+ def update!(**args)
1793
+ @cited_chunks = args[:cited_chunks] if args.key?(:cited_chunks)
1794
+ @claims = args[:claims] if args.key?(:claims)
1795
+ @support_score = args[:support_score] if args.key?(:support_score)
1796
+ end
1797
+ end
1798
+
1799
+ # Text and citation info for a claim in the answer candidate.
1800
+ class GoogleCloudDiscoveryengineV1CheckGroundingResponseClaim
1801
+ include Google::Apis::Core::Hashable
1802
+
1803
+ # A list of indices (into 'cited_chunks') specifying the citations associated
1804
+ # with the claim. For instance [1,3,4] means that cited_chunks[1], cited_chunks[
1805
+ # 3], cited_chunks[4] are the facts cited supporting for the claim. A citation
1806
+ # to a fact indicates that the claim is supported by the fact.
1807
+ # Corresponds to the JSON property `citationIndices`
1808
+ # @return [Array<Fixnum>]
1809
+ attr_accessor :citation_indices
1810
+
1811
+ # Text for the claim in the answer candidate. Always provided regardless of
1812
+ # whether citations or anti-citations are found.
1813
+ # Corresponds to the JSON property `claimText`
1814
+ # @return [String]
1815
+ attr_accessor :claim_text
1816
+
1817
+ # Position indicating the end of the claim in the answer candidate, exclusive.
1818
+ # Corresponds to the JSON property `endPos`
1819
+ # @return [Fixnum]
1820
+ attr_accessor :end_pos
1821
+
1822
+ # Indicates that this claim required grounding check. When the system decided
1823
+ # this claim doesn't require attribution/grounding check, this field will be set
1824
+ # to false. In that case, no grounding check was done for the claim and
1825
+ # therefore citation_indices, and anti_citation_indices should not be returned.
1826
+ # Corresponds to the JSON property `groundingCheckRequired`
1827
+ # @return [Boolean]
1828
+ attr_accessor :grounding_check_required
1829
+ alias_method :grounding_check_required?, :grounding_check_required
1830
+
1831
+ # Position indicating the start of the claim in the answer candidate, measured
1832
+ # in bytes.
1833
+ # Corresponds to the JSON property `startPos`
1834
+ # @return [Fixnum]
1835
+ attr_accessor :start_pos
1836
+
1837
+ def initialize(**args)
1838
+ update!(**args)
1839
+ end
1840
+
1841
+ # Update properties of this object
1842
+ def update!(**args)
1843
+ @citation_indices = args[:citation_indices] if args.key?(:citation_indices)
1844
+ @claim_text = args[:claim_text] if args.key?(:claim_text)
1845
+ @end_pos = args[:end_pos] if args.key?(:end_pos)
1846
+ @grounding_check_required = args[:grounding_check_required] if args.key?(:grounding_check_required)
1847
+ @start_pos = args[:start_pos] if args.key?(:start_pos)
547
1848
  end
548
1849
  end
549
1850
 
550
- # The Cloud Bigtable source for importing data.
551
- class GoogleCloudDiscoveryengineV1BigtableSource
1851
+ # Specification for the grounding check.
1852
+ class GoogleCloudDiscoveryengineV1CheckGroundingSpec
552
1853
  include Google::Apis::Core::Hashable
553
1854
 
554
- # The Bigtable Options object that contains information to support the import.
555
- # Corresponds to the JSON property `bigtableOptions`
556
- # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1BigtableOptions]
557
- attr_accessor :bigtable_options
558
-
559
- # Required. The instance ID of the Cloud Bigtable that needs to be imported.
560
- # Corresponds to the JSON property `instanceId`
561
- # @return [String]
562
- attr_accessor :instance_id
563
-
564
- # The project ID that the Bigtable source is in with a length limit of 128
565
- # characters. If not specified, inherits the project ID from the parent request.
566
- # Corresponds to the JSON property `projectId`
567
- # @return [String]
568
- attr_accessor :project_id
569
-
570
- # Required. The table ID of the Cloud Bigtable that needs to be imported.
571
- # Corresponds to the JSON property `tableId`
572
- # @return [String]
573
- attr_accessor :table_id
1855
+ # The threshold (in [0,1]) used for determining whether a fact must be cited for
1856
+ # a claim in the answer candidate. Choosing a higher threshold will lead to
1857
+ # fewer but very strong citations, while choosing a lower threshold may lead to
1858
+ # more but somewhat weaker citations. If unset, the threshold will default to 0.
1859
+ # 6.
1860
+ # Corresponds to the JSON property `citationThreshold`
1861
+ # @return [Float]
1862
+ attr_accessor :citation_threshold
574
1863
 
575
1864
  def initialize(**args)
576
1865
  update!(**args)
@@ -578,10 +1867,7 @@ module Google
578
1867
 
579
1868
  # Update properties of this object
580
1869
  def update!(**args)
581
- @bigtable_options = args[:bigtable_options] if args.key?(:bigtable_options)
582
- @instance_id = args[:instance_id] if args.key?(:instance_id)
583
- @project_id = args[:project_id] if args.key?(:project_id)
584
- @table_id = args[:table_id] if args.key?(:table_id)
1870
+ @citation_threshold = args[:citation_threshold] if args.key?(:citation_threshold)
585
1871
  end
586
1872
  end
587
1873
 
@@ -1510,9 +2796,9 @@ module Google
1510
2796
  attr_accessor :promotion_ids
1511
2797
 
1512
2798
  # Quantity of the Document associated with the user event. Defaults to 1. For
1513
- # example, this field will be 2 if two quantities of the same Document are
1514
- # involved in a `add-to-cart` event. Required for events of the following event
1515
- # types: * `add-to-cart` * `purchase`
2799
+ # example, this field is 2 if two quantities of the same Document are involved
2800
+ # in a `add-to-cart` event. Required for events of the following event types: * `
2801
+ # add-to-cart` * `purchase`
1516
2802
  # Corresponds to the JSON property `quantity`
1517
2803
  # @return [Fixnum]
1518
2804
  attr_accessor :quantity
@@ -1738,8 +3024,7 @@ module Google
1738
3024
 
1739
3025
  # The industry vertical that the engine registers. The restriction of the Engine
1740
3026
  # industry vertical is based on DataStore: If unspecified, default to `GENERIC`.
1741
- # Vertical on Engine has to match vertical of the DataStore liniked to the
1742
- # engine.
3027
+ # Vertical on Engine has to match vertical of the DataStore linked to the engine.
1743
3028
  # Corresponds to the JSON property `industryVertical`
1744
3029
  # @return [String]
1745
3030
  attr_accessor :industry_vertical
@@ -1937,6 +3222,45 @@ module Google
1937
3222
  end
1938
3223
  end
1939
3224
 
3225
+ # Fact Chunk.
3226
+ class GoogleCloudDiscoveryengineV1FactChunk
3227
+ include Google::Apis::Core::Hashable
3228
+
3229
+ # Text content of the fact chunk. Can be at most 10K characters long.
3230
+ # Corresponds to the JSON property `chunkText`
3231
+ # @return [String]
3232
+ attr_accessor :chunk_text
3233
+
3234
+ # The index of this chunk. Currently, only used for the streaming mode.
3235
+ # Corresponds to the JSON property `index`
3236
+ # @return [Fixnum]
3237
+ attr_accessor :index
3238
+
3239
+ # Source from which this fact chunk was retrieved. If it was retrieved from the
3240
+ # GroundingFacts provided in the request then this field will contain the index
3241
+ # of the specific fact from which this chunk was retrieved.
3242
+ # Corresponds to the JSON property `source`
3243
+ # @return [String]
3244
+ attr_accessor :source
3245
+
3246
+ # More fine-grained information for the source reference.
3247
+ # Corresponds to the JSON property `sourceMetadata`
3248
+ # @return [Hash<String,String>]
3249
+ attr_accessor :source_metadata
3250
+
3251
+ def initialize(**args)
3252
+ update!(**args)
3253
+ end
3254
+
3255
+ # Update properties of this object
3256
+ def update!(**args)
3257
+ @chunk_text = args[:chunk_text] if args.key?(:chunk_text)
3258
+ @index = args[:index] if args.key?(:index)
3259
+ @source = args[:source] if args.key?(:source)
3260
+ @source_metadata = args[:source_metadata] if args.key?(:source_metadata)
3261
+ end
3262
+ end
3263
+
1940
3264
  # Response message for SiteSearchEngineService.FetchDomainVerificationStatus
1941
3265
  # method.
1942
3266
  class GoogleCloudDiscoveryengineV1FetchDomainVerificationStatusResponse
@@ -2004,8 +3328,8 @@ module Google
2004
3328
  class GoogleCloudDiscoveryengineV1FirestoreSource
2005
3329
  include Google::Apis::Core::Hashable
2006
3330
 
2007
- # Required. The Firestore collection to copy the data from with a length limit
2008
- # of 1,500 characters.
3331
+ # Required. The Firestore collection (or entity) to copy the data from with a
3332
+ # length limit of 1,500 characters.
2009
3333
  # Corresponds to the JSON property `collectionId`
2010
3334
  # @return [String]
2011
3335
  attr_accessor :collection_id
@@ -2058,17 +3382,17 @@ module Google
2058
3382
  # vertical. * `csv`: A CSV file with header conforming to the defined Schema of
2059
3383
  # the data store. Each entry after the header is imported as a Document. This
2060
3384
  # can only be used by the GENERIC Data Store vertical. Supported values for user
2061
- # even imports: * `user_event` (default): One JSON UserEvent per line.
3385
+ # event imports: * `user_event` (default): One JSON UserEvent per line.
2062
3386
  # Corresponds to the JSON property `dataSchema`
2063
3387
  # @return [String]
2064
3388
  attr_accessor :data_schema
2065
3389
 
2066
- # Required. Cloud Storage URIs to input files. URI can be up to 2000 characters
2067
- # long. URIs can match the full object path (for example, `gs://bucket/directory/
2068
- # object.json`) or a pattern matching one or more files, such as `gs://bucket/
2069
- # directory/*.json`. A request can contain at most 100 files (or 100,000 files
2070
- # if `data_schema` is `content`). Each file can be up to 2 GB (or 100 MB if `
2071
- # data_schema` is `content`).
3390
+ # Required. Cloud Storage URIs to input files. Each URI can be up to 2000
3391
+ # characters long. URIs can match the full object path (for example, `gs://
3392
+ # bucket/directory/object.json`) or a pattern matching one or more files, such
3393
+ # as `gs://bucket/directory/*.json`. A request can contain at most 100 files (or
3394
+ # 100,000 files if `data_schema` is `content`). Each file can be up to 2 GB (or
3395
+ # 100 MB if `data_schema` is `content`).
2072
3396
  # Corresponds to the JSON property `inputUris`
2073
3397
  # @return [Array<String>]
2074
3398
  attr_accessor :input_uris
@@ -2084,6 +3408,33 @@ module Google
2084
3408
  end
2085
3409
  end
2086
3410
 
3411
+ # Grounding Fact.
3412
+ class GoogleCloudDiscoveryengineV1GroundingFact
3413
+ include Google::Apis::Core::Hashable
3414
+
3415
+ # Attributes associated with the fact. Common attributes include `source` (
3416
+ # indicating where the fact was sourced from), `author` (indicating the author
3417
+ # of the fact), and so on.
3418
+ # Corresponds to the JSON property `attributes`
3419
+ # @return [Hash<String,String>]
3420
+ attr_accessor :attributes
3421
+
3422
+ # Text content of the fact. Can be at most 10K characters long.
3423
+ # Corresponds to the JSON property `factText`
3424
+ # @return [String]
3425
+ attr_accessor :fact_text
3426
+
3427
+ def initialize(**args)
3428
+ update!(**args)
3429
+ end
3430
+
3431
+ # Update properties of this object
3432
+ def update!(**args)
3433
+ @attributes = args[:attributes] if args.key?(:attributes)
3434
+ @fact_text = args[:fact_text] if args.key?(:fact_text)
3435
+ end
3436
+ end
3437
+
2087
3438
  # Metadata related to the progress of the ImportDocuments operation. This is
2088
3439
  # returned by the google.longrunning.Operation.metadata field.
2089
3440
  class GoogleCloudDiscoveryengineV1ImportDocumentsMetadata
@@ -2716,6 +4067,31 @@ module Google
2716
4067
  end
2717
4068
  end
2718
4069
 
4070
+ # Response for ListSessions method.
4071
+ class GoogleCloudDiscoveryengineV1ListSessionsResponse
4072
+ include Google::Apis::Core::Hashable
4073
+
4074
+ # Pagination token, if not returned indicates the last page.
4075
+ # Corresponds to the JSON property `nextPageToken`
4076
+ # @return [String]
4077
+ attr_accessor :next_page_token
4078
+
4079
+ # All the Sessions for a given data store.
4080
+ # Corresponds to the JSON property `sessions`
4081
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1Session>]
4082
+ attr_accessor :sessions
4083
+
4084
+ def initialize(**args)
4085
+ update!(**args)
4086
+ end
4087
+
4088
+ # Update properties of this object
4089
+ def update!(**args)
4090
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
4091
+ @sessions = args[:sessions] if args.key?(:sessions)
4092
+ end
4093
+ end
4094
+
2719
4095
  # Response message for SiteSearchEngineService.ListTargetSites method.
2720
4096
  class GoogleCloudDiscoveryengineV1ListTargetSitesResponse
2721
4097
  include Google::Apis::Core::Hashable
@@ -3040,6 +4416,137 @@ module Google
3040
4416
  end
3041
4417
  end
3042
4418
 
4419
+ # Defines a user inputed query.
4420
+ class GoogleCloudDiscoveryengineV1Query
4421
+ include Google::Apis::Core::Hashable
4422
+
4423
+ # Unique Id for the query.
4424
+ # Corresponds to the JSON property `queryId`
4425
+ # @return [String]
4426
+ attr_accessor :query_id
4427
+
4428
+ # Plain text.
4429
+ # Corresponds to the JSON property `text`
4430
+ # @return [String]
4431
+ attr_accessor :text
4432
+
4433
+ def initialize(**args)
4434
+ update!(**args)
4435
+ end
4436
+
4437
+ # Update properties of this object
4438
+ def update!(**args)
4439
+ @query_id = args[:query_id] if args.key?(:query_id)
4440
+ @text = args[:text] if args.key?(:text)
4441
+ end
4442
+ end
4443
+
4444
+ # Request message for RankService.Rank method.
4445
+ class GoogleCloudDiscoveryengineV1RankRequest
4446
+ include Google::Apis::Core::Hashable
4447
+
4448
+ # If true, the response will contain only record ID and score. By default, it is
4449
+ # false, the response will contain record details.
4450
+ # Corresponds to the JSON property `ignoreRecordDetailsInResponse`
4451
+ # @return [Boolean]
4452
+ attr_accessor :ignore_record_details_in_response
4453
+ alias_method :ignore_record_details_in_response?, :ignore_record_details_in_response
4454
+
4455
+ # The identifier of the model to use. It is one of: * `semantic-ranker-512@
4456
+ # latest`: Semantic ranking model with maxiumn input token size 512. It is set
4457
+ # to `semantic-ranker-512@latest` by default if unspecified.
4458
+ # Corresponds to the JSON property `model`
4459
+ # @return [String]
4460
+ attr_accessor :model
4461
+
4462
+ # The query to use.
4463
+ # Corresponds to the JSON property `query`
4464
+ # @return [String]
4465
+ attr_accessor :query
4466
+
4467
+ # Required. A list of records to rank. At most 200 records to rank.
4468
+ # Corresponds to the JSON property `records`
4469
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1RankingRecord>]
4470
+ attr_accessor :records
4471
+
4472
+ # The number of results to return. If this is unset or no bigger than zero,
4473
+ # returns all results.
4474
+ # Corresponds to the JSON property `topN`
4475
+ # @return [Fixnum]
4476
+ attr_accessor :top_n
4477
+
4478
+ def initialize(**args)
4479
+ update!(**args)
4480
+ end
4481
+
4482
+ # Update properties of this object
4483
+ def update!(**args)
4484
+ @ignore_record_details_in_response = args[:ignore_record_details_in_response] if args.key?(:ignore_record_details_in_response)
4485
+ @model = args[:model] if args.key?(:model)
4486
+ @query = args[:query] if args.key?(:query)
4487
+ @records = args[:records] if args.key?(:records)
4488
+ @top_n = args[:top_n] if args.key?(:top_n)
4489
+ end
4490
+ end
4491
+
4492
+ # Response message for RankService.Rank method.
4493
+ class GoogleCloudDiscoveryengineV1RankResponse
4494
+ include Google::Apis::Core::Hashable
4495
+
4496
+ # A list of records sorted by descending score.
4497
+ # Corresponds to the JSON property `records`
4498
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1RankingRecord>]
4499
+ attr_accessor :records
4500
+
4501
+ def initialize(**args)
4502
+ update!(**args)
4503
+ end
4504
+
4505
+ # Update properties of this object
4506
+ def update!(**args)
4507
+ @records = args[:records] if args.key?(:records)
4508
+ end
4509
+ end
4510
+
4511
+ # Record message for RankService.Rank method.
4512
+ class GoogleCloudDiscoveryengineV1RankingRecord
4513
+ include Google::Apis::Core::Hashable
4514
+
4515
+ # The content of the record. Empty by default. At least one of title or content
4516
+ # should be set otherwise an INVALID_ARGUMENT error is thrown.
4517
+ # Corresponds to the JSON property `content`
4518
+ # @return [String]
4519
+ attr_accessor :content
4520
+
4521
+ # The unique ID to represent the record.
4522
+ # Corresponds to the JSON property `id`
4523
+ # @return [String]
4524
+ attr_accessor :id
4525
+
4526
+ # The score of this record based on the given query and selected model.
4527
+ # Corresponds to the JSON property `score`
4528
+ # @return [Float]
4529
+ attr_accessor :score
4530
+
4531
+ # The title of the record. Empty by default. At least one of title or content
4532
+ # should be set otherwise an INVALID_ARGUMENT error is thrown.
4533
+ # Corresponds to the JSON property `title`
4534
+ # @return [String]
4535
+ attr_accessor :title
4536
+
4537
+ def initialize(**args)
4538
+ update!(**args)
4539
+ end
4540
+
4541
+ # Update properties of this object
4542
+ def update!(**args)
4543
+ @content = args[:content] if args.key?(:content)
4544
+ @id = args[:id] if args.key?(:id)
4545
+ @score = args[:score] if args.key?(:score)
4546
+ @title = args[:title] if args.key?(:title)
4547
+ end
4548
+ end
4549
+
3043
4550
  # Request message for Recommend method.
3044
4551
  class GoogleCloudDiscoveryengineV1RecommendRequest
3045
4552
  include Google::Apis::Core::Hashable
@@ -3052,45 +4559,44 @@ module Google
3052
4559
  # field, then attribute-based expressions are expected instead of the above
3053
4560
  # described tag-based syntax. Examples: * (launguage: ANY("en", "es")) AND NOT (
3054
4561
  # categories: ANY("Movie")) * (available: true) AND (launguage: ANY("en", "es"))
3055
- # OR (categories: ANY("Movie")) If your filter blocks all results, the API will
3056
- # return generic (unfiltered) popular Documents. If you only want results
3057
- # strictly matching the filters, set `strictFiltering` to True in
4562
+ # OR (categories: ANY("Movie")) If your filter blocks all results, the API
4563
+ # returns generic (unfiltered) popular Documents. If you only want results
4564
+ # strictly matching the filters, set `strictFiltering` to `true` in
3058
4565
  # RecommendRequest.params to receive empty results instead. Note that the API
3059
- # will never return Documents with `storageStatus` of `EXPIRED` or `DELETED`
4566
+ # never returns Documents with `storageStatus` as `EXPIRED` or `DELETED`
3060
4567
  # regardless of filter choices.
3061
4568
  # Corresponds to the JSON property `filter`
3062
4569
  # @return [String]
3063
4570
  attr_accessor :filter
3064
4571
 
3065
4572
  # Maximum number of results to return. Set this property to the number of
3066
- # recommendation results needed. If zero, the service will choose a reasonable
3067
- # default. The maximum allowed value is 100. Values above 100 will be coerced to
3068
- # 100.
4573
+ # recommendation results needed. If zero, the service chooses a reasonable
4574
+ # default. The maximum allowed value is 100. Values above 100 are set to 100.
3069
4575
  # Corresponds to the JSON property `pageSize`
3070
4576
  # @return [Fixnum]
3071
4577
  attr_accessor :page_size
3072
4578
 
3073
4579
  # Additional domain specific parameters for the recommendations. Allowed values:
3074
- # * `returnDocument`: Boolean. If set to true, the associated Document object
3075
- # will be returned in RecommendResponse.RecommendationResult.document. * `
3076
- # returnScore`: Boolean. If set to true, the recommendation 'score'
3077
- # corresponding to each returned Document will be set in RecommendResponse.
3078
- # RecommendationResult.metadata. The given 'score' indicates the probability of
3079
- # a Document conversion given the user's context and history. * `strictFiltering`
3080
- # : Boolean. True by default. If set to false, the service will return generic (
3081
- # unfiltered) popular Documents instead of empty if your filter blocks all
3082
- # recommendation results. * `diversityLevel`: String. Default empty. If set to
3083
- # be non-empty, then it needs to be one of: * `no-diversity` * `low-diversity` *
3084
- # `medium-diversity` * `high-diversity` * `auto-diversity` This gives request-
3085
- # level control and adjusts recommendation results based on Document category. *
3086
- # `attributeFilteringSyntax`: Boolean. False by default. If set to true, the `
3087
- # filter` field is interpreted according to the new, attribute-based syntax.
4580
+ # * `returnDocument`: Boolean. If set to `true`, the associated Document object
4581
+ # is returned in RecommendResponse.RecommendationResult.document. * `returnScore`
4582
+ # : Boolean. If set to true, the recommendation score corresponding to each
4583
+ # returned Document is set in RecommendResponse.RecommendationResult.metadata.
4584
+ # The given score indicates the probability of a Document conversion given the
4585
+ # user's context and history. * `strictFiltering`: Boolean. True by default. If
4586
+ # set to `false`, the service returns generic (unfiltered) popular Documents
4587
+ # instead of empty if your filter blocks all recommendation results. * `
4588
+ # diversityLevel`: String. Default empty. If set to be non-empty, then it needs
4589
+ # to be one of: * `no-diversity` * `low-diversity` * `medium-diversity` * `high-
4590
+ # diversity` * `auto-diversity` This gives request-level control and adjusts
4591
+ # recommendation results based on Document category. * `attributeFilteringSyntax`
4592
+ # : Boolean. False by default. If set to true, the `filter` field is interpreted
4593
+ # according to the new, attribute-based syntax.
3088
4594
  # Corresponds to the JSON property `params`
3089
4595
  # @return [Hash<String,Object>]
3090
4596
  attr_accessor :params
3091
4597
 
3092
4598
  # UserEvent captures all metadata information Discovery Engine API needs to know
3093
- # about how end users interact with customers' website.
4599
+ # about how end users interact with your website.
3094
4600
  # Corresponds to the JSON property `userEvent`
3095
4601
  # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1UserEvent]
3096
4602
  attr_accessor :user_event
@@ -3110,10 +4616,9 @@ module Google
3110
4616
  # @return [Hash<String,String>]
3111
4617
  attr_accessor :user_labels
3112
4618
 
3113
- # Use validate only mode for this recommendation query. If set to true, a fake
3114
- # model will be used that returns arbitrary Document IDs. Note that the validate
3115
- # only mode should only be used for testing the API, or if the model is not
3116
- # ready.
4619
+ # Use validate only mode for this recommendation query. If set to `true`, a fake
4620
+ # model is used that returns arbitrary Document IDs. Note that the validate only
4621
+ # mode should only be used for testing the API, or if the model is not ready.
3117
4622
  # Corresponds to the JSON property `validateOnly`
3118
4623
  # @return [Boolean]
3119
4624
  attr_accessor :validate_only
@@ -3192,7 +4697,7 @@ module Google
3192
4697
  # @return [String]
3193
4698
  attr_accessor :id
3194
4699
 
3195
- # Additional Document metadata / annotations. Possible values: * `score`:
4700
+ # Additional Document metadata or annotations. Possible values: * `score`:
3196
4701
  # Recommendation score in double value. Is set if `returnScore` is set to true
3197
4702
  # in RecommendRequest.params.
3198
4703
  # Corresponds to the JSON property `metadata`
@@ -3236,7 +4741,7 @@ module Google
3236
4741
  class GoogleCloudDiscoveryengineV1Reply
3237
4742
  include Google::Apis::Core::Hashable
3238
4743
 
3239
- # Summary of the top N search result specified by the summary spec.
4744
+ # Summary of the top N search results specified by the summary spec.
3240
4745
  # Corresponds to the JSON property `summary`
3241
4746
  # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1SearchResponseSummary]
3242
4747
  attr_accessor :summary
@@ -3364,7 +4869,10 @@ module Google
3364
4869
  # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec]
3365
4870
  attr_accessor :content_search_spec
3366
4871
 
3367
- # A list of data store specs to apply on a search call.
4872
+ # Specs defining dataStores to filter on in a search call and configurations for
4873
+ # those dataStores. This is only considered for engines with multiple dataStores
4874
+ # use case. For single dataStore within an engine, they should use the specs at
4875
+ # the top level.
3368
4876
  # Corresponds to the JSON property `dataStoreSpecs`
3369
4877
  # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1SearchRequestDataStoreSpec>]
3370
4878
  attr_accessor :data_store_specs
@@ -3432,12 +4940,12 @@ module Google
3432
4940
 
3433
4941
  # Additional search parameters. For public website search only, supported values
3434
4942
  # are: * `user_country_code`: string. Default empty. If set to non-empty,
3435
- # results are restricted or boosted based on the location provided. Example:
3436
- # user_country_code: "au" For available codes see [Country Codes](https://
4943
+ # results are restricted or boosted based on the location provided. For example,
4944
+ # `user_country_code: "au"` For available codes see [Country Codes](https://
3437
4945
  # developers.google.com/custom-search/docs/json_api_reference#countryCodes) * `
3438
4946
  # search_type`: double. Default empty. Enables non-webpage searching depending
3439
4947
  # on the value. The only valid non-default value is 1, which enables image
3440
- # searching. Example: search_type: 1
4948
+ # searching. For example, `search_type: 1`
3441
4949
  # Corresponds to the JSON property `params`
3442
4950
  # @return [Hash<String,Object>]
3443
4951
  attr_accessor :params
@@ -3859,7 +5367,9 @@ module Google
3859
5367
  end
3860
5368
  end
3861
5369
 
3862
- # A struct to define data stores to filter on in a search call.
5370
+ # A struct to define data stores to filter on in a search call and
5371
+ # configurations for those data stores. A maximum of 1 DataStoreSpec per
5372
+ # data_store is allowed. Otherwise, an `INVALID_ARGUMENT` error is returned.
3863
5373
  class GoogleCloudDiscoveryengineV1SearchRequestDataStoreSpec
3864
5374
  include Google::Apis::Core::Hashable
3865
5375
 
@@ -3930,9 +5440,9 @@ module Google
3930
5440
  # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1SearchRequestFacetSpecFacetKey]
3931
5441
  attr_accessor :facet_key
3932
5442
 
3933
- # Maximum of facet values that should be returned for this facet. If unspecified,
3934
- # defaults to 20. The maximum allowed value is 300. Values above 300 are
3935
- # coerced to 300. If this field is negative, an `INVALID_ARGUMENT` is returned.
5443
+ # Maximum facet values that are returned for this facet. If unspecified,
5444
+ # defaults to 20. The maximum allowed value is 300. Values above 300 are coerced
5445
+ # to 300. If this field is negative, an `INVALID_ARGUMENT` is returned.
3936
5446
  # Corresponds to the JSON property `limit`
3937
5447
  # @return [Fixnum]
3938
5448
  attr_accessor :limit
@@ -3961,7 +5471,7 @@ module Google
3961
5471
  attr_accessor :case_insensitive
3962
5472
  alias_method :case_insensitive?, :case_insensitive
3963
5473
 
3964
- # Only get facet values that contains the given strings. For example, suppose "
5474
+ # Only get facet values that contain the given strings. For example, suppose "
3965
5475
  # category" has three values "Action > 2022", "Action > 2021" and "Sci-Fi > 2022"
3966
5476
  # . If set "contains" to "2022", the "category" facet only contains "Action >
3967
5477
  # 2022" and "Sci-Fi > 2022". Only supported on textual fields. Maximum is 10.
@@ -4078,8 +5588,8 @@ module Google
4078
5588
  class GoogleCloudDiscoveryengineV1SearchRequestSpellCorrectionSpec
4079
5589
  include Google::Apis::Core::Hashable
4080
5590
 
4081
- # The mode under which spell correction should take effect to replace the
4082
- # original search query. Default to Mode.AUTO.
5591
+ # The mode under which spell correction replaces the original search query.
5592
+ # Defaults to Mode.AUTO.
4083
5593
  # Corresponds to the JSON property `mode`
4084
5594
  # @return [String]
4085
5595
  attr_accessor :mode
@@ -4141,7 +5651,7 @@ module Google
4141
5651
  # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1SearchResponseSearchResult>]
4142
5652
  attr_accessor :results
4143
5653
 
4144
- # Summary of the top N search result specified by the summary spec.
5654
+ # Summary of the top N search results specified by the summary spec.
4145
5655
  # Corresponds to the JSON property `summary`
4146
5656
  # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1SearchResponseSummary]
4147
5657
  attr_accessor :summary
@@ -4181,8 +5691,8 @@ module Google
4181
5691
  attr_accessor :dynamic_facet
4182
5692
  alias_method :dynamic_facet?, :dynamic_facet
4183
5693
 
4184
- # The key for this facet. E.g., "colors" or "price". It matches SearchRequest.
4185
- # FacetSpec.FacetKey.key.
5694
+ # The key for this facet. For example, `"colors"` or `"price"`. It matches
5695
+ # SearchRequest.FacetSpec.FacetKey.key.
4186
5696
  # Corresponds to the JSON property `key`
4187
5697
  # @return [String]
4188
5698
  attr_accessor :key
@@ -4289,7 +5799,7 @@ module Google
4289
5799
  end
4290
5800
  end
4291
5801
 
4292
- # Summary of the top N search result specified by the summary spec.
5802
+ # Summary of the top N search results specified by the summary spec.
4293
5803
  class GoogleCloudDiscoveryengineV1SearchResponseSummary
4294
5804
  include Google::Apis::Core::Hashable
4295
5805
 
@@ -4519,6 +6029,82 @@ module Google
4519
6029
  end
4520
6030
  end
4521
6031
 
6032
+ # External session proto definition.
6033
+ class GoogleCloudDiscoveryengineV1Session
6034
+ include Google::Apis::Core::Hashable
6035
+
6036
+ # Output only. The time the session finished.
6037
+ # Corresponds to the JSON property `endTime`
6038
+ # @return [String]
6039
+ attr_accessor :end_time
6040
+
6041
+ # Immutable. Fully qualified name `projects/`project`/locations/global/
6042
+ # collections/`collection`/engines/`engine`/sessions/*`
6043
+ # Corresponds to the JSON property `name`
6044
+ # @return [String]
6045
+ attr_accessor :name
6046
+
6047
+ # Output only. The time the session started.
6048
+ # Corresponds to the JSON property `startTime`
6049
+ # @return [String]
6050
+ attr_accessor :start_time
6051
+
6052
+ # The state of the session.
6053
+ # Corresponds to the JSON property `state`
6054
+ # @return [String]
6055
+ attr_accessor :state
6056
+
6057
+ # Turns.
6058
+ # Corresponds to the JSON property `turns`
6059
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1SessionTurn>]
6060
+ attr_accessor :turns
6061
+
6062
+ # A unique identifier for tracking users.
6063
+ # Corresponds to the JSON property `userPseudoId`
6064
+ # @return [String]
6065
+ attr_accessor :user_pseudo_id
6066
+
6067
+ def initialize(**args)
6068
+ update!(**args)
6069
+ end
6070
+
6071
+ # Update properties of this object
6072
+ def update!(**args)
6073
+ @end_time = args[:end_time] if args.key?(:end_time)
6074
+ @name = args[:name] if args.key?(:name)
6075
+ @start_time = args[:start_time] if args.key?(:start_time)
6076
+ @state = args[:state] if args.key?(:state)
6077
+ @turns = args[:turns] if args.key?(:turns)
6078
+ @user_pseudo_id = args[:user_pseudo_id] if args.key?(:user_pseudo_id)
6079
+ end
6080
+ end
6081
+
6082
+ # Represents a turn, including a query from the user and a answer from service.
6083
+ class GoogleCloudDiscoveryengineV1SessionTurn
6084
+ include Google::Apis::Core::Hashable
6085
+
6086
+ # The resource name of the answer to the user query. Only set if the answer
6087
+ # generation (/answer API call) happened in this turn.
6088
+ # Corresponds to the JSON property `answer`
6089
+ # @return [String]
6090
+ attr_accessor :answer
6091
+
6092
+ # Defines a user inputed query.
6093
+ # Corresponds to the JSON property `query`
6094
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1Query]
6095
+ attr_accessor :query
6096
+
6097
+ def initialize(**args)
6098
+ update!(**args)
6099
+ end
6100
+
6101
+ # Update properties of this object
6102
+ def update!(**args)
6103
+ @answer = args[:answer] if args.key?(:answer)
6104
+ @query = args[:query] if args.key?(:query)
6105
+ end
6106
+ end
6107
+
4522
6108
  # SiteSearchEngine captures DataStore level site search persisting
4523
6109
  # configurations. It is a singleton value per data store.
4524
6110
  class GoogleCloudDiscoveryengineV1SiteSearchEngine
@@ -4902,7 +6488,7 @@ module Google
4902
6488
  end
4903
6489
 
4904
6490
  # UserEvent captures all metadata information Discovery Engine API needs to know
4905
- # about how end users interact with customers' website.
6491
+ # about how end users interact with your website.
4906
6492
  class GoogleCloudDiscoveryengineV1UserEvent
4907
6493
  include Google::Apis::Core::Hashable
4908
6494
 
@@ -5041,7 +6627,7 @@ module Google
5041
6627
 
5042
6628
  # A list of identifiers for the independent experiment groups this user event
5043
6629
  # belongs to. This is used to distinguish between user events associated with
5044
- # different experiment setups on the customer end.
6630
+ # different experiment setups.
5045
6631
  # Corresponds to the JSON property `tagIds`
5046
6632
  # @return [Array<String>]
5047
6633
  attr_accessor :tag_ids
@@ -6411,8 +7997,7 @@ module Google
6411
7997
 
6412
7998
  # The industry vertical that the engine registers. The restriction of the Engine
6413
7999
  # industry vertical is based on DataStore: If unspecified, default to `GENERIC`.
6414
- # Vertical on Engine has to match vertical of the DataStore liniked to the
6415
- # engine.
8000
+ # Vertical on Engine has to match vertical of the DataStore linked to the engine.
6416
8001
  # Corresponds to the JSON property `industryVertical`
6417
8002
  # @return [String]
6418
8003
  attr_accessor :industry_vertical
@@ -7774,7 +9359,8 @@ module Google
7774
9359
  class GoogleCloudDiscoveryengineV1alphaSessionTurn
7775
9360
  include Google::Apis::Core::Hashable
7776
9361
 
7777
- # The resource name of the answer to the user query.
9362
+ # The resource name of the answer to the user query. Only set if the answer
9363
+ # generation (/answer API call) happened in this turn.
7778
9364
  # Corresponds to the JSON property `answer`
7779
9365
  # @return [String]
7780
9366
  attr_accessor :answer
@@ -8732,8 +10318,7 @@ module Google
8732
10318
 
8733
10319
  # The industry vertical that the engine registers. The restriction of the Engine
8734
10320
  # industry vertical is based on DataStore: If unspecified, default to `GENERIC`.
8735
- # Vertical on Engine has to match vertical of the DataStore liniked to the
8736
- # engine.
10321
+ # Vertical on Engine has to match vertical of the DataStore linked to the engine.
8737
10322
  # Corresponds to the JSON property `industryVertical`
8738
10323
  # @return [String]
8739
10324
  attr_accessor :industry_vertical
@@ -9652,6 +11237,19 @@ module Google
9652
11237
  end
9653
11238
  end
9654
11239
 
11240
+ # The request message for Operations.CancelOperation.
11241
+ class GoogleLongrunningCancelOperationRequest
11242
+ include Google::Apis::Core::Hashable
11243
+
11244
+ def initialize(**args)
11245
+ update!(**args)
11246
+ end
11247
+
11248
+ # Update properties of this object
11249
+ def update!(**args)
11250
+ end
11251
+ end
11252
+
9655
11253
  # The response message for Operations.ListOperations.
9656
11254
  class GoogleLongrunningListOperationsResponse
9657
11255
  include Google::Apis::Core::Hashable