diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/search_service/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/search_service/client.rb index fe9b73a30ca0..3b520dc34f30 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/search_service/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/search_service/client.rb @@ -217,7 +217,7 @@ def logger # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @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, display_spec: nil, session: nil, session_spec: nil, relevance_threshold: nil, relevance_score_spec: nil, ranking_expression: nil, ranking_expression_backend: nil) + # @overload search(serving_config: nil, branch: nil, query: nil, page_categories: 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, ranking_expression: nil, ranking_expression_backend: nil, safe_search: nil, user_labels: nil, natural_language_query_understanding_spec: nil, search_as_you_type_spec: nil, display_spec: nil, crowding_specs: nil, session: nil, session_spec: nil, relevance_threshold: nil, relevance_score_spec: nil) # Pass arguments to `search` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). @@ -237,6 +237,24 @@ def logger # documents under the default branch. # @param query [::String] # Raw search query. + # @param page_categories [::Array<::String>] + # Optional. The categories associated with a category page. Must be set for + # category navigation queries to achieve good search quality. The format + # should be the same as + # {::Google::Cloud::DiscoveryEngine::V1::PageInfo#page_category PageInfo.page_category}. + # This field is the equivalent of the query for browse (navigation) queries. + # It's used by the browse model when the query is empty. + # + # If the field is empty, it will not be used by the browse model. + # If the field contains more than one element, only the first element will + # be used. + # + # To represent full path of a category, use '>' character to separate + # different hierarchies. If '>' is part of the category name, replace it with + # other character(s). + # For example, `Graphics Cards > RTX>4090 > Founders Edition` where "RTX > + # 4090" represents one level, can be rewritten as `Graphics Cards > RTX_4090 + # > Founders Edition` # @param image_query [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ImageQuery, ::Hash] # Raw image query. # @param page_size [::Integer] @@ -267,6 +285,8 @@ def logger # unset. # # If this field is negative, an `INVALID_ARGUMENT` is returned. + # + # A large offset may be capped to a reasonable threshold. # @param one_box_page_size [::Integer] # The maximum number of results to return for OneBox. # This applies to each OneBox type individually. @@ -364,10 +384,10 @@ def logger # The spell correction specification that specifies the mode under # which spell correction takes effect. # @param user_pseudo_id [::String] - # A unique identifier for tracking visitors. For example, this could be - # implemented with an HTTP cookie, which should be able to uniquely identify - # a visitor on a single device. This unique identifier should not change if - # the visitor logs in or out of the website. + # Optional. A unique identifier for tracking visitors. For example, this + # could be implemented with an HTTP cookie, which should be able to uniquely + # identify a visitor on a single device. This unique identifier should not + # change if the visitor logs in or out of the website. # # This field should NOT have a fixed value such as `unknown_visitor`. # @@ -380,72 +400,9 @@ def logger # characters. Otherwise, an `INVALID_ARGUMENT` error is returned. # @param content_search_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec, ::Hash] # A specification for configuring the behavior of content search. - # @param safe_search [::Boolean] - # Whether to turn on safe search. This is only supported for - # website search. - # @param user_labels [::Hash{::String => ::String}] - # The user labels applied to a resource must meet the following requirements: - # - # * Each resource can have multiple labels, up to a maximum of 64. - # * Each label must be a key-value pair. - # * Keys have a minimum length of 1 character and a maximum length of 63 - # characters and cannot be empty. Values can be empty and have a maximum - # length of 63 characters. - # * Keys and values can contain only lowercase letters, numeric characters, - # underscores, and dashes. All characters must use UTF-8 encoding, and - # international characters are allowed. - # * The key portion of a label must be unique. However, you can use the same - # key with multiple resources. - # * Keys must start with a lowercase letter or international character. - # - # See [Google Cloud - # Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - # for more details. - # @param search_as_you_type_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SearchAsYouTypeSpec, ::Hash] - # Search as you type configuration. Only supported for the - # {::Google::Cloud::DiscoveryEngine::V1::IndustryVertical::MEDIA IndustryVertical.MEDIA} - # vertical. - # @param display_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DisplaySpec, ::Hash] - # Optional. Config for display feature, like match highlighting on search - # results. - # @param session [::String] - # The session resource name. Optional. - # - # Session allows users to do multi-turn /search API calls or coordination - # between /search API calls and /answer API calls. - # - # Example #1 (multi-turn /search API calls): - # Call /search API with the session ID generated in the first call. - # Here, the previous search query gets considered in query - # standing. I.e., if the first query is "How did Alphabet do in 2022?" - # and the current query is "How about 2023?", the current query will - # be interpreted as "How did Alphabet do in 2023?". - # - # Example #2 (coordination between /search API calls and /answer API calls): - # Call /answer API with the session ID generated in the first call. - # Here, the answer generation happens in the context of the search - # results from the first search call. - # - # Multi-turn Search feature is currently at private GA stage. Please use - # v1alpha or v1beta version instead before we launch this feature to public - # GA. Or ask for allowlisting through Google Support team. - # @param session_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SessionSpec, ::Hash] - # Session specification. - # - # Can be used only when `session` is set. - # @param relevance_threshold [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RelevanceThreshold] - # The relevance threshold of the search results. - # - # Default to Google defined threshold, leveraging a balance of - # precision and recall to deliver both highly accurate results and - # comprehensive coverage of relevant information. - # - # This feature is not supported for healthcare search. - # @param relevance_score_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RelevanceScoreSpec, ::Hash] - # Optional. The specification for returning the relevance score. # @param ranking_expression [::String] - # The ranking expression controls the customized ranking on retrieval - # documents. This overrides + # Optional. The ranking expression controls the customized ranking on + # retrieval documents. This overrides # {::Google::Cloud::DiscoveryEngine::V1::ServingConfig#ranking_expression ServingConfig.ranking_expression}. # The syntax and supported features depend on the # `ranking_expression_backend` value. If `ranking_expression_backend` is not @@ -535,7 +492,90 @@ def logger # the document. # * `base_rank`: the default rank of the result # @param ranking_expression_backend [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RankingExpressionBackend] - # The backend to use for the ranking expression evaluation. + # Optional. The backend to use for the ranking expression evaluation. + # @param safe_search [::Boolean] + # Whether to turn on safe search. This is only supported for + # website search. + # @param user_labels [::Hash{::String => ::String}] + # The user labels applied to a resource must meet the following requirements: + # + # * Each resource can have multiple labels, up to a maximum of 64. + # * Each label must be a key-value pair. + # * Keys have a minimum length of 1 character and a maximum length of 63 + # characters and cannot be empty. Values can be empty and have a maximum + # length of 63 characters. + # * Keys and values can contain only lowercase letters, numeric characters, + # underscores, and dashes. All characters must use UTF-8 encoding, and + # international characters are allowed. + # * The key portion of a label must be unique. However, you can use the same + # key with multiple resources. + # * Keys must start with a lowercase letter or international character. + # + # See [Google Cloud + # Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + # for more details. + # @param natural_language_query_understanding_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::NaturalLanguageQueryUnderstandingSpec, ::Hash] + # Optional. Config for natural language query understanding capabilities, + # such as extracting structured field filters from the query. Refer to [this + # documentation](https://cloud.google.com/generative-ai-app-builder/docs/natural-language-queries) + # for more information. + # If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional + # natural language query understanding will be done. + # @param search_as_you_type_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SearchAsYouTypeSpec, ::Hash] + # Search as you type configuration. Only supported for the + # {::Google::Cloud::DiscoveryEngine::V1::IndustryVertical::MEDIA IndustryVertical.MEDIA} + # vertical. + # @param display_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DisplaySpec, ::Hash] + # Optional. Config for display feature, like match highlighting on search + # results. + # @param crowding_specs [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::CrowdingSpec, ::Hash>] + # Optional. Crowding specifications for improving result diversity. + # If multiple CrowdingSpecs are specified, crowding will be evaluated on + # each unique combination of the `field` values, and max_count will be the + # maximum value of `max_count` across all CrowdingSpecs. + # For example, if the first CrowdingSpec has `field` = "color" and + # `max_count` = 3, and the second CrowdingSpec has `field` = "size" and + # `max_count` = 2, then after 3 documents that share the same color AND size + # have been returned, subsequent ones should be + # removed or demoted. + # @param session [::String] + # The session resource name. Optional. + # + # Session allows users to do multi-turn /search API calls or coordination + # between /search API calls and /answer API calls. + # + # Example #1 (multi-turn /search API calls): + # Call /search API with the session ID generated in the first call. + # Here, the previous search query gets considered in query + # standing. I.e., if the first query is "How did Alphabet do in 2022?" + # and the current query is "How about 2023?", the current query will + # be interpreted as "How did Alphabet do in 2023?". + # + # Example #2 (coordination between /search API calls and /answer API calls): + # Call /answer API with the session ID generated in the first call. + # Here, the answer generation happens in the context of the search + # results from the first search call. + # + # Multi-turn Search feature is currently at private GA stage. Please use + # v1alpha or v1beta version instead before we launch this feature to public + # GA. Or ask for allowlisting through Google Support team. + # @param session_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SessionSpec, ::Hash] + # Session specification. + # + # Can be used only when `session` is set. + # @param relevance_threshold [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RelevanceThreshold] + # The global relevance threshold of the search results. + # + # Defaults to Google defined threshold, leveraging a balance of + # precision and recall to deliver both highly accurate results and + # comprehensive coverage of relevant information. + # + # If more granular relevance filtering is required, use the + # `relevance_filter_spec` instead. + # + # This feature is not supported for healthcare search. + # @param relevance_score_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RelevanceScoreSpec, ::Hash] + # Optional. The specification for returning the relevance score. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult>] @@ -632,7 +672,7 @@ def search request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @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, display_spec: nil, session: nil, session_spec: nil, relevance_threshold: nil, relevance_score_spec: nil, ranking_expression: nil, ranking_expression_backend: nil) + # @overload search_lite(serving_config: nil, branch: nil, query: nil, page_categories: 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, ranking_expression: nil, ranking_expression_backend: nil, safe_search: nil, user_labels: nil, natural_language_query_understanding_spec: nil, search_as_you_type_spec: nil, display_spec: nil, crowding_specs: nil, session: nil, session_spec: nil, relevance_threshold: nil, relevance_score_spec: nil) # Pass arguments to `search_lite` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). @@ -652,6 +692,24 @@ def search request, options = nil # documents under the default branch. # @param query [::String] # Raw search query. + # @param page_categories [::Array<::String>] + # Optional. The categories associated with a category page. Must be set for + # category navigation queries to achieve good search quality. The format + # should be the same as + # {::Google::Cloud::DiscoveryEngine::V1::PageInfo#page_category PageInfo.page_category}. + # This field is the equivalent of the query for browse (navigation) queries. + # It's used by the browse model when the query is empty. + # + # If the field is empty, it will not be used by the browse model. + # If the field contains more than one element, only the first element will + # be used. + # + # To represent full path of a category, use '>' character to separate + # different hierarchies. If '>' is part of the category name, replace it with + # other character(s). + # For example, `Graphics Cards > RTX>4090 > Founders Edition` where "RTX > + # 4090" represents one level, can be rewritten as `Graphics Cards > RTX_4090 + # > Founders Edition` # @param image_query [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ImageQuery, ::Hash] # Raw image query. # @param page_size [::Integer] @@ -682,6 +740,8 @@ def search request, options = nil # unset. # # If this field is negative, an `INVALID_ARGUMENT` is returned. + # + # A large offset may be capped to a reasonable threshold. # @param one_box_page_size [::Integer] # The maximum number of results to return for OneBox. # This applies to each OneBox type individually. @@ -779,10 +839,10 @@ def search request, options = nil # The spell correction specification that specifies the mode under # which spell correction takes effect. # @param user_pseudo_id [::String] - # A unique identifier for tracking visitors. For example, this could be - # implemented with an HTTP cookie, which should be able to uniquely identify - # a visitor on a single device. This unique identifier should not change if - # the visitor logs in or out of the website. + # Optional. A unique identifier for tracking visitors. For example, this + # could be implemented with an HTTP cookie, which should be able to uniquely + # identify a visitor on a single device. This unique identifier should not + # change if the visitor logs in or out of the website. # # This field should NOT have a fixed value such as `unknown_visitor`. # @@ -795,72 +855,9 @@ def search request, options = nil # characters. Otherwise, an `INVALID_ARGUMENT` error is returned. # @param content_search_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec, ::Hash] # A specification for configuring the behavior of content search. - # @param safe_search [::Boolean] - # Whether to turn on safe search. This is only supported for - # website search. - # @param user_labels [::Hash{::String => ::String}] - # The user labels applied to a resource must meet the following requirements: - # - # * Each resource can have multiple labels, up to a maximum of 64. - # * Each label must be a key-value pair. - # * Keys have a minimum length of 1 character and a maximum length of 63 - # characters and cannot be empty. Values can be empty and have a maximum - # length of 63 characters. - # * Keys and values can contain only lowercase letters, numeric characters, - # underscores, and dashes. All characters must use UTF-8 encoding, and - # international characters are allowed. - # * The key portion of a label must be unique. However, you can use the same - # key with multiple resources. - # * Keys must start with a lowercase letter or international character. - # - # See [Google Cloud - # Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - # for more details. - # @param search_as_you_type_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SearchAsYouTypeSpec, ::Hash] - # Search as you type configuration. Only supported for the - # {::Google::Cloud::DiscoveryEngine::V1::IndustryVertical::MEDIA IndustryVertical.MEDIA} - # vertical. - # @param display_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DisplaySpec, ::Hash] - # Optional. Config for display feature, like match highlighting on search - # results. - # @param session [::String] - # The session resource name. Optional. - # - # Session allows users to do multi-turn /search API calls or coordination - # between /search API calls and /answer API calls. - # - # Example #1 (multi-turn /search API calls): - # Call /search API with the session ID generated in the first call. - # Here, the previous search query gets considered in query - # standing. I.e., if the first query is "How did Alphabet do in 2022?" - # and the current query is "How about 2023?", the current query will - # be interpreted as "How did Alphabet do in 2023?". - # - # Example #2 (coordination between /search API calls and /answer API calls): - # Call /answer API with the session ID generated in the first call. - # Here, the answer generation happens in the context of the search - # results from the first search call. - # - # Multi-turn Search feature is currently at private GA stage. Please use - # v1alpha or v1beta version instead before we launch this feature to public - # GA. Or ask for allowlisting through Google Support team. - # @param session_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SessionSpec, ::Hash] - # Session specification. - # - # Can be used only when `session` is set. - # @param relevance_threshold [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RelevanceThreshold] - # The relevance threshold of the search results. - # - # Default to Google defined threshold, leveraging a balance of - # precision and recall to deliver both highly accurate results and - # comprehensive coverage of relevant information. - # - # This feature is not supported for healthcare search. - # @param relevance_score_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RelevanceScoreSpec, ::Hash] - # Optional. The specification for returning the relevance score. # @param ranking_expression [::String] - # The ranking expression controls the customized ranking on retrieval - # documents. This overrides + # Optional. The ranking expression controls the customized ranking on + # retrieval documents. This overrides # {::Google::Cloud::DiscoveryEngine::V1::ServingConfig#ranking_expression ServingConfig.ranking_expression}. # The syntax and supported features depend on the # `ranking_expression_backend` value. If `ranking_expression_backend` is not @@ -950,7 +947,90 @@ def search request, options = nil # the document. # * `base_rank`: the default rank of the result # @param ranking_expression_backend [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RankingExpressionBackend] - # The backend to use for the ranking expression evaluation. + # Optional. The backend to use for the ranking expression evaluation. + # @param safe_search [::Boolean] + # Whether to turn on safe search. This is only supported for + # website search. + # @param user_labels [::Hash{::String => ::String}] + # The user labels applied to a resource must meet the following requirements: + # + # * Each resource can have multiple labels, up to a maximum of 64. + # * Each label must be a key-value pair. + # * Keys have a minimum length of 1 character and a maximum length of 63 + # characters and cannot be empty. Values can be empty and have a maximum + # length of 63 characters. + # * Keys and values can contain only lowercase letters, numeric characters, + # underscores, and dashes. All characters must use UTF-8 encoding, and + # international characters are allowed. + # * The key portion of a label must be unique. However, you can use the same + # key with multiple resources. + # * Keys must start with a lowercase letter or international character. + # + # See [Google Cloud + # Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + # for more details. + # @param natural_language_query_understanding_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::NaturalLanguageQueryUnderstandingSpec, ::Hash] + # Optional. Config for natural language query understanding capabilities, + # such as extracting structured field filters from the query. Refer to [this + # documentation](https://cloud.google.com/generative-ai-app-builder/docs/natural-language-queries) + # for more information. + # If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional + # natural language query understanding will be done. + # @param search_as_you_type_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SearchAsYouTypeSpec, ::Hash] + # Search as you type configuration. Only supported for the + # {::Google::Cloud::DiscoveryEngine::V1::IndustryVertical::MEDIA IndustryVertical.MEDIA} + # vertical. + # @param display_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DisplaySpec, ::Hash] + # Optional. Config for display feature, like match highlighting on search + # results. + # @param crowding_specs [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::CrowdingSpec, ::Hash>] + # Optional. Crowding specifications for improving result diversity. + # If multiple CrowdingSpecs are specified, crowding will be evaluated on + # each unique combination of the `field` values, and max_count will be the + # maximum value of `max_count` across all CrowdingSpecs. + # For example, if the first CrowdingSpec has `field` = "color" and + # `max_count` = 3, and the second CrowdingSpec has `field` = "size" and + # `max_count` = 2, then after 3 documents that share the same color AND size + # have been returned, subsequent ones should be + # removed or demoted. + # @param session [::String] + # The session resource name. Optional. + # + # Session allows users to do multi-turn /search API calls or coordination + # between /search API calls and /answer API calls. + # + # Example #1 (multi-turn /search API calls): + # Call /search API with the session ID generated in the first call. + # Here, the previous search query gets considered in query + # standing. I.e., if the first query is "How did Alphabet do in 2022?" + # and the current query is "How about 2023?", the current query will + # be interpreted as "How did Alphabet do in 2023?". + # + # Example #2 (coordination between /search API calls and /answer API calls): + # Call /answer API with the session ID generated in the first call. + # Here, the answer generation happens in the context of the search + # results from the first search call. + # + # Multi-turn Search feature is currently at private GA stage. Please use + # v1alpha or v1beta version instead before we launch this feature to public + # GA. Or ask for allowlisting through Google Support team. + # @param session_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SessionSpec, ::Hash] + # Session specification. + # + # Can be used only when `session` is set. + # @param relevance_threshold [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RelevanceThreshold] + # The global relevance threshold of the search results. + # + # Defaults to Google defined threshold, leveraging a balance of + # precision and recall to deliver both highly accurate results and + # comprehensive coverage of relevant information. + # + # If more granular relevance filtering is required, use the + # `relevance_filter_spec` instead. + # + # This feature is not supported for healthcare search. + # @param relevance_score_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RelevanceScoreSpec, ::Hash] + # Optional. The specification for returning the relevance score. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult>] diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb index d8afe1edd333..e0cefc05ce70 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb @@ -210,7 +210,7 @@ def logger # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @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, display_spec: nil, session: nil, session_spec: nil, relevance_threshold: nil, relevance_score_spec: nil, ranking_expression: nil, ranking_expression_backend: nil) + # @overload search(serving_config: nil, branch: nil, query: nil, page_categories: 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, ranking_expression: nil, ranking_expression_backend: nil, safe_search: nil, user_labels: nil, natural_language_query_understanding_spec: nil, search_as_you_type_spec: nil, display_spec: nil, crowding_specs: nil, session: nil, session_spec: nil, relevance_threshold: nil, relevance_score_spec: nil) # Pass arguments to `search` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). @@ -230,6 +230,24 @@ def logger # documents under the default branch. # @param query [::String] # Raw search query. + # @param page_categories [::Array<::String>] + # Optional. The categories associated with a category page. Must be set for + # category navigation queries to achieve good search quality. The format + # should be the same as + # {::Google::Cloud::DiscoveryEngine::V1::PageInfo#page_category PageInfo.page_category}. + # This field is the equivalent of the query for browse (navigation) queries. + # It's used by the browse model when the query is empty. + # + # If the field is empty, it will not be used by the browse model. + # If the field contains more than one element, only the first element will + # be used. + # + # To represent full path of a category, use '>' character to separate + # different hierarchies. If '>' is part of the category name, replace it with + # other character(s). + # For example, `Graphics Cards > RTX>4090 > Founders Edition` where "RTX > + # 4090" represents one level, can be rewritten as `Graphics Cards > RTX_4090 + # > Founders Edition` # @param image_query [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ImageQuery, ::Hash] # Raw image query. # @param page_size [::Integer] @@ -260,6 +278,8 @@ def logger # unset. # # If this field is negative, an `INVALID_ARGUMENT` is returned. + # + # A large offset may be capped to a reasonable threshold. # @param one_box_page_size [::Integer] # The maximum number of results to return for OneBox. # This applies to each OneBox type individually. @@ -357,10 +377,10 @@ def logger # The spell correction specification that specifies the mode under # which spell correction takes effect. # @param user_pseudo_id [::String] - # A unique identifier for tracking visitors. For example, this could be - # implemented with an HTTP cookie, which should be able to uniquely identify - # a visitor on a single device. This unique identifier should not change if - # the visitor logs in or out of the website. + # Optional. A unique identifier for tracking visitors. For example, this + # could be implemented with an HTTP cookie, which should be able to uniquely + # identify a visitor on a single device. This unique identifier should not + # change if the visitor logs in or out of the website. # # This field should NOT have a fixed value such as `unknown_visitor`. # @@ -373,72 +393,9 @@ def logger # characters. Otherwise, an `INVALID_ARGUMENT` error is returned. # @param content_search_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec, ::Hash] # A specification for configuring the behavior of content search. - # @param safe_search [::Boolean] - # Whether to turn on safe search. This is only supported for - # website search. - # @param user_labels [::Hash{::String => ::String}] - # The user labels applied to a resource must meet the following requirements: - # - # * Each resource can have multiple labels, up to a maximum of 64. - # * Each label must be a key-value pair. - # * Keys have a minimum length of 1 character and a maximum length of 63 - # characters and cannot be empty. Values can be empty and have a maximum - # length of 63 characters. - # * Keys and values can contain only lowercase letters, numeric characters, - # underscores, and dashes. All characters must use UTF-8 encoding, and - # international characters are allowed. - # * The key portion of a label must be unique. However, you can use the same - # key with multiple resources. - # * Keys must start with a lowercase letter or international character. - # - # See [Google Cloud - # Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - # for more details. - # @param search_as_you_type_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SearchAsYouTypeSpec, ::Hash] - # Search as you type configuration. Only supported for the - # {::Google::Cloud::DiscoveryEngine::V1::IndustryVertical::MEDIA IndustryVertical.MEDIA} - # vertical. - # @param display_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DisplaySpec, ::Hash] - # Optional. Config for display feature, like match highlighting on search - # results. - # @param session [::String] - # The session resource name. Optional. - # - # Session allows users to do multi-turn /search API calls or coordination - # between /search API calls and /answer API calls. - # - # Example #1 (multi-turn /search API calls): - # Call /search API with the session ID generated in the first call. - # Here, the previous search query gets considered in query - # standing. I.e., if the first query is "How did Alphabet do in 2022?" - # and the current query is "How about 2023?", the current query will - # be interpreted as "How did Alphabet do in 2023?". - # - # Example #2 (coordination between /search API calls and /answer API calls): - # Call /answer API with the session ID generated in the first call. - # Here, the answer generation happens in the context of the search - # results from the first search call. - # - # Multi-turn Search feature is currently at private GA stage. Please use - # v1alpha or v1beta version instead before we launch this feature to public - # GA. Or ask for allowlisting through Google Support team. - # @param session_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SessionSpec, ::Hash] - # Session specification. - # - # Can be used only when `session` is set. - # @param relevance_threshold [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RelevanceThreshold] - # The relevance threshold of the search results. - # - # Default to Google defined threshold, leveraging a balance of - # precision and recall to deliver both highly accurate results and - # comprehensive coverage of relevant information. - # - # This feature is not supported for healthcare search. - # @param relevance_score_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RelevanceScoreSpec, ::Hash] - # Optional. The specification for returning the relevance score. # @param ranking_expression [::String] - # The ranking expression controls the customized ranking on retrieval - # documents. This overrides + # Optional. The ranking expression controls the customized ranking on + # retrieval documents. This overrides # {::Google::Cloud::DiscoveryEngine::V1::ServingConfig#ranking_expression ServingConfig.ranking_expression}. # The syntax and supported features depend on the # `ranking_expression_backend` value. If `ranking_expression_backend` is not @@ -528,7 +485,90 @@ def logger # the document. # * `base_rank`: the default rank of the result # @param ranking_expression_backend [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RankingExpressionBackend] - # The backend to use for the ranking expression evaluation. + # Optional. The backend to use for the ranking expression evaluation. + # @param safe_search [::Boolean] + # Whether to turn on safe search. This is only supported for + # website search. + # @param user_labels [::Hash{::String => ::String}] + # The user labels applied to a resource must meet the following requirements: + # + # * Each resource can have multiple labels, up to a maximum of 64. + # * Each label must be a key-value pair. + # * Keys have a minimum length of 1 character and a maximum length of 63 + # characters and cannot be empty. Values can be empty and have a maximum + # length of 63 characters. + # * Keys and values can contain only lowercase letters, numeric characters, + # underscores, and dashes. All characters must use UTF-8 encoding, and + # international characters are allowed. + # * The key portion of a label must be unique. However, you can use the same + # key with multiple resources. + # * Keys must start with a lowercase letter or international character. + # + # See [Google Cloud + # Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + # for more details. + # @param natural_language_query_understanding_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::NaturalLanguageQueryUnderstandingSpec, ::Hash] + # Optional. Config for natural language query understanding capabilities, + # such as extracting structured field filters from the query. Refer to [this + # documentation](https://cloud.google.com/generative-ai-app-builder/docs/natural-language-queries) + # for more information. + # If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional + # natural language query understanding will be done. + # @param search_as_you_type_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SearchAsYouTypeSpec, ::Hash] + # Search as you type configuration. Only supported for the + # {::Google::Cloud::DiscoveryEngine::V1::IndustryVertical::MEDIA IndustryVertical.MEDIA} + # vertical. + # @param display_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DisplaySpec, ::Hash] + # Optional. Config for display feature, like match highlighting on search + # results. + # @param crowding_specs [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::CrowdingSpec, ::Hash>] + # Optional. Crowding specifications for improving result diversity. + # If multiple CrowdingSpecs are specified, crowding will be evaluated on + # each unique combination of the `field` values, and max_count will be the + # maximum value of `max_count` across all CrowdingSpecs. + # For example, if the first CrowdingSpec has `field` = "color" and + # `max_count` = 3, and the second CrowdingSpec has `field` = "size" and + # `max_count` = 2, then after 3 documents that share the same color AND size + # have been returned, subsequent ones should be + # removed or demoted. + # @param session [::String] + # The session resource name. Optional. + # + # Session allows users to do multi-turn /search API calls or coordination + # between /search API calls and /answer API calls. + # + # Example #1 (multi-turn /search API calls): + # Call /search API with the session ID generated in the first call. + # Here, the previous search query gets considered in query + # standing. I.e., if the first query is "How did Alphabet do in 2022?" + # and the current query is "How about 2023?", the current query will + # be interpreted as "How did Alphabet do in 2023?". + # + # Example #2 (coordination between /search API calls and /answer API calls): + # Call /answer API with the session ID generated in the first call. + # Here, the answer generation happens in the context of the search + # results from the first search call. + # + # Multi-turn Search feature is currently at private GA stage. Please use + # v1alpha or v1beta version instead before we launch this feature to public + # GA. Or ask for allowlisting through Google Support team. + # @param session_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SessionSpec, ::Hash] + # Session specification. + # + # Can be used only when `session` is set. + # @param relevance_threshold [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RelevanceThreshold] + # The global relevance threshold of the search results. + # + # Defaults to Google defined threshold, leveraging a balance of + # precision and recall to deliver both highly accurate results and + # comprehensive coverage of relevant information. + # + # If more granular relevance filtering is required, use the + # `relevance_filter_spec` instead. + # + # This feature is not supported for healthcare search. + # @param relevance_score_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RelevanceScoreSpec, ::Hash] + # Optional. The specification for returning the relevance score. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult>] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -618,7 +658,7 @@ def search request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @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, display_spec: nil, session: nil, session_spec: nil, relevance_threshold: nil, relevance_score_spec: nil, ranking_expression: nil, ranking_expression_backend: nil) + # @overload search_lite(serving_config: nil, branch: nil, query: nil, page_categories: 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, ranking_expression: nil, ranking_expression_backend: nil, safe_search: nil, user_labels: nil, natural_language_query_understanding_spec: nil, search_as_you_type_spec: nil, display_spec: nil, crowding_specs: nil, session: nil, session_spec: nil, relevance_threshold: nil, relevance_score_spec: nil) # Pass arguments to `search_lite` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). @@ -638,6 +678,24 @@ def search request, options = nil # documents under the default branch. # @param query [::String] # Raw search query. + # @param page_categories [::Array<::String>] + # Optional. The categories associated with a category page. Must be set for + # category navigation queries to achieve good search quality. The format + # should be the same as + # {::Google::Cloud::DiscoveryEngine::V1::PageInfo#page_category PageInfo.page_category}. + # This field is the equivalent of the query for browse (navigation) queries. + # It's used by the browse model when the query is empty. + # + # If the field is empty, it will not be used by the browse model. + # If the field contains more than one element, only the first element will + # be used. + # + # To represent full path of a category, use '>' character to separate + # different hierarchies. If '>' is part of the category name, replace it with + # other character(s). + # For example, `Graphics Cards > RTX>4090 > Founders Edition` where "RTX > + # 4090" represents one level, can be rewritten as `Graphics Cards > RTX_4090 + # > Founders Edition` # @param image_query [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ImageQuery, ::Hash] # Raw image query. # @param page_size [::Integer] @@ -668,6 +726,8 @@ def search request, options = nil # unset. # # If this field is negative, an `INVALID_ARGUMENT` is returned. + # + # A large offset may be capped to a reasonable threshold. # @param one_box_page_size [::Integer] # The maximum number of results to return for OneBox. # This applies to each OneBox type individually. @@ -765,10 +825,10 @@ def search request, options = nil # The spell correction specification that specifies the mode under # which spell correction takes effect. # @param user_pseudo_id [::String] - # A unique identifier for tracking visitors. For example, this could be - # implemented with an HTTP cookie, which should be able to uniquely identify - # a visitor on a single device. This unique identifier should not change if - # the visitor logs in or out of the website. + # Optional. A unique identifier for tracking visitors. For example, this + # could be implemented with an HTTP cookie, which should be able to uniquely + # identify a visitor on a single device. This unique identifier should not + # change if the visitor logs in or out of the website. # # This field should NOT have a fixed value such as `unknown_visitor`. # @@ -781,72 +841,9 @@ def search request, options = nil # characters. Otherwise, an `INVALID_ARGUMENT` error is returned. # @param content_search_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec, ::Hash] # A specification for configuring the behavior of content search. - # @param safe_search [::Boolean] - # Whether to turn on safe search. This is only supported for - # website search. - # @param user_labels [::Hash{::String => ::String}] - # The user labels applied to a resource must meet the following requirements: - # - # * Each resource can have multiple labels, up to a maximum of 64. - # * Each label must be a key-value pair. - # * Keys have a minimum length of 1 character and a maximum length of 63 - # characters and cannot be empty. Values can be empty and have a maximum - # length of 63 characters. - # * Keys and values can contain only lowercase letters, numeric characters, - # underscores, and dashes. All characters must use UTF-8 encoding, and - # international characters are allowed. - # * The key portion of a label must be unique. However, you can use the same - # key with multiple resources. - # * Keys must start with a lowercase letter or international character. - # - # See [Google Cloud - # Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - # for more details. - # @param search_as_you_type_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SearchAsYouTypeSpec, ::Hash] - # Search as you type configuration. Only supported for the - # {::Google::Cloud::DiscoveryEngine::V1::IndustryVertical::MEDIA IndustryVertical.MEDIA} - # vertical. - # @param display_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DisplaySpec, ::Hash] - # Optional. Config for display feature, like match highlighting on search - # results. - # @param session [::String] - # The session resource name. Optional. - # - # Session allows users to do multi-turn /search API calls or coordination - # between /search API calls and /answer API calls. - # - # Example #1 (multi-turn /search API calls): - # Call /search API with the session ID generated in the first call. - # Here, the previous search query gets considered in query - # standing. I.e., if the first query is "How did Alphabet do in 2022?" - # and the current query is "How about 2023?", the current query will - # be interpreted as "How did Alphabet do in 2023?". - # - # Example #2 (coordination between /search API calls and /answer API calls): - # Call /answer API with the session ID generated in the first call. - # Here, the answer generation happens in the context of the search - # results from the first search call. - # - # Multi-turn Search feature is currently at private GA stage. Please use - # v1alpha or v1beta version instead before we launch this feature to public - # GA. Or ask for allowlisting through Google Support team. - # @param session_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SessionSpec, ::Hash] - # Session specification. - # - # Can be used only when `session` is set. - # @param relevance_threshold [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RelevanceThreshold] - # The relevance threshold of the search results. - # - # Default to Google defined threshold, leveraging a balance of - # precision and recall to deliver both highly accurate results and - # comprehensive coverage of relevant information. - # - # This feature is not supported for healthcare search. - # @param relevance_score_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RelevanceScoreSpec, ::Hash] - # Optional. The specification for returning the relevance score. # @param ranking_expression [::String] - # The ranking expression controls the customized ranking on retrieval - # documents. This overrides + # Optional. The ranking expression controls the customized ranking on + # retrieval documents. This overrides # {::Google::Cloud::DiscoveryEngine::V1::ServingConfig#ranking_expression ServingConfig.ranking_expression}. # The syntax and supported features depend on the # `ranking_expression_backend` value. If `ranking_expression_backend` is not @@ -936,7 +933,90 @@ def search request, options = nil # the document. # * `base_rank`: the default rank of the result # @param ranking_expression_backend [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RankingExpressionBackend] - # The backend to use for the ranking expression evaluation. + # Optional. The backend to use for the ranking expression evaluation. + # @param safe_search [::Boolean] + # Whether to turn on safe search. This is only supported for + # website search. + # @param user_labels [::Hash{::String => ::String}] + # The user labels applied to a resource must meet the following requirements: + # + # * Each resource can have multiple labels, up to a maximum of 64. + # * Each label must be a key-value pair. + # * Keys have a minimum length of 1 character and a maximum length of 63 + # characters and cannot be empty. Values can be empty and have a maximum + # length of 63 characters. + # * Keys and values can contain only lowercase letters, numeric characters, + # underscores, and dashes. All characters must use UTF-8 encoding, and + # international characters are allowed. + # * The key portion of a label must be unique. However, you can use the same + # key with multiple resources. + # * Keys must start with a lowercase letter or international character. + # + # See [Google Cloud + # Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + # for more details. + # @param natural_language_query_understanding_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::NaturalLanguageQueryUnderstandingSpec, ::Hash] + # Optional. Config for natural language query understanding capabilities, + # such as extracting structured field filters from the query. Refer to [this + # documentation](https://cloud.google.com/generative-ai-app-builder/docs/natural-language-queries) + # for more information. + # If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional + # natural language query understanding will be done. + # @param search_as_you_type_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SearchAsYouTypeSpec, ::Hash] + # Search as you type configuration. Only supported for the + # {::Google::Cloud::DiscoveryEngine::V1::IndustryVertical::MEDIA IndustryVertical.MEDIA} + # vertical. + # @param display_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DisplaySpec, ::Hash] + # Optional. Config for display feature, like match highlighting on search + # results. + # @param crowding_specs [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::CrowdingSpec, ::Hash>] + # Optional. Crowding specifications for improving result diversity. + # If multiple CrowdingSpecs are specified, crowding will be evaluated on + # each unique combination of the `field` values, and max_count will be the + # maximum value of `max_count` across all CrowdingSpecs. + # For example, if the first CrowdingSpec has `field` = "color" and + # `max_count` = 3, and the second CrowdingSpec has `field` = "size" and + # `max_count` = 2, then after 3 documents that share the same color AND size + # have been returned, subsequent ones should be + # removed or demoted. + # @param session [::String] + # The session resource name. Optional. + # + # Session allows users to do multi-turn /search API calls or coordination + # between /search API calls and /answer API calls. + # + # Example #1 (multi-turn /search API calls): + # Call /search API with the session ID generated in the first call. + # Here, the previous search query gets considered in query + # standing. I.e., if the first query is "How did Alphabet do in 2022?" + # and the current query is "How about 2023?", the current query will + # be interpreted as "How did Alphabet do in 2023?". + # + # Example #2 (coordination between /search API calls and /answer API calls): + # Call /answer API with the session ID generated in the first call. + # Here, the answer generation happens in the context of the search + # results from the first search call. + # + # Multi-turn Search feature is currently at private GA stage. Please use + # v1alpha or v1beta version instead before we launch this feature to public + # GA. Or ask for allowlisting through Google Support team. + # @param session_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SessionSpec, ::Hash] + # Session specification. + # + # Can be used only when `session` is set. + # @param relevance_threshold [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RelevanceThreshold] + # The global relevance threshold of the search results. + # + # Defaults to Google defined threshold, leveraging a balance of + # precision and recall to deliver both highly accurate results and + # comprehensive coverage of relevant information. + # + # If more granular relevance filtering is required, use the + # `relevance_filter_spec` instead. + # + # This feature is not supported for healthcare search. + # @param relevance_score_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RelevanceScoreSpec, ::Hash] + # Optional. The specification for returning the relevance score. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult>] # @yieldparam operation [::Gapic::Rest::TransportOperation] diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/data_store_pb.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/data_store_pb.rb index be1680f24e50..069619b9b2a9 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/data_store_pb.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/data_store_pb.rb @@ -13,7 +13,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n0google/cloud/discoveryengine/v1/data_store.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x39google/cloud/discoveryengine/v1/cmek_config_service.proto\x1a,google/cloud/discoveryengine/v1/common.proto\x1a@google/cloud/discoveryengine/v1/document_processing_config.proto\x1a,google/cloud/discoveryengine/v1/schema.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe7\r\n\tDataStore\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Q\n\x11industry_vertical\x18\x03 \x01(\x0e\x32\x31.google.cloud.discoveryengine.v1.IndustryVerticalB\x03\xe0\x41\x05\x12\x45\n\x0esolution_types\x18\x05 \x03(\x0e\x32-.google.cloud.discoveryengine.v1.SolutionType\x12\x1e\n\x11\x64\x65\x66\x61ult_schema_id\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12U\n\x0e\x63ontent_config\x18\x06 \x01(\x0e\x32\x38.google.cloud.discoveryengine.v1.DataStore.ContentConfigB\x03\xe0\x41\x05\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x63\n\x1b\x61\x64vanced_site_search_config\x18\x0c \x01(\x0b\x32\x39.google.cloud.discoveryengine.v1.AdvancedSiteSearchConfigB\x03\xe0\x41\x01\x12\x19\n\x0ckms_key_name\x18 \x01(\tB\x03\xe0\x41\x04\x12\x45\n\x0b\x63mek_config\x18\x12 \x01(\x0b\x32+.google.cloud.discoveryengine.v1.CmekConfigB\x03\xe0\x41\x03\x12]\n\x12\x62illing_estimation\x18\x17 \x01(\x0b\x32<.google.cloud.discoveryengine.v1.DataStore.BillingEstimationB\x03\xe0\x41\x03\x12\x18\n\x0b\x61\x63l_enabled\x18\x18 \x01(\x08\x42\x03\xe0\x41\x05\x12J\n\x10workspace_config\x18\x19 \x01(\x0b\x32\x30.google.cloud.discoveryengine.v1.WorkspaceConfig\x12]\n\x1a\x64ocument_processing_config\x18\x1b \x01(\x0b\x32\x39.google.cloud.discoveryengine.v1.DocumentProcessingConfig\x12@\n\x0fstarting_schema\x18\x1c \x01(\x0b\x32\'.google.cloud.discoveryengine.v1.Schema\x12Z\n\x16healthcare_fhir_config\x18\x1d \x01(\x0b\x32\x35.google.cloud.discoveryengine.v1.HealthcareFhirConfigB\x03\xe0\x41\x01\x12[\n\x16identity_mapping_store\x18\x1f \x01(\tB;\xe0\x41\x05\xfa\x41\x35\n3discoveryengine.googleapis.com/IdentityMappingStore\x1a\xae\x02\n\x11\x42illingEstimation\x12\x1c\n\x14structured_data_size\x18\x01 \x01(\x03\x12\x1e\n\x16unstructured_data_size\x18\x02 \x01(\x03\x12\x19\n\x11website_data_size\x18\x03 \x01(\x03\x12?\n\x1bstructured_data_update_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x41\n\x1dunstructured_data_update_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12<\n\x18website_data_update_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x7f\n\rContentConfig\x12\x1e\n\x1a\x43ONTENT_CONFIG_UNSPECIFIED\x10\x00\x12\x0e\n\nNO_CONTENT\x10\x01\x12\x14\n\x10\x43ONTENT_REQUIRED\x10\x02\x12\x12\n\x0ePUBLIC_WEBSITE\x10\x03\x12\x14\n\x10GOOGLE_WORKSPACE\x10\x04:\xc9\x01\xea\x41\xc5\x01\n(discoveryengine.googleapis.com/DataStore\x12?projects/{project}/locations/{location}/dataStores/{data_store}\x12Xprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}\"\x9e\x01\n\x18\x41\x64vancedSiteSearchConfig\x12\"\n\x15\x64isable_initial_index\x18\x03 \x01(\x08H\x00\x88\x01\x01\x12&\n\x19\x64isable_automatic_refresh\x18\x04 \x01(\x08H\x01\x88\x01\x01\x42\x18\n\x16_disable_initial_indexB\x1c\n\x1a_disable_automatic_refresh\"\xf5\x02\n\x0fWorkspaceConfig\x12\x43\n\x04type\x18\x01 \x01(\x0e\x32\x35.google.cloud.discoveryengine.v1.WorkspaceConfig.Type\x12\x1a\n\x12\x64\x61sher_customer_id\x18\x02 \x01(\t\x12(\n\x1bsuper_admin_service_account\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12&\n\x19super_admin_email_address\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xae\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cGOOGLE_DRIVE\x10\x01\x12\x0f\n\x0bGOOGLE_MAIL\x10\x02\x12\x10\n\x0cGOOGLE_SITES\x10\x03\x12\x13\n\x0fGOOGLE_CALENDAR\x10\x04\x12\x0f\n\x0bGOOGLE_CHAT\x10\x05\x12\x11\n\rGOOGLE_GROUPS\x10\x06\x12\x0f\n\x0bGOOGLE_KEEP\x10\x07\x12\x11\n\rGOOGLE_PEOPLE\x10\x08\x42\x81\x02\n#com.google.cloud.discoveryengine.v1B\x0e\x44\x61taStoreProtoP\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" +descriptor_data = "\n0google/cloud/discoveryengine/v1/data_store.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x39google/cloud/discoveryengine/v1/cmek_config_service.proto\x1a,google/cloud/discoveryengine/v1/common.proto\x1a@google/cloud/discoveryengine/v1/document_processing_config.proto\x1a,google/cloud/discoveryengine/v1/schema.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xec\x0e\n\tDataStore\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Q\n\x11industry_vertical\x18\x03 \x01(\x0e\x32\x31.google.cloud.discoveryengine.v1.IndustryVerticalB\x03\xe0\x41\x05\x12\x45\n\x0esolution_types\x18\x05 \x03(\x0e\x32-.google.cloud.discoveryengine.v1.SolutionType\x12\x1e\n\x11\x64\x65\x66\x61ult_schema_id\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12U\n\x0e\x63ontent_config\x18\x06 \x01(\x0e\x32\x38.google.cloud.discoveryengine.v1.DataStore.ContentConfigB\x03\xe0\x41\x05\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x63\n\x1b\x61\x64vanced_site_search_config\x18\x0c \x01(\x0b\x32\x39.google.cloud.discoveryengine.v1.AdvancedSiteSearchConfigB\x03\xe0\x41\x01\x12\x82\x01\n+natural_language_query_understanding_config\x18\" \x01(\x0b\x32H.google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfigB\x03\xe0\x41\x01\x12\x19\n\x0ckms_key_name\x18 \x01(\tB\x03\xe0\x41\x04\x12\x45\n\x0b\x63mek_config\x18\x12 \x01(\x0b\x32+.google.cloud.discoveryengine.v1.CmekConfigB\x03\xe0\x41\x03\x12]\n\x12\x62illing_estimation\x18\x17 \x01(\x0b\x32<.google.cloud.discoveryengine.v1.DataStore.BillingEstimationB\x03\xe0\x41\x03\x12\x18\n\x0b\x61\x63l_enabled\x18\x18 \x01(\x08\x42\x03\xe0\x41\x05\x12J\n\x10workspace_config\x18\x19 \x01(\x0b\x32\x30.google.cloud.discoveryengine.v1.WorkspaceConfig\x12]\n\x1a\x64ocument_processing_config\x18\x1b \x01(\x0b\x32\x39.google.cloud.discoveryengine.v1.DocumentProcessingConfig\x12@\n\x0fstarting_schema\x18\x1c \x01(\x0b\x32\'.google.cloud.discoveryengine.v1.Schema\x12Z\n\x16healthcare_fhir_config\x18\x1d \x01(\x0b\x32\x35.google.cloud.discoveryengine.v1.HealthcareFhirConfigB\x03\xe0\x41\x01\x12[\n\x16identity_mapping_store\x18\x1f \x01(\tB;\xe0\x41\x05\xfa\x41\x35\n3discoveryengine.googleapis.com/IdentityMappingStore\x1a\xae\x02\n\x11\x42illingEstimation\x12\x1c\n\x14structured_data_size\x18\x01 \x01(\x03\x12\x1e\n\x16unstructured_data_size\x18\x02 \x01(\x03\x12\x19\n\x11website_data_size\x18\x03 \x01(\x03\x12?\n\x1bstructured_data_update_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x41\n\x1dunstructured_data_update_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12<\n\x18website_data_update_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x7f\n\rContentConfig\x12\x1e\n\x1a\x43ONTENT_CONFIG_UNSPECIFIED\x10\x00\x12\x0e\n\nNO_CONTENT\x10\x01\x12\x14\n\x10\x43ONTENT_REQUIRED\x10\x02\x12\x12\n\x0ePUBLIC_WEBSITE\x10\x03\x12\x14\n\x10GOOGLE_WORKSPACE\x10\x04:\xc9\x01\xea\x41\xc5\x01\n(discoveryengine.googleapis.com/DataStore\x12?projects/{project}/locations/{location}/dataStores/{data_store}\x12Xprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}\"\x9e\x01\n\x18\x41\x64vancedSiteSearchConfig\x12\"\n\x15\x64isable_initial_index\x18\x03 \x01(\x08H\x00\x88\x01\x01\x12&\n\x19\x64isable_automatic_refresh\x18\x04 \x01(\x08H\x01\x88\x01\x01\x42\x18\n\x16_disable_initial_indexB\x1c\n\x1a_disable_automatic_refresh\"\xbf\x01\n\'NaturalLanguageQueryUnderstandingConfig\x12[\n\x04mode\x18\x01 \x01(\x0e\x32M.google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig.Mode\"7\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\"\xf5\x02\n\x0fWorkspaceConfig\x12\x43\n\x04type\x18\x01 \x01(\x0e\x32\x35.google.cloud.discoveryengine.v1.WorkspaceConfig.Type\x12\x1a\n\x12\x64\x61sher_customer_id\x18\x02 \x01(\t\x12(\n\x1bsuper_admin_service_account\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12&\n\x19super_admin_email_address\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xae\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cGOOGLE_DRIVE\x10\x01\x12\x0f\n\x0bGOOGLE_MAIL\x10\x02\x12\x10\n\x0cGOOGLE_SITES\x10\x03\x12\x13\n\x0fGOOGLE_CALENDAR\x10\x04\x12\x0f\n\x0bGOOGLE_CHAT\x10\x05\x12\x11\n\rGOOGLE_GROUPS\x10\x06\x12\x0f\n\x0bGOOGLE_KEEP\x10\x07\x12\x11\n\rGOOGLE_PEOPLE\x10\x08\x42\x81\x02\n#com.google.cloud.discoveryengine.v1B\x0e\x44\x61taStoreProtoP\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" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -52,6 +52,8 @@ module V1 DataStore::BillingEstimation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.DataStore.BillingEstimation").msgclass DataStore::ContentConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.DataStore.ContentConfig").enummodule AdvancedSiteSearchConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.AdvancedSiteSearchConfig").msgclass + NaturalLanguageQueryUnderstandingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig").msgclass + NaturalLanguageQueryUnderstandingConfig::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig.Mode").enummodule WorkspaceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.WorkspaceConfig").msgclass WorkspaceConfig::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.WorkspaceConfig.Type").enummodule end diff --git a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/search_service_pb.rb b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/search_service_pb.rb index b232a597ae20..4499260a81bb 100644 --- a/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/search_service_pb.rb +++ b/google-cloud-discovery_engine-v1/lib/google/cloud/discoveryengine/v1/search_service_pb.rb @@ -14,7 +14,7 @@ require 'google/protobuf/struct_pb' -descriptor_data = "\n4google/cloud/discoveryengine/v1/search_service.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a+google/cloud/discoveryengine/v1/chunk.proto\x1a,google/cloud/discoveryengine/v1/common.proto\x1a.google/cloud/discoveryengine/v1/document.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xca\x32\n\rSearchRequest\x12L\n\x0eserving_config\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,discoveryengine.googleapis.com/ServingConfig\x12:\n\x06\x62ranch\x18\x02 \x01(\tB*\xfa\x41\'\n%discoveryengine.googleapis.com/Branch\x12\r\n\x05query\x18\x03 \x01(\t\x12N\n\x0bimage_query\x18\x13 \x01(\x0b\x32\x39.google.cloud.discoveryengine.v1.SearchRequest.ImageQuery\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x05 \x01(\t\x12\x0e\n\x06offset\x18\x06 \x01(\x05\x12\x19\n\x11one_box_page_size\x18/ \x01(\x05\x12V\n\x10\x64\x61ta_store_specs\x18 \x03(\x0b\x32<.google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec\x12\x0e\n\x06\x66ilter\x18\x07 \x01(\t\x12\x18\n\x10\x63\x61nonical_filter\x18\x1d \x01(\t\x12\x10\n\x08order_by\x18\x08 \x01(\t\x12<\n\tuser_info\x18\x15 \x01(\x0b\x32).google.cloud.discoveryengine.v1.UserInfo\x12\x15\n\rlanguage_code\x18# \x01(\t\x12M\n\x0b\x66\x61\x63\x65t_specs\x18\t \x03(\x0b\x32\x38.google.cloud.discoveryengine.v1.SearchRequest.FacetSpec\x12L\n\nboost_spec\x18\n \x01(\x0b\x32\x38.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec\x12J\n\x06params\x18\x0b \x03(\x0b\x32:.google.cloud.discoveryengine.v1.SearchRequest.ParamsEntry\x12_\n\x14query_expansion_spec\x18\r \x01(\x0b\x32\x41.google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec\x12\x61\n\x15spell_correction_spec\x18\x0e \x01(\x0b\x32\x42.google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec\x12\x16\n\x0euser_pseudo_id\x18\x0f \x01(\t\x12]\n\x13\x63ontent_search_spec\x18\x18 \x01(\x0b\x32@.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec\x12\x13\n\x0bsafe_search\x18\x14 \x01(\x08\x12S\n\x0buser_labels\x18\x16 \x03(\x0b\x32>.google.cloud.discoveryengine.v1.SearchRequest.UserLabelsEntry\x12\x63\n\x17search_as_you_type_spec\x18\x1f \x01(\x0b\x32\x42.google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec\x12U\n\x0c\x64isplay_spec\x18& \x01(\x0b\x32:.google.cloud.discoveryengine.v1.SearchRequest.DisplaySpecB\x03\xe0\x41\x01\x12<\n\x07session\x18) \x01(\tB+\xfa\x41(\n&discoveryengine.googleapis.com/Session\x12P\n\x0csession_spec\x18* \x01(\x0b\x32:.google.cloud.discoveryengine.v1.SearchRequest.SessionSpec\x12^\n\x13relevance_threshold\x18, \x01(\x0e\x32\x41.google.cloud.discoveryengine.v1.SearchRequest.RelevanceThreshold\x12\x64\n\x14relevance_score_spec\x18\x34 \x01(\x0b\x32\x41.google.cloud.discoveryengine.v1.SearchRequest.RelevanceScoreSpecB\x03\xe0\x41\x01\x12\x1a\n\x12ranking_expression\x18\x1a \x01(\t\x12p\n\x1aranking_expression_backend\x18\x35 \x01(\x0e\x32G.google.cloud.discoveryengine.v1.SearchRequest.RankingExpressionBackendB\x03\xe0\x41\x01\x1a,\n\nImageQuery\x12\x15\n\x0bimage_bytes\x18\x01 \x01(\tH\x00\x42\x07\n\x05image\x1a\xe3\x01\n\rDataStoreSpec\x12\x44\n\ndata_store\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(discoveryengine.googleapis.com/DataStore\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12Q\n\nboost_spec\x18\x06 \x01(\x0b\x32\x38.google.cloud.discoveryengine.v1.SearchRequest.BoostSpecB\x03\xe0\x41\x01\x12$\n\x17\x63ustom_search_operators\x18\x07 \x01(\tB\x03\xe0\x41\x01\x1a\xfc\x02\n\tFacetSpec\x12Y\n\tfacet_key\x18\x01 \x01(\x0b\x32\x41.google.cloud.discoveryengine.v1.SearchRequest.FacetSpec.FacetKeyB\x03\xe0\x41\x02\x12\r\n\x05limit\x18\x02 \x01(\x05\x12\x1c\n\x14\x65xcluded_filter_keys\x18\x03 \x03(\t\x12\x1f\n\x17\x65nable_dynamic_position\x18\x04 \x01(\x08\x1a\xc5\x01\n\x08\x46\x61\x63\x65tKey\x12\x10\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12<\n\tintervals\x18\x02 \x03(\x0b\x32).google.cloud.discoveryengine.v1.Interval\x12\x19\n\x11restricted_values\x18\x03 \x03(\t\x12\x10\n\x08prefixes\x18\x04 \x03(\t\x12\x10\n\x08\x63ontains\x18\x05 \x03(\t\x12\x18\n\x10\x63\x61se_insensitive\x18\x06 \x01(\x08\x12\x10\n\x08order_by\x18\x07 \x01(\t\x1a\xbc\x07\n\tBoostSpec\x12j\n\x15\x63ondition_boost_specs\x18\x01 \x03(\x0b\x32K.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec.ConditionBoostSpec\x1a\xc2\x06\n\x12\x43onditionBoostSpec\x12\x11\n\tcondition\x18\x01 \x01(\t\x12\r\n\x05\x62oost\x18\x02 \x01(\x02\x12x\n\x12\x62oost_control_spec\x18\x03 \x01(\x0b\x32\\.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec\x1a\x8f\x05\n\x10\x42oostControlSpec\x12\x12\n\nfield_name\x18\x01 \x01(\t\x12\x82\x01\n\x0e\x61ttribute_type\x18\x02 \x01(\x0e\x32j.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType\x12\x8a\x01\n\x12interpolation_type\x18\x03 \x01(\x0e\x32n.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType\x12\x81\x01\n\x0e\x63ontrol_points\x18\x04 \x03(\x0b\x32i.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint\x1a=\n\x0c\x43ontrolPoint\x12\x17\n\x0f\x61ttribute_value\x18\x01 \x01(\t\x12\x14\n\x0c\x62oost_amount\x18\x02 \x01(\x02\"M\n\rAttributeType\x12\x1e\n\x1a\x41TTRIBUTE_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tNUMERICAL\x10\x01\x12\r\n\tFRESHNESS\x10\x02\"C\n\x11InterpolationType\x12\"\n\x1eINTERPOLATION_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06LINEAR\x10\x01\x1a\xd4\x01\n\x12QueryExpansionSpec\x12^\n\tcondition\x18\x01 \x01(\x0e\x32K.google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec.Condition\x12\x1e\n\x16pin_unexpanded_results\x18\x02 \x01(\x08\">\n\tCondition\x12\x19\n\x15\x43ONDITION_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x08\n\x04\x41UTO\x10\x02\x1a\xa9\x01\n\x13SpellCorrectionSpec\x12U\n\x04mode\x18\x01 \x01(\x0e\x32G.google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec.Mode\";\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSUGGESTION_ONLY\x10\x01\x12\x08\n\x04\x41UTO\x10\x02\x1a\xa2\x0c\n\x11\x43ontentSearchSpec\x12\x62\n\x0csnippet_spec\x18\x01 \x01(\x0b\x32L.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SnippetSpec\x12\x62\n\x0csummary_spec\x18\x02 \x01(\x0b\x32L.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec\x12w\n\x17\x65xtractive_content_spec\x18\x03 \x01(\x0b\x32V.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec\x12m\n\x12search_result_mode\x18\x04 \x01(\x0e\x32Q.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode\x12^\n\nchunk_spec\x18\x05 \x01(\x0b\x32J.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec\x1a`\n\x0bSnippetSpec\x12\x1d\n\x11max_snippet_count\x18\x01 \x01(\x05\x42\x02\x18\x01\x12\x1a\n\x0ereference_only\x18\x02 \x01(\x08\x42\x02\x18\x01\x12\x16\n\x0ereturn_snippet\x18\x03 \x01(\x08\x1a\xbc\x04\n\x0bSummarySpec\x12\x1c\n\x14summary_result_count\x18\x01 \x01(\x05\x12\x19\n\x11include_citations\x18\x02 \x01(\x08\x12 \n\x18ignore_adversarial_query\x18\x03 \x01(\x08\x12(\n ignore_non_summary_seeking_query\x18\x04 \x01(\x08\x12#\n\x1bignore_low_relevant_content\x18\t \x01(\x08\x12\'\n\x1aignore_jail_breaking_query\x18\n \x01(\x08\x42\x03\xe0\x41\x01\x12w\n\x11model_prompt_spec\x18\x05 \x01(\x0b\x32\\.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec\x12\x15\n\rlanguage_code\x18\x06 \x01(\t\x12j\n\nmodel_spec\x18\x07 \x01(\x0b\x32V.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec\x12\x1b\n\x13use_semantic_chunks\x18\x08 \x01(\x08\x1a#\n\x0fModelPromptSpec\x12\x10\n\x08preamble\x18\x01 \x01(\t\x1a\x1c\n\tModelSpec\x12\x0f\n\x07version\x18\x01 \x01(\t\x1a\xc5\x01\n\x15\x45xtractiveContentSpec\x12#\n\x1bmax_extractive_answer_count\x18\x01 \x01(\x05\x12$\n\x1cmax_extractive_segment_count\x18\x02 \x01(\x05\x12\'\n\x1freturn_extractive_segment_score\x18\x03 \x01(\x08\x12\x1d\n\x15num_previous_segments\x18\x04 \x01(\x05\x12\x19\n\x11num_next_segments\x18\x05 \x01(\x05\x1a\x41\n\tChunkSpec\x12\x1b\n\x13num_previous_chunks\x18\x01 \x01(\x05\x12\x17\n\x0fnum_next_chunks\x18\x02 \x01(\x05\"Q\n\x10SearchResultMode\x12\"\n\x1eSEARCH_RESULT_MODE_UNSPECIFIED\x10\x00\x12\r\n\tDOCUMENTS\x10\x01\x12\n\n\x06\x43HUNKS\x10\x02\x1a\xc3\x01\n\x13SearchAsYouTypeSpec\x12_\n\tcondition\x18\x01 \x01(\x0e\x32L.google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.Condition\"K\n\tCondition\x12\x19\n\x15\x43ONDITION_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x12\x08\n\x04\x41UTO\x10\x03\x1a\x98\x02\n\x0b\x44isplaySpec\x12{\n\x1cmatch_highlighting_condition\x18\x01 \x01(\x0e\x32U.google.cloud.discoveryengine.v1.SearchRequest.DisplaySpec.MatchHighlightingCondition\"\x8b\x01\n\x1aMatchHighlightingCondition\x12,\n(MATCH_HIGHLIGHTING_CONDITION_UNSPECIFIED\x10\x00\x12\x1f\n\x1bMATCH_HIGHLIGHTING_DISABLED\x10\x01\x12\x1e\n\x1aMATCH_HIGHLIGHTING_ENABLED\x10\x02\x1aq\n\x0bSessionSpec\x12\x10\n\x08query_id\x18\x01 \x01(\t\x12,\n\x1fsearch_result_persistence_count\x18\x02 \x01(\x05H\x00\x88\x01\x01\x42\"\n _search_result_persistence_count\x1a\x39\n\x12RelevanceScoreSpec\x12#\n\x16return_relevance_score\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x45\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\x1a\x31\n\x0fUserLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"d\n\x12RelevanceThreshold\x12#\n\x1fRELEVANCE_THRESHOLD_UNSPECIFIED\x10\x00\x12\n\n\x06LOWEST\x10\x01\x12\x07\n\x03LOW\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x08\n\x04HIGH\x10\x04\"~\n\x18RankingExpressionBackend\x12*\n&RANKING_EXPRESSION_BACKEND_UNSPECIFIED\x10\x00\x12\x15\n\x11RANK_BY_EMBEDDING\x10\x03\x12\x13\n\x0fRANK_BY_FORMULA\x10\x04\"\x04\x08\x01\x10\x01\"\x04\x08\x02\x10\x02\"\xbe\x1c\n\x0eSearchResponse\x12M\n\x07results\x18\x01 \x03(\x0b\x32<.google.cloud.discoveryengine.v1.SearchResponse.SearchResult\x12\x45\n\x06\x66\x61\x63\x65ts\x18\x02 \x03(\x0b\x32\x35.google.cloud.discoveryengine.v1.SearchResponse.Facet\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\x12\x19\n\x11\x61ttribution_token\x18\x04 \x01(\t\x12\x14\n\x0credirect_uri\x18\x0c \x01(\t\x12\x17\n\x0fnext_page_token\x18\x05 \x01(\t\x12\x17\n\x0f\x63orrected_query\x18\x07 \x01(\t\x12H\n\x07summary\x18\t \x01(\x0b\x32\x37.google.cloud.discoveryengine.v1.SearchResponse.Summary\x12`\n\x14query_expansion_info\x18\x0e \x01(\x0b\x32\x42.google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo\x12Q\n\x0csession_info\x18\x13 \x01(\x0b\x32;.google.cloud.discoveryengine.v1.SearchResponse.SessionInfo\x12T\n\x16search_link_promotions\x18\x17 \x03(\x0b\x32\x34.google.cloud.discoveryengine.v1.SearchLinkPromotion\x1a\xaf\x08\n\x0cSearchResult\x12\n\n\x02id\x18\x01 \x01(\t\x12;\n\x08\x64ocument\x18\x02 \x01(\x0b\x32).google.cloud.discoveryengine.v1.Document\x12\x35\n\x05\x63hunk\x18\x12 \x01(\x0b\x32&.google.cloud.discoveryengine.v1.Chunk\x12h\n\x0cmodel_scores\x18\x04 \x03(\x0b\x32M.google.cloud.discoveryengine.v1.SearchResponse.SearchResult.ModelScoresEntryB\x03\xe0\x41\x03\x12\x63\n\x0crank_signals\x18\x07 \x01(\x0b\x32H.google.cloud.discoveryengine.v1.SearchResponse.SearchResult.RankSignalsB\x03\xe0\x41\x01\x1a_\n\x10ModelScoresEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12:\n\x05value\x18\x02 \x01(\x0b\x32+.google.cloud.discoveryengine.v1.DoubleList:\x02\x38\x01\x1a\xee\x04\n\x0bRankSignals\x12*\n\x18keyword_similarity_score\x18\x01 \x01(\x02\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12!\n\x0frelevance_score\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12+\n\x19semantic_similarity_score\x18\x03 \x01(\x02\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x1b\n\tpctr_rank\x18\x04 \x01(\x02\x42\x03\xe0\x41\x01H\x03\x88\x01\x01\x12!\n\x0ftopicality_rank\x18\x06 \x01(\x02\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x1e\n\x0c\x64ocument_age\x18\x07 \x01(\x02\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12!\n\x0f\x62oosting_factor\x18\x08 \x01(\x02\x42\x03\xe0\x41\x01H\x06\x88\x01\x01\x12\x19\n\x0c\x64\x65\x66\x61ult_rank\x18 \x01(\x02\x42\x03\xe0\x41\x01\x12r\n\x0e\x63ustom_signals\x18! \x03(\x0b\x32U.google.cloud.discoveryengine.v1.SearchResponse.SearchResult.RankSignals.CustomSignalB\x03\xe0\x41\x01\x1a\x35\n\x0c\x43ustomSignal\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05value\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01\x42\x1b\n\x19_keyword_similarity_scoreB\x12\n\x10_relevance_scoreB\x1c\n\x1a_semantic_similarity_scoreB\x0c\n\n_pctr_rankB\x12\n\x10_topicality_rankB\x0f\n\r_document_ageB\x12\n\x10_boosting_factorJ\x04\x08\x05\x10\x06\x1a\xf9\x01\n\x05\x46\x61\x63\x65t\x12\x0b\n\x03key\x18\x01 \x01(\t\x12P\n\x06values\x18\x02 \x03(\x0b\x32@.google.cloud.discoveryengine.v1.SearchResponse.Facet.FacetValue\x12\x15\n\rdynamic_facet\x18\x03 \x01(\x08\x1az\n\nFacetValue\x12\x0f\n\x05value\x18\x01 \x01(\tH\x00\x12=\n\x08interval\x18\x02 \x01(\x0b\x32).google.cloud.discoveryengine.v1.IntervalH\x00\x12\r\n\x05\x63ount\x18\x03 \x01(\x03\x42\r\n\x0b\x66\x61\x63\x65t_value\x1a\xa1\x0c\n\x07Summary\x12\x14\n\x0csummary_text\x18\x01 \x01(\t\x12m\n\x17summary_skipped_reasons\x18\x02 \x03(\x0e\x32L.google.cloud.discoveryengine.v1.SearchResponse.Summary.SummarySkippedReason\x12\x63\n\x11safety_attributes\x18\x03 \x01(\x0b\x32H.google.cloud.discoveryengine.v1.SearchResponse.Summary.SafetyAttributes\x12j\n\x15summary_with_metadata\x18\x04 \x01(\x0b\x32K.google.cloud.discoveryengine.v1.SearchResponse.Summary.SummaryWithMetadata\x1a\x36\n\x10SafetyAttributes\x12\x12\n\ncategories\x18\x01 \x03(\t\x12\x0e\n\x06scores\x18\x02 \x03(\x02\x1ag\n\x10\x43itationMetadata\x12S\n\tcitations\x18\x01 \x03(\x0b\x32@.google.cloud.discoveryengine.v1.SearchResponse.Summary.Citation\x1a\x8b\x01\n\x08\x43itation\x12\x13\n\x0bstart_index\x18\x01 \x01(\x03\x12\x11\n\tend_index\x18\x02 \x01(\x03\x12W\n\x07sources\x18\x03 \x03(\x0b\x32\x46.google.cloud.discoveryengine.v1.SearchResponse.Summary.CitationSource\x1a)\n\x0e\x43itationSource\x12\x17\n\x0freference_index\x18\x04 \x01(\x03\x1a\x8c\x02\n\tReference\x12\r\n\x05title\x18\x01 \x01(\t\x12\x41\n\x08\x64ocument\x18\x02 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'discoveryengine.googleapis.com/Document\x12\x0b\n\x03uri\x18\x03 \x01(\t\x12\x66\n\x0e\x63hunk_contents\x18\x04 \x03(\x0b\x32N.google.cloud.discoveryengine.v1.SearchResponse.Summary.Reference.ChunkContent\x1a\x38\n\x0c\x43hunkContent\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12\x17\n\x0fpage_identifier\x18\x02 \x01(\t\x1a\xe2\x01\n\x13SummaryWithMetadata\x12\x0f\n\x07summary\x18\x01 \x01(\t\x12\x63\n\x11\x63itation_metadata\x18\x02 \x01(\x0b\x32H.google.cloud.discoveryengine.v1.SearchResponse.Summary.CitationMetadata\x12U\n\nreferences\x18\x03 \x03(\x0b\x32\x41.google.cloud.discoveryengine.v1.SearchResponse.Summary.Reference\"\xf1\x02\n\x14SummarySkippedReason\x12&\n\"SUMMARY_SKIPPED_REASON_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x41\x44VERSARIAL_QUERY_IGNORED\x10\x01\x12%\n!NON_SUMMARY_SEEKING_QUERY_IGNORED\x10\x02\x12\x1f\n\x1bOUT_OF_DOMAIN_QUERY_IGNORED\x10\x03\x12\x1e\n\x1aPOTENTIAL_POLICY_VIOLATION\x10\x04\x12\x19\n\x15LLM_ADDON_NOT_ENABLED\x10\x05\x12\x17\n\x13NO_RELEVANT_CONTENT\x10\x06\x12\x1f\n\x1bJAIL_BREAKING_QUERY_IGNORED\x10\x07\x12\x1d\n\x19\x43USTOMER_POLICY_VIOLATION\x10\x08\x12(\n$NON_SUMMARY_SEEKING_QUERY_IGNORED_V2\x10\t\x12\x0c\n\x08TIME_OUT\x10\n\x1aI\n\x12QueryExpansionInfo\x12\x16\n\x0e\x65xpanded_query\x18\x01 \x01(\x08\x12\x1b\n\x13pinned_result_count\x18\x02 \x01(\x03\x1a-\n\x0bSessionInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x08query_id\x18\x02 \x01(\t2\x97\x07\n\rSearchService\x12\x8f\x03\n\x06Search\x12..google.cloud.discoveryengine.v1.SearchRequest\x1a/.google.cloud.discoveryengine.v1.SearchResponse\"\xa3\x02\x82\xd3\xe4\x93\x02\x9c\x02\"P/v1/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:search:\x01*Zc\"^/v1/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:search:\x01*Z`\"[/v1/{serving_config=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}:search:\x01*\x12\x9f\x03\n\nSearchLite\x12..google.cloud.discoveryengine.v1.SearchRequest\x1a/.google.cloud.discoveryengine.v1.SearchResponse\"\xaf\x02\x82\xd3\xe4\x93\x02\xa8\x02\"T/v1/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:searchLite:\x01*Zg\"b/v1/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:searchLite:\x01*Zd\"_/v1/{serving_config=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}:searchLite:\x01*\x1aR\xca\x41\x1e\x64iscoveryengine.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x85\x02\n#com.google.cloud.discoveryengine.v1B\x12SearchServiceProtoP\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" +descriptor_data = "\n4google/cloud/discoveryengine/v1/search_service.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a+google/cloud/discoveryengine/v1/chunk.proto\x1a,google/cloud/discoveryengine/v1/common.proto\x1a.google/cloud/discoveryengine/v1/document.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xb1;\n\rSearchRequest\x12L\n\x0eserving_config\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,discoveryengine.googleapis.com/ServingConfig\x12:\n\x06\x62ranch\x18\x02 \x01(\tB*\xfa\x41\'\n%discoveryengine.googleapis.com/Branch\x12\r\n\x05query\x18\x03 \x01(\t\x12\x1c\n\x0fpage_categories\x18? \x03(\tB\x03\xe0\x41\x01\x12N\n\x0bimage_query\x18\x13 \x01(\x0b\x32\x39.google.cloud.discoveryengine.v1.SearchRequest.ImageQuery\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x05 \x01(\t\x12\x0e\n\x06offset\x18\x06 \x01(\x05\x12\x19\n\x11one_box_page_size\x18/ \x01(\x05\x12V\n\x10\x64\x61ta_store_specs\x18 \x03(\x0b\x32<.google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec\x12\x0e\n\x06\x66ilter\x18\x07 \x01(\t\x12\x18\n\x10\x63\x61nonical_filter\x18\x1d \x01(\t\x12\x10\n\x08order_by\x18\x08 \x01(\t\x12<\n\tuser_info\x18\x15 \x01(\x0b\x32).google.cloud.discoveryengine.v1.UserInfo\x12\x15\n\rlanguage_code\x18# \x01(\t\x12M\n\x0b\x66\x61\x63\x65t_specs\x18\t \x03(\x0b\x32\x38.google.cloud.discoveryengine.v1.SearchRequest.FacetSpec\x12L\n\nboost_spec\x18\n \x01(\x0b\x32\x38.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec\x12J\n\x06params\x18\x0b \x03(\x0b\x32:.google.cloud.discoveryengine.v1.SearchRequest.ParamsEntry\x12_\n\x14query_expansion_spec\x18\r \x01(\x0b\x32\x41.google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec\x12\x61\n\x15spell_correction_spec\x18\x0e \x01(\x0b\x32\x42.google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec\x12\x1b\n\x0euser_pseudo_id\x18\x0f \x01(\tB\x03\xe0\x41\x01\x12]\n\x13\x63ontent_search_spec\x18\x18 \x01(\x0b\x32@.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec\x12\x1f\n\x12ranking_expression\x18\x1a \x01(\tB\x03\xe0\x41\x01\x12p\n\x1aranking_expression_backend\x18\x35 \x01(\x0e\x32G.google.cloud.discoveryengine.v1.SearchRequest.RankingExpressionBackendB\x03\xe0\x41\x01\x12\x13\n\x0bsafe_search\x18\x14 \x01(\x08\x12S\n\x0buser_labels\x18\x16 \x03(\x0b\x32>.google.cloud.discoveryengine.v1.SearchRequest.UserLabelsEntry\x12\x8c\x01\n)natural_language_query_understanding_spec\x18\x1c \x01(\x0b\x32T.google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpecB\x03\xe0\x41\x01\x12\x63\n\x17search_as_you_type_spec\x18\x1f \x01(\x0b\x32\x42.google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec\x12U\n\x0c\x64isplay_spec\x18& \x01(\x0b\x32:.google.cloud.discoveryengine.v1.SearchRequest.DisplaySpecB\x03\xe0\x41\x01\x12X\n\x0e\x63rowding_specs\x18( \x03(\x0b\x32;.google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpecB\x03\xe0\x41\x01\x12<\n\x07session\x18) \x01(\tB+\xfa\x41(\n&discoveryengine.googleapis.com/Session\x12P\n\x0csession_spec\x18* \x01(\x0b\x32:.google.cloud.discoveryengine.v1.SearchRequest.SessionSpec\x12^\n\x13relevance_threshold\x18, \x01(\x0e\x32\x41.google.cloud.discoveryengine.v1.SearchRequest.RelevanceThreshold\x12\x64\n\x14relevance_score_spec\x18\x34 \x01(\x0b\x32\x41.google.cloud.discoveryengine.v1.SearchRequest.RelevanceScoreSpecB\x03\xe0\x41\x01\x1a,\n\nImageQuery\x12\x15\n\x0bimage_bytes\x18\x01 \x01(\tH\x00\x42\x07\n\x05image\x1a\xe3\x01\n\rDataStoreSpec\x12\x44\n\ndata_store\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(discoveryengine.googleapis.com/DataStore\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12Q\n\nboost_spec\x18\x06 \x01(\x0b\x32\x38.google.cloud.discoveryengine.v1.SearchRequest.BoostSpecB\x03\xe0\x41\x01\x12$\n\x17\x63ustom_search_operators\x18\x07 \x01(\tB\x03\xe0\x41\x01\x1a\xfc\x02\n\tFacetSpec\x12Y\n\tfacet_key\x18\x01 \x01(\x0b\x32\x41.google.cloud.discoveryengine.v1.SearchRequest.FacetSpec.FacetKeyB\x03\xe0\x41\x02\x12\r\n\x05limit\x18\x02 \x01(\x05\x12\x1c\n\x14\x65xcluded_filter_keys\x18\x03 \x03(\t\x12\x1f\n\x17\x65nable_dynamic_position\x18\x04 \x01(\x08\x1a\xc5\x01\n\x08\x46\x61\x63\x65tKey\x12\x10\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12<\n\tintervals\x18\x02 \x03(\x0b\x32).google.cloud.discoveryengine.v1.Interval\x12\x19\n\x11restricted_values\x18\x03 \x03(\t\x12\x10\n\x08prefixes\x18\x04 \x03(\t\x12\x10\n\x08\x63ontains\x18\x05 \x03(\t\x12\x18\n\x10\x63\x61se_insensitive\x18\x06 \x01(\x08\x12\x10\n\x08order_by\x18\x07 \x01(\t\x1a\xbc\x07\n\tBoostSpec\x12j\n\x15\x63ondition_boost_specs\x18\x01 \x03(\x0b\x32K.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec.ConditionBoostSpec\x1a\xc2\x06\n\x12\x43onditionBoostSpec\x12\x11\n\tcondition\x18\x01 \x01(\t\x12\r\n\x05\x62oost\x18\x02 \x01(\x02\x12x\n\x12\x62oost_control_spec\x18\x03 \x01(\x0b\x32\\.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec\x1a\x8f\x05\n\x10\x42oostControlSpec\x12\x12\n\nfield_name\x18\x01 \x01(\t\x12\x82\x01\n\x0e\x61ttribute_type\x18\x02 \x01(\x0e\x32j.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType\x12\x8a\x01\n\x12interpolation_type\x18\x03 \x01(\x0e\x32n.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType\x12\x81\x01\n\x0e\x63ontrol_points\x18\x04 \x03(\x0b\x32i.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint\x1a=\n\x0c\x43ontrolPoint\x12\x17\n\x0f\x61ttribute_value\x18\x01 \x01(\t\x12\x14\n\x0c\x62oost_amount\x18\x02 \x01(\x02\"M\n\rAttributeType\x12\x1e\n\x1a\x41TTRIBUTE_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tNUMERICAL\x10\x01\x12\r\n\tFRESHNESS\x10\x02\"C\n\x11InterpolationType\x12\"\n\x1eINTERPOLATION_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06LINEAR\x10\x01\x1a\xd4\x01\n\x12QueryExpansionSpec\x12^\n\tcondition\x18\x01 \x01(\x0e\x32K.google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec.Condition\x12\x1e\n\x16pin_unexpanded_results\x18\x02 \x01(\x08\">\n\tCondition\x12\x19\n\x15\x43ONDITION_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x08\n\x04\x41UTO\x10\x02\x1a\xa9\x01\n\x13SpellCorrectionSpec\x12U\n\x04mode\x18\x01 \x01(\x0e\x32G.google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec.Mode\";\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSUGGESTION_ONLY\x10\x01\x12\x08\n\x04\x41UTO\x10\x02\x1a\xa2\x0c\n\x11\x43ontentSearchSpec\x12\x62\n\x0csnippet_spec\x18\x01 \x01(\x0b\x32L.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SnippetSpec\x12\x62\n\x0csummary_spec\x18\x02 \x01(\x0b\x32L.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec\x12w\n\x17\x65xtractive_content_spec\x18\x03 \x01(\x0b\x32V.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec\x12m\n\x12search_result_mode\x18\x04 \x01(\x0e\x32Q.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode\x12^\n\nchunk_spec\x18\x05 \x01(\x0b\x32J.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec\x1a`\n\x0bSnippetSpec\x12\x1d\n\x11max_snippet_count\x18\x01 \x01(\x05\x42\x02\x18\x01\x12\x1a\n\x0ereference_only\x18\x02 \x01(\x08\x42\x02\x18\x01\x12\x16\n\x0ereturn_snippet\x18\x03 \x01(\x08\x1a\xbc\x04\n\x0bSummarySpec\x12\x1c\n\x14summary_result_count\x18\x01 \x01(\x05\x12\x19\n\x11include_citations\x18\x02 \x01(\x08\x12 \n\x18ignore_adversarial_query\x18\x03 \x01(\x08\x12(\n ignore_non_summary_seeking_query\x18\x04 \x01(\x08\x12#\n\x1bignore_low_relevant_content\x18\t \x01(\x08\x12\'\n\x1aignore_jail_breaking_query\x18\n \x01(\x08\x42\x03\xe0\x41\x01\x12w\n\x11model_prompt_spec\x18\x05 \x01(\x0b\x32\\.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec\x12\x15\n\rlanguage_code\x18\x06 \x01(\t\x12j\n\nmodel_spec\x18\x07 \x01(\x0b\x32V.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec\x12\x1b\n\x13use_semantic_chunks\x18\x08 \x01(\x08\x1a#\n\x0fModelPromptSpec\x12\x10\n\x08preamble\x18\x01 \x01(\t\x1a\x1c\n\tModelSpec\x12\x0f\n\x07version\x18\x01 \x01(\t\x1a\xc5\x01\n\x15\x45xtractiveContentSpec\x12#\n\x1bmax_extractive_answer_count\x18\x01 \x01(\x05\x12$\n\x1cmax_extractive_segment_count\x18\x02 \x01(\x05\x12\'\n\x1freturn_extractive_segment_score\x18\x03 \x01(\x08\x12\x1d\n\x15num_previous_segments\x18\x04 \x01(\x05\x12\x19\n\x11num_next_segments\x18\x05 \x01(\x05\x1a\x41\n\tChunkSpec\x12\x1b\n\x13num_previous_chunks\x18\x01 \x01(\x05\x12\x17\n\x0fnum_next_chunks\x18\x02 \x01(\x05\"Q\n\x10SearchResultMode\x12\"\n\x1eSEARCH_RESULT_MODE_UNSPECIFIED\x10\x00\x12\r\n\tDOCUMENTS\x10\x01\x12\n\n\x06\x43HUNKS\x10\x02\x1a\xe0\x04\n%NaturalLanguageQueryUnderstandingSpec\x12\x93\x01\n\x1b\x66ilter_extraction_condition\x18\x01 \x01(\x0e\x32n.google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition\x12.\n&geo_search_query_detection_field_names\x18\x02 \x03(\t\x12\x94\x01\n\x19\x65xtracted_filter_behavior\x18\x03 \x01(\x0e\x32l.google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec.ExtractedFilterBehaviorB\x03\xe0\x41\x01\x12 \n\x13\x61llowed_field_names\x18\x04 \x03(\tB\x03\xe0\x41\x01\"Q\n\x19\x46ilterExtractionCondition\x12\x19\n\x15\x43ONDITION_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\"e\n\x17\x45xtractedFilterBehavior\x12)\n%EXTRACTED_FILTER_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x0f\n\x0bHARD_FILTER\x10\x01\x12\x0e\n\nSOFT_BOOST\x10\x02\x1a\xc3\x01\n\x13SearchAsYouTypeSpec\x12_\n\tcondition\x18\x01 \x01(\x0e\x32L.google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.Condition\"K\n\tCondition\x12\x19\n\x15\x43ONDITION_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x12\x08\n\x04\x41UTO\x10\x03\x1a\x98\x02\n\x0b\x44isplaySpec\x12{\n\x1cmatch_highlighting_condition\x18\x01 \x01(\x0e\x32U.google.cloud.discoveryengine.v1.SearchRequest.DisplaySpec.MatchHighlightingCondition\"\x8b\x01\n\x1aMatchHighlightingCondition\x12,\n(MATCH_HIGHLIGHTING_CONDITION_UNSPECIFIED\x10\x00\x12\x1f\n\x1bMATCH_HIGHLIGHTING_DISABLED\x10\x01\x12\x1e\n\x1aMATCH_HIGHLIGHTING_ENABLED\x10\x02\x1a\xdb\x01\n\x0c\x43rowdingSpec\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x11\n\tmax_count\x18\x02 \x01(\x05\x12N\n\x04mode\x18\x03 \x01(\x0e\x32@.google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec.Mode\"Y\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x44ROP_CROWDED_RESULTS\x10\x01\x12!\n\x1d\x44\x45MOTE_CROWDED_RESULTS_TO_END\x10\x02\x1aq\n\x0bSessionSpec\x12\x10\n\x08query_id\x18\x01 \x01(\t\x12,\n\x1fsearch_result_persistence_count\x18\x02 \x01(\x05H\x00\x88\x01\x01\x42\"\n _search_result_persistence_count\x1a\x39\n\x12RelevanceScoreSpec\x12#\n\x16return_relevance_score\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x45\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\x1a\x31\n\x0fUserLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x92\x01\n\x18RankingExpressionBackend\x12*\n&RANKING_EXPRESSION_BACKEND_UNSPECIFIED\x10\x00\x12\x0c\n\x04\x42YOE\x10\x01\x1a\x02\x08\x01\x12\x10\n\x08\x43LEARBOX\x10\x02\x1a\x02\x08\x01\x12\x15\n\x11RANK_BY_EMBEDDING\x10\x03\x12\x13\n\x0fRANK_BY_FORMULA\x10\x04\"d\n\x12RelevanceThreshold\x12#\n\x1fRELEVANCE_THRESHOLD_UNSPECIFIED\x10\x00\x12\n\n\x06LOWEST\x10\x01\x12\x07\n\x03LOW\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x08\n\x04HIGH\x10\x04\"\xe6/\n\x0eSearchResponse\x12M\n\x07results\x18\x01 \x03(\x0b\x32<.google.cloud.discoveryengine.v1.SearchResponse.SearchResult\x12\x45\n\x06\x66\x61\x63\x65ts\x18\x02 \x03(\x0b\x32\x35.google.cloud.discoveryengine.v1.SearchResponse.Facet\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\x12\x19\n\x11\x61ttribution_token\x18\x04 \x01(\t\x12\x14\n\x0credirect_uri\x18\x0c \x01(\t\x12\x17\n\x0fnext_page_token\x18\x05 \x01(\t\x12\x17\n\x0f\x63orrected_query\x18\x07 \x01(\t\x12H\n\x07summary\x18\t \x01(\x0b\x32\x37.google.cloud.discoveryengine.v1.SearchResponse.Summary\x12`\n\x14query_expansion_info\x18\x0e \x01(\x0b\x32\x42.google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo\x12\x8d\x01\n)natural_language_query_understanding_info\x18\x0f \x01(\x0b\x32U.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfoB\x03\xe0\x41\x03\x12Q\n\x0csession_info\x18\x13 \x01(\x0b\x32;.google.cloud.discoveryengine.v1.SearchResponse.SessionInfo\x12T\n\x16search_link_promotions\x18\x17 \x03(\x0b\x32\x34.google.cloud.discoveryengine.v1.SearchLinkPromotion\x12Z\n\x0esemantic_state\x18$ \x01(\x0e\x32=.google.cloud.discoveryengine.v1.SearchResponse.SemanticStateB\x03\xe0\x41\x03\x1a\xa9\x08\n\x0cSearchResult\x12\n\n\x02id\x18\x01 \x01(\t\x12;\n\x08\x64ocument\x18\x02 \x01(\x0b\x32).google.cloud.discoveryengine.v1.Document\x12\x35\n\x05\x63hunk\x18\x12 \x01(\x0b\x32&.google.cloud.discoveryengine.v1.Chunk\x12h\n\x0cmodel_scores\x18\x04 \x03(\x0b\x32M.google.cloud.discoveryengine.v1.SearchResponse.SearchResult.ModelScoresEntryB\x03\xe0\x41\x03\x12\x63\n\x0crank_signals\x18\x07 \x01(\x0b\x32H.google.cloud.discoveryengine.v1.SearchResponse.SearchResult.RankSignalsB\x03\xe0\x41\x01\x1a\xe8\x04\n\x0bRankSignals\x12*\n\x18keyword_similarity_score\x18\x01 \x01(\x02\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12!\n\x0frelevance_score\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12+\n\x19semantic_similarity_score\x18\x03 \x01(\x02\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x1b\n\tpctr_rank\x18\x04 \x01(\x02\x42\x03\xe0\x41\x01H\x03\x88\x01\x01\x12!\n\x0ftopicality_rank\x18\x06 \x01(\x02\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x1e\n\x0c\x64ocument_age\x18\x07 \x01(\x02\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12!\n\x0f\x62oosting_factor\x18\x08 \x01(\x02\x42\x03\xe0\x41\x01H\x06\x88\x01\x01\x12\x19\n\x0c\x64\x65\x66\x61ult_rank\x18 \x01(\x02\x42\x03\xe0\x41\x01\x12r\n\x0e\x63ustom_signals\x18! \x03(\x0b\x32U.google.cloud.discoveryengine.v1.SearchResponse.SearchResult.RankSignals.CustomSignalB\x03\xe0\x41\x01\x1a\x35\n\x0c\x43ustomSignal\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05value\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01\x42\x1b\n\x19_keyword_similarity_scoreB\x12\n\x10_relevance_scoreB\x1c\n\x1a_semantic_similarity_scoreB\x0c\n\n_pctr_rankB\x12\n\x10_topicality_rankB\x0f\n\r_document_ageB\x12\n\x10_boosting_factor\x1a_\n\x10ModelScoresEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12:\n\x05value\x18\x02 \x01(\x0b\x32+.google.cloud.discoveryengine.v1.DoubleList:\x02\x38\x01\x1a\xf9\x01\n\x05\x46\x61\x63\x65t\x12\x0b\n\x03key\x18\x01 \x01(\t\x12P\n\x06values\x18\x02 \x03(\x0b\x32@.google.cloud.discoveryengine.v1.SearchResponse.Facet.FacetValue\x12\x15\n\rdynamic_facet\x18\x03 \x01(\x08\x1az\n\nFacetValue\x12\x0f\n\x05value\x18\x01 \x01(\tH\x00\x12=\n\x08interval\x18\x02 \x01(\x0b\x32).google.cloud.discoveryengine.v1.IntervalH\x00\x12\r\n\x05\x63ount\x18\x03 \x01(\x03\x42\r\n\x0b\x66\x61\x63\x65t_value\x1a\xa1\x0c\n\x07Summary\x12\x14\n\x0csummary_text\x18\x01 \x01(\t\x12m\n\x17summary_skipped_reasons\x18\x02 \x03(\x0e\x32L.google.cloud.discoveryengine.v1.SearchResponse.Summary.SummarySkippedReason\x12\x63\n\x11safety_attributes\x18\x03 \x01(\x0b\x32H.google.cloud.discoveryengine.v1.SearchResponse.Summary.SafetyAttributes\x12j\n\x15summary_with_metadata\x18\x04 \x01(\x0b\x32K.google.cloud.discoveryengine.v1.SearchResponse.Summary.SummaryWithMetadata\x1a\x36\n\x10SafetyAttributes\x12\x12\n\ncategories\x18\x01 \x03(\t\x12\x0e\n\x06scores\x18\x02 \x03(\x02\x1ag\n\x10\x43itationMetadata\x12S\n\tcitations\x18\x01 \x03(\x0b\x32@.google.cloud.discoveryengine.v1.SearchResponse.Summary.Citation\x1a\x8b\x01\n\x08\x43itation\x12\x13\n\x0bstart_index\x18\x01 \x01(\x03\x12\x11\n\tend_index\x18\x02 \x01(\x03\x12W\n\x07sources\x18\x03 \x03(\x0b\x32\x46.google.cloud.discoveryengine.v1.SearchResponse.Summary.CitationSource\x1a)\n\x0e\x43itationSource\x12\x17\n\x0freference_index\x18\x04 \x01(\x03\x1a\x8c\x02\n\tReference\x12\r\n\x05title\x18\x01 \x01(\t\x12\x41\n\x08\x64ocument\x18\x02 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'discoveryengine.googleapis.com/Document\x12\x0b\n\x03uri\x18\x03 \x01(\t\x12\x66\n\x0e\x63hunk_contents\x18\x04 \x03(\x0b\x32N.google.cloud.discoveryengine.v1.SearchResponse.Summary.Reference.ChunkContent\x1a\x38\n\x0c\x43hunkContent\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12\x17\n\x0fpage_identifier\x18\x02 \x01(\t\x1a\xe2\x01\n\x13SummaryWithMetadata\x12\x0f\n\x07summary\x18\x01 \x01(\t\x12\x63\n\x11\x63itation_metadata\x18\x02 \x01(\x0b\x32H.google.cloud.discoveryengine.v1.SearchResponse.Summary.CitationMetadata\x12U\n\nreferences\x18\x03 \x03(\x0b\x32\x41.google.cloud.discoveryengine.v1.SearchResponse.Summary.Reference\"\xf1\x02\n\x14SummarySkippedReason\x12&\n\"SUMMARY_SKIPPED_REASON_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x41\x44VERSARIAL_QUERY_IGNORED\x10\x01\x12%\n!NON_SUMMARY_SEEKING_QUERY_IGNORED\x10\x02\x12\x1f\n\x1bOUT_OF_DOMAIN_QUERY_IGNORED\x10\x03\x12\x1e\n\x1aPOTENTIAL_POLICY_VIOLATION\x10\x04\x12\x19\n\x15LLM_ADDON_NOT_ENABLED\x10\x05\x12\x17\n\x13NO_RELEVANT_CONTENT\x10\x06\x12\x1f\n\x1bJAIL_BREAKING_QUERY_IGNORED\x10\x07\x12\x1d\n\x19\x43USTOMER_POLICY_VIOLATION\x10\x08\x12(\n$NON_SUMMARY_SEEKING_QUERY_IGNORED_V2\x10\t\x12\x0c\n\x08TIME_OUT\x10\n\x1aI\n\x12QueryExpansionInfo\x12\x16\n\x0e\x65xpanded_query\x18\x01 \x01(\x08\x12\x1b\n\x13pinned_result_count\x18\x02 \x01(\x03\x1a\xf3\x10\n%NaturalLanguageQueryUnderstandingInfo\x12\x19\n\x11\x65xtracted_filters\x18\x01 \x01(\t\x12\x17\n\x0frewritten_query\x18\x02 \x01(\t\x12\x1a\n\x12\x63lassified_intents\x18\x05 \x03(\t\x12\x94\x01\n\x1bstructured_extracted_filter\x18\x03 \x01(\x0b\x32o.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter\x1a\xe2\x0e\n\x19StructuredExtractedFilter\x12\x8e\x01\n\nexpression\x18\x01 \x01(\x0b\x32z.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression\x1aM\n\x10StringConstraint\x12\x12\n\nfield_name\x18\x01 \x01(\t\x12\x0e\n\x06values\x18\x02 \x03(\t\x12\x15\n\rquery_segment\x18\x03 \x01(\t\x1a\xf6\x02\n\x10NumberConstraint\x12\x12\n\nfield_name\x18\x01 \x01(\t\x12\xa0\x01\n\ncomparison\x18\x02 \x01(\x0e\x32\x8b\x01.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint.Comparison\x12\r\n\x05value\x18\x03 \x01(\x01\x12\x15\n\rquery_segment\x18\x04 \x01(\t\"\x84\x01\n\nComparison\x12\x1a\n\x16\x43OMPARISON_UNSPECIFIED\x10\x00\x12\n\n\x06\x45QUALS\x10\x01\x12\x14\n\x10LESS_THAN_EQUALS\x10\x02\x12\r\n\tLESS_THAN\x10\x03\x12\x17\n\x13GREATER_THAN_EQUALS\x10\x04\x12\x10\n\x0cGREATER_THAN\x10\x05\x1a{\n\x15GeolocationConstraint\x12\x12\n\nfield_name\x18\x01 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\t\x12\x10\n\x08latitude\x18\x04 \x01(\x01\x12\x11\n\tlongitude\x18\x05 \x01(\x01\x12\x18\n\x10radius_in_meters\x18\x03 \x01(\x02\x1a\xa1\x01\n\rAndExpression\x12\x8f\x01\n\x0b\x65xpressions\x18\x01 \x03(\x0b\x32z.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression\x1a\xa0\x01\n\x0cOrExpression\x12\x8f\x01\n\x0b\x65xpressions\x18\x01 \x03(\x0b\x32z.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression\x1a\xa7\x06\n\nExpression\x12\x9e\x01\n\x11string_constraint\x18\x01 \x01(\x0b\x32\x80\x01.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.StringConstraintH\x00\x12\x9e\x01\n\x11number_constraint\x18\x02 \x01(\x0b\x32\x80\x01.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraintH\x00\x12\xa8\x01\n\x16geolocation_constraint\x18\x03 \x01(\x0b\x32\x85\x01.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraintH\x00\x12\x91\x01\n\x08\x61nd_expr\x18\x04 \x01(\x0b\x32}.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.AndExpressionH\x00\x12\x8f\x01\n\x07or_expr\x18\x05 \x01(\x0b\x32|.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.OrExpressionH\x00\x42\x06\n\x04\x65xpr\x1a-\n\x0bSessionInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x08query_id\x18\x02 \x01(\t\"J\n\rSemanticState\x12\x1e\n\x1aSEMANTIC_STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x32\x97\x07\n\rSearchService\x12\x8f\x03\n\x06Search\x12..google.cloud.discoveryengine.v1.SearchRequest\x1a/.google.cloud.discoveryengine.v1.SearchResponse\"\xa3\x02\x82\xd3\xe4\x93\x02\x9c\x02\"P/v1/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:search:\x01*Zc\"^/v1/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:search:\x01*Z`\"[/v1/{serving_config=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}:search:\x01*\x12\x9f\x03\n\nSearchLite\x12..google.cloud.discoveryengine.v1.SearchRequest\x1a/.google.cloud.discoveryengine.v1.SearchResponse\"\xaf\x02\x82\xd3\xe4\x93\x02\xa8\x02\"T/v1/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:searchLite:\x01*Zg\"b/v1/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:searchLite:\x01*Zd\"_/v1/{serving_config=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}:searchLite:\x01*\x1aR\xca\x41\x1e\x64iscoveryengine.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x85\x02\n#com.google.cloud.discoveryengine.v1B\x12SearchServiceProtoP\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" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -71,14 +71,19 @@ module V1 SearchRequest::ContentSearchSpec::ExtractiveContentSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec").msgclass SearchRequest::ContentSearchSpec::ChunkSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec").msgclass SearchRequest::ContentSearchSpec::SearchResultMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode").enummodule + SearchRequest::NaturalLanguageQueryUnderstandingSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec").msgclass + SearchRequest::NaturalLanguageQueryUnderstandingSpec::FilterExtractionCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition").enummodule + SearchRequest::NaturalLanguageQueryUnderstandingSpec::ExtractedFilterBehavior = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec.ExtractedFilterBehavior").enummodule SearchRequest::SearchAsYouTypeSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec").msgclass SearchRequest::SearchAsYouTypeSpec::Condition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.Condition").enummodule SearchRequest::DisplaySpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchRequest.DisplaySpec").msgclass SearchRequest::DisplaySpec::MatchHighlightingCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchRequest.DisplaySpec.MatchHighlightingCondition").enummodule + SearchRequest::CrowdingSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec").msgclass + SearchRequest::CrowdingSpec::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec.Mode").enummodule SearchRequest::SessionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchRequest.SessionSpec").msgclass SearchRequest::RelevanceScoreSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchRequest.RelevanceScoreSpec").msgclass - SearchRequest::RelevanceThreshold = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchRequest.RelevanceThreshold").enummodule SearchRequest::RankingExpressionBackend = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchRequest.RankingExpressionBackend").enummodule + SearchRequest::RelevanceThreshold = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchRequest.RelevanceThreshold").enummodule SearchResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchResponse").msgclass SearchResponse::SearchResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchResponse.SearchResult").msgclass SearchResponse::SearchResult::RankSignals = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchResponse.SearchResult.RankSignals").msgclass @@ -95,7 +100,17 @@ module V1 SearchResponse::Summary::SummaryWithMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchResponse.Summary.SummaryWithMetadata").msgclass SearchResponse::Summary::SummarySkippedReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchResponse.Summary.SummarySkippedReason").enummodule SearchResponse::QueryExpansionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo").msgclass + SearchResponse::NaturalLanguageQueryUnderstandingInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo").msgclass + SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter").msgclass + SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::StringConstraint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.StringConstraint").msgclass + SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint").msgclass + SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint::Comparison = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint.Comparison").enummodule + SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::GeolocationConstraint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraint").msgclass + SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::AndExpression = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.AndExpression").msgclass + SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::OrExpression = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.OrExpression").msgclass + SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::Expression = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression").msgclass SearchResponse::SessionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchResponse.SessionInfo").msgclass + SearchResponse::SemanticState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.SearchResponse.SemanticState").enummodule end end end diff --git a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/data_store.rb b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/data_store.rb index 199e7f965f7f..5f7ca6698b31 100644 --- a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/data_store.rb +++ b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/data_store.rb @@ -64,6 +64,9 @@ module V1 # @!attribute [rw] advanced_site_search_config # @return [::Google::Cloud::DiscoveryEngine::V1::AdvancedSiteSearchConfig] # Optional. Configuration for advanced site search. + # @!attribute [rw] natural_language_query_understanding_config + # @return [::Google::Cloud::DiscoveryEngine::V1::NaturalLanguageQueryUnderstandingConfig] + # Optional. Configuration for Natural Language Query Understanding. # @!attribute [rw] kms_key_name # @return [::String] # Input only. The KMS key to be used to protect this DataStore at creation @@ -201,6 +204,33 @@ class AdvancedSiteSearchConfig extend ::Google::Protobuf::MessageExts::ClassMethods end + # Configuration for Natural Language Query Understanding. + # @!attribute [rw] mode + # @return [::Google::Cloud::DiscoveryEngine::V1::NaturalLanguageQueryUnderstandingConfig::Mode] + # Mode of Natural Language Query Understanding. If this field is unset, the + # behavior defaults to + # {::Google::Cloud::DiscoveryEngine::V1::NaturalLanguageQueryUnderstandingConfig::Mode::DISABLED NaturalLanguageQueryUnderstandingConfig.Mode.DISABLED}. + class NaturalLanguageQueryUnderstandingConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Mode of Natural Language Query Understanding. When the + # NaturalLanguageQueryUnderstandingConfig.Mode is ENABLED, the natural + # language understanding capabilities will be enabled for a search request if + # the NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition in the + # SearchRequest is ENABLED. + module Mode + # Default value. + MODE_UNSPECIFIED = 0 + + # Natural Language Query Understanding is disabled. + DISABLED = 1 + + # Natural Language Query Understanding is enabled. + ENABLED = 2 + end + end + # Config to store data store type configuration for workspace data # @!attribute [rw] type # @return [::Google::Cloud::DiscoveryEngine::V1::WorkspaceConfig::Type] diff --git a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/search_service.rb b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/search_service.rb index bd02908e6f30..c0e47397a834 100644 --- a/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +++ b/google-cloud-discovery_engine-v1/proto_docs/google/cloud/discoveryengine/v1/search_service.rb @@ -42,6 +42,25 @@ module V1 # @!attribute [rw] query # @return [::String] # Raw search query. + # @!attribute [rw] page_categories + # @return [::Array<::String>] + # Optional. The categories associated with a category page. Must be set for + # category navigation queries to achieve good search quality. The format + # should be the same as + # {::Google::Cloud::DiscoveryEngine::V1::PageInfo#page_category PageInfo.page_category}. + # This field is the equivalent of the query for browse (navigation) queries. + # It's used by the browse model when the query is empty. + # + # If the field is empty, it will not be used by the browse model. + # If the field contains more than one element, only the first element will + # be used. + # + # To represent full path of a category, use '>' character to separate + # different hierarchies. If '>' is part of the category name, replace it with + # other character(s). + # For example, `Graphics Cards > RTX>4090 > Founders Edition` where "RTX > + # 4090" represents one level, can be rewritten as `Graphics Cards > RTX_4090 + # > Founders Edition` # @!attribute [rw] image_query # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ImageQuery] # Raw image query. @@ -76,6 +95,8 @@ module V1 # unset. # # If this field is negative, an `INVALID_ARGUMENT` is returned. + # + # A large offset may be capped to a reasonable threshold. # @!attribute [rw] one_box_page_size # @return [::Integer] # The maximum number of results to return for OneBox. @@ -186,10 +207,10 @@ module V1 # which spell correction takes effect. # @!attribute [rw] user_pseudo_id # @return [::String] - # A unique identifier for tracking visitors. For example, this could be - # implemented with an HTTP cookie, which should be able to uniquely identify - # a visitor on a single device. This unique identifier should not change if - # the visitor logs in or out of the website. + # Optional. A unique identifier for tracking visitors. For example, this + # could be implemented with an HTTP cookie, which should be able to uniquely + # identify a visitor on a single device. This unique identifier should not + # change if the visitor logs in or out of the website. # # This field should NOT have a fixed value such as `unknown_visitor`. # @@ -203,81 +224,10 @@ module V1 # @!attribute [rw] content_search_spec # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec] # A specification for configuring the behavior of content search. - # @!attribute [rw] safe_search - # @return [::Boolean] - # Whether to turn on safe search. This is only supported for - # website search. - # @!attribute [rw] user_labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # The user labels applied to a resource must meet the following requirements: - # - # * Each resource can have multiple labels, up to a maximum of 64. - # * Each label must be a key-value pair. - # * Keys have a minimum length of 1 character and a maximum length of 63 - # characters and cannot be empty. Values can be empty and have a maximum - # length of 63 characters. - # * Keys and values can contain only lowercase letters, numeric characters, - # underscores, and dashes. All characters must use UTF-8 encoding, and - # international characters are allowed. - # * The key portion of a label must be unique. However, you can use the same - # key with multiple resources. - # * Keys must start with a lowercase letter or international character. - # - # See [Google Cloud - # Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - # for more details. - # @!attribute [rw] search_as_you_type_spec - # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SearchAsYouTypeSpec] - # Search as you type configuration. Only supported for the - # {::Google::Cloud::DiscoveryEngine::V1::IndustryVertical::MEDIA IndustryVertical.MEDIA} - # vertical. - # @!attribute [rw] display_spec - # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DisplaySpec] - # Optional. Config for display feature, like match highlighting on search - # results. - # @!attribute [rw] session - # @return [::String] - # The session resource name. Optional. - # - # Session allows users to do multi-turn /search API calls or coordination - # between /search API calls and /answer API calls. - # - # Example #1 (multi-turn /search API calls): - # Call /search API with the session ID generated in the first call. - # Here, the previous search query gets considered in query - # standing. I.e., if the first query is "How did Alphabet do in 2022?" - # and the current query is "How about 2023?", the current query will - # be interpreted as "How did Alphabet do in 2023?". - # - # Example #2 (coordination between /search API calls and /answer API calls): - # Call /answer API with the session ID generated in the first call. - # Here, the answer generation happens in the context of the search - # results from the first search call. - # - # Multi-turn Search feature is currently at private GA stage. Please use - # v1alpha or v1beta version instead before we launch this feature to public - # GA. Or ask for allowlisting through Google Support team. - # @!attribute [rw] session_spec - # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SessionSpec] - # Session specification. - # - # Can be used only when `session` is set. - # @!attribute [rw] relevance_threshold - # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RelevanceThreshold] - # The relevance threshold of the search results. - # - # Default to Google defined threshold, leveraging a balance of - # precision and recall to deliver both highly accurate results and - # comprehensive coverage of relevant information. - # - # This feature is not supported for healthcare search. - # @!attribute [rw] relevance_score_spec - # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RelevanceScoreSpec] - # Optional. The specification for returning the relevance score. # @!attribute [rw] ranking_expression # @return [::String] - # The ranking expression controls the customized ranking on retrieval - # documents. This overrides + # Optional. The ranking expression controls the customized ranking on + # retrieval documents. This overrides # {::Google::Cloud::DiscoveryEngine::V1::ServingConfig#ranking_expression ServingConfig.ranking_expression}. # The syntax and supported features depend on the # `ranking_expression_backend` value. If `ranking_expression_backend` is not @@ -368,7 +318,100 @@ module V1 # * `base_rank`: the default rank of the result # @!attribute [rw] ranking_expression_backend # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RankingExpressionBackend] - # The backend to use for the ranking expression evaluation. + # Optional. The backend to use for the ranking expression evaluation. + # @!attribute [rw] safe_search + # @return [::Boolean] + # Whether to turn on safe search. This is only supported for + # website search. + # @!attribute [rw] user_labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # The user labels applied to a resource must meet the following requirements: + # + # * Each resource can have multiple labels, up to a maximum of 64. + # * Each label must be a key-value pair. + # * Keys have a minimum length of 1 character and a maximum length of 63 + # characters and cannot be empty. Values can be empty and have a maximum + # length of 63 characters. + # * Keys and values can contain only lowercase letters, numeric characters, + # underscores, and dashes. All characters must use UTF-8 encoding, and + # international characters are allowed. + # * The key portion of a label must be unique. However, you can use the same + # key with multiple resources. + # * Keys must start with a lowercase letter or international character. + # + # See [Google Cloud + # Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + # for more details. + # @!attribute [rw] natural_language_query_understanding_spec + # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::NaturalLanguageQueryUnderstandingSpec] + # Optional. Config for natural language query understanding capabilities, + # such as extracting structured field filters from the query. Refer to [this + # documentation](https://cloud.google.com/generative-ai-app-builder/docs/natural-language-queries) + # for more information. + # If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional + # natural language query understanding will be done. + # @!attribute [rw] search_as_you_type_spec + # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SearchAsYouTypeSpec] + # Search as you type configuration. Only supported for the + # {::Google::Cloud::DiscoveryEngine::V1::IndustryVertical::MEDIA IndustryVertical.MEDIA} + # vertical. + # @!attribute [rw] display_spec + # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DisplaySpec] + # Optional. Config for display feature, like match highlighting on search + # results. + # @!attribute [rw] crowding_specs + # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::CrowdingSpec>] + # Optional. Crowding specifications for improving result diversity. + # If multiple CrowdingSpecs are specified, crowding will be evaluated on + # each unique combination of the `field` values, and max_count will be the + # maximum value of `max_count` across all CrowdingSpecs. + # For example, if the first CrowdingSpec has `field` = "color" and + # `max_count` = 3, and the second CrowdingSpec has `field` = "size" and + # `max_count` = 2, then after 3 documents that share the same color AND size + # have been returned, subsequent ones should be + # removed or demoted. + # @!attribute [rw] session + # @return [::String] + # The session resource name. Optional. + # + # Session allows users to do multi-turn /search API calls or coordination + # between /search API calls and /answer API calls. + # + # Example #1 (multi-turn /search API calls): + # Call /search API with the session ID generated in the first call. + # Here, the previous search query gets considered in query + # standing. I.e., if the first query is "How did Alphabet do in 2022?" + # and the current query is "How about 2023?", the current query will + # be interpreted as "How did Alphabet do in 2023?". + # + # Example #2 (coordination between /search API calls and /answer API calls): + # Call /answer API with the session ID generated in the first call. + # Here, the answer generation happens in the context of the search + # results from the first search call. + # + # Multi-turn Search feature is currently at private GA stage. Please use + # v1alpha or v1beta version instead before we launch this feature to public + # GA. Or ask for allowlisting through Google Support team. + # @!attribute [rw] session_spec + # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SessionSpec] + # Session specification. + # + # Can be used only when `session` is set. + # @!attribute [rw] relevance_threshold + # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RelevanceThreshold] + # The global relevance threshold of the search results. + # + # Defaults to Google defined threshold, leveraging a balance of + # precision and recall to deliver both highly accurate results and + # comprehensive coverage of relevant information. + # + # If more granular relevance filtering is required, use the + # `relevance_filter_spec` instead. + # + # This feature is not supported for healthcare search. + # @!attribute [rw] relevance_score_spec + # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RelevanceScoreSpec] + # Optional. The specification for returning the relevance score. class SearchRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -391,6 +434,8 @@ class ImageQuery # Required. Full resource name of # {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore}, such as # `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. + # The path must include the project number, project id is not supported for + # this field. # @!attribute [rw] filter # @return [::String] # Optional. Filter specification to filter documents in the data store @@ -430,7 +475,6 @@ class DataStoreSpec # @return [::Array<::String>] # List of keys to exclude when faceting. # - # # By default, # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::FacetSpec::FacetKey#key FacetKey.key} # is not excluded from the filter unless it is listed in this field. @@ -1025,6 +1069,77 @@ module SearchResultMode end end + # Specification to enable natural language understanding capabilities for + # search requests. + # @!attribute [rw] filter_extraction_condition + # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::NaturalLanguageQueryUnderstandingSpec::FilterExtractionCondition] + # The condition under which filter extraction should occur. + # Server behavior defaults to `DISABLED`. + # @!attribute [rw] geo_search_query_detection_field_names + # @return [::Array<::String>] + # Field names used for location-based filtering, where geolocation filters + # are detected in natural language search queries. + # Only valid when the FilterExtractionCondition is set to `ENABLED`. + # + # If this field is set, it overrides the field names set in + # [ServingConfig.geo_search_query_detection_field_names][google.cloud.discoveryengine.v1.ServingConfig.geo_search_query_detection_field_names]. + # @!attribute [rw] extracted_filter_behavior + # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::NaturalLanguageQueryUnderstandingSpec::ExtractedFilterBehavior] + # Optional. Controls behavior of how extracted filters are applied to the + # search. The default behavior depends on the request. For single datastore + # structured search, the default is `HARD_FILTER`. For multi-datastore + # search, the default behavior is `SOFT_BOOST`. + # Location-based filters are always applied as hard filters, and the + # `SOFT_BOOST` setting will not affect them. + # This field is only used if + # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::NaturalLanguageQueryUnderstandingSpec::FilterExtractionCondition SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition} + # is set to + # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::NaturalLanguageQueryUnderstandingSpec::FilterExtractionCondition::ENABLED FilterExtractionCondition.ENABLED}. + # @!attribute [rw] allowed_field_names + # @return [::Array<::String>] + # Optional. Allowlist of fields that can be used for natural language + # filter extraction. By default, if this is unspecified, all indexable + # fields are eligible for natural language filter extraction (but are not + # guaranteed to be used). If any fields are specified in + # allowed_field_names, only the fields that are both marked as indexable in + # the schema and specified in the allowlist will be eligible for natural + # language filter extraction. Note: for multi-datastore search, this is not + # yet supported, and will be ignored. + class NaturalLanguageQueryUnderstandingSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum describing under which condition filter extraction should occur. + module FilterExtractionCondition + # Server behavior defaults to `DISABLED`. + CONDITION_UNSPECIFIED = 0 + + # Disables NL filter extraction. + DISABLED = 1 + + # Enables NL filter extraction. + ENABLED = 2 + end + + # Enum describing how extracted filters are applied to the search. + module ExtractedFilterBehavior + # `EXTRACTED_FILTER_BEHAVIOR_UNSPECIFIED` will use the default behavior + # for extracted filters. For single datastore search, the default is to + # apply as hard filters. For multi-datastore search, the default is to + # apply as soft boosts. + EXTRACTED_FILTER_BEHAVIOR_UNSPECIFIED = 0 + + # Applies all extracted filters as hard filters on the results. Results + # that do not pass the extracted filters will not be returned in the + # result set. + HARD_FILTER = 1 + + # Applies all extracted filters as soft boosts. Results that pass the + # filters will be boosted up to higher ranks in the result set. + SOFT_BOOST = 2 + end + end + # Specification for search as you type in search requests. # @!attribute [rw] condition # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SearchAsYouTypeSpec::Condition] @@ -1074,6 +1189,45 @@ module MatchHighlightingCondition end end + # Specification for crowding. Crowding improves the diversity of search + # results by limiting the number of results that share the same field value. + # For example, crowding on the color field with a max_count of 3 and mode + # DROP_CROWDED_RESULTS will return at most 3 results with the same color + # across all pages. + # @!attribute [rw] field + # @return [::String] + # The field to use for crowding. Documents can be crowded by a field in the + # {::Google::Cloud::DiscoveryEngine::V1::Document Document} object. Crowding + # field is case sensitive. + # @!attribute [rw] max_count + # @return [::Integer] + # The maximum number of documents to keep per value of the field. Once + # there are at least max_count previous results which contain the same + # value for the given field (according to the order specified in + # `order_by`), later results with the same value are "crowded away". + # If not specified, the default value is 1. + # @!attribute [rw] mode + # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::CrowdingSpec::Mode] + # Mode to use for documents that are crowded away. + class CrowdingSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum describing the mode to use for documents that are crowded away. + # They can be dropped or demoted to the later pages. + module Mode + # Unspecified crowding mode. In this case, server behavior defaults to + # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::CrowdingSpec::Mode::DROP_CROWDED_RESULTS Mode.DROP_CROWDED_RESULTS}. + MODE_UNSPECIFIED = 0 + + # Drop crowded results. + DROP_CROWDED_RESULTS = 1 + + # Demote crowded results to the later pages. + DEMOTE_CROWDED_RESULTS_TO_END = 2 + end + end + # Session specification. # # Multi-turn Search feature is currently at private GA stage. Please use @@ -1148,6 +1302,30 @@ class UserLabelsEntry extend ::Google::Protobuf::MessageExts::ClassMethods end + # The backend to use for the ranking expression evaluation. + module RankingExpressionBackend + # Default option for unspecified/unknown values. + RANKING_EXPRESSION_BACKEND_UNSPECIFIED = 0 + + # Deprecated: Use `RANK_BY_EMBEDDING` instead. + # Ranking by custom embedding model, the default way to evaluate the + # ranking expression. Legacy enum option, `RANK_BY_EMBEDDING` should be + # used instead. + BYOE = 1 + + # Deprecated: Use `RANK_BY_FORMULA` instead. + # Ranking by custom formula. Legacy enum option, `RANK_BY_FORMULA` should + # be used instead. + CLEARBOX = 2 + + # Ranking by custom embedding model, the default way to evaluate the + # ranking expression. + RANK_BY_EMBEDDING = 3 + + # Ranking by custom formula. + RANK_BY_FORMULA = 4 + end + # The relevance threshold of the search results. The higher relevance # threshold is, the higher relevant results are shown and the less number of # results are returned. @@ -1168,19 +1346,6 @@ module RelevanceThreshold # High relevance threshold. HIGH = 4 end - - # The backend to use for the ranking expression evaluation. - module RankingExpressionBackend - # Default option for unspecified/unknown values. - RANKING_EXPRESSION_BACKEND_UNSPECIFIED = 0 - - # Ranking by custom embedding model, the default way to evaluate the - # ranking expression. - RANK_BY_EMBEDDING = 3 - - # Ranking by custom formula. - RANK_BY_FORMULA = 4 - end end # Response message for @@ -1234,6 +1399,10 @@ module RankingExpressionBackend # @!attribute [rw] query_expansion_info # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::QueryExpansionInfo] # Query expansion information for the returned results. + # @!attribute [r] natural_language_query_understanding_info + # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo] + # Output only. Natural language query understanding information for the + # returned results. # @!attribute [rw] session_info # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SessionInfo] # Session information. @@ -1244,6 +1413,9 @@ module RankingExpressionBackend # @!attribute [rw] search_link_promotions # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchLinkPromotion>] # Promotions for site search. + # @!attribute [r] semantic_state + # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SemanticState] + # Output only. Indicates the semantic state of the search response. class SearchResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1268,48 +1440,39 @@ class SearchResponse # Output only. Google provided available scores. # @!attribute [rw] rank_signals # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult::RankSignals] - # A set of ranking signals associated with the result. + # Optional. A set of ranking signals associated with the result. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::DiscoveryEngine::V1::DoubleList] - class ModelScoresEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - # A set of ranking signals. # @!attribute [rw] keyword_similarity_score # @return [::Float] - # Keyword matching adjustment. + # Optional. Keyword matching adjustment. # @!attribute [rw] relevance_score # @return [::Float] - # Semantic relevance adjustment. + # Optional. Semantic relevance adjustment. # @!attribute [rw] semantic_similarity_score # @return [::Float] - # Semantic similarity adjustment. + # Optional. Semantic similarity adjustment. # @!attribute [rw] pctr_rank # @return [::Float] - # Predicted conversion rate adjustment as a rank. + # Optional. Predicted conversion rate adjustment as a rank. # @!attribute [rw] topicality_rank # @return [::Float] - # Topicality adjustment as a rank. + # Optional. Topicality adjustment as a rank. # @!attribute [rw] document_age # @return [::Float] - # Age of the document in hours. + # Optional. Age of the document in hours. # @!attribute [rw] boosting_factor # @return [::Float] - # Combined custom boosts for a doc. + # Optional. Combined custom boosts for a doc. # @!attribute [rw] default_rank # @return [::Float] - # The default rank of the result. + # Optional. The default rank of the result. # @!attribute [rw] custom_signals # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult::RankSignals::CustomSignal>] - # A list of custom clearbox signals. + # Optional. A list of custom clearbox signals. class RankSignals include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1317,15 +1480,25 @@ class RankSignals # Custom clearbox signal represented by name and value pair. # @!attribute [rw] name # @return [::String] - # Name of the signal. + # Optional. Name of the signal. # @!attribute [rw] value # @return [::Float] - # Float value representing the ranking signal (e.g. 1.25 for BM25). + # Optional. Float value representing the ranking signal (e.g. 1.25 for + # BM25). class CustomSignal include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::DiscoveryEngine::V1::DoubleList] + class ModelScoresEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end # A facet result. @@ -1570,6 +1743,171 @@ class QueryExpansionInfo extend ::Google::Protobuf::MessageExts::ClassMethods end + # Information describing what natural language understanding was + # done on the input query. + # @!attribute [rw] extracted_filters + # @return [::String] + # The filters that were extracted from the input query. + # @!attribute [rw] rewritten_query + # @return [::String] + # Rewritten input query minus the extracted filters. + # @!attribute [rw] classified_intents + # @return [::Array<::String>] + # The classified intents from the input query. + # @!attribute [rw] structured_extracted_filter + # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter] + # The filters that were extracted from the input query represented in a + # structured form. + class NaturalLanguageQueryUnderstandingInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The filters that were extracted from the input query represented in a + # structured form. + # @!attribute [rw] expression + # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::Expression] + # The expression denoting the filter that was extracted from the input + # query in a structured form. It can be a simple expression denoting a + # single string, numerical or geolocation constraint or a compound + # expression which is a combination of multiple expressions connected + # using logical (OR and AND) operators. + class StructuredExtractedFilter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Constraint expression of a string field. + # @!attribute [rw] field_name + # @return [::String] + # Name of the string field as defined in the schema. + # @!attribute [rw] values + # @return [::Array<::String>] + # Values of the string field. The record will only be returned if the + # field value matches one of the values specified here. + # @!attribute [rw] query_segment + # @return [::String] + # Identifies the keywords within the search query that match a filter. + class StringConstraint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Constraint expression of a number field. Example: price < 100. + # @!attribute [rw] field_name + # @return [::String] + # Name of the numerical field as defined in the schema. + # @!attribute [rw] comparison + # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint::Comparison] + # The comparison operation performed between the field value and the + # value specified in the constraint. + # @!attribute [rw] value + # @return [::Float] + # The value specified in the numerical constraint. + # @!attribute [rw] query_segment + # @return [::String] + # Identifies the keywords within the search query that match a filter. + class NumberConstraint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The comparison operation that was performed. + module Comparison + # Undefined comparison operator. + COMPARISON_UNSPECIFIED = 0 + + # Denotes equality `=` operator. + EQUALS = 1 + + # Denotes less than or equal to `<=` operator. + LESS_THAN_EQUALS = 2 + + # Denotes less than `<` operator. + LESS_THAN = 3 + + # Denotes greater than or equal to `>=` operator. + GREATER_THAN_EQUALS = 4 + + # Denotes greater than `>` operator. + GREATER_THAN = 5 + end + end + + # Constraint of a geolocation field. + # Name of the geolocation field as defined in the schema. + # @!attribute [rw] field_name + # @return [::String] + # The name of the geolocation field as defined in the schema. + # @!attribute [rw] address + # @return [::String] + # The reference address that was inferred from the input query. The + # proximity of the reference address to the geolocation field will be + # used to filter the results. + # @!attribute [rw] latitude + # @return [::Float] + # The latitude of the geolocation inferred from the input query. + # @!attribute [rw] longitude + # @return [::Float] + # The longitude of the geolocation inferred from the input query. + # @!attribute [rw] radius_in_meters + # @return [::Float] + # The radius in meters around the address. The record is returned if + # the location of the geolocation field is within the radius. + class GeolocationConstraint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Logical `And` operator. + # @!attribute [rw] expressions + # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::Expression>] + # The expressions that were ANDed together. + class AndExpression + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Logical `Or` operator. + # @!attribute [rw] expressions + # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::Expression>] + # The expressions that were ORed together. + class OrExpression + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The expression denoting the filter that was extracted from the input + # query. + # @!attribute [rw] string_constraint + # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::StringConstraint] + # String constraint expression. + # + # Note: The following fields are mutually exclusive: `string_constraint`, `number_constraint`, `geolocation_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] number_constraint + # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint] + # Numerical constraint expression. + # + # Note: The following fields are mutually exclusive: `number_constraint`, `string_constraint`, `geolocation_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] geolocation_constraint + # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::GeolocationConstraint] + # Geolocation constraint expression. + # + # Note: The following fields are mutually exclusive: `geolocation_constraint`, `string_constraint`, `number_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] and_expr + # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::AndExpression] + # Logical "And" compound operator connecting multiple expressions. + # + # Note: The following fields are mutually exclusive: `and_expr`, `string_constraint`, `number_constraint`, `geolocation_constraint`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] or_expr + # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::OrExpression] + # Logical "Or" compound operator connecting multiple expressions. + # + # Note: The following fields are mutually exclusive: `or_expr`, `string_constraint`, `number_constraint`, `geolocation_constraint`, `and_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Expression + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + # Information about the session. # @!attribute [rw] name # @return [::String] @@ -1589,6 +1927,18 @@ class SessionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # Semantic state of the search response. + module SemanticState + # Default value. Should not be used. + SEMANTIC_STATE_UNSPECIFIED = 0 + + # Semantic search was disabled for this search response. + DISABLED = 1 + + # Semantic search was enabled for this search response. + ENABLED = 2 + end end end end diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/search_service_rest_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/search_service_rest_test.rb index 7a1f71d31c6f..ee92bdfe0c7a 100644 --- a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/search_service_rest_test.rb +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/search_service_rest_test.rb @@ -89,6 +89,7 @@ def test_search serving_config = "hello world" branch = "hello world" query = "hello world" + page_categories = ["hello world"] image_query = {} page_size = 42 page_token = "hello world" @@ -107,16 +108,18 @@ def test_search spell_correction_spec = {} user_pseudo_id = "hello world" content_search_spec = {} + ranking_expression = "hello world" + ranking_expression_backend = :RANKING_EXPRESSION_BACKEND_UNSPECIFIED safe_search = true user_labels = {} + natural_language_query_understanding_spec = {} search_as_you_type_spec = {} display_spec = {} + crowding_specs = [{}] session = "hello world" session_spec = {} relevance_threshold = :RELEVANCE_THRESHOLD_UNSPECIFIED relevance_score_spec = {} - ranking_expression = "hello world" - ranking_expression_backend = :RANKING_EXPRESSION_BACKEND_UNSPECIFIED search_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| assert options.metadata.key? :"x-goog-api-client" @@ -132,27 +135,27 @@ def test_search end # Use hash object - client.search({ serving_config: serving_config, branch: branch, query: query, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, safe_search: safe_search, user_labels: user_labels, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend }) do |_result, response| + client.search({ serving_config: serving_config, branch: branch, query: query, page_categories: page_categories, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend, safe_search: safe_search, user_labels: user_labels, natural_language_query_understanding_spec: natural_language_query_understanding_spec, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, crowding_specs: crowding_specs, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.search serving_config: serving_config, branch: branch, query: query, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, safe_search: safe_search, user_labels: user_labels, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend do |_result, response| + client.search serving_config: serving_config, branch: branch, query: query, page_categories: page_categories, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend, safe_search: safe_search, user_labels: user_labels, natural_language_query_understanding_spec: natural_language_query_understanding_spec, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, crowding_specs: crowding_specs, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.search ::Google::Cloud::DiscoveryEngine::V1::SearchRequest.new(serving_config: serving_config, branch: branch, query: query, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, safe_search: safe_search, user_labels: user_labels, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend) do |_result, response| + client.search ::Google::Cloud::DiscoveryEngine::V1::SearchRequest.new(serving_config: serving_config, branch: branch, query: query, page_categories: page_categories, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend, safe_search: safe_search, user_labels: user_labels, natural_language_query_understanding_spec: natural_language_query_understanding_spec, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, crowding_specs: crowding_specs, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.search({ serving_config: serving_config, branch: branch, query: query, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, safe_search: safe_search, user_labels: user_labels, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend }, call_options) do |_result, response| + client.search({ serving_config: serving_config, branch: branch, query: query, page_categories: page_categories, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend, safe_search: safe_search, user_labels: user_labels, natural_language_query_understanding_spec: natural_language_query_understanding_spec, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, crowding_specs: crowding_specs, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.search(::Google::Cloud::DiscoveryEngine::V1::SearchRequest.new(serving_config: serving_config, branch: branch, query: query, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, safe_search: safe_search, user_labels: user_labels, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend), call_options) do |_result, response| + client.search(::Google::Cloud::DiscoveryEngine::V1::SearchRequest.new(serving_config: serving_config, branch: branch, query: query, page_categories: page_categories, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend, safe_search: safe_search, user_labels: user_labels, natural_language_query_understanding_spec: natural_language_query_understanding_spec, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, crowding_specs: crowding_specs, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec), call_options) do |_result, response| assert_equal http_response, response.underlying_op end @@ -173,6 +176,7 @@ def test_search_lite serving_config = "hello world" branch = "hello world" query = "hello world" + page_categories = ["hello world"] image_query = {} page_size = 42 page_token = "hello world" @@ -191,16 +195,18 @@ def test_search_lite spell_correction_spec = {} user_pseudo_id = "hello world" content_search_spec = {} + ranking_expression = "hello world" + ranking_expression_backend = :RANKING_EXPRESSION_BACKEND_UNSPECIFIED safe_search = true user_labels = {} + natural_language_query_understanding_spec = {} search_as_you_type_spec = {} display_spec = {} + crowding_specs = [{}] session = "hello world" session_spec = {} relevance_threshold = :RELEVANCE_THRESHOLD_UNSPECIFIED relevance_score_spec = {} - ranking_expression = "hello world" - ranking_expression_backend = :RANKING_EXPRESSION_BACKEND_UNSPECIFIED search_lite_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| assert options.metadata.key? :"x-goog-api-client" @@ -216,27 +222,27 @@ def test_search_lite end # Use hash object - client.search_lite({ serving_config: serving_config, branch: branch, query: query, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, safe_search: safe_search, user_labels: user_labels, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend }) do |_result, response| + client.search_lite({ serving_config: serving_config, branch: branch, query: query, page_categories: page_categories, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend, safe_search: safe_search, user_labels: user_labels, natural_language_query_understanding_spec: natural_language_query_understanding_spec, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, crowding_specs: crowding_specs, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.search_lite serving_config: serving_config, branch: branch, query: query, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, safe_search: safe_search, user_labels: user_labels, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend do |_result, response| + client.search_lite serving_config: serving_config, branch: branch, query: query, page_categories: page_categories, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend, safe_search: safe_search, user_labels: user_labels, natural_language_query_understanding_spec: natural_language_query_understanding_spec, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, crowding_specs: crowding_specs, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.search_lite ::Google::Cloud::DiscoveryEngine::V1::SearchRequest.new(serving_config: serving_config, branch: branch, query: query, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, safe_search: safe_search, user_labels: user_labels, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend) do |_result, response| + client.search_lite ::Google::Cloud::DiscoveryEngine::V1::SearchRequest.new(serving_config: serving_config, branch: branch, query: query, page_categories: page_categories, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend, safe_search: safe_search, user_labels: user_labels, natural_language_query_understanding_spec: natural_language_query_understanding_spec, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, crowding_specs: crowding_specs, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.search_lite({ serving_config: serving_config, branch: branch, query: query, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, safe_search: safe_search, user_labels: user_labels, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend }, call_options) do |_result, response| + client.search_lite({ serving_config: serving_config, branch: branch, query: query, page_categories: page_categories, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend, safe_search: safe_search, user_labels: user_labels, natural_language_query_understanding_spec: natural_language_query_understanding_spec, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, crowding_specs: crowding_specs, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.search_lite(::Google::Cloud::DiscoveryEngine::V1::SearchRequest.new(serving_config: serving_config, branch: branch, query: query, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, safe_search: safe_search, user_labels: user_labels, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend), call_options) do |_result, response| + client.search_lite(::Google::Cloud::DiscoveryEngine::V1::SearchRequest.new(serving_config: serving_config, branch: branch, query: query, page_categories: page_categories, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend, safe_search: safe_search, user_labels: user_labels, natural_language_query_understanding_spec: natural_language_query_understanding_spec, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, crowding_specs: crowding_specs, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec), call_options) do |_result, response| assert_equal http_response, response.underlying_op end diff --git a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/search_service_test.rb b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/search_service_test.rb index ae0a5f96d220..c07426470386 100644 --- a/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/search_service_test.rb +++ b/google-cloud-discovery_engine-v1/test/google/cloud/discovery_engine/v1/search_service_test.rb @@ -74,6 +74,7 @@ def test_search serving_config = "hello world" branch = "hello world" query = "hello world" + page_categories = ["hello world"] image_query = {} page_size = 42 page_token = "hello world" @@ -92,16 +93,18 @@ def test_search spell_correction_spec = {} user_pseudo_id = "hello world" content_search_spec = {} + ranking_expression = "hello world" + ranking_expression_backend = :RANKING_EXPRESSION_BACKEND_UNSPECIFIED safe_search = true user_labels = {} + natural_language_query_understanding_spec = {} search_as_you_type_spec = {} display_spec = {} + crowding_specs = [{}] session = "hello world" session_spec = {} relevance_threshold = :RELEVANCE_THRESHOLD_UNSPECIFIED relevance_score_spec = {} - ranking_expression = "hello world" - ranking_expression_backend = :RANKING_EXPRESSION_BACKEND_UNSPECIFIED search_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :search, name @@ -109,6 +112,7 @@ def test_search assert_equal "hello world", request["serving_config"] assert_equal "hello world", request["branch"] assert_equal "hello world", request["query"] + assert_equal ["hello world"], request["page_categories"] assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ImageQuery), request["image_query"] assert_equal 42, request["page_size"] assert_equal "hello world", request["page_token"] @@ -127,16 +131,18 @@ def test_search assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SpellCorrectionSpec), request["spell_correction_spec"] assert_equal "hello world", request["user_pseudo_id"] assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec), request["content_search_spec"] + assert_equal "hello world", request["ranking_expression"] + assert_equal :RANKING_EXPRESSION_BACKEND_UNSPECIFIED, request["ranking_expression_backend"] assert_equal true, request["safe_search"] assert_equal({}, request["user_labels"].to_h) + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DiscoveryEngine::V1::SearchRequest::NaturalLanguageQueryUnderstandingSpec), request["natural_language_query_understanding_spec"] assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SearchAsYouTypeSpec), request["search_as_you_type_spec"] assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DisplaySpec), request["display_spec"] + assert_kind_of ::Google::Cloud::DiscoveryEngine::V1::SearchRequest::CrowdingSpec, request["crowding_specs"].first assert_equal "hello world", request["session"] assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SessionSpec), request["session_spec"] assert_equal :RELEVANCE_THRESHOLD_UNSPECIFIED, request["relevance_threshold"] assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RelevanceScoreSpec), request["relevance_score_spec"] - assert_equal "hello world", request["ranking_expression"] - assert_equal :RANKING_EXPRESSION_BACKEND_UNSPECIFIED, request["ranking_expression_backend"] refute_nil options end @@ -147,35 +153,35 @@ def test_search end # Use hash object - client.search({ serving_config: serving_config, branch: branch, query: query, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, safe_search: safe_search, user_labels: user_labels, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend }) do |response, operation| + client.search({ serving_config: serving_config, branch: branch, query: query, page_categories: page_categories, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend, safe_search: safe_search, user_labels: user_labels, natural_language_query_understanding_spec: natural_language_query_understanding_spec, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, crowding_specs: crowding_specs, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec }) do |response, operation| assert_kind_of Gapic::PagedEnumerable, response assert_equal grpc_response, response.response assert_equal grpc_operation, operation end # Use named arguments - client.search serving_config: serving_config, branch: branch, query: query, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, safe_search: safe_search, user_labels: user_labels, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend do |response, operation| + client.search serving_config: serving_config, branch: branch, query: query, page_categories: page_categories, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend, safe_search: safe_search, user_labels: user_labels, natural_language_query_understanding_spec: natural_language_query_understanding_spec, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, crowding_specs: crowding_specs, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec do |response, operation| assert_kind_of Gapic::PagedEnumerable, response assert_equal grpc_response, response.response assert_equal grpc_operation, operation end # Use protobuf object - client.search ::Google::Cloud::DiscoveryEngine::V1::SearchRequest.new(serving_config: serving_config, branch: branch, query: query, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, safe_search: safe_search, user_labels: user_labels, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend) do |response, operation| + client.search ::Google::Cloud::DiscoveryEngine::V1::SearchRequest.new(serving_config: serving_config, branch: branch, query: query, page_categories: page_categories, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend, safe_search: safe_search, user_labels: user_labels, natural_language_query_understanding_spec: natural_language_query_understanding_spec, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, crowding_specs: crowding_specs, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec) do |response, operation| assert_kind_of Gapic::PagedEnumerable, response assert_equal grpc_response, response.response assert_equal grpc_operation, operation end # Use hash object with options - client.search({ serving_config: serving_config, branch: branch, query: query, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, safe_search: safe_search, user_labels: user_labels, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend }, grpc_options) do |response, operation| + client.search({ serving_config: serving_config, branch: branch, query: query, page_categories: page_categories, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend, safe_search: safe_search, user_labels: user_labels, natural_language_query_understanding_spec: natural_language_query_understanding_spec, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, crowding_specs: crowding_specs, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec }, grpc_options) do |response, operation| assert_kind_of Gapic::PagedEnumerable, response assert_equal grpc_response, response.response assert_equal grpc_operation, operation end # Use protobuf object with options - client.search(::Google::Cloud::DiscoveryEngine::V1::SearchRequest.new(serving_config: serving_config, branch: branch, query: query, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, safe_search: safe_search, user_labels: user_labels, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend), grpc_options) do |response, operation| + client.search(::Google::Cloud::DiscoveryEngine::V1::SearchRequest.new(serving_config: serving_config, branch: branch, query: query, page_categories: page_categories, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend, safe_search: safe_search, user_labels: user_labels, natural_language_query_understanding_spec: natural_language_query_understanding_spec, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, crowding_specs: crowding_specs, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec), grpc_options) do |response, operation| assert_kind_of Gapic::PagedEnumerable, response assert_equal grpc_response, response.response assert_equal grpc_operation, operation @@ -197,6 +203,7 @@ def test_search_lite serving_config = "hello world" branch = "hello world" query = "hello world" + page_categories = ["hello world"] image_query = {} page_size = 42 page_token = "hello world" @@ -215,16 +222,18 @@ def test_search_lite spell_correction_spec = {} user_pseudo_id = "hello world" content_search_spec = {} + ranking_expression = "hello world" + ranking_expression_backend = :RANKING_EXPRESSION_BACKEND_UNSPECIFIED safe_search = true user_labels = {} + natural_language_query_understanding_spec = {} search_as_you_type_spec = {} display_spec = {} + crowding_specs = [{}] session = "hello world" session_spec = {} relevance_threshold = :RELEVANCE_THRESHOLD_UNSPECIFIED relevance_score_spec = {} - ranking_expression = "hello world" - ranking_expression_backend = :RANKING_EXPRESSION_BACKEND_UNSPECIFIED search_lite_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :search_lite, name @@ -232,6 +241,7 @@ def test_search_lite assert_equal "hello world", request["serving_config"] assert_equal "hello world", request["branch"] assert_equal "hello world", request["query"] + assert_equal ["hello world"], request["page_categories"] assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ImageQuery), request["image_query"] assert_equal 42, request["page_size"] assert_equal "hello world", request["page_token"] @@ -250,16 +260,18 @@ def test_search_lite assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SpellCorrectionSpec), request["spell_correction_spec"] assert_equal "hello world", request["user_pseudo_id"] assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec), request["content_search_spec"] + assert_equal "hello world", request["ranking_expression"] + assert_equal :RANKING_EXPRESSION_BACKEND_UNSPECIFIED, request["ranking_expression_backend"] assert_equal true, request["safe_search"] assert_equal({}, request["user_labels"].to_h) + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DiscoveryEngine::V1::SearchRequest::NaturalLanguageQueryUnderstandingSpec), request["natural_language_query_understanding_spec"] assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SearchAsYouTypeSpec), request["search_as_you_type_spec"] assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DisplaySpec), request["display_spec"] + assert_kind_of ::Google::Cloud::DiscoveryEngine::V1::SearchRequest::CrowdingSpec, request["crowding_specs"].first assert_equal "hello world", request["session"] assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SessionSpec), request["session_spec"] assert_equal :RELEVANCE_THRESHOLD_UNSPECIFIED, request["relevance_threshold"] assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RelevanceScoreSpec), request["relevance_score_spec"] - assert_equal "hello world", request["ranking_expression"] - assert_equal :RANKING_EXPRESSION_BACKEND_UNSPECIFIED, request["ranking_expression_backend"] refute_nil options end @@ -270,35 +282,35 @@ def test_search_lite end # Use hash object - client.search_lite({ serving_config: serving_config, branch: branch, query: query, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, safe_search: safe_search, user_labels: user_labels, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend }) do |response, operation| + client.search_lite({ serving_config: serving_config, branch: branch, query: query, page_categories: page_categories, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend, safe_search: safe_search, user_labels: user_labels, natural_language_query_understanding_spec: natural_language_query_understanding_spec, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, crowding_specs: crowding_specs, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec }) do |response, operation| assert_kind_of Gapic::PagedEnumerable, response assert_equal grpc_response, response.response assert_equal grpc_operation, operation end # Use named arguments - client.search_lite serving_config: serving_config, branch: branch, query: query, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, safe_search: safe_search, user_labels: user_labels, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend do |response, operation| + client.search_lite serving_config: serving_config, branch: branch, query: query, page_categories: page_categories, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend, safe_search: safe_search, user_labels: user_labels, natural_language_query_understanding_spec: natural_language_query_understanding_spec, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, crowding_specs: crowding_specs, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec do |response, operation| assert_kind_of Gapic::PagedEnumerable, response assert_equal grpc_response, response.response assert_equal grpc_operation, operation end # Use protobuf object - client.search_lite ::Google::Cloud::DiscoveryEngine::V1::SearchRequest.new(serving_config: serving_config, branch: branch, query: query, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, safe_search: safe_search, user_labels: user_labels, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend) do |response, operation| + client.search_lite ::Google::Cloud::DiscoveryEngine::V1::SearchRequest.new(serving_config: serving_config, branch: branch, query: query, page_categories: page_categories, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend, safe_search: safe_search, user_labels: user_labels, natural_language_query_understanding_spec: natural_language_query_understanding_spec, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, crowding_specs: crowding_specs, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec) do |response, operation| assert_kind_of Gapic::PagedEnumerable, response assert_equal grpc_response, response.response assert_equal grpc_operation, operation end # Use hash object with options - client.search_lite({ serving_config: serving_config, branch: branch, query: query, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, safe_search: safe_search, user_labels: user_labels, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend }, grpc_options) do |response, operation| + client.search_lite({ serving_config: serving_config, branch: branch, query: query, page_categories: page_categories, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend, safe_search: safe_search, user_labels: user_labels, natural_language_query_understanding_spec: natural_language_query_understanding_spec, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, crowding_specs: crowding_specs, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec }, grpc_options) do |response, operation| assert_kind_of Gapic::PagedEnumerable, response assert_equal grpc_response, response.response assert_equal grpc_operation, operation end # Use protobuf object with options - client.search_lite(::Google::Cloud::DiscoveryEngine::V1::SearchRequest.new(serving_config: serving_config, branch: branch, query: query, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, safe_search: safe_search, user_labels: user_labels, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend), grpc_options) do |response, operation| + client.search_lite(::Google::Cloud::DiscoveryEngine::V1::SearchRequest.new(serving_config: serving_config, branch: branch, query: query, page_categories: page_categories, image_query: image_query, page_size: page_size, page_token: page_token, offset: offset, one_box_page_size: one_box_page_size, data_store_specs: data_store_specs, filter: filter, canonical_filter: canonical_filter, order_by: order_by, user_info: user_info, language_code: language_code, facet_specs: facet_specs, boost_spec: boost_spec, params: params, query_expansion_spec: query_expansion_spec, spell_correction_spec: spell_correction_spec, user_pseudo_id: user_pseudo_id, content_search_spec: content_search_spec, ranking_expression: ranking_expression, ranking_expression_backend: ranking_expression_backend, safe_search: safe_search, user_labels: user_labels, natural_language_query_understanding_spec: natural_language_query_understanding_spec, search_as_you_type_spec: search_as_you_type_spec, display_spec: display_spec, crowding_specs: crowding_specs, session: session, session_spec: session_spec, relevance_threshold: relevance_threshold, relevance_score_spec: relevance_score_spec), grpc_options) do |response, operation| assert_kind_of Gapic::PagedEnumerable, response assert_equal grpc_response, response.response assert_equal grpc_operation, operation