google-cloud-discovery_engine-v1 1.1.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/discovery_engine/v1/completion_service/rest/operations.rb +2 -2
  3. data/lib/google/cloud/discovery_engine/v1/control_service/client.rb +6 -6
  4. data/lib/google/cloud/discovery_engine/v1/control_service/rest/client.rb +6 -6
  5. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb +15 -12
  6. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb +15 -12
  7. data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/operations.rb +2 -2
  8. data/lib/google/cloud/discovery_engine/v1/document_service/paths.rb +25 -0
  9. data/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb +2 -2
  10. data/lib/google/cloud/discovery_engine/v1/engine_service/rest/operations.rb +2 -2
  11. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/client.rb +219 -3
  12. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/paths.rb +85 -0
  13. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/client.rb +126 -3
  14. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/service_stub.rb +60 -0
  15. data/lib/google/cloud/discovery_engine/v1/project_service/rest/operations.rb +2 -2
  16. data/lib/google/cloud/discovery_engine/v1/rank_service/client.rb +1 -1
  17. data/lib/google/cloud/discovery_engine/v1/rank_service/rest/client.rb +1 -1
  18. data/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb +2 -2
  19. data/lib/google/cloud/discovery_engine/v1/search_service/client.rb +324 -1
  20. data/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +316 -1
  21. data/lib/google/cloud/discovery_engine/v1/search_service/rest/service_stub.rb +76 -0
  22. data/lib/google/cloud/discovery_engine/v1/search_tuning_service/rest/operations.rb +2 -2
  23. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/client.rb +5 -1
  24. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/client.rb +5 -1
  25. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/operations.rb +2 -2
  26. data/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb +1 -1
  27. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb +1 -1
  28. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb +2 -2
  29. data/lib/google/cloud/discovery_engine/v1/version.rb +1 -1
  30. data/lib/google/cloud/discoveryengine/v1/answer_pb.rb +1 -1
  31. data/lib/google/cloud/discoveryengine/v1/common_pb.rb +1 -1
  32. data/lib/google/cloud/discoveryengine/v1/control_pb.rb +1 -1
  33. data/lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb +2 -1
  34. data/lib/google/cloud/discoveryengine/v1/custom_tuning_model_pb.rb +1 -1
  35. data/lib/google/cloud/discoveryengine/v1/data_store_pb.rb +4 -1
  36. data/lib/google/cloud/discoveryengine/v1/document_service_pb.rb +2 -1
  37. data/lib/google/cloud/discoveryengine/v1/engine_pb.rb +1 -1
  38. data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_pb.rb +23 -1
  39. data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_services_pb.rb +4 -0
  40. data/lib/google/cloud/discoveryengine/v1/search_service_pb.rb +5 -1
  41. data/lib/google/cloud/discoveryengine/v1/search_service_services_pb.rb +14 -0
  42. data/lib/google/cloud/discoveryengine/v1/site_search_engine_service_pb.rb +1 -1
  43. data/proto_docs/google/api/client.rb +14 -0
  44. data/proto_docs/google/cloud/discoveryengine/v1/answer.rb +18 -2
  45. data/proto_docs/google/cloud/discoveryengine/v1/control.rb +9 -0
  46. data/proto_docs/google/cloud/discoveryengine/v1/control_service.rb +6 -6
  47. data/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb +59 -15
  48. data/proto_docs/google/cloud/discoveryengine/v1/custom_tuning_model.rb +8 -3
  49. data/proto_docs/google/cloud/discoveryengine/v1/data_store.rb +88 -0
  50. data/proto_docs/google/cloud/discoveryengine/v1/document_processing_config.rb +7 -5
  51. data/proto_docs/google/cloud/discoveryengine/v1/document_service.rb +19 -0
  52. data/proto_docs/google/cloud/discoveryengine/v1/engine.rb +5 -1
  53. data/proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb +383 -0
  54. data/proto_docs/google/cloud/discoveryengine/v1/project.rb +1 -1
  55. data/proto_docs/google/cloud/discoveryengine/v1/purge_config.rb +1 -1
  56. data/proto_docs/google/cloud/discoveryengine/v1/rank_service.rb +1 -1
  57. data/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +116 -0
  58. data/proto_docs/google/cloud/discoveryengine/v1/site_search_engine_service.rb +5 -0
  59. data/proto_docs/google/cloud/discoveryengine/v1/user_event.rb +1 -1
  60. metadata +3 -3
@@ -189,7 +189,7 @@ module Google
189
189
  # @param options [::Gapic::CallOptions, ::Hash]
190
190
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
191
191
  #
192
- # @overload search(serving_config: nil, branch: nil, query: nil, image_query: nil, page_size: nil, page_token: nil, offset: nil, data_store_specs: nil, filter: nil, canonical_filter: nil, order_by: nil, user_info: nil, language_code: nil, facet_specs: nil, boost_spec: nil, params: nil, query_expansion_spec: nil, spell_correction_spec: nil, user_pseudo_id: nil, content_search_spec: nil, safe_search: nil, user_labels: nil, search_as_you_type_spec: nil, session: nil, session_spec: nil)
192
+ # @overload search(serving_config: nil, branch: nil, query: nil, image_query: nil, page_size: nil, page_token: nil, offset: nil, one_box_page_size: nil, data_store_specs: nil, filter: nil, canonical_filter: nil, order_by: nil, user_info: nil, language_code: nil, facet_specs: nil, boost_spec: nil, params: nil, query_expansion_spec: nil, spell_correction_spec: nil, user_pseudo_id: nil, content_search_spec: nil, safe_search: nil, user_labels: nil, search_as_you_type_spec: nil, session: nil, session_spec: nil)
193
193
  # Pass arguments to `search` via keyword arguments. Note that at
194
194
  # least one keyword argument is required. To specify no parameters, or to keep all
195
195
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -239,6 +239,10 @@ module Google
239
239
  # unset.
240
240
  #
241
241
  # If this field is negative, an `INVALID_ARGUMENT` is returned.
242
+ # @param one_box_page_size [::Integer]
243
+ # The maximum number of results to return for OneBox.
244
+ # This applies to each OneBox type individually.
245
+ # Default number is 10.
242
246
  # @param data_store_specs [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DataStoreSpec, ::Hash>]
243
247
  # Specs defining dataStores to filter on in a search call and configurations
244
248
  # for those dataStores. This is only considered for engines with multiple
@@ -464,6 +468,310 @@ module Google
464
468
  raise ::Google::Cloud::Error.from_error(e)
465
469
  end
466
470
 
471
+ ##
472
+ # Performs a search. Similar to the
473
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchService::Rest::Client#search SearchService.Search}
474
+ # method, but a lite version that allows API key for authentication, where
475
+ # OAuth and IAM checks are not required.
476
+ #
477
+ # Only public website search is supported by this method. If data stores and
478
+ # engines not associated with public website search are specified, a
479
+ # `FAILED_PRECONDITION` error is returned.
480
+ #
481
+ # This method can be used for easy onboarding without having to implement an
482
+ # authentication backend. However, it is strongly recommended to use
483
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchService::Rest::Client#search SearchService.Search}
484
+ # instead with required OAuth and IAM checks to provide better data security.
485
+ #
486
+ # @overload search_lite(request, options = nil)
487
+ # Pass arguments to `search_lite` via a request object, either of type
488
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest} or an equivalent Hash.
489
+ #
490
+ # @param request [::Google::Cloud::DiscoveryEngine::V1::SearchRequest, ::Hash]
491
+ # A request object representing the call parameters. Required. To specify no
492
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
493
+ # @param options [::Gapic::CallOptions, ::Hash]
494
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
495
+ #
496
+ # @overload search_lite(serving_config: nil, branch: nil, query: nil, image_query: nil, page_size: nil, page_token: nil, offset: nil, one_box_page_size: nil, data_store_specs: nil, filter: nil, canonical_filter: nil, order_by: nil, user_info: nil, language_code: nil, facet_specs: nil, boost_spec: nil, params: nil, query_expansion_spec: nil, spell_correction_spec: nil, user_pseudo_id: nil, content_search_spec: nil, safe_search: nil, user_labels: nil, search_as_you_type_spec: nil, session: nil, session_spec: nil)
497
+ # Pass arguments to `search_lite` via keyword arguments. Note that at
498
+ # least one keyword argument is required. To specify no parameters, or to keep all
499
+ # the default parameter values, pass an empty Hash as a request object (see above).
500
+ #
501
+ # @param serving_config [::String]
502
+ # Required. The resource name of the Search serving config, such as
503
+ # `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`,
504
+ # or
505
+ # `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
506
+ # This field is used to identify the serving configuration name, set
507
+ # of models used to make the search.
508
+ # @param branch [::String]
509
+ # The branch resource name, such as
510
+ # `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
511
+ #
512
+ # Use `default_branch` as the branch ID or leave this field empty, to search
513
+ # documents under the default branch.
514
+ # @param query [::String]
515
+ # Raw search query.
516
+ # @param image_query [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ImageQuery, ::Hash]
517
+ # Raw image query.
518
+ # @param page_size [::Integer]
519
+ # Maximum number of {::Google::Cloud::DiscoveryEngine::V1::Document Document}s to
520
+ # return. The maximum allowed value depends on the data type. Values above
521
+ # the maximum value are coerced to the maximum value.
522
+ #
523
+ # * Websites with basic indexing: Default `10`, Maximum `25`.
524
+ # * Websites with advanced indexing: Default `25`, Maximum `50`.
525
+ # * Other: Default `50`, Maximum `100`.
526
+ #
527
+ # If this field is negative, an `INVALID_ARGUMENT` is returned.
528
+ # @param page_token [::String]
529
+ # A page token received from a previous
530
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchService::Rest::Client#search SearchService.Search}
531
+ # call. Provide this to retrieve the subsequent page.
532
+ #
533
+ # When paginating, all other parameters provided to
534
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchService::Rest::Client#search SearchService.Search}
535
+ # must match the call that provided the page token. Otherwise, an
536
+ # `INVALID_ARGUMENT` error is returned.
537
+ # @param offset [::Integer]
538
+ # A 0-indexed integer that specifies the current offset (that is, starting
539
+ # result location, amongst the
540
+ # {::Google::Cloud::DiscoveryEngine::V1::Document Document}s deemed by the API as
541
+ # relevant) in search results. This field is only considered if
542
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest#page_token page_token} is
543
+ # unset.
544
+ #
545
+ # If this field is negative, an `INVALID_ARGUMENT` is returned.
546
+ # @param one_box_page_size [::Integer]
547
+ # The maximum number of results to return for OneBox.
548
+ # This applies to each OneBox type individually.
549
+ # Default number is 10.
550
+ # @param data_store_specs [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DataStoreSpec, ::Hash>]
551
+ # Specs defining dataStores to filter on in a search call and configurations
552
+ # for those dataStores. This is only considered for engines with multiple
553
+ # dataStores use case. For single dataStore within an engine, they should
554
+ # use the specs at the top level.
555
+ # @param filter [::String]
556
+ # The filter syntax consists of an expression language for constructing a
557
+ # predicate from one or more fields of the documents being filtered. Filter
558
+ # expression is case-sensitive.
559
+ #
560
+ # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
561
+ #
562
+ # Filtering in Vertex AI Search is done by mapping the LHS filter key to a
563
+ # key property defined in the Vertex AI Search backend -- this mapping is
564
+ # defined by the customer in their schema. For example a media customer might
565
+ # have a field 'name' in their schema. In this case the filter would look
566
+ # like this: filter --> name:'ANY("king kong")'
567
+ #
568
+ # For more information about filtering including syntax and filter
569
+ # operators, see
570
+ # [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
571
+ # @param canonical_filter [::String]
572
+ # The default filter that is applied when a user performs a search without
573
+ # checking any filters on the search page.
574
+ #
575
+ # The filter applied to every search request when quality improvement such as
576
+ # query expansion is needed. In the case a query does not have a sufficient
577
+ # amount of results this filter will be used to determine whether or not to
578
+ # enable the query expansion flow. The original filter will still be used for
579
+ # the query expanded search.
580
+ # This field is strongly recommended to achieve high search quality.
581
+ #
582
+ # For more information about filter syntax, see
583
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest#filter SearchRequest.filter}.
584
+ # @param order_by [::String]
585
+ # The order in which documents are returned. Documents can be ordered by
586
+ # a field in an {::Google::Cloud::DiscoveryEngine::V1::Document Document} object.
587
+ # Leave it unset if ordered by relevance. `order_by` expression is
588
+ # case-sensitive.
589
+ #
590
+ # For more information on ordering the website search results, see
591
+ # [Order web search
592
+ # results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results).
593
+ # For more information on ordering the healthcare search results, see
594
+ # [Order healthcare search
595
+ # results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results).
596
+ # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
597
+ # @param user_info [::Google::Cloud::DiscoveryEngine::V1::UserInfo, ::Hash]
598
+ # Information about the end user.
599
+ # Highly recommended for analytics.
600
+ # {::Google::Cloud::DiscoveryEngine::V1::UserInfo#user_agent UserInfo.user_agent}
601
+ # is used to deduce `device_type` for analytics.
602
+ # @param language_code [::String]
603
+ # The BCP-47 language code, such as "en-US" or "sr-Latn". For more
604
+ # information, see [Standard
605
+ # fields](https://cloud.google.com/apis/design/standard_fields). This field
606
+ # helps to better interpret the query. If a value isn't specified, the query
607
+ # language code is automatically detected, which may not be accurate.
608
+ # @param facet_specs [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::FacetSpec, ::Hash>]
609
+ # Facet specifications for faceted search. If empty, no facets are returned.
610
+ #
611
+ # A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT`
612
+ # error is returned.
613
+ # @param boost_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::BoostSpec, ::Hash]
614
+ # Boost specification to boost certain documents.
615
+ # For more information on boosting, see
616
+ # [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
617
+ # @param params [::Hash{::String => ::Google::Protobuf::Value, ::Hash}]
618
+ # Additional search parameters.
619
+ #
620
+ # For public website search only, supported values are:
621
+ #
622
+ # * `user_country_code`: string. Default empty. If set to non-empty, results
623
+ # are restricted or boosted based on the location provided.
624
+ # For example, `user_country_code: "au"`
625
+ #
626
+ # For available codes see [Country
627
+ # Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
628
+ #
629
+ # * `search_type`: double. Default empty. Enables non-webpage searching
630
+ # depending on the value. The only valid non-default value is 1,
631
+ # which enables image searching.
632
+ # For example, `search_type: 1`
633
+ # @param query_expansion_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::QueryExpansionSpec, ::Hash]
634
+ # The query expansion specification that specifies the conditions under which
635
+ # query expansion occurs.
636
+ # @param spell_correction_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SpellCorrectionSpec, ::Hash]
637
+ # The spell correction specification that specifies the mode under
638
+ # which spell correction takes effect.
639
+ # @param user_pseudo_id [::String]
640
+ # A unique identifier for tracking visitors. For example, this could be
641
+ # implemented with an HTTP cookie, which should be able to uniquely identify
642
+ # a visitor on a single device. This unique identifier should not change if
643
+ # the visitor logs in or out of the website.
644
+ #
645
+ # This field should NOT have a fixed value such as `unknown_visitor`.
646
+ #
647
+ # This should be the same identifier as
648
+ # {::Google::Cloud::DiscoveryEngine::V1::UserEvent#user_pseudo_id UserEvent.user_pseudo_id}
649
+ # and
650
+ # {::Google::Cloud::DiscoveryEngine::V1::CompleteQueryRequest#user_pseudo_id CompleteQueryRequest.user_pseudo_id}
651
+ #
652
+ # The field must be a UTF-8 encoded string with a length limit of 128
653
+ # characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
654
+ # @param content_search_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec, ::Hash]
655
+ # A specification for configuring the behavior of content search.
656
+ # @param safe_search [::Boolean]
657
+ # Whether to turn on safe search. This is only supported for
658
+ # website search.
659
+ # @param user_labels [::Hash{::String => ::String}]
660
+ # The user labels applied to a resource must meet the following requirements:
661
+ #
662
+ # * Each resource can have multiple labels, up to a maximum of 64.
663
+ # * Each label must be a key-value pair.
664
+ # * Keys have a minimum length of 1 character and a maximum length of 63
665
+ # characters and cannot be empty. Values can be empty and have a maximum
666
+ # length of 63 characters.
667
+ # * Keys and values can contain only lowercase letters, numeric characters,
668
+ # underscores, and dashes. All characters must use UTF-8 encoding, and
669
+ # international characters are allowed.
670
+ # * The key portion of a label must be unique. However, you can use the same
671
+ # key with multiple resources.
672
+ # * Keys must start with a lowercase letter or international character.
673
+ #
674
+ # See [Google Cloud
675
+ # Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
676
+ # for more details.
677
+ # @param search_as_you_type_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SearchAsYouTypeSpec, ::Hash]
678
+ # Search as you type configuration. Only supported for the
679
+ # {::Google::Cloud::DiscoveryEngine::V1::IndustryVertical::MEDIA IndustryVertical.MEDIA}
680
+ # vertical.
681
+ # @param session [::String]
682
+ # The session resource name. Optional.
683
+ #
684
+ # Session allows users to do multi-turn /search API calls or coordination
685
+ # between /search API calls and /answer API calls.
686
+ #
687
+ # Example #1 (multi-turn /search API calls):
688
+ # 1. Call /search API with the auto-session mode (see below).
689
+ # 2. Call /search API with the session ID generated in the first call.
690
+ # Here, the previous search query gets considered in query
691
+ # standing. I.e., if the first query is "How did Alphabet do in 2022?"
692
+ # and the current query is "How about 2023?", the current query will
693
+ # be interpreted as "How did Alphabet do in 2023?".
694
+ #
695
+ # Example #2 (coordination between /search API calls and /answer API calls):
696
+ # 1. Call /search API with the auto-session mode (see below).
697
+ # 2. Call /answer API with the session ID generated in the first call.
698
+ # Here, the answer generation happens in the context of the search
699
+ # results from the first search call.
700
+ #
701
+ # Auto-session mode: when `projects/.../sessions/-` is used, a new session
702
+ # gets automatically created. Otherwise, users can use the create-session API
703
+ # to create a session manually.
704
+ #
705
+ # Multi-turn Search feature is currently at private GA stage. Please use
706
+ # v1alpha or v1beta version instead before we launch this feature to public
707
+ # GA. Or ask for allowlisting through Google Support team.
708
+ # @param session_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SessionSpec, ::Hash]
709
+ # Session specification.
710
+ #
711
+ # Can be used only when `session` is set.
712
+ # @yield [result, operation] Access the result along with the TransportOperation object
713
+ # @yieldparam result [::Google::Cloud::DiscoveryEngine::V1::SearchResponse]
714
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
715
+ #
716
+ # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse]
717
+ #
718
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
719
+ #
720
+ # @example Basic example
721
+ # require "google/cloud/discovery_engine/v1"
722
+ #
723
+ # # Create a client object. The client can be reused for multiple calls.
724
+ # client = Google::Cloud::DiscoveryEngine::V1::SearchService::Rest::Client.new
725
+ #
726
+ # # Create a request. To set request fields, pass in keyword arguments.
727
+ # request = Google::Cloud::DiscoveryEngine::V1::SearchRequest.new
728
+ #
729
+ # # Call the search_lite method.
730
+ # result = client.search_lite request
731
+ #
732
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
733
+ # # over elements, and API calls will be issued to fetch pages as needed.
734
+ # result.each do |item|
735
+ # # Each element is of type ::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult.
736
+ # p item
737
+ # end
738
+ #
739
+ def search_lite request, options = nil
740
+ raise ::ArgumentError, "request must be provided" if request.nil?
741
+
742
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::SearchRequest
743
+
744
+ # Converts hash and nil to an options object
745
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
746
+
747
+ # Customize the options with defaults
748
+ call_metadata = @config.rpcs.search_lite.metadata.to_h
749
+
750
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
751
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
752
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
753
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
754
+ transports_version_send: [:rest]
755
+
756
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
757
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
758
+
759
+ options.apply_defaults timeout: @config.rpcs.search_lite.timeout,
760
+ metadata: call_metadata,
761
+ retry_policy: @config.rpcs.search_lite.retry_policy
762
+
763
+ options.apply_defaults timeout: @config.timeout,
764
+ metadata: @config.metadata,
765
+ retry_policy: @config.retry_policy
766
+
767
+ @search_service_stub.search_lite request, options do |result, operation|
768
+ yield result, operation if block_given?
769
+ return result
770
+ end
771
+ rescue ::Gapic::Rest::Error => e
772
+ raise ::Google::Cloud::Error.from_error(e)
773
+ end
774
+
467
775
  ##
468
776
  # Configuration class for the SearchService REST API.
469
777
  #
@@ -602,11 +910,18 @@ module Google
602
910
  # @return [::Gapic::Config::Method]
603
911
  #
604
912
  attr_reader :search
913
+ ##
914
+ # RPC-specific configuration for `search_lite`
915
+ # @return [::Gapic::Config::Method]
916
+ #
917
+ attr_reader :search_lite
605
918
 
606
919
  # @private
607
920
  def initialize parent_rpcs = nil
608
921
  search_config = parent_rpcs.search if parent_rpcs.respond_to? :search
609
922
  @search = ::Gapic::Config::Method.new search_config
923
+ search_lite_config = parent_rpcs.search_lite if parent_rpcs.respond_to? :search_lite
924
+ @search_lite = ::Gapic::Config::Method.new search_lite_config
610
925
 
611
926
  yield self if block_given?
612
927
  end
@@ -99,6 +99,44 @@ module Google
99
99
  result
100
100
  end
101
101
 
102
+ ##
103
+ # Baseline implementation for the search_lite REST call
104
+ #
105
+ # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::SearchRequest]
106
+ # A request object representing the call parameters. Required.
107
+ # @param options [::Gapic::CallOptions]
108
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
109
+ #
110
+ # @yield [result, operation] Access the result along with the TransportOperation object
111
+ # @yieldparam result [::Google::Cloud::DiscoveryEngine::V1::SearchResponse]
112
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
113
+ #
114
+ # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse]
115
+ # A result object deserialized from the server's reply
116
+ def search_lite request_pb, options = nil
117
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
118
+
119
+ verb, uri, query_string_params, body = ServiceStub.transcode_search_lite_request request_pb
120
+ query_string_params = if query_string_params.any?
121
+ query_string_params.to_h { |p| p.split "=", 2 }
122
+ else
123
+ {}
124
+ end
125
+
126
+ response = @client_stub.make_http_request(
127
+ verb,
128
+ uri: uri,
129
+ body: body || "",
130
+ params: query_string_params,
131
+ options: options
132
+ )
133
+ operation = ::Gapic::Rest::TransportOperation.new response
134
+ result = ::Google::Cloud::DiscoveryEngine::V1::SearchResponse.decode_json response.body, ignore_unknown_fields: true
135
+
136
+ yield result, operation if block_given?
137
+ result
138
+ end
139
+
102
140
  ##
103
141
  # @private
104
142
  #
@@ -136,6 +174,44 @@ module Google
136
174
  )
137
175
  transcoder.transcode request_pb
138
176
  end
177
+
178
+ ##
179
+ # @private
180
+ #
181
+ # GRPC transcoding helper method for the search_lite REST call
182
+ #
183
+ # @param request_pb [::Google::Cloud::DiscoveryEngine::V1::SearchRequest]
184
+ # A request object representing the call parameters. Required.
185
+ # @return [Array(String, [String, nil], Hash{String => String})]
186
+ # Uri, Body, Query string parameters
187
+ def self.transcode_search_lite_request request_pb
188
+ transcoder = Gapic::Rest::GrpcTranscoder.new
189
+ .with_bindings(
190
+ uri_method: :post,
191
+ uri_template: "/v1/{serving_config}:searchLite",
192
+ body: "*",
193
+ matches: [
194
+ ["serving_config", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+/?$}, false]
195
+ ]
196
+ )
197
+ .with_bindings(
198
+ uri_method: :post,
199
+ uri_template: "/v1/{serving_config}:searchLite",
200
+ body: "*",
201
+ matches: [
202
+ ["serving_config", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+/?$}, false]
203
+ ]
204
+ )
205
+ .with_bindings(
206
+ uri_method: :post,
207
+ uri_template: "/v1/{serving_config}:searchLite",
208
+ body: "*",
209
+ matches: [
210
+ ["serving_config", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+/?$}, false]
211
+ ]
212
+ )
213
+ transcoder.transcode request_pb
214
+ end
139
215
  end
140
216
  end
141
217
  end
@@ -915,7 +915,7 @@ module Google
915
915
  uri_method: :get,
916
916
  uri_template: "/v1/{name}/operations",
917
917
  matches: [
918
- ["name", %r{^projects/[^/]+/locations/[^/]+/identity_mapping_stores/[^/]+/?$}, false]
918
+ ["name", %r{^projects/[^/]+/locations/[^/]+/identityMappingStores/[^/]+/?$}, false]
919
919
  ]
920
920
  )
921
921
  .with_bindings(
@@ -1041,7 +1041,7 @@ module Google
1041
1041
  uri_method: :get,
1042
1042
  uri_template: "/v1/{name}",
1043
1043
  matches: [
1044
- ["name", %r{^projects/[^/]+/locations/[^/]+/identity_mapping_stores/[^/]+/operations/[^/]+/?$}, false]
1044
+ ["name", %r{^projects/[^/]+/locations/[^/]+/identityMappingStores/[^/]+/operations/[^/]+/?$}, false]
1045
1045
  ]
1046
1046
  )
1047
1047
  .with_bindings(
@@ -1100,7 +1100,7 @@ module Google
1100
1100
  # @param options [::Gapic::CallOptions, ::Hash]
1101
1101
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1102
1102
  #
1103
- # @overload recrawl_uris(site_search_engine: nil, uris: nil)
1103
+ # @overload recrawl_uris(site_search_engine: nil, uris: nil, site_credential: nil)
1104
1104
  # Pass arguments to `recrawl_uris` via keyword arguments. Note that at
1105
1105
  # least one keyword argument is required. To specify no parameters, or to keep all
1106
1106
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1114,6 +1114,10 @@ module Google
1114
1114
  # an INVALID_ARGUMENT error is thrown. Each URI should match at least one
1115
1115
  # {::Google::Cloud::DiscoveryEngine::V1::TargetSite TargetSite} in
1116
1116
  # `site_search_engine`.
1117
+ # @param site_credential [::String]
1118
+ # Optional. Full resource name of the [SiteCredential][], such as
1119
+ # `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/siteCredentials/*`.
1120
+ # Only set to crawl private URIs.
1117
1121
  #
1118
1122
  # @yield [response, operation] Access the result along with the RPC operation
1119
1123
  # @yieldparam response [::Gapic::Operation]
@@ -1030,7 +1030,7 @@ module Google
1030
1030
  # @param options [::Gapic::CallOptions, ::Hash]
1031
1031
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1032
1032
  #
1033
- # @overload recrawl_uris(site_search_engine: nil, uris: nil)
1033
+ # @overload recrawl_uris(site_search_engine: nil, uris: nil, site_credential: nil)
1034
1034
  # Pass arguments to `recrawl_uris` via keyword arguments. Note that at
1035
1035
  # least one keyword argument is required. To specify no parameters, or to keep all
1036
1036
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1044,6 +1044,10 @@ module Google
1044
1044
  # an INVALID_ARGUMENT error is thrown. Each URI should match at least one
1045
1045
  # {::Google::Cloud::DiscoveryEngine::V1::TargetSite TargetSite} in
1046
1046
  # `site_search_engine`.
1047
+ # @param site_credential [::String]
1048
+ # Optional. Full resource name of the [SiteCredential][], such as
1049
+ # `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/siteCredentials/*`.
1050
+ # Only set to crawl private URIs.
1047
1051
  # @yield [result, operation] Access the result along with the TransportOperation object
1048
1052
  # @yieldparam result [::Gapic::Operation]
1049
1053
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -915,7 +915,7 @@ module Google
915
915
  uri_method: :get,
916
916
  uri_template: "/v1/{name}/operations",
917
917
  matches: [
918
- ["name", %r{^projects/[^/]+/locations/[^/]+/identity_mapping_stores/[^/]+/?$}, false]
918
+ ["name", %r{^projects/[^/]+/locations/[^/]+/identityMappingStores/[^/]+/?$}, false]
919
919
  ]
920
920
  )
921
921
  .with_bindings(
@@ -1041,7 +1041,7 @@ module Google
1041
1041
  uri_method: :get,
1042
1042
  uri_template: "/v1/{name}",
1043
1043
  matches: [
1044
- ["name", %r{^projects/[^/]+/locations/[^/]+/identity_mapping_stores/[^/]+/operations/[^/]+/?$}, false]
1044
+ ["name", %r{^projects/[^/]+/locations/[^/]+/identityMappingStores/[^/]+/operations/[^/]+/?$}, false]
1045
1045
  ]
1046
1046
  )
1047
1047
  .with_bindings(
@@ -429,7 +429,7 @@ module Google
429
429
  # @param parent [::String]
430
430
  # Required. The resource name of the catalog under which the events are
431
431
  # created. The format is
432
- # `projects/{project}/locations/global/collections/{collection}/dataStores/{dataStore}`
432
+ # `projects/{project}/locations/global/collections/{collection}/dataStores/{dataStore}`.
433
433
  # @param filter [::String]
434
434
  # Required. The filter string to specify the events to be deleted with a
435
435
  # length limit of 5,000 characters. The eligible fields for filtering are:
@@ -408,7 +408,7 @@ module Google
408
408
  # @param parent [::String]
409
409
  # Required. The resource name of the catalog under which the events are
410
410
  # created. The format is
411
- # `projects/{project}/locations/global/collections/{collection}/dataStores/{dataStore}`
411
+ # `projects/{project}/locations/global/collections/{collection}/dataStores/{dataStore}`.
412
412
  # @param filter [::String]
413
413
  # Required. The filter string to specify the events to be deleted with a
414
414
  # length limit of 5,000 characters. The eligible fields for filtering are:
@@ -915,7 +915,7 @@ module Google
915
915
  uri_method: :get,
916
916
  uri_template: "/v1/{name}/operations",
917
917
  matches: [
918
- ["name", %r{^projects/[^/]+/locations/[^/]+/identity_mapping_stores/[^/]+/?$}, false]
918
+ ["name", %r{^projects/[^/]+/locations/[^/]+/identityMappingStores/[^/]+/?$}, false]
919
919
  ]
920
920
  )
921
921
  .with_bindings(
@@ -1041,7 +1041,7 @@ module Google
1041
1041
  uri_method: :get,
1042
1042
  uri_template: "/v1/{name}",
1043
1043
  matches: [
1044
- ["name", %r{^projects/[^/]+/locations/[^/]+/identity_mapping_stores/[^/]+/operations/[^/]+/?$}, false]
1044
+ ["name", %r{^projects/[^/]+/locations/[^/]+/identityMappingStores/[^/]+/operations/[^/]+/?$}, false]
1045
1045
  ]
1046
1046
  )
1047
1047
  .with_bindings(
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module DiscoveryEngine
23
23
  module V1
24
- VERSION = "1.1.0"
24
+ VERSION = "1.3.0"
25
25
  end
26
26
  end
27
27
  end
@@ -10,7 +10,7 @@ require 'google/protobuf/struct_pb'
10
10
  require 'google/protobuf/timestamp_pb'
11
11
 
12
12
 
13
- descriptor_data = "\n,google/cloud/discoveryengine/v1/answer.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf5!\n\x06\x41nswer\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12<\n\x05state\x18\x02 \x01(\x0e\x32-.google.cloud.discoveryengine.v1.Answer.State\x12\x13\n\x0b\x61nswer_text\x18\x03 \x01(\t\x12\x43\n\tcitations\x18\x04 \x03(\x0b\x32\x30.google.cloud.discoveryengine.v1.Answer.Citation\x12\x45\n\nreferences\x18\x05 \x03(\x0b\x32\x31.google.cloud.discoveryengine.v1.Answer.Reference\x12\x19\n\x11related_questions\x18\x06 \x03(\t\x12;\n\x05steps\x18\x07 \x03(\x0b\x32,.google.cloud.discoveryengine.v1.Answer.Step\x12`\n\x18query_understanding_info\x18\n \x01(\x0b\x32>.google.cloud.discoveryengine.v1.Answer.QueryUnderstandingInfo\x12[\n\x16\x61nswer_skipped_reasons\x18\x0b \x03(\x0e\x32;.google.cloud.discoveryengine.v1.Answer.AnswerSkippedReason\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\rcomplete_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a{\n\x08\x43itation\x12\x13\n\x0bstart_index\x18\x01 \x01(\x03\x12\x11\n\tend_index\x18\x02 \x01(\x03\x12G\n\x07sources\x18\x03 \x03(\x0b\x32\x36.google.cloud.discoveryengine.v1.Answer.CitationSource\x1a&\n\x0e\x43itationSource\x12\x14\n\x0creference_id\x18\x01 \x01(\t\x1a\x82\n\n\tReference\x12p\n\x1aunstructured_document_info\x18\x01 \x01(\x0b\x32J.google.cloud.discoveryengine.v1.Answer.Reference.UnstructuredDocumentInfoH\x00\x12Q\n\nchunk_info\x18\x02 \x01(\x0b\x32;.google.cloud.discoveryengine.v1.Answer.Reference.ChunkInfoH\x00\x12l\n\x18structured_document_info\x18\x03 \x01(\x0b\x32H.google.cloud.discoveryengine.v1.Answer.Reference.StructuredDocumentInfoH\x00\x1a\x81\x03\n\x18UnstructuredDocumentInfo\x12>\n\x08\x64ocument\x18\x01 \x01(\tB,\xfa\x41)\n\'discoveryengine.googleapis.com/Document\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\r\n\x05title\x18\x03 \x01(\t\x12o\n\x0e\x63hunk_contents\x18\x04 \x03(\x0b\x32W.google.cloud.discoveryengine.v1.Answer.Reference.UnstructuredDocumentInfo.ChunkContent\x12,\n\x0bstruct_data\x18\x05 \x01(\x0b\x32\x17.google.protobuf.Struct\x1aj\n\x0c\x43hunkContent\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12\x17\n\x0fpage_identifier\x18\x02 \x01(\t\x12\x1c\n\x0frelevance_score\x18\x03 \x01(\x02H\x00\x88\x01\x01\x42\x12\n\x10_relevance_score\x1a\xa9\x03\n\tChunkInfo\x12\x38\n\x05\x63hunk\x18\x01 \x01(\tB)\xfa\x41&\n$discoveryengine.googleapis.com/Chunk\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x12\x1c\n\x0frelevance_score\x18\x03 \x01(\x02H\x00\x88\x01\x01\x12g\n\x11\x64ocument_metadata\x18\x04 \x01(\x0b\x32L.google.cloud.discoveryengine.v1.Answer.Reference.ChunkInfo.DocumentMetadata\x1a\xb5\x01\n\x10\x44ocumentMetadata\x12>\n\x08\x64ocument\x18\x01 \x01(\tB,\xfa\x41)\n\'discoveryengine.googleapis.com/Document\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\r\n\x05title\x18\x03 \x01(\t\x12\x17\n\x0fpage_identifier\x18\x04 \x01(\t\x12,\n\x0bstruct_data\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructB\x12\n\x10_relevance_score\x1a\x86\x01\n\x16StructuredDocumentInfo\x12>\n\x08\x64ocument\x18\x01 \x01(\tB,\xfa\x41)\n\'discoveryengine.googleapis.com/Document\x12,\n\x0bstruct_data\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\t\n\x07\x63ontent\x1a\xbc\x08\n\x04Step\x12\x41\n\x05state\x18\x01 \x01(\x0e\x32\x32.google.cloud.discoveryengine.v1.Answer.Step.State\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0f\n\x07thought\x18\x03 \x01(\t\x12\x44\n\x07\x61\x63tions\x18\x04 \x03(\x0b\x32\x33.google.cloud.discoveryengine.v1.Answer.Step.Action\x1a\xb8\x06\n\x06\x41\x63tion\x12Y\n\rsearch_action\x18\x02 \x01(\x0b\x32@.google.cloud.discoveryengine.v1.Answer.Step.Action.SearchActionH\x00\x12T\n\x0bobservation\x18\x03 \x01(\x0b\x32?.google.cloud.discoveryengine.v1.Answer.Step.Action.Observation\x1a\x1d\n\x0cSearchAction\x12\r\n\x05query\x18\x01 \x01(\t\x1a\xd3\x04\n\x0bObservation\x12\x64\n\x0esearch_results\x18\x02 \x03(\x0b\x32L.google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult\x1a\xdd\x03\n\x0cSearchResult\x12\x10\n\x08\x64ocument\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\r\n\x05title\x18\x03 \x01(\t\x12n\n\x0csnippet_info\x18\x04 \x03(\x0b\x32X.google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult.SnippetInfo\x12j\n\nchunk_info\x18\x05 \x03(\x0b\x32V.google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult.ChunkInfo\x12,\n\x0bstruct_data\x18\x06 \x01(\x0b\x32\x17.google.protobuf.Struct\x1a\x36\n\x0bSnippetInfo\x12\x0f\n\x07snippet\x18\x01 \x01(\t\x12\x16\n\x0esnippet_status\x18\x02 \x01(\t\x1a]\n\tChunkInfo\x12\r\n\x05\x63hunk\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x12\x1c\n\x0frelevance_score\x18\x03 \x01(\x02H\x00\x88\x01\x01\x42\x12\n\x10_relevance_scoreB\x08\n\x06\x61\x63tion\"J\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIN_PROGRESS\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x1a\x98\x03\n\x16QueryUnderstandingInfo\x12y\n\x19query_classification_info\x18\x01 \x03(\x0b\x32V.google.cloud.discoveryengine.v1.Answer.QueryUnderstandingInfo.QueryClassificationInfo\x1a\x82\x02\n\x17QueryClassificationInfo\x12i\n\x04type\x18\x01 \x01(\x0e\x32[.google.cloud.discoveryengine.v1.Answer.QueryUnderstandingInfo.QueryClassificationInfo.Type\x12\x10\n\x08positive\x18\x02 \x01(\x08\"j\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x41\x44VERSARIAL_QUERY\x10\x01\x12\x1c\n\x18NON_ANSWER_SEEKING_QUERY\x10\x02\x12\x17\n\x13JAIL_BREAKING_QUERY\x10\x03\"J\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIN_PROGRESS\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\"\x9b\x02\n\x13\x41nswerSkippedReason\x12%\n!ANSWER_SKIPPED_REASON_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x41\x44VERSARIAL_QUERY_IGNORED\x10\x01\x12$\n NON_ANSWER_SEEKING_QUERY_IGNORED\x10\x02\x12\x1f\n\x1bOUT_OF_DOMAIN_QUERY_IGNORED\x10\x03\x12\x1e\n\x1aPOTENTIAL_POLICY_VIOLATION\x10\x04\x12\x17\n\x13NO_RELEVANT_CONTENT\x10\x05\x12\x1f\n\x1bJAIL_BREAKING_QUERY_IGNORED\x10\x06\x12\x1d\n\x19\x43USTOMER_POLICY_VIOLATION\x10\x07:\x85\x03\xea\x41\x81\x03\n%discoveryengine.googleapis.com/Answer\x12\x63projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}/answers/{answer}\x12|projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}/answers/{answer}\x12uprojects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/answers/{answer}B\xfe\x01\n#com.google.cloud.discoveryengine.v1B\x0b\x41nswerProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1b\x06proto3"
13
+ descriptor_data = "\n,google/cloud/discoveryengine/v1/answer.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd9\"\n\x06\x41nswer\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12<\n\x05state\x18\x02 \x01(\x0e\x32-.google.cloud.discoveryengine.v1.Answer.State\x12\x13\n\x0b\x61nswer_text\x18\x03 \x01(\t\x12\x43\n\tcitations\x18\x04 \x03(\x0b\x32\x30.google.cloud.discoveryengine.v1.Answer.Citation\x12\x45\n\nreferences\x18\x05 \x03(\x0b\x32\x31.google.cloud.discoveryengine.v1.Answer.Reference\x12\x19\n\x11related_questions\x18\x06 \x03(\t\x12;\n\x05steps\x18\x07 \x03(\x0b\x32,.google.cloud.discoveryengine.v1.Answer.Step\x12`\n\x18query_understanding_info\x18\n \x01(\x0b\x32>.google.cloud.discoveryengine.v1.Answer.QueryUnderstandingInfo\x12[\n\x16\x61nswer_skipped_reasons\x18\x0b \x03(\x0e\x32;.google.cloud.discoveryengine.v1.Answer.AnswerSkippedReason\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\rcomplete_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a{\n\x08\x43itation\x12\x13\n\x0bstart_index\x18\x01 \x01(\x03\x12\x11\n\tend_index\x18\x02 \x01(\x03\x12G\n\x07sources\x18\x03 \x03(\x0b\x32\x36.google.cloud.discoveryengine.v1.Answer.CitationSource\x1a&\n\x0e\x43itationSource\x12\x14\n\x0creference_id\x18\x01 \x01(\t\x1a\x82\n\n\tReference\x12p\n\x1aunstructured_document_info\x18\x01 \x01(\x0b\x32J.google.cloud.discoveryengine.v1.Answer.Reference.UnstructuredDocumentInfoH\x00\x12Q\n\nchunk_info\x18\x02 \x01(\x0b\x32;.google.cloud.discoveryengine.v1.Answer.Reference.ChunkInfoH\x00\x12l\n\x18structured_document_info\x18\x03 \x01(\x0b\x32H.google.cloud.discoveryengine.v1.Answer.Reference.StructuredDocumentInfoH\x00\x1a\x81\x03\n\x18UnstructuredDocumentInfo\x12>\n\x08\x64ocument\x18\x01 \x01(\tB,\xfa\x41)\n\'discoveryengine.googleapis.com/Document\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\r\n\x05title\x18\x03 \x01(\t\x12o\n\x0e\x63hunk_contents\x18\x04 \x03(\x0b\x32W.google.cloud.discoveryengine.v1.Answer.Reference.UnstructuredDocumentInfo.ChunkContent\x12,\n\x0bstruct_data\x18\x05 \x01(\x0b\x32\x17.google.protobuf.Struct\x1aj\n\x0c\x43hunkContent\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12\x17\n\x0fpage_identifier\x18\x02 \x01(\t\x12\x1c\n\x0frelevance_score\x18\x03 \x01(\x02H\x00\x88\x01\x01\x42\x12\n\x10_relevance_score\x1a\xa9\x03\n\tChunkInfo\x12\x38\n\x05\x63hunk\x18\x01 \x01(\tB)\xfa\x41&\n$discoveryengine.googleapis.com/Chunk\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x12\x1c\n\x0frelevance_score\x18\x03 \x01(\x02H\x00\x88\x01\x01\x12g\n\x11\x64ocument_metadata\x18\x04 \x01(\x0b\x32L.google.cloud.discoveryengine.v1.Answer.Reference.ChunkInfo.DocumentMetadata\x1a\xb5\x01\n\x10\x44ocumentMetadata\x12>\n\x08\x64ocument\x18\x01 \x01(\tB,\xfa\x41)\n\'discoveryengine.googleapis.com/Document\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\r\n\x05title\x18\x03 \x01(\t\x12\x17\n\x0fpage_identifier\x18\x04 \x01(\t\x12,\n\x0bstruct_data\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructB\x12\n\x10_relevance_score\x1a\x86\x01\n\x16StructuredDocumentInfo\x12>\n\x08\x64ocument\x18\x01 \x01(\tB,\xfa\x41)\n\'discoveryengine.googleapis.com/Document\x12,\n\x0bstruct_data\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\t\n\x07\x63ontent\x1a\xbc\x08\n\x04Step\x12\x41\n\x05state\x18\x01 \x01(\x0e\x32\x32.google.cloud.discoveryengine.v1.Answer.Step.State\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0f\n\x07thought\x18\x03 \x01(\t\x12\x44\n\x07\x61\x63tions\x18\x04 \x03(\x0b\x32\x33.google.cloud.discoveryengine.v1.Answer.Step.Action\x1a\xb8\x06\n\x06\x41\x63tion\x12Y\n\rsearch_action\x18\x02 \x01(\x0b\x32@.google.cloud.discoveryengine.v1.Answer.Step.Action.SearchActionH\x00\x12T\n\x0bobservation\x18\x03 \x01(\x0b\x32?.google.cloud.discoveryengine.v1.Answer.Step.Action.Observation\x1a\x1d\n\x0cSearchAction\x12\r\n\x05query\x18\x01 \x01(\t\x1a\xd3\x04\n\x0bObservation\x12\x64\n\x0esearch_results\x18\x02 \x03(\x0b\x32L.google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult\x1a\xdd\x03\n\x0cSearchResult\x12\x10\n\x08\x64ocument\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\r\n\x05title\x18\x03 \x01(\t\x12n\n\x0csnippet_info\x18\x04 \x03(\x0b\x32X.google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult.SnippetInfo\x12j\n\nchunk_info\x18\x05 \x03(\x0b\x32V.google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult.ChunkInfo\x12,\n\x0bstruct_data\x18\x06 \x01(\x0b\x32\x17.google.protobuf.Struct\x1a\x36\n\x0bSnippetInfo\x12\x0f\n\x07snippet\x18\x01 \x01(\t\x12\x16\n\x0esnippet_status\x18\x02 \x01(\t\x1a]\n\tChunkInfo\x12\r\n\x05\x63hunk\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x12\x1c\n\x0frelevance_score\x18\x03 \x01(\x02H\x00\x88\x01\x01\x42\x12\n\x10_relevance_scoreB\x08\n\x06\x61\x63tion\"J\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIN_PROGRESS\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x1a\xba\x03\n\x16QueryUnderstandingInfo\x12y\n\x19query_classification_info\x18\x01 \x03(\x0b\x32V.google.cloud.discoveryengine.v1.Answer.QueryUnderstandingInfo.QueryClassificationInfo\x1a\xa4\x02\n\x17QueryClassificationInfo\x12i\n\x04type\x18\x01 \x01(\x0e\x32[.google.cloud.discoveryengine.v1.Answer.QueryUnderstandingInfo.QueryClassificationInfo.Type\x12\x10\n\x08positive\x18\x02 \x01(\x08\"\x8b\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x41\x44VERSARIAL_QUERY\x10\x01\x12\x1c\n\x18NON_ANSWER_SEEKING_QUERY\x10\x02\x12\x17\n\x13JAIL_BREAKING_QUERY\x10\x03\x12\x1f\n\x1bNON_ANSWER_SEEKING_QUERY_V2\x10\x04\"J\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIN_PROGRESS\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\"\xdd\x02\n\x13\x41nswerSkippedReason\x12%\n!ANSWER_SKIPPED_REASON_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x41\x44VERSARIAL_QUERY_IGNORED\x10\x01\x12$\n NON_ANSWER_SEEKING_QUERY_IGNORED\x10\x02\x12\x1f\n\x1bOUT_OF_DOMAIN_QUERY_IGNORED\x10\x03\x12\x1e\n\x1aPOTENTIAL_POLICY_VIOLATION\x10\x04\x12\x17\n\x13NO_RELEVANT_CONTENT\x10\x05\x12\x1f\n\x1bJAIL_BREAKING_QUERY_IGNORED\x10\x06\x12\x1d\n\x19\x43USTOMER_POLICY_VIOLATION\x10\x07\x12\'\n#NON_ANSWER_SEEKING_QUERY_IGNORED_V2\x10\x08\x12\x17\n\x13LOW_GROUNDED_ANSWER\x10\t:\x85\x03\xea\x41\x81\x03\n%discoveryengine.googleapis.com/Answer\x12\x63projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}/answers/{answer}\x12|projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}/answers/{answer}\x12uprojects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/answers/{answer}B\xfe\x01\n#com.google.cloud.discoveryengine.v1B\x0b\x41nswerProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1b\x06proto3"
14
14
 
15
15
  pool = Google::Protobuf::DescriptorPool.generated_pool
16
16