Class: Google::Cloud::DiscoveryEngine::V1beta::SearchResponse

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb

Overview

Response message for SearchService.Search method.

Defined Under Namespace

Modules: SemanticState Classes: Facet, GeoSearchDebugInfo, GuidedSearchResult, NaturalLanguageQueryUnderstandingInfo, OneBoxResult, QueryExpansionInfo, SearchResult, SessionInfo, Summary

Instance Attribute Summary collapse

Instance Attribute Details

#applied_controls::Array<::String>

Returns Controls applied as part of the Control service.

Returns:

  • (::Array<::String>)

    Controls applied as part of the Control service.



1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
# File 'proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb', line 1646

class SearchResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents the search results.
  # @!attribute [rw] id
  #   @return [::String]
  #     {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id} of the
  #     searched {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}.
  # @!attribute [rw] document
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Document]
  #     The document data snippet in the search response. Only fields that are
  #     marked as `retrievable` are populated.
  # @!attribute [rw] chunk
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Chunk]
  #     The chunk data in the search response if the
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec#search_result_mode SearchRequest.ContentSearchSpec.search_result_mode}
  #     is set to
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS CHUNKS}.
  # @!attribute [r] model_scores
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1beta::DoubleList}]
  #     Output only. Google provided available scores.
  # @!attribute [rw] rank_signals
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals]
  #     Optional. A set of ranking signals associated with the result.
  class SearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A set of ranking signals.
    # @!attribute [rw] keyword_similarity_score
    #   @return [::Float]
    #     Optional. Keyword matching adjustment.
    # @!attribute [rw] relevance_score
    #   @return [::Float]
    #     Optional. Semantic relevance adjustment.
    # @!attribute [rw] semantic_similarity_score
    #   @return [::Float]
    #     Optional. Semantic similarity adjustment.
    # @!attribute [rw] pctr_rank
    #   @return [::Float]
    #     Optional. Predicted conversion rate adjustment as a rank.
    # @!attribute [rw] topicality_rank
    #   @return [::Float]
    #     Optional. Topicality adjustment as a rank.
    # @!attribute [rw] document_age
    #   @return [::Float]
    #     Optional. Age of the document in hours.
    # @!attribute [rw] boosting_factor
    #   @return [::Float]
    #     Optional. Combined custom boosts for a doc.
    # @!attribute [rw] default_rank
    #   @return [::Float]
    #     Optional. The default rank of the result.
    # @!attribute [rw] custom_signals
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals::CustomSignal>]
    #     Optional. A list of custom clearbox signals.
    # @!attribute [rw] precomputed_expression_values
    #   @return [::Array<::Float>]
    #     Optional. A list of precomputed expression results for a given
    #     document, in the same order as requested in
    #     `SearchRequest.custom_ranking_params.expressions_to_precompute`.
    class RankSignals
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Custom clearbox signal represented by name and value pair.
      # @!attribute [rw] name
      #   @return [::String]
      #     Optional. Name of the signal.
      # @!attribute [rw] value
      #   @return [::Float]
      #     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::V1beta::DoubleList]
    class ModelScoresEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A facet result.
  # @!attribute [rw] key
  #   @return [::String]
  #     The key for this facet. For example, `"colors"` or `"price"`. It matches
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#key SearchRequest.FacetSpec.FacetKey.key}.
  # @!attribute [rw] values
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Facet::FacetValue>]
  #     The facet values for this field.
  # @!attribute [rw] dynamic_facet
  #   @return [::Boolean]
  #     Whether the facet is dynamically generated.
  class Facet
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A facet value which contains value names and their count.
    # @!attribute [rw] value
    #   @return [::String]
    #     Text value of a facet, such as "Black" for facet "colors".
    #
    #     Note: The following fields are mutually exclusive: `value`, `interval`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] interval
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Interval]
    #     Interval value for a facet, such as [10, 20) for facet "price". It
    #     matches
    #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals}.
    #
    #     Note: The following fields are mutually exclusive: `interval`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] count
    #   @return [::Integer]
    #     Number of items that have this facet value.
    class FacetValue
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Guided search result. The guided search helps user to refine the search
  # results and narrow down to the real needs from a broaded search results.
  # @!attribute [rw] refinement_attributes
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::GuidedSearchResult::RefinementAttribute>]
  #     A list of ranked refinement attributes.
  # @!attribute [rw] follow_up_questions
  #   @return [::Array<::String>]
  #     Suggested follow-up questions.
  class GuidedSearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Useful attribute for search result refinements.
    # @!attribute [rw] attribute_key
    #   @return [::String]
    #     Attribute key used to refine the results. For example, `"movie_type"`.
    # @!attribute [rw] attribute_value
    #   @return [::String]
    #     Attribute value used to refine the results. For example, `"drama"`.
    class RefinementAttribute
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Summary of the top N search results specified by the summary spec.
  # @!attribute [rw] summary_text
  #   @return [::String]
  #     The summary content.
  # @!attribute [rw] summary_skipped_reasons
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummarySkippedReason>]
  #     Additional summary-skipped reasons. This provides the reason for ignored
  #     cases. If nothing is skipped, this field is not set.
  # @!attribute [rw] safety_attributes
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SafetyAttributes]
  #     A collection of Safety Attribute categories and their associated
  #     confidence scores.
  # @!attribute [rw] summary_with_metadata
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummaryWithMetadata]
  #     Summary with metadata information.
  class Summary
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Safety Attribute categories and their associated confidence scores.
    # @!attribute [rw] categories
    #   @return [::Array<::String>]
    #     The display names of Safety Attribute categories associated with the
    #     generated content. Order matches the Scores.
    # @!attribute [rw] scores
    #   @return [::Array<::Float>]
    #     The confidence scores of the each category, higher
    #     value means higher confidence. Order matches the Categories.
    class SafetyAttributes
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation metadata.
    # @!attribute [rw] citations
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Citation>]
    #     Citations for segments.
    class CitationMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation info for a segment.
    # @!attribute [rw] start_index
    #   @return [::Integer]
    #     Index indicates the start of the segment, measured in bytes/unicode.
    # @!attribute [rw] end_index
    #   @return [::Integer]
    #     End of the attributed segment, exclusive.
    # @!attribute [rw] sources
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::CitationSource>]
    #     Citation sources for the attributed segment.
    class Citation
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation source.
    # @!attribute [rw] reference_index
    #   @return [::Integer]
    #     Document reference index from SummaryWithMetadata.references.
    #     It is 0-indexed and the value will be zero if the reference_index is
    #     not set explicitly.
    class CitationSource
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Document reference.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title of the document.
    # @!attribute [rw] document
    #   @return [::String]
    #     Required.
    #     {::Google::Cloud::DiscoveryEngine::V1beta::Document#name Document.name} of
    #     the document. Full resource name of the referenced document, in the
    #     format
    #     `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
    # @!attribute [rw] uri
    #   @return [::String]
    #     Cloud Storage or HTTP uri for the document.
    # @!attribute [rw] chunk_contents
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Reference::ChunkContent>]
    #     List of cited chunk contents derived from document content.
    class Reference
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Chunk content.
      # @!attribute [rw] content
      #   @return [::String]
      #     Chunk textual content.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      # @!attribute [r] blob_attachment_indexes
      #   @return [::Array<::Integer>]
      #     Output only. Stores indexes of blobattachments linked to this chunk.
      class ChunkContent
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end

    # Stores binarydata attached to text answer, e.g. image, video, audio, etc.
    # @!attribute [r] data
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment::Blob]
    #     Output only. The blob data.
    # @!attribute [r] attribution_type
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment::AttributionType]
    #     Output only. The attribution type of the blob.
    class BlobAttachment
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Stores type and data of the blob.
      # @!attribute [r] mime_type
      #   @return [::String]
      #     Output only. The media type (MIME type) of the generated data.
      # @!attribute [r] data
      #   @return [::String]
      #     Output only. Raw bytes.
      class Blob
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Defines the attribution type of the blob.
      module AttributionType
        # Unspecified attribution type.
        ATTRIBUTION_TYPE_UNSPECIFIED = 0

        # The attachment data is from the corpus.
        CORPUS = 1

        # The attachment data is generated by the model through code
        # generation.
        GENERATED = 2
      end
    end

    # Summary with metadata information.
    # @!attribute [rw] summary
    #   @return [::String]
    #     Summary text with no citation information.
    # @!attribute [rw] citation_metadata
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::CitationMetadata]
    #     Citation metadata for given summary.
    # @!attribute [rw] references
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Reference>]
    #     Document References.
    # @!attribute [r] blob_attachments
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment>]
    #     Output only. Store multimodal data for answer enhancement.
    class SummaryWithMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # An Enum for summary-skipped reasons.
    module SummarySkippedReason
      # Default value. The summary skipped reason is not specified.
      SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0

      # The adversarial query ignored case.
      #
      # Only used when
      # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query}
      # is set to `true`.
      ADVERSARIAL_QUERY_IGNORED = 1

      # The non-summary seeking query ignored case.
      #
      # Google skips the summary if the query is chit chat.
      # Only used when
      # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query}
      # is set to `true`.
      NON_SUMMARY_SEEKING_QUERY_IGNORED = 2

      # The out-of-domain query ignored case.
      #
      # Google skips the summary if there are no high-relevance search results.
      # For example, the data store contains facts about company A but the
      # user query is asking questions about company B.
      OUT_OF_DOMAIN_QUERY_IGNORED = 3

      # The potential policy violation case.
      #
      # Google skips the summary if there is a potential policy violation
      # detected. This includes content that may be violent or toxic.
      POTENTIAL_POLICY_VIOLATION = 4

      # The LLM addon not enabled case.
      #
      # Google skips the summary if the LLM addon is not enabled.
      LLM_ADDON_NOT_ENABLED = 5

      # The no relevant content case.
      #
      # Google skips the summary if there is no relevant content in the
      # retrieved search results.
      NO_RELEVANT_CONTENT = 6

      # The jail-breaking query ignored case.
      #
      # For example, "Reply in the tone of a competing company's CEO".
      # Only used when
      # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query]
      # is set to `true`.
      JAIL_BREAKING_QUERY_IGNORED = 7

      # The customer policy violation case.
      #
      # Google skips the summary if there is a customer policy violation
      # detected. The policy is defined by the customer.
      CUSTOMER_POLICY_VIOLATION = 8

      # The non-answer seeking query ignored case.
      #
      # Google skips the summary if the query doesn't have clear intent.
      # Only used when
      # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query]
      # is set to `true`.
      NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9

      # The time out case.
      #
      # Google skips the summary if the time out.
      TIME_OUT = 10
    end
  end

  # Debug information specifically related to forward geocoding issues arising
  # from Geolocation Search.
  # @!attribute [rw] original_address_query
  #   @return [::String]
  #     The address from which forward geocoding ingestion produced issues.
  # @!attribute [rw] error_message
  #   @return [::String]
  #     The error produced.
  class GeoSearchDebugInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Information describing query expansion including whether expansion has
  # occurred.
  # @!attribute [rw] expanded_query
  #   @return [::Boolean]
  #     Bool describing whether query expansion has occurred.
  # @!attribute [rw] pinned_result_count
  #   @return [::Integer]
  #     Number of pinned results. This field will only be set when expansion
  #     happens and
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results}
  #     is set to true.
  class QueryExpansionInfo
    include ::Google::Protobuf::MessageExts
    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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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]
  #     Name of the session.
  #     If the auto-session mode is used (when
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#session SearchRequest.session}
  #     ends with "-"), this field holds the newly generated session name.
  # @!attribute [rw] query_id
  #   @return [::String]
  #     Query ID that corresponds to this search API call.
  #     One session can have multiple turns, each with a unique query ID.
  #
  #     By specifying the session name and this query ID in the Answer API call,
  #     the answer generation happens in the context of the search results from
  #     this search call.
  class SessionInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # OneBoxResult is a holder for all results of specific type that we want
  # to display in UI differently.
  # @!attribute [rw] one_box_type
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::OneBoxResult::OneBoxType]
  #     The type of One Box result.
  # @!attribute [rw] search_results
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult>]
  #     The search results for this One Box.
  class OneBoxResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The type of One Box result.
    module OneBoxType
      # Default value. Should not be used.
      ONE_BOX_TYPE_UNSPECIFIED = 0

      # One Box result contains people results.
      PEOPLE = 1

      # One Box result contains organization results.
      ORGANIZATION = 2

      # One Box result contains slack results.
      SLACK = 3

      # One Box result contains Knowledge Graph search responses.
      KNOWLEDGE_GRAPH = 4
    end
  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

#attribution_token::String

Returns A unique search token. This should be included in the UserEvent logs resulting from this search, which enables accurate attribution of search model performance. This also helps to identify a request during the customer support scenarios.

Returns:

  • (::String)

    A unique search token. This should be included in the UserEvent logs resulting from this search, which enables accurate attribution of search model performance. This also helps to identify a request during the customer support scenarios.



1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
# File 'proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb', line 1646

class SearchResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents the search results.
  # @!attribute [rw] id
  #   @return [::String]
  #     {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id} of the
  #     searched {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}.
  # @!attribute [rw] document
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Document]
  #     The document data snippet in the search response. Only fields that are
  #     marked as `retrievable` are populated.
  # @!attribute [rw] chunk
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Chunk]
  #     The chunk data in the search response if the
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec#search_result_mode SearchRequest.ContentSearchSpec.search_result_mode}
  #     is set to
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS CHUNKS}.
  # @!attribute [r] model_scores
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1beta::DoubleList}]
  #     Output only. Google provided available scores.
  # @!attribute [rw] rank_signals
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals]
  #     Optional. A set of ranking signals associated with the result.
  class SearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A set of ranking signals.
    # @!attribute [rw] keyword_similarity_score
    #   @return [::Float]
    #     Optional. Keyword matching adjustment.
    # @!attribute [rw] relevance_score
    #   @return [::Float]
    #     Optional. Semantic relevance adjustment.
    # @!attribute [rw] semantic_similarity_score
    #   @return [::Float]
    #     Optional. Semantic similarity adjustment.
    # @!attribute [rw] pctr_rank
    #   @return [::Float]
    #     Optional. Predicted conversion rate adjustment as a rank.
    # @!attribute [rw] topicality_rank
    #   @return [::Float]
    #     Optional. Topicality adjustment as a rank.
    # @!attribute [rw] document_age
    #   @return [::Float]
    #     Optional. Age of the document in hours.
    # @!attribute [rw] boosting_factor
    #   @return [::Float]
    #     Optional. Combined custom boosts for a doc.
    # @!attribute [rw] default_rank
    #   @return [::Float]
    #     Optional. The default rank of the result.
    # @!attribute [rw] custom_signals
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals::CustomSignal>]
    #     Optional. A list of custom clearbox signals.
    # @!attribute [rw] precomputed_expression_values
    #   @return [::Array<::Float>]
    #     Optional. A list of precomputed expression results for a given
    #     document, in the same order as requested in
    #     `SearchRequest.custom_ranking_params.expressions_to_precompute`.
    class RankSignals
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Custom clearbox signal represented by name and value pair.
      # @!attribute [rw] name
      #   @return [::String]
      #     Optional. Name of the signal.
      # @!attribute [rw] value
      #   @return [::Float]
      #     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::V1beta::DoubleList]
    class ModelScoresEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A facet result.
  # @!attribute [rw] key
  #   @return [::String]
  #     The key for this facet. For example, `"colors"` or `"price"`. It matches
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#key SearchRequest.FacetSpec.FacetKey.key}.
  # @!attribute [rw] values
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Facet::FacetValue>]
  #     The facet values for this field.
  # @!attribute [rw] dynamic_facet
  #   @return [::Boolean]
  #     Whether the facet is dynamically generated.
  class Facet
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A facet value which contains value names and their count.
    # @!attribute [rw] value
    #   @return [::String]
    #     Text value of a facet, such as "Black" for facet "colors".
    #
    #     Note: The following fields are mutually exclusive: `value`, `interval`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] interval
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Interval]
    #     Interval value for a facet, such as [10, 20) for facet "price". It
    #     matches
    #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals}.
    #
    #     Note: The following fields are mutually exclusive: `interval`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] count
    #   @return [::Integer]
    #     Number of items that have this facet value.
    class FacetValue
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Guided search result. The guided search helps user to refine the search
  # results and narrow down to the real needs from a broaded search results.
  # @!attribute [rw] refinement_attributes
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::GuidedSearchResult::RefinementAttribute>]
  #     A list of ranked refinement attributes.
  # @!attribute [rw] follow_up_questions
  #   @return [::Array<::String>]
  #     Suggested follow-up questions.
  class GuidedSearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Useful attribute for search result refinements.
    # @!attribute [rw] attribute_key
    #   @return [::String]
    #     Attribute key used to refine the results. For example, `"movie_type"`.
    # @!attribute [rw] attribute_value
    #   @return [::String]
    #     Attribute value used to refine the results. For example, `"drama"`.
    class RefinementAttribute
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Summary of the top N search results specified by the summary spec.
  # @!attribute [rw] summary_text
  #   @return [::String]
  #     The summary content.
  # @!attribute [rw] summary_skipped_reasons
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummarySkippedReason>]
  #     Additional summary-skipped reasons. This provides the reason for ignored
  #     cases. If nothing is skipped, this field is not set.
  # @!attribute [rw] safety_attributes
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SafetyAttributes]
  #     A collection of Safety Attribute categories and their associated
  #     confidence scores.
  # @!attribute [rw] summary_with_metadata
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummaryWithMetadata]
  #     Summary with metadata information.
  class Summary
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Safety Attribute categories and their associated confidence scores.
    # @!attribute [rw] categories
    #   @return [::Array<::String>]
    #     The display names of Safety Attribute categories associated with the
    #     generated content. Order matches the Scores.
    # @!attribute [rw] scores
    #   @return [::Array<::Float>]
    #     The confidence scores of the each category, higher
    #     value means higher confidence. Order matches the Categories.
    class SafetyAttributes
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation metadata.
    # @!attribute [rw] citations
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Citation>]
    #     Citations for segments.
    class CitationMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation info for a segment.
    # @!attribute [rw] start_index
    #   @return [::Integer]
    #     Index indicates the start of the segment, measured in bytes/unicode.
    # @!attribute [rw] end_index
    #   @return [::Integer]
    #     End of the attributed segment, exclusive.
    # @!attribute [rw] sources
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::CitationSource>]
    #     Citation sources for the attributed segment.
    class Citation
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation source.
    # @!attribute [rw] reference_index
    #   @return [::Integer]
    #     Document reference index from SummaryWithMetadata.references.
    #     It is 0-indexed and the value will be zero if the reference_index is
    #     not set explicitly.
    class CitationSource
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Document reference.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title of the document.
    # @!attribute [rw] document
    #   @return [::String]
    #     Required.
    #     {::Google::Cloud::DiscoveryEngine::V1beta::Document#name Document.name} of
    #     the document. Full resource name of the referenced document, in the
    #     format
    #     `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
    # @!attribute [rw] uri
    #   @return [::String]
    #     Cloud Storage or HTTP uri for the document.
    # @!attribute [rw] chunk_contents
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Reference::ChunkContent>]
    #     List of cited chunk contents derived from document content.
    class Reference
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Chunk content.
      # @!attribute [rw] content
      #   @return [::String]
      #     Chunk textual content.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      # @!attribute [r] blob_attachment_indexes
      #   @return [::Array<::Integer>]
      #     Output only. Stores indexes of blobattachments linked to this chunk.
      class ChunkContent
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end

    # Stores binarydata attached to text answer, e.g. image, video, audio, etc.
    # @!attribute [r] data
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment::Blob]
    #     Output only. The blob data.
    # @!attribute [r] attribution_type
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment::AttributionType]
    #     Output only. The attribution type of the blob.
    class BlobAttachment
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Stores type and data of the blob.
      # @!attribute [r] mime_type
      #   @return [::String]
      #     Output only. The media type (MIME type) of the generated data.
      # @!attribute [r] data
      #   @return [::String]
      #     Output only. Raw bytes.
      class Blob
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Defines the attribution type of the blob.
      module AttributionType
        # Unspecified attribution type.
        ATTRIBUTION_TYPE_UNSPECIFIED = 0

        # The attachment data is from the corpus.
        CORPUS = 1

        # The attachment data is generated by the model through code
        # generation.
        GENERATED = 2
      end
    end

    # Summary with metadata information.
    # @!attribute [rw] summary
    #   @return [::String]
    #     Summary text with no citation information.
    # @!attribute [rw] citation_metadata
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::CitationMetadata]
    #     Citation metadata for given summary.
    # @!attribute [rw] references
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Reference>]
    #     Document References.
    # @!attribute [r] blob_attachments
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment>]
    #     Output only. Store multimodal data for answer enhancement.
    class SummaryWithMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # An Enum for summary-skipped reasons.
    module SummarySkippedReason
      # Default value. The summary skipped reason is not specified.
      SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0

      # The adversarial query ignored case.
      #
      # Only used when
      # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query}
      # is set to `true`.
      ADVERSARIAL_QUERY_IGNORED = 1

      # The non-summary seeking query ignored case.
      #
      # Google skips the summary if the query is chit chat.
      # Only used when
      # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query}
      # is set to `true`.
      NON_SUMMARY_SEEKING_QUERY_IGNORED = 2

      # The out-of-domain query ignored case.
      #
      # Google skips the summary if there are no high-relevance search results.
      # For example, the data store contains facts about company A but the
      # user query is asking questions about company B.
      OUT_OF_DOMAIN_QUERY_IGNORED = 3

      # The potential policy violation case.
      #
      # Google skips the summary if there is a potential policy violation
      # detected. This includes content that may be violent or toxic.
      POTENTIAL_POLICY_VIOLATION = 4

      # The LLM addon not enabled case.
      #
      # Google skips the summary if the LLM addon is not enabled.
      LLM_ADDON_NOT_ENABLED = 5

      # The no relevant content case.
      #
      # Google skips the summary if there is no relevant content in the
      # retrieved search results.
      NO_RELEVANT_CONTENT = 6

      # The jail-breaking query ignored case.
      #
      # For example, "Reply in the tone of a competing company's CEO".
      # Only used when
      # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query]
      # is set to `true`.
      JAIL_BREAKING_QUERY_IGNORED = 7

      # The customer policy violation case.
      #
      # Google skips the summary if there is a customer policy violation
      # detected. The policy is defined by the customer.
      CUSTOMER_POLICY_VIOLATION = 8

      # The non-answer seeking query ignored case.
      #
      # Google skips the summary if the query doesn't have clear intent.
      # Only used when
      # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query]
      # is set to `true`.
      NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9

      # The time out case.
      #
      # Google skips the summary if the time out.
      TIME_OUT = 10
    end
  end

  # Debug information specifically related to forward geocoding issues arising
  # from Geolocation Search.
  # @!attribute [rw] original_address_query
  #   @return [::String]
  #     The address from which forward geocoding ingestion produced issues.
  # @!attribute [rw] error_message
  #   @return [::String]
  #     The error produced.
  class GeoSearchDebugInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Information describing query expansion including whether expansion has
  # occurred.
  # @!attribute [rw] expanded_query
  #   @return [::Boolean]
  #     Bool describing whether query expansion has occurred.
  # @!attribute [rw] pinned_result_count
  #   @return [::Integer]
  #     Number of pinned results. This field will only be set when expansion
  #     happens and
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results}
  #     is set to true.
  class QueryExpansionInfo
    include ::Google::Protobuf::MessageExts
    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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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]
  #     Name of the session.
  #     If the auto-session mode is used (when
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#session SearchRequest.session}
  #     ends with "-"), this field holds the newly generated session name.
  # @!attribute [rw] query_id
  #   @return [::String]
  #     Query ID that corresponds to this search API call.
  #     One session can have multiple turns, each with a unique query ID.
  #
  #     By specifying the session name and this query ID in the Answer API call,
  #     the answer generation happens in the context of the search results from
  #     this search call.
  class SessionInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # OneBoxResult is a holder for all results of specific type that we want
  # to display in UI differently.
  # @!attribute [rw] one_box_type
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::OneBoxResult::OneBoxType]
  #     The type of One Box result.
  # @!attribute [rw] search_results
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult>]
  #     The search results for this One Box.
  class OneBoxResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The type of One Box result.
    module OneBoxType
      # Default value. Should not be used.
      ONE_BOX_TYPE_UNSPECIFIED = 0

      # One Box result contains people results.
      PEOPLE = 1

      # One Box result contains organization results.
      ORGANIZATION = 2

      # One Box result contains slack results.
      SLACK = 3

      # One Box result contains Knowledge Graph search responses.
      KNOWLEDGE_GRAPH = 4
    end
  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

#corrected_query::String

Returns Contains the spell corrected query, if found. If the spell correction type is AUTOMATIC, then the search results are based on corrected_query. Otherwise the original query is used for search.

Returns:

  • (::String)

    Contains the spell corrected query, if found. If the spell correction type is AUTOMATIC, then the search results are based on corrected_query. Otherwise the original query is used for search.



1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
# File 'proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb', line 1646

class SearchResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents the search results.
  # @!attribute [rw] id
  #   @return [::String]
  #     {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id} of the
  #     searched {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}.
  # @!attribute [rw] document
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Document]
  #     The document data snippet in the search response. Only fields that are
  #     marked as `retrievable` are populated.
  # @!attribute [rw] chunk
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Chunk]
  #     The chunk data in the search response if the
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec#search_result_mode SearchRequest.ContentSearchSpec.search_result_mode}
  #     is set to
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS CHUNKS}.
  # @!attribute [r] model_scores
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1beta::DoubleList}]
  #     Output only. Google provided available scores.
  # @!attribute [rw] rank_signals
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals]
  #     Optional. A set of ranking signals associated with the result.
  class SearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A set of ranking signals.
    # @!attribute [rw] keyword_similarity_score
    #   @return [::Float]
    #     Optional. Keyword matching adjustment.
    # @!attribute [rw] relevance_score
    #   @return [::Float]
    #     Optional. Semantic relevance adjustment.
    # @!attribute [rw] semantic_similarity_score
    #   @return [::Float]
    #     Optional. Semantic similarity adjustment.
    # @!attribute [rw] pctr_rank
    #   @return [::Float]
    #     Optional. Predicted conversion rate adjustment as a rank.
    # @!attribute [rw] topicality_rank
    #   @return [::Float]
    #     Optional. Topicality adjustment as a rank.
    # @!attribute [rw] document_age
    #   @return [::Float]
    #     Optional. Age of the document in hours.
    # @!attribute [rw] boosting_factor
    #   @return [::Float]
    #     Optional. Combined custom boosts for a doc.
    # @!attribute [rw] default_rank
    #   @return [::Float]
    #     Optional. The default rank of the result.
    # @!attribute [rw] custom_signals
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals::CustomSignal>]
    #     Optional. A list of custom clearbox signals.
    # @!attribute [rw] precomputed_expression_values
    #   @return [::Array<::Float>]
    #     Optional. A list of precomputed expression results for a given
    #     document, in the same order as requested in
    #     `SearchRequest.custom_ranking_params.expressions_to_precompute`.
    class RankSignals
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Custom clearbox signal represented by name and value pair.
      # @!attribute [rw] name
      #   @return [::String]
      #     Optional. Name of the signal.
      # @!attribute [rw] value
      #   @return [::Float]
      #     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::V1beta::DoubleList]
    class ModelScoresEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A facet result.
  # @!attribute [rw] key
  #   @return [::String]
  #     The key for this facet. For example, `"colors"` or `"price"`. It matches
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#key SearchRequest.FacetSpec.FacetKey.key}.
  # @!attribute [rw] values
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Facet::FacetValue>]
  #     The facet values for this field.
  # @!attribute [rw] dynamic_facet
  #   @return [::Boolean]
  #     Whether the facet is dynamically generated.
  class Facet
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A facet value which contains value names and their count.
    # @!attribute [rw] value
    #   @return [::String]
    #     Text value of a facet, such as "Black" for facet "colors".
    #
    #     Note: The following fields are mutually exclusive: `value`, `interval`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] interval
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Interval]
    #     Interval value for a facet, such as [10, 20) for facet "price". It
    #     matches
    #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals}.
    #
    #     Note: The following fields are mutually exclusive: `interval`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] count
    #   @return [::Integer]
    #     Number of items that have this facet value.
    class FacetValue
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Guided search result. The guided search helps user to refine the search
  # results and narrow down to the real needs from a broaded search results.
  # @!attribute [rw] refinement_attributes
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::GuidedSearchResult::RefinementAttribute>]
  #     A list of ranked refinement attributes.
  # @!attribute [rw] follow_up_questions
  #   @return [::Array<::String>]
  #     Suggested follow-up questions.
  class GuidedSearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Useful attribute for search result refinements.
    # @!attribute [rw] attribute_key
    #   @return [::String]
    #     Attribute key used to refine the results. For example, `"movie_type"`.
    # @!attribute [rw] attribute_value
    #   @return [::String]
    #     Attribute value used to refine the results. For example, `"drama"`.
    class RefinementAttribute
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Summary of the top N search results specified by the summary spec.
  # @!attribute [rw] summary_text
  #   @return [::String]
  #     The summary content.
  # @!attribute [rw] summary_skipped_reasons
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummarySkippedReason>]
  #     Additional summary-skipped reasons. This provides the reason for ignored
  #     cases. If nothing is skipped, this field is not set.
  # @!attribute [rw] safety_attributes
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SafetyAttributes]
  #     A collection of Safety Attribute categories and their associated
  #     confidence scores.
  # @!attribute [rw] summary_with_metadata
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummaryWithMetadata]
  #     Summary with metadata information.
  class Summary
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Safety Attribute categories and their associated confidence scores.
    # @!attribute [rw] categories
    #   @return [::Array<::String>]
    #     The display names of Safety Attribute categories associated with the
    #     generated content. Order matches the Scores.
    # @!attribute [rw] scores
    #   @return [::Array<::Float>]
    #     The confidence scores of the each category, higher
    #     value means higher confidence. Order matches the Categories.
    class SafetyAttributes
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation metadata.
    # @!attribute [rw] citations
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Citation>]
    #     Citations for segments.
    class CitationMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation info for a segment.
    # @!attribute [rw] start_index
    #   @return [::Integer]
    #     Index indicates the start of the segment, measured in bytes/unicode.
    # @!attribute [rw] end_index
    #   @return [::Integer]
    #     End of the attributed segment, exclusive.
    # @!attribute [rw] sources
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::CitationSource>]
    #     Citation sources for the attributed segment.
    class Citation
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation source.
    # @!attribute [rw] reference_index
    #   @return [::Integer]
    #     Document reference index from SummaryWithMetadata.references.
    #     It is 0-indexed and the value will be zero if the reference_index is
    #     not set explicitly.
    class CitationSource
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Document reference.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title of the document.
    # @!attribute [rw] document
    #   @return [::String]
    #     Required.
    #     {::Google::Cloud::DiscoveryEngine::V1beta::Document#name Document.name} of
    #     the document. Full resource name of the referenced document, in the
    #     format
    #     `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
    # @!attribute [rw] uri
    #   @return [::String]
    #     Cloud Storage or HTTP uri for the document.
    # @!attribute [rw] chunk_contents
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Reference::ChunkContent>]
    #     List of cited chunk contents derived from document content.
    class Reference
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Chunk content.
      # @!attribute [rw] content
      #   @return [::String]
      #     Chunk textual content.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      # @!attribute [r] blob_attachment_indexes
      #   @return [::Array<::Integer>]
      #     Output only. Stores indexes of blobattachments linked to this chunk.
      class ChunkContent
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end

    # Stores binarydata attached to text answer, e.g. image, video, audio, etc.
    # @!attribute [r] data
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment::Blob]
    #     Output only. The blob data.
    # @!attribute [r] attribution_type
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment::AttributionType]
    #     Output only. The attribution type of the blob.
    class BlobAttachment
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Stores type and data of the blob.
      # @!attribute [r] mime_type
      #   @return [::String]
      #     Output only. The media type (MIME type) of the generated data.
      # @!attribute [r] data
      #   @return [::String]
      #     Output only. Raw bytes.
      class Blob
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Defines the attribution type of the blob.
      module AttributionType
        # Unspecified attribution type.
        ATTRIBUTION_TYPE_UNSPECIFIED = 0

        # The attachment data is from the corpus.
        CORPUS = 1

        # The attachment data is generated by the model through code
        # generation.
        GENERATED = 2
      end
    end

    # Summary with metadata information.
    # @!attribute [rw] summary
    #   @return [::String]
    #     Summary text with no citation information.
    # @!attribute [rw] citation_metadata
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::CitationMetadata]
    #     Citation metadata for given summary.
    # @!attribute [rw] references
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Reference>]
    #     Document References.
    # @!attribute [r] blob_attachments
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment>]
    #     Output only. Store multimodal data for answer enhancement.
    class SummaryWithMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # An Enum for summary-skipped reasons.
    module SummarySkippedReason
      # Default value. The summary skipped reason is not specified.
      SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0

      # The adversarial query ignored case.
      #
      # Only used when
      # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query}
      # is set to `true`.
      ADVERSARIAL_QUERY_IGNORED = 1

      # The non-summary seeking query ignored case.
      #
      # Google skips the summary if the query is chit chat.
      # Only used when
      # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query}
      # is set to `true`.
      NON_SUMMARY_SEEKING_QUERY_IGNORED = 2

      # The out-of-domain query ignored case.
      #
      # Google skips the summary if there are no high-relevance search results.
      # For example, the data store contains facts about company A but the
      # user query is asking questions about company B.
      OUT_OF_DOMAIN_QUERY_IGNORED = 3

      # The potential policy violation case.
      #
      # Google skips the summary if there is a potential policy violation
      # detected. This includes content that may be violent or toxic.
      POTENTIAL_POLICY_VIOLATION = 4

      # The LLM addon not enabled case.
      #
      # Google skips the summary if the LLM addon is not enabled.
      LLM_ADDON_NOT_ENABLED = 5

      # The no relevant content case.
      #
      # Google skips the summary if there is no relevant content in the
      # retrieved search results.
      NO_RELEVANT_CONTENT = 6

      # The jail-breaking query ignored case.
      #
      # For example, "Reply in the tone of a competing company's CEO".
      # Only used when
      # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query]
      # is set to `true`.
      JAIL_BREAKING_QUERY_IGNORED = 7

      # The customer policy violation case.
      #
      # Google skips the summary if there is a customer policy violation
      # detected. The policy is defined by the customer.
      CUSTOMER_POLICY_VIOLATION = 8

      # The non-answer seeking query ignored case.
      #
      # Google skips the summary if the query doesn't have clear intent.
      # Only used when
      # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query]
      # is set to `true`.
      NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9

      # The time out case.
      #
      # Google skips the summary if the time out.
      TIME_OUT = 10
    end
  end

  # Debug information specifically related to forward geocoding issues arising
  # from Geolocation Search.
  # @!attribute [rw] original_address_query
  #   @return [::String]
  #     The address from which forward geocoding ingestion produced issues.
  # @!attribute [rw] error_message
  #   @return [::String]
  #     The error produced.
  class GeoSearchDebugInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Information describing query expansion including whether expansion has
  # occurred.
  # @!attribute [rw] expanded_query
  #   @return [::Boolean]
  #     Bool describing whether query expansion has occurred.
  # @!attribute [rw] pinned_result_count
  #   @return [::Integer]
  #     Number of pinned results. This field will only be set when expansion
  #     happens and
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results}
  #     is set to true.
  class QueryExpansionInfo
    include ::Google::Protobuf::MessageExts
    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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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]
  #     Name of the session.
  #     If the auto-session mode is used (when
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#session SearchRequest.session}
  #     ends with "-"), this field holds the newly generated session name.
  # @!attribute [rw] query_id
  #   @return [::String]
  #     Query ID that corresponds to this search API call.
  #     One session can have multiple turns, each with a unique query ID.
  #
  #     By specifying the session name and this query ID in the Answer API call,
  #     the answer generation happens in the context of the search results from
  #     this search call.
  class SessionInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # OneBoxResult is a holder for all results of specific type that we want
  # to display in UI differently.
  # @!attribute [rw] one_box_type
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::OneBoxResult::OneBoxType]
  #     The type of One Box result.
  # @!attribute [rw] search_results
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult>]
  #     The search results for this One Box.
  class OneBoxResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The type of One Box result.
    module OneBoxType
      # Default value. Should not be used.
      ONE_BOX_TYPE_UNSPECIFIED = 0

      # One Box result contains people results.
      PEOPLE = 1

      # One Box result contains organization results.
      ORGANIZATION = 2

      # One Box result contains slack results.
      SLACK = 3

      # One Box result contains Knowledge Graph search responses.
      KNOWLEDGE_GRAPH = 4
    end
  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

#facets::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Facet>

Returns Results of facets requested by user.

Returns:



1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
# File 'proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb', line 1646

class SearchResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents the search results.
  # @!attribute [rw] id
  #   @return [::String]
  #     {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id} of the
  #     searched {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}.
  # @!attribute [rw] document
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Document]
  #     The document data snippet in the search response. Only fields that are
  #     marked as `retrievable` are populated.
  # @!attribute [rw] chunk
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Chunk]
  #     The chunk data in the search response if the
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec#search_result_mode SearchRequest.ContentSearchSpec.search_result_mode}
  #     is set to
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS CHUNKS}.
  # @!attribute [r] model_scores
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1beta::DoubleList}]
  #     Output only. Google provided available scores.
  # @!attribute [rw] rank_signals
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals]
  #     Optional. A set of ranking signals associated with the result.
  class SearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A set of ranking signals.
    # @!attribute [rw] keyword_similarity_score
    #   @return [::Float]
    #     Optional. Keyword matching adjustment.
    # @!attribute [rw] relevance_score
    #   @return [::Float]
    #     Optional. Semantic relevance adjustment.
    # @!attribute [rw] semantic_similarity_score
    #   @return [::Float]
    #     Optional. Semantic similarity adjustment.
    # @!attribute [rw] pctr_rank
    #   @return [::Float]
    #     Optional. Predicted conversion rate adjustment as a rank.
    # @!attribute [rw] topicality_rank
    #   @return [::Float]
    #     Optional. Topicality adjustment as a rank.
    # @!attribute [rw] document_age
    #   @return [::Float]
    #     Optional. Age of the document in hours.
    # @!attribute [rw] boosting_factor
    #   @return [::Float]
    #     Optional. Combined custom boosts for a doc.
    # @!attribute [rw] default_rank
    #   @return [::Float]
    #     Optional. The default rank of the result.
    # @!attribute [rw] custom_signals
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals::CustomSignal>]
    #     Optional. A list of custom clearbox signals.
    # @!attribute [rw] precomputed_expression_values
    #   @return [::Array<::Float>]
    #     Optional. A list of precomputed expression results for a given
    #     document, in the same order as requested in
    #     `SearchRequest.custom_ranking_params.expressions_to_precompute`.
    class RankSignals
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Custom clearbox signal represented by name and value pair.
      # @!attribute [rw] name
      #   @return [::String]
      #     Optional. Name of the signal.
      # @!attribute [rw] value
      #   @return [::Float]
      #     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::V1beta::DoubleList]
    class ModelScoresEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A facet result.
  # @!attribute [rw] key
  #   @return [::String]
  #     The key for this facet. For example, `"colors"` or `"price"`. It matches
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#key SearchRequest.FacetSpec.FacetKey.key}.
  # @!attribute [rw] values
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Facet::FacetValue>]
  #     The facet values for this field.
  # @!attribute [rw] dynamic_facet
  #   @return [::Boolean]
  #     Whether the facet is dynamically generated.
  class Facet
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A facet value which contains value names and their count.
    # @!attribute [rw] value
    #   @return [::String]
    #     Text value of a facet, such as "Black" for facet "colors".
    #
    #     Note: The following fields are mutually exclusive: `value`, `interval`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] interval
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Interval]
    #     Interval value for a facet, such as [10, 20) for facet "price". It
    #     matches
    #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals}.
    #
    #     Note: The following fields are mutually exclusive: `interval`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] count
    #   @return [::Integer]
    #     Number of items that have this facet value.
    class FacetValue
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Guided search result. The guided search helps user to refine the search
  # results and narrow down to the real needs from a broaded search results.
  # @!attribute [rw] refinement_attributes
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::GuidedSearchResult::RefinementAttribute>]
  #     A list of ranked refinement attributes.
  # @!attribute [rw] follow_up_questions
  #   @return [::Array<::String>]
  #     Suggested follow-up questions.
  class GuidedSearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Useful attribute for search result refinements.
    # @!attribute [rw] attribute_key
    #   @return [::String]
    #     Attribute key used to refine the results. For example, `"movie_type"`.
    # @!attribute [rw] attribute_value
    #   @return [::String]
    #     Attribute value used to refine the results. For example, `"drama"`.
    class RefinementAttribute
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Summary of the top N search results specified by the summary spec.
  # @!attribute [rw] summary_text
  #   @return [::String]
  #     The summary content.
  # @!attribute [rw] summary_skipped_reasons
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummarySkippedReason>]
  #     Additional summary-skipped reasons. This provides the reason for ignored
  #     cases. If nothing is skipped, this field is not set.
  # @!attribute [rw] safety_attributes
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SafetyAttributes]
  #     A collection of Safety Attribute categories and their associated
  #     confidence scores.
  # @!attribute [rw] summary_with_metadata
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummaryWithMetadata]
  #     Summary with metadata information.
  class Summary
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Safety Attribute categories and their associated confidence scores.
    # @!attribute [rw] categories
    #   @return [::Array<::String>]
    #     The display names of Safety Attribute categories associated with the
    #     generated content. Order matches the Scores.
    # @!attribute [rw] scores
    #   @return [::Array<::Float>]
    #     The confidence scores of the each category, higher
    #     value means higher confidence. Order matches the Categories.
    class SafetyAttributes
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation metadata.
    # @!attribute [rw] citations
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Citation>]
    #     Citations for segments.
    class CitationMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation info for a segment.
    # @!attribute [rw] start_index
    #   @return [::Integer]
    #     Index indicates the start of the segment, measured in bytes/unicode.
    # @!attribute [rw] end_index
    #   @return [::Integer]
    #     End of the attributed segment, exclusive.
    # @!attribute [rw] sources
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::CitationSource>]
    #     Citation sources for the attributed segment.
    class Citation
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation source.
    # @!attribute [rw] reference_index
    #   @return [::Integer]
    #     Document reference index from SummaryWithMetadata.references.
    #     It is 0-indexed and the value will be zero if the reference_index is
    #     not set explicitly.
    class CitationSource
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Document reference.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title of the document.
    # @!attribute [rw] document
    #   @return [::String]
    #     Required.
    #     {::Google::Cloud::DiscoveryEngine::V1beta::Document#name Document.name} of
    #     the document. Full resource name of the referenced document, in the
    #     format
    #     `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
    # @!attribute [rw] uri
    #   @return [::String]
    #     Cloud Storage or HTTP uri for the document.
    # @!attribute [rw] chunk_contents
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Reference::ChunkContent>]
    #     List of cited chunk contents derived from document content.
    class Reference
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Chunk content.
      # @!attribute [rw] content
      #   @return [::String]
      #     Chunk textual content.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      # @!attribute [r] blob_attachment_indexes
      #   @return [::Array<::Integer>]
      #     Output only. Stores indexes of blobattachments linked to this chunk.
      class ChunkContent
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end

    # Stores binarydata attached to text answer, e.g. image, video, audio, etc.
    # @!attribute [r] data
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment::Blob]
    #     Output only. The blob data.
    # @!attribute [r] attribution_type
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment::AttributionType]
    #     Output only. The attribution type of the blob.
    class BlobAttachment
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Stores type and data of the blob.
      # @!attribute [r] mime_type
      #   @return [::String]
      #     Output only. The media type (MIME type) of the generated data.
      # @!attribute [r] data
      #   @return [::String]
      #     Output only. Raw bytes.
      class Blob
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Defines the attribution type of the blob.
      module AttributionType
        # Unspecified attribution type.
        ATTRIBUTION_TYPE_UNSPECIFIED = 0

        # The attachment data is from the corpus.
        CORPUS = 1

        # The attachment data is generated by the model through code
        # generation.
        GENERATED = 2
      end
    end

    # Summary with metadata information.
    # @!attribute [rw] summary
    #   @return [::String]
    #     Summary text with no citation information.
    # @!attribute [rw] citation_metadata
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::CitationMetadata]
    #     Citation metadata for given summary.
    # @!attribute [rw] references
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Reference>]
    #     Document References.
    # @!attribute [r] blob_attachments
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment>]
    #     Output only. Store multimodal data for answer enhancement.
    class SummaryWithMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # An Enum for summary-skipped reasons.
    module SummarySkippedReason
      # Default value. The summary skipped reason is not specified.
      SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0

      # The adversarial query ignored case.
      #
      # Only used when
      # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query}
      # is set to `true`.
      ADVERSARIAL_QUERY_IGNORED = 1

      # The non-summary seeking query ignored case.
      #
      # Google skips the summary if the query is chit chat.
      # Only used when
      # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query}
      # is set to `true`.
      NON_SUMMARY_SEEKING_QUERY_IGNORED = 2

      # The out-of-domain query ignored case.
      #
      # Google skips the summary if there are no high-relevance search results.
      # For example, the data store contains facts about company A but the
      # user query is asking questions about company B.
      OUT_OF_DOMAIN_QUERY_IGNORED = 3

      # The potential policy violation case.
      #
      # Google skips the summary if there is a potential policy violation
      # detected. This includes content that may be violent or toxic.
      POTENTIAL_POLICY_VIOLATION = 4

      # The LLM addon not enabled case.
      #
      # Google skips the summary if the LLM addon is not enabled.
      LLM_ADDON_NOT_ENABLED = 5

      # The no relevant content case.
      #
      # Google skips the summary if there is no relevant content in the
      # retrieved search results.
      NO_RELEVANT_CONTENT = 6

      # The jail-breaking query ignored case.
      #
      # For example, "Reply in the tone of a competing company's CEO".
      # Only used when
      # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query]
      # is set to `true`.
      JAIL_BREAKING_QUERY_IGNORED = 7

      # The customer policy violation case.
      #
      # Google skips the summary if there is a customer policy violation
      # detected. The policy is defined by the customer.
      CUSTOMER_POLICY_VIOLATION = 8

      # The non-answer seeking query ignored case.
      #
      # Google skips the summary if the query doesn't have clear intent.
      # Only used when
      # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query]
      # is set to `true`.
      NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9

      # The time out case.
      #
      # Google skips the summary if the time out.
      TIME_OUT = 10
    end
  end

  # Debug information specifically related to forward geocoding issues arising
  # from Geolocation Search.
  # @!attribute [rw] original_address_query
  #   @return [::String]
  #     The address from which forward geocoding ingestion produced issues.
  # @!attribute [rw] error_message
  #   @return [::String]
  #     The error produced.
  class GeoSearchDebugInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Information describing query expansion including whether expansion has
  # occurred.
  # @!attribute [rw] expanded_query
  #   @return [::Boolean]
  #     Bool describing whether query expansion has occurred.
  # @!attribute [rw] pinned_result_count
  #   @return [::Integer]
  #     Number of pinned results. This field will only be set when expansion
  #     happens and
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results}
  #     is set to true.
  class QueryExpansionInfo
    include ::Google::Protobuf::MessageExts
    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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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]
  #     Name of the session.
  #     If the auto-session mode is used (when
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#session SearchRequest.session}
  #     ends with "-"), this field holds the newly generated session name.
  # @!attribute [rw] query_id
  #   @return [::String]
  #     Query ID that corresponds to this search API call.
  #     One session can have multiple turns, each with a unique query ID.
  #
  #     By specifying the session name and this query ID in the Answer API call,
  #     the answer generation happens in the context of the search results from
  #     this search call.
  class SessionInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # OneBoxResult is a holder for all results of specific type that we want
  # to display in UI differently.
  # @!attribute [rw] one_box_type
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::OneBoxResult::OneBoxType]
  #     The type of One Box result.
  # @!attribute [rw] search_results
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult>]
  #     The search results for this One Box.
  class OneBoxResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The type of One Box result.
    module OneBoxType
      # Default value. Should not be used.
      ONE_BOX_TYPE_UNSPECIFIED = 0

      # One Box result contains people results.
      PEOPLE = 1

      # One Box result contains organization results.
      ORGANIZATION = 2

      # One Box result contains slack results.
      SLACK = 3

      # One Box result contains Knowledge Graph search responses.
      KNOWLEDGE_GRAPH = 4
    end
  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

#geo_search_debug_info::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::GeoSearchDebugInfo>



1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
# File 'proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb', line 1646

class SearchResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents the search results.
  # @!attribute [rw] id
  #   @return [::String]
  #     {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id} of the
  #     searched {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}.
  # @!attribute [rw] document
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Document]
  #     The document data snippet in the search response. Only fields that are
  #     marked as `retrievable` are populated.
  # @!attribute [rw] chunk
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Chunk]
  #     The chunk data in the search response if the
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec#search_result_mode SearchRequest.ContentSearchSpec.search_result_mode}
  #     is set to
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS CHUNKS}.
  # @!attribute [r] model_scores
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1beta::DoubleList}]
  #     Output only. Google provided available scores.
  # @!attribute [rw] rank_signals
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals]
  #     Optional. A set of ranking signals associated with the result.
  class SearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A set of ranking signals.
    # @!attribute [rw] keyword_similarity_score
    #   @return [::Float]
    #     Optional. Keyword matching adjustment.
    # @!attribute [rw] relevance_score
    #   @return [::Float]
    #     Optional. Semantic relevance adjustment.
    # @!attribute [rw] semantic_similarity_score
    #   @return [::Float]
    #     Optional. Semantic similarity adjustment.
    # @!attribute [rw] pctr_rank
    #   @return [::Float]
    #     Optional. Predicted conversion rate adjustment as a rank.
    # @!attribute [rw] topicality_rank
    #   @return [::Float]
    #     Optional. Topicality adjustment as a rank.
    # @!attribute [rw] document_age
    #   @return [::Float]
    #     Optional. Age of the document in hours.
    # @!attribute [rw] boosting_factor
    #   @return [::Float]
    #     Optional. Combined custom boosts for a doc.
    # @!attribute [rw] default_rank
    #   @return [::Float]
    #     Optional. The default rank of the result.
    # @!attribute [rw] custom_signals
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals::CustomSignal>]
    #     Optional. A list of custom clearbox signals.
    # @!attribute [rw] precomputed_expression_values
    #   @return [::Array<::Float>]
    #     Optional. A list of precomputed expression results for a given
    #     document, in the same order as requested in
    #     `SearchRequest.custom_ranking_params.expressions_to_precompute`.
    class RankSignals
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Custom clearbox signal represented by name and value pair.
      # @!attribute [rw] name
      #   @return [::String]
      #     Optional. Name of the signal.
      # @!attribute [rw] value
      #   @return [::Float]
      #     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::V1beta::DoubleList]
    class ModelScoresEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A facet result.
  # @!attribute [rw] key
  #   @return [::String]
  #     The key for this facet. For example, `"colors"` or `"price"`. It matches
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#key SearchRequest.FacetSpec.FacetKey.key}.
  # @!attribute [rw] values
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Facet::FacetValue>]
  #     The facet values for this field.
  # @!attribute [rw] dynamic_facet
  #   @return [::Boolean]
  #     Whether the facet is dynamically generated.
  class Facet
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A facet value which contains value names and their count.
    # @!attribute [rw] value
    #   @return [::String]
    #     Text value of a facet, such as "Black" for facet "colors".
    #
    #     Note: The following fields are mutually exclusive: `value`, `interval`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] interval
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Interval]
    #     Interval value for a facet, such as [10, 20) for facet "price". It
    #     matches
    #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals}.
    #
    #     Note: The following fields are mutually exclusive: `interval`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] count
    #   @return [::Integer]
    #     Number of items that have this facet value.
    class FacetValue
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Guided search result. The guided search helps user to refine the search
  # results and narrow down to the real needs from a broaded search results.
  # @!attribute [rw] refinement_attributes
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::GuidedSearchResult::RefinementAttribute>]
  #     A list of ranked refinement attributes.
  # @!attribute [rw] follow_up_questions
  #   @return [::Array<::String>]
  #     Suggested follow-up questions.
  class GuidedSearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Useful attribute for search result refinements.
    # @!attribute [rw] attribute_key
    #   @return [::String]
    #     Attribute key used to refine the results. For example, `"movie_type"`.
    # @!attribute [rw] attribute_value
    #   @return [::String]
    #     Attribute value used to refine the results. For example, `"drama"`.
    class RefinementAttribute
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Summary of the top N search results specified by the summary spec.
  # @!attribute [rw] summary_text
  #   @return [::String]
  #     The summary content.
  # @!attribute [rw] summary_skipped_reasons
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummarySkippedReason>]
  #     Additional summary-skipped reasons. This provides the reason for ignored
  #     cases. If nothing is skipped, this field is not set.
  # @!attribute [rw] safety_attributes
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SafetyAttributes]
  #     A collection of Safety Attribute categories and their associated
  #     confidence scores.
  # @!attribute [rw] summary_with_metadata
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummaryWithMetadata]
  #     Summary with metadata information.
  class Summary
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Safety Attribute categories and their associated confidence scores.
    # @!attribute [rw] categories
    #   @return [::Array<::String>]
    #     The display names of Safety Attribute categories associated with the
    #     generated content. Order matches the Scores.
    # @!attribute [rw] scores
    #   @return [::Array<::Float>]
    #     The confidence scores of the each category, higher
    #     value means higher confidence. Order matches the Categories.
    class SafetyAttributes
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation metadata.
    # @!attribute [rw] citations
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Citation>]
    #     Citations for segments.
    class CitationMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation info for a segment.
    # @!attribute [rw] start_index
    #   @return [::Integer]
    #     Index indicates the start of the segment, measured in bytes/unicode.
    # @!attribute [rw] end_index
    #   @return [::Integer]
    #     End of the attributed segment, exclusive.
    # @!attribute [rw] sources
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::CitationSource>]
    #     Citation sources for the attributed segment.
    class Citation
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation source.
    # @!attribute [rw] reference_index
    #   @return [::Integer]
    #     Document reference index from SummaryWithMetadata.references.
    #     It is 0-indexed and the value will be zero if the reference_index is
    #     not set explicitly.
    class CitationSource
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Document reference.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title of the document.
    # @!attribute [rw] document
    #   @return [::String]
    #     Required.
    #     {::Google::Cloud::DiscoveryEngine::V1beta::Document#name Document.name} of
    #     the document. Full resource name of the referenced document, in the
    #     format
    #     `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
    # @!attribute [rw] uri
    #   @return [::String]
    #     Cloud Storage or HTTP uri for the document.
    # @!attribute [rw] chunk_contents
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Reference::ChunkContent>]
    #     List of cited chunk contents derived from document content.
    class Reference
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Chunk content.
      # @!attribute [rw] content
      #   @return [::String]
      #     Chunk textual content.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      # @!attribute [r] blob_attachment_indexes
      #   @return [::Array<::Integer>]
      #     Output only. Stores indexes of blobattachments linked to this chunk.
      class ChunkContent
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end

    # Stores binarydata attached to text answer, e.g. image, video, audio, etc.
    # @!attribute [r] data
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment::Blob]
    #     Output only. The blob data.
    # @!attribute [r] attribution_type
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment::AttributionType]
    #     Output only. The attribution type of the blob.
    class BlobAttachment
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Stores type and data of the blob.
      # @!attribute [r] mime_type
      #   @return [::String]
      #     Output only. The media type (MIME type) of the generated data.
      # @!attribute [r] data
      #   @return [::String]
      #     Output only. Raw bytes.
      class Blob
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Defines the attribution type of the blob.
      module AttributionType
        # Unspecified attribution type.
        ATTRIBUTION_TYPE_UNSPECIFIED = 0

        # The attachment data is from the corpus.
        CORPUS = 1

        # The attachment data is generated by the model through code
        # generation.
        GENERATED = 2
      end
    end

    # Summary with metadata information.
    # @!attribute [rw] summary
    #   @return [::String]
    #     Summary text with no citation information.
    # @!attribute [rw] citation_metadata
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::CitationMetadata]
    #     Citation metadata for given summary.
    # @!attribute [rw] references
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Reference>]
    #     Document References.
    # @!attribute [r] blob_attachments
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment>]
    #     Output only. Store multimodal data for answer enhancement.
    class SummaryWithMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # An Enum for summary-skipped reasons.
    module SummarySkippedReason
      # Default value. The summary skipped reason is not specified.
      SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0

      # The adversarial query ignored case.
      #
      # Only used when
      # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query}
      # is set to `true`.
      ADVERSARIAL_QUERY_IGNORED = 1

      # The non-summary seeking query ignored case.
      #
      # Google skips the summary if the query is chit chat.
      # Only used when
      # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query}
      # is set to `true`.
      NON_SUMMARY_SEEKING_QUERY_IGNORED = 2

      # The out-of-domain query ignored case.
      #
      # Google skips the summary if there are no high-relevance search results.
      # For example, the data store contains facts about company A but the
      # user query is asking questions about company B.
      OUT_OF_DOMAIN_QUERY_IGNORED = 3

      # The potential policy violation case.
      #
      # Google skips the summary if there is a potential policy violation
      # detected. This includes content that may be violent or toxic.
      POTENTIAL_POLICY_VIOLATION = 4

      # The LLM addon not enabled case.
      #
      # Google skips the summary if the LLM addon is not enabled.
      LLM_ADDON_NOT_ENABLED = 5

      # The no relevant content case.
      #
      # Google skips the summary if there is no relevant content in the
      # retrieved search results.
      NO_RELEVANT_CONTENT = 6

      # The jail-breaking query ignored case.
      #
      # For example, "Reply in the tone of a competing company's CEO".
      # Only used when
      # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query]
      # is set to `true`.
      JAIL_BREAKING_QUERY_IGNORED = 7

      # The customer policy violation case.
      #
      # Google skips the summary if there is a customer policy violation
      # detected. The policy is defined by the customer.
      CUSTOMER_POLICY_VIOLATION = 8

      # The non-answer seeking query ignored case.
      #
      # Google skips the summary if the query doesn't have clear intent.
      # Only used when
      # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query]
      # is set to `true`.
      NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9

      # The time out case.
      #
      # Google skips the summary if the time out.
      TIME_OUT = 10
    end
  end

  # Debug information specifically related to forward geocoding issues arising
  # from Geolocation Search.
  # @!attribute [rw] original_address_query
  #   @return [::String]
  #     The address from which forward geocoding ingestion produced issues.
  # @!attribute [rw] error_message
  #   @return [::String]
  #     The error produced.
  class GeoSearchDebugInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Information describing query expansion including whether expansion has
  # occurred.
  # @!attribute [rw] expanded_query
  #   @return [::Boolean]
  #     Bool describing whether query expansion has occurred.
  # @!attribute [rw] pinned_result_count
  #   @return [::Integer]
  #     Number of pinned results. This field will only be set when expansion
  #     happens and
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results}
  #     is set to true.
  class QueryExpansionInfo
    include ::Google::Protobuf::MessageExts
    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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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]
  #     Name of the session.
  #     If the auto-session mode is used (when
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#session SearchRequest.session}
  #     ends with "-"), this field holds the newly generated session name.
  # @!attribute [rw] query_id
  #   @return [::String]
  #     Query ID that corresponds to this search API call.
  #     One session can have multiple turns, each with a unique query ID.
  #
  #     By specifying the session name and this query ID in the Answer API call,
  #     the answer generation happens in the context of the search results from
  #     this search call.
  class SessionInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # OneBoxResult is a holder for all results of specific type that we want
  # to display in UI differently.
  # @!attribute [rw] one_box_type
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::OneBoxResult::OneBoxType]
  #     The type of One Box result.
  # @!attribute [rw] search_results
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult>]
  #     The search results for this One Box.
  class OneBoxResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The type of One Box result.
    module OneBoxType
      # Default value. Should not be used.
      ONE_BOX_TYPE_UNSPECIFIED = 0

      # One Box result contains people results.
      PEOPLE = 1

      # One Box result contains organization results.
      ORGANIZATION = 2

      # One Box result contains slack results.
      SLACK = 3

      # One Box result contains Knowledge Graph search responses.
      KNOWLEDGE_GRAPH = 4
    end
  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

#guided_search_result::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::GuidedSearchResult

Returns Guided search result.



1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
# File 'proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb', line 1646

class SearchResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents the search results.
  # @!attribute [rw] id
  #   @return [::String]
  #     {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id} of the
  #     searched {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}.
  # @!attribute [rw] document
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Document]
  #     The document data snippet in the search response. Only fields that are
  #     marked as `retrievable` are populated.
  # @!attribute [rw] chunk
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Chunk]
  #     The chunk data in the search response if the
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec#search_result_mode SearchRequest.ContentSearchSpec.search_result_mode}
  #     is set to
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS CHUNKS}.
  # @!attribute [r] model_scores
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1beta::DoubleList}]
  #     Output only. Google provided available scores.
  # @!attribute [rw] rank_signals
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals]
  #     Optional. A set of ranking signals associated with the result.
  class SearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A set of ranking signals.
    # @!attribute [rw] keyword_similarity_score
    #   @return [::Float]
    #     Optional. Keyword matching adjustment.
    # @!attribute [rw] relevance_score
    #   @return [::Float]
    #     Optional. Semantic relevance adjustment.
    # @!attribute [rw] semantic_similarity_score
    #   @return [::Float]
    #     Optional. Semantic similarity adjustment.
    # @!attribute [rw] pctr_rank
    #   @return [::Float]
    #     Optional. Predicted conversion rate adjustment as a rank.
    # @!attribute [rw] topicality_rank
    #   @return [::Float]
    #     Optional. Topicality adjustment as a rank.
    # @!attribute [rw] document_age
    #   @return [::Float]
    #     Optional. Age of the document in hours.
    # @!attribute [rw] boosting_factor
    #   @return [::Float]
    #     Optional. Combined custom boosts for a doc.
    # @!attribute [rw] default_rank
    #   @return [::Float]
    #     Optional. The default rank of the result.
    # @!attribute [rw] custom_signals
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals::CustomSignal>]
    #     Optional. A list of custom clearbox signals.
    # @!attribute [rw] precomputed_expression_values
    #   @return [::Array<::Float>]
    #     Optional. A list of precomputed expression results for a given
    #     document, in the same order as requested in
    #     `SearchRequest.custom_ranking_params.expressions_to_precompute`.
    class RankSignals
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Custom clearbox signal represented by name and value pair.
      # @!attribute [rw] name
      #   @return [::String]
      #     Optional. Name of the signal.
      # @!attribute [rw] value
      #   @return [::Float]
      #     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::V1beta::DoubleList]
    class ModelScoresEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A facet result.
  # @!attribute [rw] key
  #   @return [::String]
  #     The key for this facet. For example, `"colors"` or `"price"`. It matches
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#key SearchRequest.FacetSpec.FacetKey.key}.
  # @!attribute [rw] values
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Facet::FacetValue>]
  #     The facet values for this field.
  # @!attribute [rw] dynamic_facet
  #   @return [::Boolean]
  #     Whether the facet is dynamically generated.
  class Facet
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A facet value which contains value names and their count.
    # @!attribute [rw] value
    #   @return [::String]
    #     Text value of a facet, such as "Black" for facet "colors".
    #
    #     Note: The following fields are mutually exclusive: `value`, `interval`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] interval
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Interval]
    #     Interval value for a facet, such as [10, 20) for facet "price". It
    #     matches
    #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals}.
    #
    #     Note: The following fields are mutually exclusive: `interval`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] count
    #   @return [::Integer]
    #     Number of items that have this facet value.
    class FacetValue
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Guided search result. The guided search helps user to refine the search
  # results and narrow down to the real needs from a broaded search results.
  # @!attribute [rw] refinement_attributes
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::GuidedSearchResult::RefinementAttribute>]
  #     A list of ranked refinement attributes.
  # @!attribute [rw] follow_up_questions
  #   @return [::Array<::String>]
  #     Suggested follow-up questions.
  class GuidedSearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Useful attribute for search result refinements.
    # @!attribute [rw] attribute_key
    #   @return [::String]
    #     Attribute key used to refine the results. For example, `"movie_type"`.
    # @!attribute [rw] attribute_value
    #   @return [::String]
    #     Attribute value used to refine the results. For example, `"drama"`.
    class RefinementAttribute
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Summary of the top N search results specified by the summary spec.
  # @!attribute [rw] summary_text
  #   @return [::String]
  #     The summary content.
  # @!attribute [rw] summary_skipped_reasons
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummarySkippedReason>]
  #     Additional summary-skipped reasons. This provides the reason for ignored
  #     cases. If nothing is skipped, this field is not set.
  # @!attribute [rw] safety_attributes
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SafetyAttributes]
  #     A collection of Safety Attribute categories and their associated
  #     confidence scores.
  # @!attribute [rw] summary_with_metadata
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummaryWithMetadata]
  #     Summary with metadata information.
  class Summary
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Safety Attribute categories and their associated confidence scores.
    # @!attribute [rw] categories
    #   @return [::Array<::String>]
    #     The display names of Safety Attribute categories associated with the
    #     generated content. Order matches the Scores.
    # @!attribute [rw] scores
    #   @return [::Array<::Float>]
    #     The confidence scores of the each category, higher
    #     value means higher confidence. Order matches the Categories.
    class SafetyAttributes
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation metadata.
    # @!attribute [rw] citations
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Citation>]
    #     Citations for segments.
    class CitationMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation info for a segment.
    # @!attribute [rw] start_index
    #   @return [::Integer]
    #     Index indicates the start of the segment, measured in bytes/unicode.
    # @!attribute [rw] end_index
    #   @return [::Integer]
    #     End of the attributed segment, exclusive.
    # @!attribute [rw] sources
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::CitationSource>]
    #     Citation sources for the attributed segment.
    class Citation
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation source.
    # @!attribute [rw] reference_index
    #   @return [::Integer]
    #     Document reference index from SummaryWithMetadata.references.
    #     It is 0-indexed and the value will be zero if the reference_index is
    #     not set explicitly.
    class CitationSource
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Document reference.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title of the document.
    # @!attribute [rw] document
    #   @return [::String]
    #     Required.
    #     {::Google::Cloud::DiscoveryEngine::V1beta::Document#name Document.name} of
    #     the document. Full resource name of the referenced document, in the
    #     format
    #     `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
    # @!attribute [rw] uri
    #   @return [::String]
    #     Cloud Storage or HTTP uri for the document.
    # @!attribute [rw] chunk_contents
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Reference::ChunkContent>]
    #     List of cited chunk contents derived from document content.
    class Reference
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Chunk content.
      # @!attribute [rw] content
      #   @return [::String]
      #     Chunk textual content.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      # @!attribute [r] blob_attachment_indexes
      #   @return [::Array<::Integer>]
      #     Output only. Stores indexes of blobattachments linked to this chunk.
      class ChunkContent
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end

    # Stores binarydata attached to text answer, e.g. image, video, audio, etc.
    # @!attribute [r] data
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment::Blob]
    #     Output only. The blob data.
    # @!attribute [r] attribution_type
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment::AttributionType]
    #     Output only. The attribution type of the blob.
    class BlobAttachment
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Stores type and data of the blob.
      # @!attribute [r] mime_type
      #   @return [::String]
      #     Output only. The media type (MIME type) of the generated data.
      # @!attribute [r] data
      #   @return [::String]
      #     Output only. Raw bytes.
      class Blob
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Defines the attribution type of the blob.
      module AttributionType
        # Unspecified attribution type.
        ATTRIBUTION_TYPE_UNSPECIFIED = 0

        # The attachment data is from the corpus.
        CORPUS = 1

        # The attachment data is generated by the model through code
        # generation.
        GENERATED = 2
      end
    end

    # Summary with metadata information.
    # @!attribute [rw] summary
    #   @return [::String]
    #     Summary text with no citation information.
    # @!attribute [rw] citation_metadata
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::CitationMetadata]
    #     Citation metadata for given summary.
    # @!attribute [rw] references
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Reference>]
    #     Document References.
    # @!attribute [r] blob_attachments
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment>]
    #     Output only. Store multimodal data for answer enhancement.
    class SummaryWithMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # An Enum for summary-skipped reasons.
    module SummarySkippedReason
      # Default value. The summary skipped reason is not specified.
      SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0

      # The adversarial query ignored case.
      #
      # Only used when
      # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query}
      # is set to `true`.
      ADVERSARIAL_QUERY_IGNORED = 1

      # The non-summary seeking query ignored case.
      #
      # Google skips the summary if the query is chit chat.
      # Only used when
      # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query}
      # is set to `true`.
      NON_SUMMARY_SEEKING_QUERY_IGNORED = 2

      # The out-of-domain query ignored case.
      #
      # Google skips the summary if there are no high-relevance search results.
      # For example, the data store contains facts about company A but the
      # user query is asking questions about company B.
      OUT_OF_DOMAIN_QUERY_IGNORED = 3

      # The potential policy violation case.
      #
      # Google skips the summary if there is a potential policy violation
      # detected. This includes content that may be violent or toxic.
      POTENTIAL_POLICY_VIOLATION = 4

      # The LLM addon not enabled case.
      #
      # Google skips the summary if the LLM addon is not enabled.
      LLM_ADDON_NOT_ENABLED = 5

      # The no relevant content case.
      #
      # Google skips the summary if there is no relevant content in the
      # retrieved search results.
      NO_RELEVANT_CONTENT = 6

      # The jail-breaking query ignored case.
      #
      # For example, "Reply in the tone of a competing company's CEO".
      # Only used when
      # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query]
      # is set to `true`.
      JAIL_BREAKING_QUERY_IGNORED = 7

      # The customer policy violation case.
      #
      # Google skips the summary if there is a customer policy violation
      # detected. The policy is defined by the customer.
      CUSTOMER_POLICY_VIOLATION = 8

      # The non-answer seeking query ignored case.
      #
      # Google skips the summary if the query doesn't have clear intent.
      # Only used when
      # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query]
      # is set to `true`.
      NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9

      # The time out case.
      #
      # Google skips the summary if the time out.
      TIME_OUT = 10
    end
  end

  # Debug information specifically related to forward geocoding issues arising
  # from Geolocation Search.
  # @!attribute [rw] original_address_query
  #   @return [::String]
  #     The address from which forward geocoding ingestion produced issues.
  # @!attribute [rw] error_message
  #   @return [::String]
  #     The error produced.
  class GeoSearchDebugInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Information describing query expansion including whether expansion has
  # occurred.
  # @!attribute [rw] expanded_query
  #   @return [::Boolean]
  #     Bool describing whether query expansion has occurred.
  # @!attribute [rw] pinned_result_count
  #   @return [::Integer]
  #     Number of pinned results. This field will only be set when expansion
  #     happens and
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results}
  #     is set to true.
  class QueryExpansionInfo
    include ::Google::Protobuf::MessageExts
    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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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]
  #     Name of the session.
  #     If the auto-session mode is used (when
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#session SearchRequest.session}
  #     ends with "-"), this field holds the newly generated session name.
  # @!attribute [rw] query_id
  #   @return [::String]
  #     Query ID that corresponds to this search API call.
  #     One session can have multiple turns, each with a unique query ID.
  #
  #     By specifying the session name and this query ID in the Answer API call,
  #     the answer generation happens in the context of the search results from
  #     this search call.
  class SessionInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # OneBoxResult is a holder for all results of specific type that we want
  # to display in UI differently.
  # @!attribute [rw] one_box_type
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::OneBoxResult::OneBoxType]
  #     The type of One Box result.
  # @!attribute [rw] search_results
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult>]
  #     The search results for this One Box.
  class OneBoxResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The type of One Box result.
    module OneBoxType
      # Default value. Should not be used.
      ONE_BOX_TYPE_UNSPECIFIED = 0

      # One Box result contains people results.
      PEOPLE = 1

      # One Box result contains organization results.
      ORGANIZATION = 2

      # One Box result contains slack results.
      SLACK = 3

      # One Box result contains Knowledge Graph search responses.
      KNOWLEDGE_GRAPH = 4
    end
  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

#natural_language_query_understanding_info::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::NaturalLanguageQueryUnderstandingInfo (readonly)

Output only. Natural language query understanding information for the returned results.

Returns:



1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
# File 'proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb', line 1646

class SearchResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents the search results.
  # @!attribute [rw] id
  #   @return [::String]
  #     {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id} of the
  #     searched {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}.
  # @!attribute [rw] document
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Document]
  #     The document data snippet in the search response. Only fields that are
  #     marked as `retrievable` are populated.
  # @!attribute [rw] chunk
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Chunk]
  #     The chunk data in the search response if the
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec#search_result_mode SearchRequest.ContentSearchSpec.search_result_mode}
  #     is set to
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS CHUNKS}.
  # @!attribute [r] model_scores
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1beta::DoubleList}]
  #     Output only. Google provided available scores.
  # @!attribute [rw] rank_signals
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals]
  #     Optional. A set of ranking signals associated with the result.
  class SearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A set of ranking signals.
    # @!attribute [rw] keyword_similarity_score
    #   @return [::Float]
    #     Optional. Keyword matching adjustment.
    # @!attribute [rw] relevance_score
    #   @return [::Float]
    #     Optional. Semantic relevance adjustment.
    # @!attribute [rw] semantic_similarity_score
    #   @return [::Float]
    #     Optional. Semantic similarity adjustment.
    # @!attribute [rw] pctr_rank
    #   @return [::Float]
    #     Optional. Predicted conversion rate adjustment as a rank.
    # @!attribute [rw] topicality_rank
    #   @return [::Float]
    #     Optional. Topicality adjustment as a rank.
    # @!attribute [rw] document_age
    #   @return [::Float]
    #     Optional. Age of the document in hours.
    # @!attribute [rw] boosting_factor
    #   @return [::Float]
    #     Optional. Combined custom boosts for a doc.
    # @!attribute [rw] default_rank
    #   @return [::Float]
    #     Optional. The default rank of the result.
    # @!attribute [rw] custom_signals
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals::CustomSignal>]
    #     Optional. A list of custom clearbox signals.
    # @!attribute [rw] precomputed_expression_values
    #   @return [::Array<::Float>]
    #     Optional. A list of precomputed expression results for a given
    #     document, in the same order as requested in
    #     `SearchRequest.custom_ranking_params.expressions_to_precompute`.
    class RankSignals
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Custom clearbox signal represented by name and value pair.
      # @!attribute [rw] name
      #   @return [::String]
      #     Optional. Name of the signal.
      # @!attribute [rw] value
      #   @return [::Float]
      #     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::V1beta::DoubleList]
    class ModelScoresEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A facet result.
  # @!attribute [rw] key
  #   @return [::String]
  #     The key for this facet. For example, `"colors"` or `"price"`. It matches
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#key SearchRequest.FacetSpec.FacetKey.key}.
  # @!attribute [rw] values
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Facet::FacetValue>]
  #     The facet values for this field.
  # @!attribute [rw] dynamic_facet
  #   @return [::Boolean]
  #     Whether the facet is dynamically generated.
  class Facet
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A facet value which contains value names and their count.
    # @!attribute [rw] value
    #   @return [::String]
    #     Text value of a facet, such as "Black" for facet "colors".
    #
    #     Note: The following fields are mutually exclusive: `value`, `interval`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] interval
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Interval]
    #     Interval value for a facet, such as [10, 20) for facet "price". It
    #     matches
    #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals}.
    #
    #     Note: The following fields are mutually exclusive: `interval`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] count
    #   @return [::Integer]
    #     Number of items that have this facet value.
    class FacetValue
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Guided search result. The guided search helps user to refine the search
  # results and narrow down to the real needs from a broaded search results.
  # @!attribute [rw] refinement_attributes
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::GuidedSearchResult::RefinementAttribute>]
  #     A list of ranked refinement attributes.
  # @!attribute [rw] follow_up_questions
  #   @return [::Array<::String>]
  #     Suggested follow-up questions.
  class GuidedSearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Useful attribute for search result refinements.
    # @!attribute [rw] attribute_key
    #   @return [::String]
    #     Attribute key used to refine the results. For example, `"movie_type"`.
    # @!attribute [rw] attribute_value
    #   @return [::String]
    #     Attribute value used to refine the results. For example, `"drama"`.
    class RefinementAttribute
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Summary of the top N search results specified by the summary spec.
  # @!attribute [rw] summary_text
  #   @return [::String]
  #     The summary content.
  # @!attribute [rw] summary_skipped_reasons
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummarySkippedReason>]
  #     Additional summary-skipped reasons. This provides the reason for ignored
  #     cases. If nothing is skipped, this field is not set.
  # @!attribute [rw] safety_attributes
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SafetyAttributes]
  #     A collection of Safety Attribute categories and their associated
  #     confidence scores.
  # @!attribute [rw] summary_with_metadata
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummaryWithMetadata]
  #     Summary with metadata information.
  class Summary
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Safety Attribute categories and their associated confidence scores.
    # @!attribute [rw] categories
    #   @return [::Array<::String>]
    #     The display names of Safety Attribute categories associated with the
    #     generated content. Order matches the Scores.
    # @!attribute [rw] scores
    #   @return [::Array<::Float>]
    #     The confidence scores of the each category, higher
    #     value means higher confidence. Order matches the Categories.
    class SafetyAttributes
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation metadata.
    # @!attribute [rw] citations
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Citation>]
    #     Citations for segments.
    class CitationMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation info for a segment.
    # @!attribute [rw] start_index
    #   @return [::Integer]
    #     Index indicates the start of the segment, measured in bytes/unicode.
    # @!attribute [rw] end_index
    #   @return [::Integer]
    #     End of the attributed segment, exclusive.
    # @!attribute [rw] sources
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::CitationSource>]
    #     Citation sources for the attributed segment.
    class Citation
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation source.
    # @!attribute [rw] reference_index
    #   @return [::Integer]
    #     Document reference index from SummaryWithMetadata.references.
    #     It is 0-indexed and the value will be zero if the reference_index is
    #     not set explicitly.
    class CitationSource
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Document reference.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title of the document.
    # @!attribute [rw] document
    #   @return [::String]
    #     Required.
    #     {::Google::Cloud::DiscoveryEngine::V1beta::Document#name Document.name} of
    #     the document. Full resource name of the referenced document, in the
    #     format
    #     `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
    # @!attribute [rw] uri
    #   @return [::String]
    #     Cloud Storage or HTTP uri for the document.
    # @!attribute [rw] chunk_contents
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Reference::ChunkContent>]
    #     List of cited chunk contents derived from document content.
    class Reference
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Chunk content.
      # @!attribute [rw] content
      #   @return [::String]
      #     Chunk textual content.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      # @!attribute [r] blob_attachment_indexes
      #   @return [::Array<::Integer>]
      #     Output only. Stores indexes of blobattachments linked to this chunk.
      class ChunkContent
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end

    # Stores binarydata attached to text answer, e.g. image, video, audio, etc.
    # @!attribute [r] data
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment::Blob]
    #     Output only. The blob data.
    # @!attribute [r] attribution_type
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment::AttributionType]
    #     Output only. The attribution type of the blob.
    class BlobAttachment
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Stores type and data of the blob.
      # @!attribute [r] mime_type
      #   @return [::String]
      #     Output only. The media type (MIME type) of the generated data.
      # @!attribute [r] data
      #   @return [::String]
      #     Output only. Raw bytes.
      class Blob
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Defines the attribution type of the blob.
      module AttributionType
        # Unspecified attribution type.
        ATTRIBUTION_TYPE_UNSPECIFIED = 0

        # The attachment data is from the corpus.
        CORPUS = 1

        # The attachment data is generated by the model through code
        # generation.
        GENERATED = 2
      end
    end

    # Summary with metadata information.
    # @!attribute [rw] summary
    #   @return [::String]
    #     Summary text with no citation information.
    # @!attribute [rw] citation_metadata
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::CitationMetadata]
    #     Citation metadata for given summary.
    # @!attribute [rw] references
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Reference>]
    #     Document References.
    # @!attribute [r] blob_attachments
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment>]
    #     Output only. Store multimodal data for answer enhancement.
    class SummaryWithMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # An Enum for summary-skipped reasons.
    module SummarySkippedReason
      # Default value. The summary skipped reason is not specified.
      SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0

      # The adversarial query ignored case.
      #
      # Only used when
      # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query}
      # is set to `true`.
      ADVERSARIAL_QUERY_IGNORED = 1

      # The non-summary seeking query ignored case.
      #
      # Google skips the summary if the query is chit chat.
      # Only used when
      # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query}
      # is set to `true`.
      NON_SUMMARY_SEEKING_QUERY_IGNORED = 2

      # The out-of-domain query ignored case.
      #
      # Google skips the summary if there are no high-relevance search results.
      # For example, the data store contains facts about company A but the
      # user query is asking questions about company B.
      OUT_OF_DOMAIN_QUERY_IGNORED = 3

      # The potential policy violation case.
      #
      # Google skips the summary if there is a potential policy violation
      # detected. This includes content that may be violent or toxic.
      POTENTIAL_POLICY_VIOLATION = 4

      # The LLM addon not enabled case.
      #
      # Google skips the summary if the LLM addon is not enabled.
      LLM_ADDON_NOT_ENABLED = 5

      # The no relevant content case.
      #
      # Google skips the summary if there is no relevant content in the
      # retrieved search results.
      NO_RELEVANT_CONTENT = 6

      # The jail-breaking query ignored case.
      #
      # For example, "Reply in the tone of a competing company's CEO".
      # Only used when
      # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query]
      # is set to `true`.
      JAIL_BREAKING_QUERY_IGNORED = 7

      # The customer policy violation case.
      #
      # Google skips the summary if there is a customer policy violation
      # detected. The policy is defined by the customer.
      CUSTOMER_POLICY_VIOLATION = 8

      # The non-answer seeking query ignored case.
      #
      # Google skips the summary if the query doesn't have clear intent.
      # Only used when
      # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query]
      # is set to `true`.
      NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9

      # The time out case.
      #
      # Google skips the summary if the time out.
      TIME_OUT = 10
    end
  end

  # Debug information specifically related to forward geocoding issues arising
  # from Geolocation Search.
  # @!attribute [rw] original_address_query
  #   @return [::String]
  #     The address from which forward geocoding ingestion produced issues.
  # @!attribute [rw] error_message
  #   @return [::String]
  #     The error produced.
  class GeoSearchDebugInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Information describing query expansion including whether expansion has
  # occurred.
  # @!attribute [rw] expanded_query
  #   @return [::Boolean]
  #     Bool describing whether query expansion has occurred.
  # @!attribute [rw] pinned_result_count
  #   @return [::Integer]
  #     Number of pinned results. This field will only be set when expansion
  #     happens and
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results}
  #     is set to true.
  class QueryExpansionInfo
    include ::Google::Protobuf::MessageExts
    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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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]
  #     Name of the session.
  #     If the auto-session mode is used (when
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#session SearchRequest.session}
  #     ends with "-"), this field holds the newly generated session name.
  # @!attribute [rw] query_id
  #   @return [::String]
  #     Query ID that corresponds to this search API call.
  #     One session can have multiple turns, each with a unique query ID.
  #
  #     By specifying the session name and this query ID in the Answer API call,
  #     the answer generation happens in the context of the search results from
  #     this search call.
  class SessionInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # OneBoxResult is a holder for all results of specific type that we want
  # to display in UI differently.
  # @!attribute [rw] one_box_type
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::OneBoxResult::OneBoxType]
  #     The type of One Box result.
  # @!attribute [rw] search_results
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult>]
  #     The search results for this One Box.
  class OneBoxResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The type of One Box result.
    module OneBoxType
      # Default value. Should not be used.
      ONE_BOX_TYPE_UNSPECIFIED = 0

      # One Box result contains people results.
      PEOPLE = 1

      # One Box result contains organization results.
      ORGANIZATION = 2

      # One Box result contains slack results.
      SLACK = 3

      # One Box result contains Knowledge Graph search responses.
      KNOWLEDGE_GRAPH = 4
    end
  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

#next_page_token::String

Returns A token that can be sent as SearchRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

Returns:

  • (::String)

    A token that can be sent as SearchRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.



1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
# File 'proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb', line 1646

class SearchResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents the search results.
  # @!attribute [rw] id
  #   @return [::String]
  #     {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id} of the
  #     searched {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}.
  # @!attribute [rw] document
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Document]
  #     The document data snippet in the search response. Only fields that are
  #     marked as `retrievable` are populated.
  # @!attribute [rw] chunk
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Chunk]
  #     The chunk data in the search response if the
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec#search_result_mode SearchRequest.ContentSearchSpec.search_result_mode}
  #     is set to
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS CHUNKS}.
  # @!attribute [r] model_scores
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1beta::DoubleList}]
  #     Output only. Google provided available scores.
  # @!attribute [rw] rank_signals
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals]
  #     Optional. A set of ranking signals associated with the result.
  class SearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A set of ranking signals.
    # @!attribute [rw] keyword_similarity_score
    #   @return [::Float]
    #     Optional. Keyword matching adjustment.
    # @!attribute [rw] relevance_score
    #   @return [::Float]
    #     Optional. Semantic relevance adjustment.
    # @!attribute [rw] semantic_similarity_score
    #   @return [::Float]
    #     Optional. Semantic similarity adjustment.
    # @!attribute [rw] pctr_rank
    #   @return [::Float]
    #     Optional. Predicted conversion rate adjustment as a rank.
    # @!attribute [rw] topicality_rank
    #   @return [::Float]
    #     Optional. Topicality adjustment as a rank.
    # @!attribute [rw] document_age
    #   @return [::Float]
    #     Optional. Age of the document in hours.
    # @!attribute [rw] boosting_factor
    #   @return [::Float]
    #     Optional. Combined custom boosts for a doc.
    # @!attribute [rw] default_rank
    #   @return [::Float]
    #     Optional. The default rank of the result.
    # @!attribute [rw] custom_signals
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals::CustomSignal>]
    #     Optional. A list of custom clearbox signals.
    # @!attribute [rw] precomputed_expression_values
    #   @return [::Array<::Float>]
    #     Optional. A list of precomputed expression results for a given
    #     document, in the same order as requested in
    #     `SearchRequest.custom_ranking_params.expressions_to_precompute`.
    class RankSignals
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Custom clearbox signal represented by name and value pair.
      # @!attribute [rw] name
      #   @return [::String]
      #     Optional. Name of the signal.
      # @!attribute [rw] value
      #   @return [::Float]
      #     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::V1beta::DoubleList]
    class ModelScoresEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A facet result.
  # @!attribute [rw] key
  #   @return [::String]
  #     The key for this facet. For example, `"colors"` or `"price"`. It matches
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#key SearchRequest.FacetSpec.FacetKey.key}.
  # @!attribute [rw] values
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Facet::FacetValue>]
  #     The facet values for this field.
  # @!attribute [rw] dynamic_facet
  #   @return [::Boolean]
  #     Whether the facet is dynamically generated.
  class Facet
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A facet value which contains value names and their count.
    # @!attribute [rw] value
    #   @return [::String]
    #     Text value of a facet, such as "Black" for facet "colors".
    #
    #     Note: The following fields are mutually exclusive: `value`, `interval`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] interval
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Interval]
    #     Interval value for a facet, such as [10, 20) for facet "price". It
    #     matches
    #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals}.
    #
    #     Note: The following fields are mutually exclusive: `interval`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] count
    #   @return [::Integer]
    #     Number of items that have this facet value.
    class FacetValue
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Guided search result. The guided search helps user to refine the search
  # results and narrow down to the real needs from a broaded search results.
  # @!attribute [rw] refinement_attributes
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::GuidedSearchResult::RefinementAttribute>]
  #     A list of ranked refinement attributes.
  # @!attribute [rw] follow_up_questions
  #   @return [::Array<::String>]
  #     Suggested follow-up questions.
  class GuidedSearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Useful attribute for search result refinements.
    # @!attribute [rw] attribute_key
    #   @return [::String]
    #     Attribute key used to refine the results. For example, `"movie_type"`.
    # @!attribute [rw] attribute_value
    #   @return [::String]
    #     Attribute value used to refine the results. For example, `"drama"`.
    class RefinementAttribute
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Summary of the top N search results specified by the summary spec.
  # @!attribute [rw] summary_text
  #   @return [::String]
  #     The summary content.
  # @!attribute [rw] summary_skipped_reasons
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummarySkippedReason>]
  #     Additional summary-skipped reasons. This provides the reason for ignored
  #     cases. If nothing is skipped, this field is not set.
  # @!attribute [rw] safety_attributes
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SafetyAttributes]
  #     A collection of Safety Attribute categories and their associated
  #     confidence scores.
  # @!attribute [rw] summary_with_metadata
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummaryWithMetadata]
  #     Summary with metadata information.
  class Summary
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Safety Attribute categories and their associated confidence scores.
    # @!attribute [rw] categories
    #   @return [::Array<::String>]
    #     The display names of Safety Attribute categories associated with the
    #     generated content. Order matches the Scores.
    # @!attribute [rw] scores
    #   @return [::Array<::Float>]
    #     The confidence scores of the each category, higher
    #     value means higher confidence. Order matches the Categories.
    class SafetyAttributes
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation metadata.
    # @!attribute [rw] citations
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Citation>]
    #     Citations for segments.
    class CitationMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation info for a segment.
    # @!attribute [rw] start_index
    #   @return [::Integer]
    #     Index indicates the start of the segment, measured in bytes/unicode.
    # @!attribute [rw] end_index
    #   @return [::Integer]
    #     End of the attributed segment, exclusive.
    # @!attribute [rw] sources
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::CitationSource>]
    #     Citation sources for the attributed segment.
    class Citation
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation source.
    # @!attribute [rw] reference_index
    #   @return [::Integer]
    #     Document reference index from SummaryWithMetadata.references.
    #     It is 0-indexed and the value will be zero if the reference_index is
    #     not set explicitly.
    class CitationSource
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Document reference.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title of the document.
    # @!attribute [rw] document
    #   @return [::String]
    #     Required.
    #     {::Google::Cloud::DiscoveryEngine::V1beta::Document#name Document.name} of
    #     the document. Full resource name of the referenced document, in the
    #     format
    #     `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
    # @!attribute [rw] uri
    #   @return [::String]
    #     Cloud Storage or HTTP uri for the document.
    # @!attribute [rw] chunk_contents
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Reference::ChunkContent>]
    #     List of cited chunk contents derived from document content.
    class Reference
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Chunk content.
      # @!attribute [rw] content
      #   @return [::String]
      #     Chunk textual content.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      # @!attribute [r] blob_attachment_indexes
      #   @return [::Array<::Integer>]
      #     Output only. Stores indexes of blobattachments linked to this chunk.
      class ChunkContent
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end

    # Stores binarydata attached to text answer, e.g. image, video, audio, etc.
    # @!attribute [r] data
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment::Blob]
    #     Output only. The blob data.
    # @!attribute [r] attribution_type
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment::AttributionType]
    #     Output only. The attribution type of the blob.
    class BlobAttachment
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Stores type and data of the blob.
      # @!attribute [r] mime_type
      #   @return [::String]
      #     Output only. The media type (MIME type) of the generated data.
      # @!attribute [r] data
      #   @return [::String]
      #     Output only. Raw bytes.
      class Blob
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Defines the attribution type of the blob.
      module AttributionType
        # Unspecified attribution type.
        ATTRIBUTION_TYPE_UNSPECIFIED = 0

        # The attachment data is from the corpus.
        CORPUS = 1

        # The attachment data is generated by the model through code
        # generation.
        GENERATED = 2
      end
    end

    # Summary with metadata information.
    # @!attribute [rw] summary
    #   @return [::String]
    #     Summary text with no citation information.
    # @!attribute [rw] citation_metadata
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::CitationMetadata]
    #     Citation metadata for given summary.
    # @!attribute [rw] references
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Reference>]
    #     Document References.
    # @!attribute [r] blob_attachments
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment>]
    #     Output only. Store multimodal data for answer enhancement.
    class SummaryWithMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # An Enum for summary-skipped reasons.
    module SummarySkippedReason
      # Default value. The summary skipped reason is not specified.
      SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0

      # The adversarial query ignored case.
      #
      # Only used when
      # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query}
      # is set to `true`.
      ADVERSARIAL_QUERY_IGNORED = 1

      # The non-summary seeking query ignored case.
      #
      # Google skips the summary if the query is chit chat.
      # Only used when
      # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query}
      # is set to `true`.
      NON_SUMMARY_SEEKING_QUERY_IGNORED = 2

      # The out-of-domain query ignored case.
      #
      # Google skips the summary if there are no high-relevance search results.
      # For example, the data store contains facts about company A but the
      # user query is asking questions about company B.
      OUT_OF_DOMAIN_QUERY_IGNORED = 3

      # The potential policy violation case.
      #
      # Google skips the summary if there is a potential policy violation
      # detected. This includes content that may be violent or toxic.
      POTENTIAL_POLICY_VIOLATION = 4

      # The LLM addon not enabled case.
      #
      # Google skips the summary if the LLM addon is not enabled.
      LLM_ADDON_NOT_ENABLED = 5

      # The no relevant content case.
      #
      # Google skips the summary if there is no relevant content in the
      # retrieved search results.
      NO_RELEVANT_CONTENT = 6

      # The jail-breaking query ignored case.
      #
      # For example, "Reply in the tone of a competing company's CEO".
      # Only used when
      # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query]
      # is set to `true`.
      JAIL_BREAKING_QUERY_IGNORED = 7

      # The customer policy violation case.
      #
      # Google skips the summary if there is a customer policy violation
      # detected. The policy is defined by the customer.
      CUSTOMER_POLICY_VIOLATION = 8

      # The non-answer seeking query ignored case.
      #
      # Google skips the summary if the query doesn't have clear intent.
      # Only used when
      # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query]
      # is set to `true`.
      NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9

      # The time out case.
      #
      # Google skips the summary if the time out.
      TIME_OUT = 10
    end
  end

  # Debug information specifically related to forward geocoding issues arising
  # from Geolocation Search.
  # @!attribute [rw] original_address_query
  #   @return [::String]
  #     The address from which forward geocoding ingestion produced issues.
  # @!attribute [rw] error_message
  #   @return [::String]
  #     The error produced.
  class GeoSearchDebugInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Information describing query expansion including whether expansion has
  # occurred.
  # @!attribute [rw] expanded_query
  #   @return [::Boolean]
  #     Bool describing whether query expansion has occurred.
  # @!attribute [rw] pinned_result_count
  #   @return [::Integer]
  #     Number of pinned results. This field will only be set when expansion
  #     happens and
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results}
  #     is set to true.
  class QueryExpansionInfo
    include ::Google::Protobuf::MessageExts
    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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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]
  #     Name of the session.
  #     If the auto-session mode is used (when
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#session SearchRequest.session}
  #     ends with "-"), this field holds the newly generated session name.
  # @!attribute [rw] query_id
  #   @return [::String]
  #     Query ID that corresponds to this search API call.
  #     One session can have multiple turns, each with a unique query ID.
  #
  #     By specifying the session name and this query ID in the Answer API call,
  #     the answer generation happens in the context of the search results from
  #     this search call.
  class SessionInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # OneBoxResult is a holder for all results of specific type that we want
  # to display in UI differently.
  # @!attribute [rw] one_box_type
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::OneBoxResult::OneBoxType]
  #     The type of One Box result.
  # @!attribute [rw] search_results
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult>]
  #     The search results for this One Box.
  class OneBoxResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The type of One Box result.
    module OneBoxType
      # Default value. Should not be used.
      ONE_BOX_TYPE_UNSPECIFIED = 0

      # One Box result contains people results.
      PEOPLE = 1

      # One Box result contains organization results.
      ORGANIZATION = 2

      # One Box result contains slack results.
      SLACK = 3

      # One Box result contains Knowledge Graph search responses.
      KNOWLEDGE_GRAPH = 4
    end
  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

#one_box_results::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::OneBoxResult>

Returns A list of One Box results. There can be multiple One Box results of different types.

Returns:



1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
# File 'proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb', line 1646

class SearchResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents the search results.
  # @!attribute [rw] id
  #   @return [::String]
  #     {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id} of the
  #     searched {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}.
  # @!attribute [rw] document
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Document]
  #     The document data snippet in the search response. Only fields that are
  #     marked as `retrievable` are populated.
  # @!attribute [rw] chunk
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Chunk]
  #     The chunk data in the search response if the
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec#search_result_mode SearchRequest.ContentSearchSpec.search_result_mode}
  #     is set to
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS CHUNKS}.
  # @!attribute [r] model_scores
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1beta::DoubleList}]
  #     Output only. Google provided available scores.
  # @!attribute [rw] rank_signals
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals]
  #     Optional. A set of ranking signals associated with the result.
  class SearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A set of ranking signals.
    # @!attribute [rw] keyword_similarity_score
    #   @return [::Float]
    #     Optional. Keyword matching adjustment.
    # @!attribute [rw] relevance_score
    #   @return [::Float]
    #     Optional. Semantic relevance adjustment.
    # @!attribute [rw] semantic_similarity_score
    #   @return [::Float]
    #     Optional. Semantic similarity adjustment.
    # @!attribute [rw] pctr_rank
    #   @return [::Float]
    #     Optional. Predicted conversion rate adjustment as a rank.
    # @!attribute [rw] topicality_rank
    #   @return [::Float]
    #     Optional. Topicality adjustment as a rank.
    # @!attribute [rw] document_age
    #   @return [::Float]
    #     Optional. Age of the document in hours.
    # @!attribute [rw] boosting_factor
    #   @return [::Float]
    #     Optional. Combined custom boosts for a doc.
    # @!attribute [rw] default_rank
    #   @return [::Float]
    #     Optional. The default rank of the result.
    # @!attribute [rw] custom_signals
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals::CustomSignal>]
    #     Optional. A list of custom clearbox signals.
    # @!attribute [rw] precomputed_expression_values
    #   @return [::Array<::Float>]
    #     Optional. A list of precomputed expression results for a given
    #     document, in the same order as requested in
    #     `SearchRequest.custom_ranking_params.expressions_to_precompute`.
    class RankSignals
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Custom clearbox signal represented by name and value pair.
      # @!attribute [rw] name
      #   @return [::String]
      #     Optional. Name of the signal.
      # @!attribute [rw] value
      #   @return [::Float]
      #     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::V1beta::DoubleList]
    class ModelScoresEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A facet result.
  # @!attribute [rw] key
  #   @return [::String]
  #     The key for this facet. For example, `"colors"` or `"price"`. It matches
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#key SearchRequest.FacetSpec.FacetKey.key}.
  # @!attribute [rw] values
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Facet::FacetValue>]
  #     The facet values for this field.
  # @!attribute [rw] dynamic_facet
  #   @return [::Boolean]
  #     Whether the facet is dynamically generated.
  class Facet
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A facet value which contains value names and their count.
    # @!attribute [rw] value
    #   @return [::String]
    #     Text value of a facet, such as "Black" for facet "colors".
    #
    #     Note: The following fields are mutually exclusive: `value`, `interval`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] interval
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Interval]
    #     Interval value for a facet, such as [10, 20) for facet "price". It
    #     matches
    #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals}.
    #
    #     Note: The following fields are mutually exclusive: `interval`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] count
    #   @return [::Integer]
    #     Number of items that have this facet value.
    class FacetValue
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Guided search result. The guided search helps user to refine the search
  # results and narrow down to the real needs from a broaded search results.
  # @!attribute [rw] refinement_attributes
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::GuidedSearchResult::RefinementAttribute>]
  #     A list of ranked refinement attributes.
  # @!attribute [rw] follow_up_questions
  #   @return [::Array<::String>]
  #     Suggested follow-up questions.
  class GuidedSearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Useful attribute for search result refinements.
    # @!attribute [rw] attribute_key
    #   @return [::String]
    #     Attribute key used to refine the results. For example, `"movie_type"`.
    # @!attribute [rw] attribute_value
    #   @return [::String]
    #     Attribute value used to refine the results. For example, `"drama"`.
    class RefinementAttribute
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Summary of the top N search results specified by the summary spec.
  # @!attribute [rw] summary_text
  #   @return [::String]
  #     The summary content.
  # @!attribute [rw] summary_skipped_reasons
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummarySkippedReason>]
  #     Additional summary-skipped reasons. This provides the reason for ignored
  #     cases. If nothing is skipped, this field is not set.
  # @!attribute [rw] safety_attributes
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SafetyAttributes]
  #     A collection of Safety Attribute categories and their associated
  #     confidence scores.
  # @!attribute [rw] summary_with_metadata
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummaryWithMetadata]
  #     Summary with metadata information.
  class Summary
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Safety Attribute categories and their associated confidence scores.
    # @!attribute [rw] categories
    #   @return [::Array<::String>]
    #     The display names of Safety Attribute categories associated with the
    #     generated content. Order matches the Scores.
    # @!attribute [rw] scores
    #   @return [::Array<::Float>]
    #     The confidence scores of the each category, higher
    #     value means higher confidence. Order matches the Categories.
    class SafetyAttributes
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation metadata.
    # @!attribute [rw] citations
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Citation>]
    #     Citations for segments.
    class CitationMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation info for a segment.
    # @!attribute [rw] start_index
    #   @return [::Integer]
    #     Index indicates the start of the segment, measured in bytes/unicode.
    # @!attribute [rw] end_index
    #   @return [::Integer]
    #     End of the attributed segment, exclusive.
    # @!attribute [rw] sources
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::CitationSource>]
    #     Citation sources for the attributed segment.
    class Citation
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation source.
    # @!attribute [rw] reference_index
    #   @return [::Integer]
    #     Document reference index from SummaryWithMetadata.references.
    #     It is 0-indexed and the value will be zero if the reference_index is
    #     not set explicitly.
    class CitationSource
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Document reference.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title of the document.
    # @!attribute [rw] document
    #   @return [::String]
    #     Required.
    #     {::Google::Cloud::DiscoveryEngine::V1beta::Document#name Document.name} of
    #     the document. Full resource name of the referenced document, in the
    #     format
    #     `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
    # @!attribute [rw] uri
    #   @return [::String]
    #     Cloud Storage or HTTP uri for the document.
    # @!attribute [rw] chunk_contents
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Reference::ChunkContent>]
    #     List of cited chunk contents derived from document content.
    class Reference
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Chunk content.
      # @!attribute [rw] content
      #   @return [::String]
      #     Chunk textual content.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      # @!attribute [r] blob_attachment_indexes
      #   @return [::Array<::Integer>]
      #     Output only. Stores indexes of blobattachments linked to this chunk.
      class ChunkContent
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end

    # Stores binarydata attached to text answer, e.g. image, video, audio, etc.
    # @!attribute [r] data
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment::Blob]
    #     Output only. The blob data.
    # @!attribute [r] attribution_type
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment::AttributionType]
    #     Output only. The attribution type of the blob.
    class BlobAttachment
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Stores type and data of the blob.
      # @!attribute [r] mime_type
      #   @return [::String]
      #     Output only. The media type (MIME type) of the generated data.
      # @!attribute [r] data
      #   @return [::String]
      #     Output only. Raw bytes.
      class Blob
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Defines the attribution type of the blob.
      module AttributionType
        # Unspecified attribution type.
        ATTRIBUTION_TYPE_UNSPECIFIED = 0

        # The attachment data is from the corpus.
        CORPUS = 1

        # The attachment data is generated by the model through code
        # generation.
        GENERATED = 2
      end
    end

    # Summary with metadata information.
    # @!attribute [rw] summary
    #   @return [::String]
    #     Summary text with no citation information.
    # @!attribute [rw] citation_metadata
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::CitationMetadata]
    #     Citation metadata for given summary.
    # @!attribute [rw] references
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Reference>]
    #     Document References.
    # @!attribute [r] blob_attachments
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment>]
    #     Output only. Store multimodal data for answer enhancement.
    class SummaryWithMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # An Enum for summary-skipped reasons.
    module SummarySkippedReason
      # Default value. The summary skipped reason is not specified.
      SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0

      # The adversarial query ignored case.
      #
      # Only used when
      # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query}
      # is set to `true`.
      ADVERSARIAL_QUERY_IGNORED = 1

      # The non-summary seeking query ignored case.
      #
      # Google skips the summary if the query is chit chat.
      # Only used when
      # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query}
      # is set to `true`.
      NON_SUMMARY_SEEKING_QUERY_IGNORED = 2

      # The out-of-domain query ignored case.
      #
      # Google skips the summary if there are no high-relevance search results.
      # For example, the data store contains facts about company A but the
      # user query is asking questions about company B.
      OUT_OF_DOMAIN_QUERY_IGNORED = 3

      # The potential policy violation case.
      #
      # Google skips the summary if there is a potential policy violation
      # detected. This includes content that may be violent or toxic.
      POTENTIAL_POLICY_VIOLATION = 4

      # The LLM addon not enabled case.
      #
      # Google skips the summary if the LLM addon is not enabled.
      LLM_ADDON_NOT_ENABLED = 5

      # The no relevant content case.
      #
      # Google skips the summary if there is no relevant content in the
      # retrieved search results.
      NO_RELEVANT_CONTENT = 6

      # The jail-breaking query ignored case.
      #
      # For example, "Reply in the tone of a competing company's CEO".
      # Only used when
      # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query]
      # is set to `true`.
      JAIL_BREAKING_QUERY_IGNORED = 7

      # The customer policy violation case.
      #
      # Google skips the summary if there is a customer policy violation
      # detected. The policy is defined by the customer.
      CUSTOMER_POLICY_VIOLATION = 8

      # The non-answer seeking query ignored case.
      #
      # Google skips the summary if the query doesn't have clear intent.
      # Only used when
      # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query]
      # is set to `true`.
      NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9

      # The time out case.
      #
      # Google skips the summary if the time out.
      TIME_OUT = 10
    end
  end

  # Debug information specifically related to forward geocoding issues arising
  # from Geolocation Search.
  # @!attribute [rw] original_address_query
  #   @return [::String]
  #     The address from which forward geocoding ingestion produced issues.
  # @!attribute [rw] error_message
  #   @return [::String]
  #     The error produced.
  class GeoSearchDebugInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Information describing query expansion including whether expansion has
  # occurred.
  # @!attribute [rw] expanded_query
  #   @return [::Boolean]
  #     Bool describing whether query expansion has occurred.
  # @!attribute [rw] pinned_result_count
  #   @return [::Integer]
  #     Number of pinned results. This field will only be set when expansion
  #     happens and
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results}
  #     is set to true.
  class QueryExpansionInfo
    include ::Google::Protobuf::MessageExts
    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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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]
  #     Name of the session.
  #     If the auto-session mode is used (when
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#session SearchRequest.session}
  #     ends with "-"), this field holds the newly generated session name.
  # @!attribute [rw] query_id
  #   @return [::String]
  #     Query ID that corresponds to this search API call.
  #     One session can have multiple turns, each with a unique query ID.
  #
  #     By specifying the session name and this query ID in the Answer API call,
  #     the answer generation happens in the context of the search results from
  #     this search call.
  class SessionInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # OneBoxResult is a holder for all results of specific type that we want
  # to display in UI differently.
  # @!attribute [rw] one_box_type
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::OneBoxResult::OneBoxType]
  #     The type of One Box result.
  # @!attribute [rw] search_results
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult>]
  #     The search results for this One Box.
  class OneBoxResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The type of One Box result.
    module OneBoxType
      # Default value. Should not be used.
      ONE_BOX_TYPE_UNSPECIFIED = 0

      # One Box result contains people results.
      PEOPLE = 1

      # One Box result contains organization results.
      ORGANIZATION = 2

      # One Box result contains slack results.
      SLACK = 3

      # One Box result contains Knowledge Graph search responses.
      KNOWLEDGE_GRAPH = 4
    end
  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

#query_expansion_info::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::QueryExpansionInfo

Returns Query expansion information for the returned results.

Returns:



1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
# File 'proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb', line 1646

class SearchResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents the search results.
  # @!attribute [rw] id
  #   @return [::String]
  #     {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id} of the
  #     searched {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}.
  # @!attribute [rw] document
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Document]
  #     The document data snippet in the search response. Only fields that are
  #     marked as `retrievable` are populated.
  # @!attribute [rw] chunk
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Chunk]
  #     The chunk data in the search response if the
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec#search_result_mode SearchRequest.ContentSearchSpec.search_result_mode}
  #     is set to
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS CHUNKS}.
  # @!attribute [r] model_scores
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1beta::DoubleList}]
  #     Output only. Google provided available scores.
  # @!attribute [rw] rank_signals
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals]
  #     Optional. A set of ranking signals associated with the result.
  class SearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A set of ranking signals.
    # @!attribute [rw] keyword_similarity_score
    #   @return [::Float]
    #     Optional. Keyword matching adjustment.
    # @!attribute [rw] relevance_score
    #   @return [::Float]
    #     Optional. Semantic relevance adjustment.
    # @!attribute [rw] semantic_similarity_score
    #   @return [::Float]
    #     Optional. Semantic similarity adjustment.
    # @!attribute [rw] pctr_rank
    #   @return [::Float]
    #     Optional. Predicted conversion rate adjustment as a rank.
    # @!attribute [rw] topicality_rank
    #   @return [::Float]
    #     Optional. Topicality adjustment as a rank.
    # @!attribute [rw] document_age
    #   @return [::Float]
    #     Optional. Age of the document in hours.
    # @!attribute [rw] boosting_factor
    #   @return [::Float]
    #     Optional. Combined custom boosts for a doc.
    # @!attribute [rw] default_rank
    #   @return [::Float]
    #     Optional. The default rank of the result.
    # @!attribute [rw] custom_signals
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals::CustomSignal>]
    #     Optional. A list of custom clearbox signals.
    # @!attribute [rw] precomputed_expression_values
    #   @return [::Array<::Float>]
    #     Optional. A list of precomputed expression results for a given
    #     document, in the same order as requested in
    #     `SearchRequest.custom_ranking_params.expressions_to_precompute`.
    class RankSignals
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Custom clearbox signal represented by name and value pair.
      # @!attribute [rw] name
      #   @return [::String]
      #     Optional. Name of the signal.
      # @!attribute [rw] value
      #   @return [::Float]
      #     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::V1beta::DoubleList]
    class ModelScoresEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A facet result.
  # @!attribute [rw] key
  #   @return [::String]
  #     The key for this facet. For example, `"colors"` or `"price"`. It matches
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#key SearchRequest.FacetSpec.FacetKey.key}.
  # @!attribute [rw] values
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Facet::FacetValue>]
  #     The facet values for this field.
  # @!attribute [rw] dynamic_facet
  #   @return [::Boolean]
  #     Whether the facet is dynamically generated.
  class Facet
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A facet value which contains value names and their count.
    # @!attribute [rw] value
    #   @return [::String]
    #     Text value of a facet, such as "Black" for facet "colors".
    #
    #     Note: The following fields are mutually exclusive: `value`, `interval`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] interval
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Interval]
    #     Interval value for a facet, such as [10, 20) for facet "price". It
    #     matches
    #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals}.
    #
    #     Note: The following fields are mutually exclusive: `interval`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] count
    #   @return [::Integer]
    #     Number of items that have this facet value.
    class FacetValue
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Guided search result. The guided search helps user to refine the search
  # results and narrow down to the real needs from a broaded search results.
  # @!attribute [rw] refinement_attributes
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::GuidedSearchResult::RefinementAttribute>]
  #     A list of ranked refinement attributes.
  # @!attribute [rw] follow_up_questions
  #   @return [::Array<::String>]
  #     Suggested follow-up questions.
  class GuidedSearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Useful attribute for search result refinements.
    # @!attribute [rw] attribute_key
    #   @return [::String]
    #     Attribute key used to refine the results. For example, `"movie_type"`.
    # @!attribute [rw] attribute_value
    #   @return [::String]
    #     Attribute value used to refine the results. For example, `"drama"`.
    class RefinementAttribute
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Summary of the top N search results specified by the summary spec.
  # @!attribute [rw] summary_text
  #   @return [::String]
  #     The summary content.
  # @!attribute [rw] summary_skipped_reasons
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummarySkippedReason>]
  #     Additional summary-skipped reasons. This provides the reason for ignored
  #     cases. If nothing is skipped, this field is not set.
  # @!attribute [rw] safety_attributes
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SafetyAttributes]
  #     A collection of Safety Attribute categories and their associated
  #     confidence scores.
  # @!attribute [rw] summary_with_metadata
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummaryWithMetadata]
  #     Summary with metadata information.
  class Summary
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Safety Attribute categories and their associated confidence scores.
    # @!attribute [rw] categories
    #   @return [::Array<::String>]
    #     The display names of Safety Attribute categories associated with the
    #     generated content. Order matches the Scores.
    # @!attribute [rw] scores
    #   @return [::Array<::Float>]
    #     The confidence scores of the each category, higher
    #     value means higher confidence. Order matches the Categories.
    class SafetyAttributes
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation metadata.
    # @!attribute [rw] citations
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Citation>]
    #     Citations for segments.
    class CitationMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation info for a segment.
    # @!attribute [rw] start_index
    #   @return [::Integer]
    #     Index indicates the start of the segment, measured in bytes/unicode.
    # @!attribute [rw] end_index
    #   @return [::Integer]
    #     End of the attributed segment, exclusive.
    # @!attribute [rw] sources
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::CitationSource>]
    #     Citation sources for the attributed segment.
    class Citation
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation source.
    # @!attribute [rw] reference_index
    #   @return [::Integer]
    #     Document reference index from SummaryWithMetadata.references.
    #     It is 0-indexed and the value will be zero if the reference_index is
    #     not set explicitly.
    class CitationSource
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Document reference.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title of the document.
    # @!attribute [rw] document
    #   @return [::String]
    #     Required.
    #     {::Google::Cloud::DiscoveryEngine::V1beta::Document#name Document.name} of
    #     the document. Full resource name of the referenced document, in the
    #     format
    #     `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
    # @!attribute [rw] uri
    #   @return [::String]
    #     Cloud Storage or HTTP uri for the document.
    # @!attribute [rw] chunk_contents
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Reference::ChunkContent>]
    #     List of cited chunk contents derived from document content.
    class Reference
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Chunk content.
      # @!attribute [rw] content
      #   @return [::String]
      #     Chunk textual content.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      # @!attribute [r] blob_attachment_indexes
      #   @return [::Array<::Integer>]
      #     Output only. Stores indexes of blobattachments linked to this chunk.
      class ChunkContent
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end

    # Stores binarydata attached to text answer, e.g. image, video, audio, etc.
    # @!attribute [r] data
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment::Blob]
    #     Output only. The blob data.
    # @!attribute [r] attribution_type
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment::AttributionType]
    #     Output only. The attribution type of the blob.
    class BlobAttachment
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Stores type and data of the blob.
      # @!attribute [r] mime_type
      #   @return [::String]
      #     Output only. The media type (MIME type) of the generated data.
      # @!attribute [r] data
      #   @return [::String]
      #     Output only. Raw bytes.
      class Blob
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Defines the attribution type of the blob.
      module AttributionType
        # Unspecified attribution type.
        ATTRIBUTION_TYPE_UNSPECIFIED = 0

        # The attachment data is from the corpus.
        CORPUS = 1

        # The attachment data is generated by the model through code
        # generation.
        GENERATED = 2
      end
    end

    # Summary with metadata information.
    # @!attribute [rw] summary
    #   @return [::String]
    #     Summary text with no citation information.
    # @!attribute [rw] citation_metadata
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::CitationMetadata]
    #     Citation metadata for given summary.
    # @!attribute [rw] references
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Reference>]
    #     Document References.
    # @!attribute [r] blob_attachments
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment>]
    #     Output only. Store multimodal data for answer enhancement.
    class SummaryWithMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # An Enum for summary-skipped reasons.
    module SummarySkippedReason
      # Default value. The summary skipped reason is not specified.
      SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0

      # The adversarial query ignored case.
      #
      # Only used when
      # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query}
      # is set to `true`.
      ADVERSARIAL_QUERY_IGNORED = 1

      # The non-summary seeking query ignored case.
      #
      # Google skips the summary if the query is chit chat.
      # Only used when
      # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query}
      # is set to `true`.
      NON_SUMMARY_SEEKING_QUERY_IGNORED = 2

      # The out-of-domain query ignored case.
      #
      # Google skips the summary if there are no high-relevance search results.
      # For example, the data store contains facts about company A but the
      # user query is asking questions about company B.
      OUT_OF_DOMAIN_QUERY_IGNORED = 3

      # The potential policy violation case.
      #
      # Google skips the summary if there is a potential policy violation
      # detected. This includes content that may be violent or toxic.
      POTENTIAL_POLICY_VIOLATION = 4

      # The LLM addon not enabled case.
      #
      # Google skips the summary if the LLM addon is not enabled.
      LLM_ADDON_NOT_ENABLED = 5

      # The no relevant content case.
      #
      # Google skips the summary if there is no relevant content in the
      # retrieved search results.
      NO_RELEVANT_CONTENT = 6

      # The jail-breaking query ignored case.
      #
      # For example, "Reply in the tone of a competing company's CEO".
      # Only used when
      # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query]
      # is set to `true`.
      JAIL_BREAKING_QUERY_IGNORED = 7

      # The customer policy violation case.
      #
      # Google skips the summary if there is a customer policy violation
      # detected. The policy is defined by the customer.
      CUSTOMER_POLICY_VIOLATION = 8

      # The non-answer seeking query ignored case.
      #
      # Google skips the summary if the query doesn't have clear intent.
      # Only used when
      # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query]
      # is set to `true`.
      NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9

      # The time out case.
      #
      # Google skips the summary if the time out.
      TIME_OUT = 10
    end
  end

  # Debug information specifically related to forward geocoding issues arising
  # from Geolocation Search.
  # @!attribute [rw] original_address_query
  #   @return [::String]
  #     The address from which forward geocoding ingestion produced issues.
  # @!attribute [rw] error_message
  #   @return [::String]
  #     The error produced.
  class GeoSearchDebugInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Information describing query expansion including whether expansion has
  # occurred.
  # @!attribute [rw] expanded_query
  #   @return [::Boolean]
  #     Bool describing whether query expansion has occurred.
  # @!attribute [rw] pinned_result_count
  #   @return [::Integer]
  #     Number of pinned results. This field will only be set when expansion
  #     happens and
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results}
  #     is set to true.
  class QueryExpansionInfo
    include ::Google::Protobuf::MessageExts
    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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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]
  #     Name of the session.
  #     If the auto-session mode is used (when
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#session SearchRequest.session}
  #     ends with "-"), this field holds the newly generated session name.
  # @!attribute [rw] query_id
  #   @return [::String]
  #     Query ID that corresponds to this search API call.
  #     One session can have multiple turns, each with a unique query ID.
  #
  #     By specifying the session name and this query ID in the Answer API call,
  #     the answer generation happens in the context of the search results from
  #     this search call.
  class SessionInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # OneBoxResult is a holder for all results of specific type that we want
  # to display in UI differently.
  # @!attribute [rw] one_box_type
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::OneBoxResult::OneBoxType]
  #     The type of One Box result.
  # @!attribute [rw] search_results
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult>]
  #     The search results for this One Box.
  class OneBoxResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The type of One Box result.
    module OneBoxType
      # Default value. Should not be used.
      ONE_BOX_TYPE_UNSPECIFIED = 0

      # One Box result contains people results.
      PEOPLE = 1

      # One Box result contains organization results.
      ORGANIZATION = 2

      # One Box result contains slack results.
      SLACK = 3

      # One Box result contains Knowledge Graph search responses.
      KNOWLEDGE_GRAPH = 4
    end
  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

#redirect_uri::String

Returns The URI of a customer-defined redirect page. If redirect action is triggered, no search is performed, and only redirect_uri and attribution_token are set in the response.

Returns:

  • (::String)

    The URI of a customer-defined redirect page. If redirect action is triggered, no search is performed, and only redirect_uri and attribution_token are set in the response.



1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
# File 'proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb', line 1646

class SearchResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents the search results.
  # @!attribute [rw] id
  #   @return [::String]
  #     {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id} of the
  #     searched {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}.
  # @!attribute [rw] document
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Document]
  #     The document data snippet in the search response. Only fields that are
  #     marked as `retrievable` are populated.
  # @!attribute [rw] chunk
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Chunk]
  #     The chunk data in the search response if the
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec#search_result_mode SearchRequest.ContentSearchSpec.search_result_mode}
  #     is set to
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS CHUNKS}.
  # @!attribute [r] model_scores
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1beta::DoubleList}]
  #     Output only. Google provided available scores.
  # @!attribute [rw] rank_signals
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals]
  #     Optional. A set of ranking signals associated with the result.
  class SearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A set of ranking signals.
    # @!attribute [rw] keyword_similarity_score
    #   @return [::Float]
    #     Optional. Keyword matching adjustment.
    # @!attribute [rw] relevance_score
    #   @return [::Float]
    #     Optional. Semantic relevance adjustment.
    # @!attribute [rw] semantic_similarity_score
    #   @return [::Float]
    #     Optional. Semantic similarity adjustment.
    # @!attribute [rw] pctr_rank
    #   @return [::Float]
    #     Optional. Predicted conversion rate adjustment as a rank.
    # @!attribute [rw] topicality_rank
    #   @return [::Float]
    #     Optional. Topicality adjustment as a rank.
    # @!attribute [rw] document_age
    #   @return [::Float]
    #     Optional. Age of the document in hours.
    # @!attribute [rw] boosting_factor
    #   @return [::Float]
    #     Optional. Combined custom boosts for a doc.
    # @!attribute [rw] default_rank
    #   @return [::Float]
    #     Optional. The default rank of the result.
    # @!attribute [rw] custom_signals
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals::CustomSignal>]
    #     Optional. A list of custom clearbox signals.
    # @!attribute [rw] precomputed_expression_values
    #   @return [::Array<::Float>]
    #     Optional. A list of precomputed expression results for a given
    #     document, in the same order as requested in
    #     `SearchRequest.custom_ranking_params.expressions_to_precompute`.
    class RankSignals
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Custom clearbox signal represented by name and value pair.
      # @!attribute [rw] name
      #   @return [::String]
      #     Optional. Name of the signal.
      # @!attribute [rw] value
      #   @return [::Float]
      #     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::V1beta::DoubleList]
    class ModelScoresEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A facet result.
  # @!attribute [rw] key
  #   @return [::String]
  #     The key for this facet. For example, `"colors"` or `"price"`. It matches
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#key SearchRequest.FacetSpec.FacetKey.key}.
  # @!attribute [rw] values
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Facet::FacetValue>]
  #     The facet values for this field.
  # @!attribute [rw] dynamic_facet
  #   @return [::Boolean]
  #     Whether the facet is dynamically generated.
  class Facet
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A facet value which contains value names and their count.
    # @!attribute [rw] value
    #   @return [::String]
    #     Text value of a facet, such as "Black" for facet "colors".
    #
    #     Note: The following fields are mutually exclusive: `value`, `interval`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] interval
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Interval]
    #     Interval value for a facet, such as [10, 20) for facet "price". It
    #     matches
    #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals}.
    #
    #     Note: The following fields are mutually exclusive: `interval`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] count
    #   @return [::Integer]
    #     Number of items that have this facet value.
    class FacetValue
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Guided search result. The guided search helps user to refine the search
  # results and narrow down to the real needs from a broaded search results.
  # @!attribute [rw] refinement_attributes
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::GuidedSearchResult::RefinementAttribute>]
  #     A list of ranked refinement attributes.
  # @!attribute [rw] follow_up_questions
  #   @return [::Array<::String>]
  #     Suggested follow-up questions.
  class GuidedSearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Useful attribute for search result refinements.
    # @!attribute [rw] attribute_key
    #   @return [::String]
    #     Attribute key used to refine the results. For example, `"movie_type"`.
    # @!attribute [rw] attribute_value
    #   @return [::String]
    #     Attribute value used to refine the results. For example, `"drama"`.
    class RefinementAttribute
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Summary of the top N search results specified by the summary spec.
  # @!attribute [rw] summary_text
  #   @return [::String]
  #     The summary content.
  # @!attribute [rw] summary_skipped_reasons
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummarySkippedReason>]
  #     Additional summary-skipped reasons. This provides the reason for ignored
  #     cases. If nothing is skipped, this field is not set.
  # @!attribute [rw] safety_attributes
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SafetyAttributes]
  #     A collection of Safety Attribute categories and their associated
  #     confidence scores.
  # @!attribute [rw] summary_with_metadata
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummaryWithMetadata]
  #     Summary with metadata information.
  class Summary
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Safety Attribute categories and their associated confidence scores.
    # @!attribute [rw] categories
    #   @return [::Array<::String>]
    #     The display names of Safety Attribute categories associated with the
    #     generated content. Order matches the Scores.
    # @!attribute [rw] scores
    #   @return [::Array<::Float>]
    #     The confidence scores of the each category, higher
    #     value means higher confidence. Order matches the Categories.
    class SafetyAttributes
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation metadata.
    # @!attribute [rw] citations
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Citation>]
    #     Citations for segments.
    class CitationMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation info for a segment.
    # @!attribute [rw] start_index
    #   @return [::Integer]
    #     Index indicates the start of the segment, measured in bytes/unicode.
    # @!attribute [rw] end_index
    #   @return [::Integer]
    #     End of the attributed segment, exclusive.
    # @!attribute [rw] sources
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::CitationSource>]
    #     Citation sources for the attributed segment.
    class Citation
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation source.
    # @!attribute [rw] reference_index
    #   @return [::Integer]
    #     Document reference index from SummaryWithMetadata.references.
    #     It is 0-indexed and the value will be zero if the reference_index is
    #     not set explicitly.
    class CitationSource
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Document reference.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title of the document.
    # @!attribute [rw] document
    #   @return [::String]
    #     Required.
    #     {::Google::Cloud::DiscoveryEngine::V1beta::Document#name Document.name} of
    #     the document. Full resource name of the referenced document, in the
    #     format
    #     `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
    # @!attribute [rw] uri
    #   @return [::String]
    #     Cloud Storage or HTTP uri for the document.
    # @!attribute [rw] chunk_contents
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Reference::ChunkContent>]
    #     List of cited chunk contents derived from document content.
    class Reference
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Chunk content.
      # @!attribute [rw] content
      #   @return [::String]
      #     Chunk textual content.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      # @!attribute [r] blob_attachment_indexes
      #   @return [::Array<::Integer>]
      #     Output only. Stores indexes of blobattachments linked to this chunk.
      class ChunkContent
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end

    # Stores binarydata attached to text answer, e.g. image, video, audio, etc.
    # @!attribute [r] data
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment::Blob]
    #     Output only. The blob data.
    # @!attribute [r] attribution_type
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment::AttributionType]
    #     Output only. The attribution type of the blob.
    class BlobAttachment
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Stores type and data of the blob.
      # @!attribute [r] mime_type
      #   @return [::String]
      #     Output only. The media type (MIME type) of the generated data.
      # @!attribute [r] data
      #   @return [::String]
      #     Output only. Raw bytes.
      class Blob
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Defines the attribution type of the blob.
      module AttributionType
        # Unspecified attribution type.
        ATTRIBUTION_TYPE_UNSPECIFIED = 0

        # The attachment data is from the corpus.
        CORPUS = 1

        # The attachment data is generated by the model through code
        # generation.
        GENERATED = 2
      end
    end

    # Summary with metadata information.
    # @!attribute [rw] summary
    #   @return [::String]
    #     Summary text with no citation information.
    # @!attribute [rw] citation_metadata
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::CitationMetadata]
    #     Citation metadata for given summary.
    # @!attribute [rw] references
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Reference>]
    #     Document References.
    # @!attribute [r] blob_attachments
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment>]
    #     Output only. Store multimodal data for answer enhancement.
    class SummaryWithMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # An Enum for summary-skipped reasons.
    module SummarySkippedReason
      # Default value. The summary skipped reason is not specified.
      SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0

      # The adversarial query ignored case.
      #
      # Only used when
      # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query}
      # is set to `true`.
      ADVERSARIAL_QUERY_IGNORED = 1

      # The non-summary seeking query ignored case.
      #
      # Google skips the summary if the query is chit chat.
      # Only used when
      # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query}
      # is set to `true`.
      NON_SUMMARY_SEEKING_QUERY_IGNORED = 2

      # The out-of-domain query ignored case.
      #
      # Google skips the summary if there are no high-relevance search results.
      # For example, the data store contains facts about company A but the
      # user query is asking questions about company B.
      OUT_OF_DOMAIN_QUERY_IGNORED = 3

      # The potential policy violation case.
      #
      # Google skips the summary if there is a potential policy violation
      # detected. This includes content that may be violent or toxic.
      POTENTIAL_POLICY_VIOLATION = 4

      # The LLM addon not enabled case.
      #
      # Google skips the summary if the LLM addon is not enabled.
      LLM_ADDON_NOT_ENABLED = 5

      # The no relevant content case.
      #
      # Google skips the summary if there is no relevant content in the
      # retrieved search results.
      NO_RELEVANT_CONTENT = 6

      # The jail-breaking query ignored case.
      #
      # For example, "Reply in the tone of a competing company's CEO".
      # Only used when
      # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query]
      # is set to `true`.
      JAIL_BREAKING_QUERY_IGNORED = 7

      # The customer policy violation case.
      #
      # Google skips the summary if there is a customer policy violation
      # detected. The policy is defined by the customer.
      CUSTOMER_POLICY_VIOLATION = 8

      # The non-answer seeking query ignored case.
      #
      # Google skips the summary if the query doesn't have clear intent.
      # Only used when
      # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query]
      # is set to `true`.
      NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9

      # The time out case.
      #
      # Google skips the summary if the time out.
      TIME_OUT = 10
    end
  end

  # Debug information specifically related to forward geocoding issues arising
  # from Geolocation Search.
  # @!attribute [rw] original_address_query
  #   @return [::String]
  #     The address from which forward geocoding ingestion produced issues.
  # @!attribute [rw] error_message
  #   @return [::String]
  #     The error produced.
  class GeoSearchDebugInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Information describing query expansion including whether expansion has
  # occurred.
  # @!attribute [rw] expanded_query
  #   @return [::Boolean]
  #     Bool describing whether query expansion has occurred.
  # @!attribute [rw] pinned_result_count
  #   @return [::Integer]
  #     Number of pinned results. This field will only be set when expansion
  #     happens and
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results}
  #     is set to true.
  class QueryExpansionInfo
    include ::Google::Protobuf::MessageExts
    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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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]
  #     Name of the session.
  #     If the auto-session mode is used (when
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#session SearchRequest.session}
  #     ends with "-"), this field holds the newly generated session name.
  # @!attribute [rw] query_id
  #   @return [::String]
  #     Query ID that corresponds to this search API call.
  #     One session can have multiple turns, each with a unique query ID.
  #
  #     By specifying the session name and this query ID in the Answer API call,
  #     the answer generation happens in the context of the search results from
  #     this search call.
  class SessionInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # OneBoxResult is a holder for all results of specific type that we want
  # to display in UI differently.
  # @!attribute [rw] one_box_type
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::OneBoxResult::OneBoxType]
  #     The type of One Box result.
  # @!attribute [rw] search_results
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult>]
  #     The search results for this One Box.
  class OneBoxResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The type of One Box result.
    module OneBoxType
      # Default value. Should not be used.
      ONE_BOX_TYPE_UNSPECIFIED = 0

      # One Box result contains people results.
      PEOPLE = 1

      # One Box result contains organization results.
      ORGANIZATION = 2

      # One Box result contains slack results.
      SLACK = 3

      # One Box result contains Knowledge Graph search responses.
      KNOWLEDGE_GRAPH = 4
    end
  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

#results::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult>

Returns A list of matched documents. The order represents the ranking.

Returns:



1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
# File 'proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb', line 1646

class SearchResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents the search results.
  # @!attribute [rw] id
  #   @return [::String]
  #     {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id} of the
  #     searched {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}.
  # @!attribute [rw] document
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Document]
  #     The document data snippet in the search response. Only fields that are
  #     marked as `retrievable` are populated.
  # @!attribute [rw] chunk
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Chunk]
  #     The chunk data in the search response if the
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec#search_result_mode SearchRequest.ContentSearchSpec.search_result_mode}
  #     is set to
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS CHUNKS}.
  # @!attribute [r] model_scores
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1beta::DoubleList}]
  #     Output only. Google provided available scores.
  # @!attribute [rw] rank_signals
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals]
  #     Optional. A set of ranking signals associated with the result.
  class SearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A set of ranking signals.
    # @!attribute [rw] keyword_similarity_score
    #   @return [::Float]
    #     Optional. Keyword matching adjustment.
    # @!attribute [rw] relevance_score
    #   @return [::Float]
    #     Optional. Semantic relevance adjustment.
    # @!attribute [rw] semantic_similarity_score
    #   @return [::Float]
    #     Optional. Semantic similarity adjustment.
    # @!attribute [rw] pctr_rank
    #   @return [::Float]
    #     Optional. Predicted conversion rate adjustment as a rank.
    # @!attribute [rw] topicality_rank
    #   @return [::Float]
    #     Optional. Topicality adjustment as a rank.
    # @!attribute [rw] document_age
    #   @return [::Float]
    #     Optional. Age of the document in hours.
    # @!attribute [rw] boosting_factor
    #   @return [::Float]
    #     Optional. Combined custom boosts for a doc.
    # @!attribute [rw] default_rank
    #   @return [::Float]
    #     Optional. The default rank of the result.
    # @!attribute [rw] custom_signals
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals::CustomSignal>]
    #     Optional. A list of custom clearbox signals.
    # @!attribute [rw] precomputed_expression_values
    #   @return [::Array<::Float>]
    #     Optional. A list of precomputed expression results for a given
    #     document, in the same order as requested in
    #     `SearchRequest.custom_ranking_params.expressions_to_precompute`.
    class RankSignals
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Custom clearbox signal represented by name and value pair.
      # @!attribute [rw] name
      #   @return [::String]
      #     Optional. Name of the signal.
      # @!attribute [rw] value
      #   @return [::Float]
      #     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::V1beta::DoubleList]
    class ModelScoresEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A facet result.
  # @!attribute [rw] key
  #   @return [::String]
  #     The key for this facet. For example, `"colors"` or `"price"`. It matches
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#key SearchRequest.FacetSpec.FacetKey.key}.
  # @!attribute [rw] values
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Facet::FacetValue>]
  #     The facet values for this field.
  # @!attribute [rw] dynamic_facet
  #   @return [::Boolean]
  #     Whether the facet is dynamically generated.
  class Facet
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A facet value which contains value names and their count.
    # @!attribute [rw] value
    #   @return [::String]
    #     Text value of a facet, such as "Black" for facet "colors".
    #
    #     Note: The following fields are mutually exclusive: `value`, `interval`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] interval
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Interval]
    #     Interval value for a facet, such as [10, 20) for facet "price". It
    #     matches
    #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals}.
    #
    #     Note: The following fields are mutually exclusive: `interval`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] count
    #   @return [::Integer]
    #     Number of items that have this facet value.
    class FacetValue
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Guided search result. The guided search helps user to refine the search
  # results and narrow down to the real needs from a broaded search results.
  # @!attribute [rw] refinement_attributes
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::GuidedSearchResult::RefinementAttribute>]
  #     A list of ranked refinement attributes.
  # @!attribute [rw] follow_up_questions
  #   @return [::Array<::String>]
  #     Suggested follow-up questions.
  class GuidedSearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Useful attribute for search result refinements.
    # @!attribute [rw] attribute_key
    #   @return [::String]
    #     Attribute key used to refine the results. For example, `"movie_type"`.
    # @!attribute [rw] attribute_value
    #   @return [::String]
    #     Attribute value used to refine the results. For example, `"drama"`.
    class RefinementAttribute
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Summary of the top N search results specified by the summary spec.
  # @!attribute [rw] summary_text
  #   @return [::String]
  #     The summary content.
  # @!attribute [rw] summary_skipped_reasons
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummarySkippedReason>]
  #     Additional summary-skipped reasons. This provides the reason for ignored
  #     cases. If nothing is skipped, this field is not set.
  # @!attribute [rw] safety_attributes
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SafetyAttributes]
  #     A collection of Safety Attribute categories and their associated
  #     confidence scores.
  # @!attribute [rw] summary_with_metadata
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummaryWithMetadata]
  #     Summary with metadata information.
  class Summary
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Safety Attribute categories and their associated confidence scores.
    # @!attribute [rw] categories
    #   @return [::Array<::String>]
    #     The display names of Safety Attribute categories associated with the
    #     generated content. Order matches the Scores.
    # @!attribute [rw] scores
    #   @return [::Array<::Float>]
    #     The confidence scores of the each category, higher
    #     value means higher confidence. Order matches the Categories.
    class SafetyAttributes
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation metadata.
    # @!attribute [rw] citations
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Citation>]
    #     Citations for segments.
    class CitationMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation info for a segment.
    # @!attribute [rw] start_index
    #   @return [::Integer]
    #     Index indicates the start of the segment, measured in bytes/unicode.
    # @!attribute [rw] end_index
    #   @return [::Integer]
    #     End of the attributed segment, exclusive.
    # @!attribute [rw] sources
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::CitationSource>]
    #     Citation sources for the attributed segment.
    class Citation
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation source.
    # @!attribute [rw] reference_index
    #   @return [::Integer]
    #     Document reference index from SummaryWithMetadata.references.
    #     It is 0-indexed and the value will be zero if the reference_index is
    #     not set explicitly.
    class CitationSource
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Document reference.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title of the document.
    # @!attribute [rw] document
    #   @return [::String]
    #     Required.
    #     {::Google::Cloud::DiscoveryEngine::V1beta::Document#name Document.name} of
    #     the document. Full resource name of the referenced document, in the
    #     format
    #     `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
    # @!attribute [rw] uri
    #   @return [::String]
    #     Cloud Storage or HTTP uri for the document.
    # @!attribute [rw] chunk_contents
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Reference::ChunkContent>]
    #     List of cited chunk contents derived from document content.
    class Reference
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Chunk content.
      # @!attribute [rw] content
      #   @return [::String]
      #     Chunk textual content.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      # @!attribute [r] blob_attachment_indexes
      #   @return [::Array<::Integer>]
      #     Output only. Stores indexes of blobattachments linked to this chunk.
      class ChunkContent
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end

    # Stores binarydata attached to text answer, e.g. image, video, audio, etc.
    # @!attribute [r] data
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment::Blob]
    #     Output only. The blob data.
    # @!attribute [r] attribution_type
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment::AttributionType]
    #     Output only. The attribution type of the blob.
    class BlobAttachment
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Stores type and data of the blob.
      # @!attribute [r] mime_type
      #   @return [::String]
      #     Output only. The media type (MIME type) of the generated data.
      # @!attribute [r] data
      #   @return [::String]
      #     Output only. Raw bytes.
      class Blob
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Defines the attribution type of the blob.
      module AttributionType
        # Unspecified attribution type.
        ATTRIBUTION_TYPE_UNSPECIFIED = 0

        # The attachment data is from the corpus.
        CORPUS = 1

        # The attachment data is generated by the model through code
        # generation.
        GENERATED = 2
      end
    end

    # Summary with metadata information.
    # @!attribute [rw] summary
    #   @return [::String]
    #     Summary text with no citation information.
    # @!attribute [rw] citation_metadata
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::CitationMetadata]
    #     Citation metadata for given summary.
    # @!attribute [rw] references
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Reference>]
    #     Document References.
    # @!attribute [r] blob_attachments
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment>]
    #     Output only. Store multimodal data for answer enhancement.
    class SummaryWithMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # An Enum for summary-skipped reasons.
    module SummarySkippedReason
      # Default value. The summary skipped reason is not specified.
      SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0

      # The adversarial query ignored case.
      #
      # Only used when
      # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query}
      # is set to `true`.
      ADVERSARIAL_QUERY_IGNORED = 1

      # The non-summary seeking query ignored case.
      #
      # Google skips the summary if the query is chit chat.
      # Only used when
      # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query}
      # is set to `true`.
      NON_SUMMARY_SEEKING_QUERY_IGNORED = 2

      # The out-of-domain query ignored case.
      #
      # Google skips the summary if there are no high-relevance search results.
      # For example, the data store contains facts about company A but the
      # user query is asking questions about company B.
      OUT_OF_DOMAIN_QUERY_IGNORED = 3

      # The potential policy violation case.
      #
      # Google skips the summary if there is a potential policy violation
      # detected. This includes content that may be violent or toxic.
      POTENTIAL_POLICY_VIOLATION = 4

      # The LLM addon not enabled case.
      #
      # Google skips the summary if the LLM addon is not enabled.
      LLM_ADDON_NOT_ENABLED = 5

      # The no relevant content case.
      #
      # Google skips the summary if there is no relevant content in the
      # retrieved search results.
      NO_RELEVANT_CONTENT = 6

      # The jail-breaking query ignored case.
      #
      # For example, "Reply in the tone of a competing company's CEO".
      # Only used when
      # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query]
      # is set to `true`.
      JAIL_BREAKING_QUERY_IGNORED = 7

      # The customer policy violation case.
      #
      # Google skips the summary if there is a customer policy violation
      # detected. The policy is defined by the customer.
      CUSTOMER_POLICY_VIOLATION = 8

      # The non-answer seeking query ignored case.
      #
      # Google skips the summary if the query doesn't have clear intent.
      # Only used when
      # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query]
      # is set to `true`.
      NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9

      # The time out case.
      #
      # Google skips the summary if the time out.
      TIME_OUT = 10
    end
  end

  # Debug information specifically related to forward geocoding issues arising
  # from Geolocation Search.
  # @!attribute [rw] original_address_query
  #   @return [::String]
  #     The address from which forward geocoding ingestion produced issues.
  # @!attribute [rw] error_message
  #   @return [::String]
  #     The error produced.
  class GeoSearchDebugInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Information describing query expansion including whether expansion has
  # occurred.
  # @!attribute [rw] expanded_query
  #   @return [::Boolean]
  #     Bool describing whether query expansion has occurred.
  # @!attribute [rw] pinned_result_count
  #   @return [::Integer]
  #     Number of pinned results. This field will only be set when expansion
  #     happens and
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results}
  #     is set to true.
  class QueryExpansionInfo
    include ::Google::Protobuf::MessageExts
    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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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]
  #     Name of the session.
  #     If the auto-session mode is used (when
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#session SearchRequest.session}
  #     ends with "-"), this field holds the newly generated session name.
  # @!attribute [rw] query_id
  #   @return [::String]
  #     Query ID that corresponds to this search API call.
  #     One session can have multiple turns, each with a unique query ID.
  #
  #     By specifying the session name and this query ID in the Answer API call,
  #     the answer generation happens in the context of the search results from
  #     this search call.
  class SessionInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # OneBoxResult is a holder for all results of specific type that we want
  # to display in UI differently.
  # @!attribute [rw] one_box_type
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::OneBoxResult::OneBoxType]
  #     The type of One Box result.
  # @!attribute [rw] search_results
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult>]
  #     The search results for this One Box.
  class OneBoxResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The type of One Box result.
    module OneBoxType
      # Default value. Should not be used.
      ONE_BOX_TYPE_UNSPECIFIED = 0

      # One Box result contains people results.
      PEOPLE = 1

      # One Box result contains organization results.
      ORGANIZATION = 2

      # One Box result contains slack results.
      SLACK = 3

      # One Box result contains Knowledge Graph search responses.
      KNOWLEDGE_GRAPH = 4
    end
  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

Returns Promotions for site search.

Returns:



1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
# File 'proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb', line 1646

class SearchResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents the search results.
  # @!attribute [rw] id
  #   @return [::String]
  #     {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id} of the
  #     searched {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}.
  # @!attribute [rw] document
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Document]
  #     The document data snippet in the search response. Only fields that are
  #     marked as `retrievable` are populated.
  # @!attribute [rw] chunk
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Chunk]
  #     The chunk data in the search response if the
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec#search_result_mode SearchRequest.ContentSearchSpec.search_result_mode}
  #     is set to
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS CHUNKS}.
  # @!attribute [r] model_scores
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1beta::DoubleList}]
  #     Output only. Google provided available scores.
  # @!attribute [rw] rank_signals
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals]
  #     Optional. A set of ranking signals associated with the result.
  class SearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A set of ranking signals.
    # @!attribute [rw] keyword_similarity_score
    #   @return [::Float]
    #     Optional. Keyword matching adjustment.
    # @!attribute [rw] relevance_score
    #   @return [::Float]
    #     Optional. Semantic relevance adjustment.
    # @!attribute [rw] semantic_similarity_score
    #   @return [::Float]
    #     Optional. Semantic similarity adjustment.
    # @!attribute [rw] pctr_rank
    #   @return [::Float]
    #     Optional. Predicted conversion rate adjustment as a rank.
    # @!attribute [rw] topicality_rank
    #   @return [::Float]
    #     Optional. Topicality adjustment as a rank.
    # @!attribute [rw] document_age
    #   @return [::Float]
    #     Optional. Age of the document in hours.
    # @!attribute [rw] boosting_factor
    #   @return [::Float]
    #     Optional. Combined custom boosts for a doc.
    # @!attribute [rw] default_rank
    #   @return [::Float]
    #     Optional. The default rank of the result.
    # @!attribute [rw] custom_signals
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals::CustomSignal>]
    #     Optional. A list of custom clearbox signals.
    # @!attribute [rw] precomputed_expression_values
    #   @return [::Array<::Float>]
    #     Optional. A list of precomputed expression results for a given
    #     document, in the same order as requested in
    #     `SearchRequest.custom_ranking_params.expressions_to_precompute`.
    class RankSignals
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Custom clearbox signal represented by name and value pair.
      # @!attribute [rw] name
      #   @return [::String]
      #     Optional. Name of the signal.
      # @!attribute [rw] value
      #   @return [::Float]
      #     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::V1beta::DoubleList]
    class ModelScoresEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A facet result.
  # @!attribute [rw] key
  #   @return [::String]
  #     The key for this facet. For example, `"colors"` or `"price"`. It matches
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#key SearchRequest.FacetSpec.FacetKey.key}.
  # @!attribute [rw] values
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Facet::FacetValue>]
  #     The facet values for this field.
  # @!attribute [rw] dynamic_facet
  #   @return [::Boolean]
  #     Whether the facet is dynamically generated.
  class Facet
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A facet value which contains value names and their count.
    # @!attribute [rw] value
    #   @return [::String]
    #     Text value of a facet, such as "Black" for facet "colors".
    #
    #     Note: The following fields are mutually exclusive: `value`, `interval`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] interval
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Interval]
    #     Interval value for a facet, such as [10, 20) for facet "price". It
    #     matches
    #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals}.
    #
    #     Note: The following fields are mutually exclusive: `interval`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] count
    #   @return [::Integer]
    #     Number of items that have this facet value.
    class FacetValue
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Guided search result. The guided search helps user to refine the search
  # results and narrow down to the real needs from a broaded search results.
  # @!attribute [rw] refinement_attributes
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::GuidedSearchResult::RefinementAttribute>]
  #     A list of ranked refinement attributes.
  # @!attribute [rw] follow_up_questions
  #   @return [::Array<::String>]
  #     Suggested follow-up questions.
  class GuidedSearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Useful attribute for search result refinements.
    # @!attribute [rw] attribute_key
    #   @return [::String]
    #     Attribute key used to refine the results. For example, `"movie_type"`.
    # @!attribute [rw] attribute_value
    #   @return [::String]
    #     Attribute value used to refine the results. For example, `"drama"`.
    class RefinementAttribute
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Summary of the top N search results specified by the summary spec.
  # @!attribute [rw] summary_text
  #   @return [::String]
  #     The summary content.
  # @!attribute [rw] summary_skipped_reasons
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummarySkippedReason>]
  #     Additional summary-skipped reasons. This provides the reason for ignored
  #     cases. If nothing is skipped, this field is not set.
  # @!attribute [rw] safety_attributes
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SafetyAttributes]
  #     A collection of Safety Attribute categories and their associated
  #     confidence scores.
  # @!attribute [rw] summary_with_metadata
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummaryWithMetadata]
  #     Summary with metadata information.
  class Summary
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Safety Attribute categories and their associated confidence scores.
    # @!attribute [rw] categories
    #   @return [::Array<::String>]
    #     The display names of Safety Attribute categories associated with the
    #     generated content. Order matches the Scores.
    # @!attribute [rw] scores
    #   @return [::Array<::Float>]
    #     The confidence scores of the each category, higher
    #     value means higher confidence. Order matches the Categories.
    class SafetyAttributes
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation metadata.
    # @!attribute [rw] citations
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Citation>]
    #     Citations for segments.
    class CitationMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation info for a segment.
    # @!attribute [rw] start_index
    #   @return [::Integer]
    #     Index indicates the start of the segment, measured in bytes/unicode.
    # @!attribute [rw] end_index
    #   @return [::Integer]
    #     End of the attributed segment, exclusive.
    # @!attribute [rw] sources
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::CitationSource>]
    #     Citation sources for the attributed segment.
    class Citation
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation source.
    # @!attribute [rw] reference_index
    #   @return [::Integer]
    #     Document reference index from SummaryWithMetadata.references.
    #     It is 0-indexed and the value will be zero if the reference_index is
    #     not set explicitly.
    class CitationSource
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Document reference.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title of the document.
    # @!attribute [rw] document
    #   @return [::String]
    #     Required.
    #     {::Google::Cloud::DiscoveryEngine::V1beta::Document#name Document.name} of
    #     the document. Full resource name of the referenced document, in the
    #     format
    #     `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
    # @!attribute [rw] uri
    #   @return [::String]
    #     Cloud Storage or HTTP uri for the document.
    # @!attribute [rw] chunk_contents
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Reference::ChunkContent>]
    #     List of cited chunk contents derived from document content.
    class Reference
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Chunk content.
      # @!attribute [rw] content
      #   @return [::String]
      #     Chunk textual content.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      # @!attribute [r] blob_attachment_indexes
      #   @return [::Array<::Integer>]
      #     Output only. Stores indexes of blobattachments linked to this chunk.
      class ChunkContent
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end

    # Stores binarydata attached to text answer, e.g. image, video, audio, etc.
    # @!attribute [r] data
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment::Blob]
    #     Output only. The blob data.
    # @!attribute [r] attribution_type
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment::AttributionType]
    #     Output only. The attribution type of the blob.
    class BlobAttachment
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Stores type and data of the blob.
      # @!attribute [r] mime_type
      #   @return [::String]
      #     Output only. The media type (MIME type) of the generated data.
      # @!attribute [r] data
      #   @return [::String]
      #     Output only. Raw bytes.
      class Blob
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Defines the attribution type of the blob.
      module AttributionType
        # Unspecified attribution type.
        ATTRIBUTION_TYPE_UNSPECIFIED = 0

        # The attachment data is from the corpus.
        CORPUS = 1

        # The attachment data is generated by the model through code
        # generation.
        GENERATED = 2
      end
    end

    # Summary with metadata information.
    # @!attribute [rw] summary
    #   @return [::String]
    #     Summary text with no citation information.
    # @!attribute [rw] citation_metadata
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::CitationMetadata]
    #     Citation metadata for given summary.
    # @!attribute [rw] references
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Reference>]
    #     Document References.
    # @!attribute [r] blob_attachments
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment>]
    #     Output only. Store multimodal data for answer enhancement.
    class SummaryWithMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # An Enum for summary-skipped reasons.
    module SummarySkippedReason
      # Default value. The summary skipped reason is not specified.
      SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0

      # The adversarial query ignored case.
      #
      # Only used when
      # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query}
      # is set to `true`.
      ADVERSARIAL_QUERY_IGNORED = 1

      # The non-summary seeking query ignored case.
      #
      # Google skips the summary if the query is chit chat.
      # Only used when
      # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query}
      # is set to `true`.
      NON_SUMMARY_SEEKING_QUERY_IGNORED = 2

      # The out-of-domain query ignored case.
      #
      # Google skips the summary if there are no high-relevance search results.
      # For example, the data store contains facts about company A but the
      # user query is asking questions about company B.
      OUT_OF_DOMAIN_QUERY_IGNORED = 3

      # The potential policy violation case.
      #
      # Google skips the summary if there is a potential policy violation
      # detected. This includes content that may be violent or toxic.
      POTENTIAL_POLICY_VIOLATION = 4

      # The LLM addon not enabled case.
      #
      # Google skips the summary if the LLM addon is not enabled.
      LLM_ADDON_NOT_ENABLED = 5

      # The no relevant content case.
      #
      # Google skips the summary if there is no relevant content in the
      # retrieved search results.
      NO_RELEVANT_CONTENT = 6

      # The jail-breaking query ignored case.
      #
      # For example, "Reply in the tone of a competing company's CEO".
      # Only used when
      # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query]
      # is set to `true`.
      JAIL_BREAKING_QUERY_IGNORED = 7

      # The customer policy violation case.
      #
      # Google skips the summary if there is a customer policy violation
      # detected. The policy is defined by the customer.
      CUSTOMER_POLICY_VIOLATION = 8

      # The non-answer seeking query ignored case.
      #
      # Google skips the summary if the query doesn't have clear intent.
      # Only used when
      # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query]
      # is set to `true`.
      NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9

      # The time out case.
      #
      # Google skips the summary if the time out.
      TIME_OUT = 10
    end
  end

  # Debug information specifically related to forward geocoding issues arising
  # from Geolocation Search.
  # @!attribute [rw] original_address_query
  #   @return [::String]
  #     The address from which forward geocoding ingestion produced issues.
  # @!attribute [rw] error_message
  #   @return [::String]
  #     The error produced.
  class GeoSearchDebugInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Information describing query expansion including whether expansion has
  # occurred.
  # @!attribute [rw] expanded_query
  #   @return [::Boolean]
  #     Bool describing whether query expansion has occurred.
  # @!attribute [rw] pinned_result_count
  #   @return [::Integer]
  #     Number of pinned results. This field will only be set when expansion
  #     happens and
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results}
  #     is set to true.
  class QueryExpansionInfo
    include ::Google::Protobuf::MessageExts
    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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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]
  #     Name of the session.
  #     If the auto-session mode is used (when
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#session SearchRequest.session}
  #     ends with "-"), this field holds the newly generated session name.
  # @!attribute [rw] query_id
  #   @return [::String]
  #     Query ID that corresponds to this search API call.
  #     One session can have multiple turns, each with a unique query ID.
  #
  #     By specifying the session name and this query ID in the Answer API call,
  #     the answer generation happens in the context of the search results from
  #     this search call.
  class SessionInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # OneBoxResult is a holder for all results of specific type that we want
  # to display in UI differently.
  # @!attribute [rw] one_box_type
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::OneBoxResult::OneBoxType]
  #     The type of One Box result.
  # @!attribute [rw] search_results
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult>]
  #     The search results for this One Box.
  class OneBoxResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The type of One Box result.
    module OneBoxType
      # Default value. Should not be used.
      ONE_BOX_TYPE_UNSPECIFIED = 0

      # One Box result contains people results.
      PEOPLE = 1

      # One Box result contains organization results.
      ORGANIZATION = 2

      # One Box result contains slack results.
      SLACK = 3

      # One Box result contains Knowledge Graph search responses.
      KNOWLEDGE_GRAPH = 4
    end
  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

#semantic_state::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SemanticState (readonly)

Returns Output only. Indicates the semantic state of the search response.

Returns:



1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
# File 'proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb', line 1646

class SearchResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents the search results.
  # @!attribute [rw] id
  #   @return [::String]
  #     {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id} of the
  #     searched {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}.
  # @!attribute [rw] document
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Document]
  #     The document data snippet in the search response. Only fields that are
  #     marked as `retrievable` are populated.
  # @!attribute [rw] chunk
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Chunk]
  #     The chunk data in the search response if the
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec#search_result_mode SearchRequest.ContentSearchSpec.search_result_mode}
  #     is set to
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS CHUNKS}.
  # @!attribute [r] model_scores
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1beta::DoubleList}]
  #     Output only. Google provided available scores.
  # @!attribute [rw] rank_signals
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals]
  #     Optional. A set of ranking signals associated with the result.
  class SearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A set of ranking signals.
    # @!attribute [rw] keyword_similarity_score
    #   @return [::Float]
    #     Optional. Keyword matching adjustment.
    # @!attribute [rw] relevance_score
    #   @return [::Float]
    #     Optional. Semantic relevance adjustment.
    # @!attribute [rw] semantic_similarity_score
    #   @return [::Float]
    #     Optional. Semantic similarity adjustment.
    # @!attribute [rw] pctr_rank
    #   @return [::Float]
    #     Optional. Predicted conversion rate adjustment as a rank.
    # @!attribute [rw] topicality_rank
    #   @return [::Float]
    #     Optional. Topicality adjustment as a rank.
    # @!attribute [rw] document_age
    #   @return [::Float]
    #     Optional. Age of the document in hours.
    # @!attribute [rw] boosting_factor
    #   @return [::Float]
    #     Optional. Combined custom boosts for a doc.
    # @!attribute [rw] default_rank
    #   @return [::Float]
    #     Optional. The default rank of the result.
    # @!attribute [rw] custom_signals
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals::CustomSignal>]
    #     Optional. A list of custom clearbox signals.
    # @!attribute [rw] precomputed_expression_values
    #   @return [::Array<::Float>]
    #     Optional. A list of precomputed expression results for a given
    #     document, in the same order as requested in
    #     `SearchRequest.custom_ranking_params.expressions_to_precompute`.
    class RankSignals
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Custom clearbox signal represented by name and value pair.
      # @!attribute [rw] name
      #   @return [::String]
      #     Optional. Name of the signal.
      # @!attribute [rw] value
      #   @return [::Float]
      #     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::V1beta::DoubleList]
    class ModelScoresEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A facet result.
  # @!attribute [rw] key
  #   @return [::String]
  #     The key for this facet. For example, `"colors"` or `"price"`. It matches
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#key SearchRequest.FacetSpec.FacetKey.key}.
  # @!attribute [rw] values
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Facet::FacetValue>]
  #     The facet values for this field.
  # @!attribute [rw] dynamic_facet
  #   @return [::Boolean]
  #     Whether the facet is dynamically generated.
  class Facet
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A facet value which contains value names and their count.
    # @!attribute [rw] value
    #   @return [::String]
    #     Text value of a facet, such as "Black" for facet "colors".
    #
    #     Note: The following fields are mutually exclusive: `value`, `interval`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] interval
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Interval]
    #     Interval value for a facet, such as [10, 20) for facet "price". It
    #     matches
    #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals}.
    #
    #     Note: The following fields are mutually exclusive: `interval`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] count
    #   @return [::Integer]
    #     Number of items that have this facet value.
    class FacetValue
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Guided search result. The guided search helps user to refine the search
  # results and narrow down to the real needs from a broaded search results.
  # @!attribute [rw] refinement_attributes
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::GuidedSearchResult::RefinementAttribute>]
  #     A list of ranked refinement attributes.
  # @!attribute [rw] follow_up_questions
  #   @return [::Array<::String>]
  #     Suggested follow-up questions.
  class GuidedSearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Useful attribute for search result refinements.
    # @!attribute [rw] attribute_key
    #   @return [::String]
    #     Attribute key used to refine the results. For example, `"movie_type"`.
    # @!attribute [rw] attribute_value
    #   @return [::String]
    #     Attribute value used to refine the results. For example, `"drama"`.
    class RefinementAttribute
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Summary of the top N search results specified by the summary spec.
  # @!attribute [rw] summary_text
  #   @return [::String]
  #     The summary content.
  # @!attribute [rw] summary_skipped_reasons
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummarySkippedReason>]
  #     Additional summary-skipped reasons. This provides the reason for ignored
  #     cases. If nothing is skipped, this field is not set.
  # @!attribute [rw] safety_attributes
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SafetyAttributes]
  #     A collection of Safety Attribute categories and their associated
  #     confidence scores.
  # @!attribute [rw] summary_with_metadata
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummaryWithMetadata]
  #     Summary with metadata information.
  class Summary
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Safety Attribute categories and their associated confidence scores.
    # @!attribute [rw] categories
    #   @return [::Array<::String>]
    #     The display names of Safety Attribute categories associated with the
    #     generated content. Order matches the Scores.
    # @!attribute [rw] scores
    #   @return [::Array<::Float>]
    #     The confidence scores of the each category, higher
    #     value means higher confidence. Order matches the Categories.
    class SafetyAttributes
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation metadata.
    # @!attribute [rw] citations
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Citation>]
    #     Citations for segments.
    class CitationMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation info for a segment.
    # @!attribute [rw] start_index
    #   @return [::Integer]
    #     Index indicates the start of the segment, measured in bytes/unicode.
    # @!attribute [rw] end_index
    #   @return [::Integer]
    #     End of the attributed segment, exclusive.
    # @!attribute [rw] sources
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::CitationSource>]
    #     Citation sources for the attributed segment.
    class Citation
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation source.
    # @!attribute [rw] reference_index
    #   @return [::Integer]
    #     Document reference index from SummaryWithMetadata.references.
    #     It is 0-indexed and the value will be zero if the reference_index is
    #     not set explicitly.
    class CitationSource
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Document reference.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title of the document.
    # @!attribute [rw] document
    #   @return [::String]
    #     Required.
    #     {::Google::Cloud::DiscoveryEngine::V1beta::Document#name Document.name} of
    #     the document. Full resource name of the referenced document, in the
    #     format
    #     `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
    # @!attribute [rw] uri
    #   @return [::String]
    #     Cloud Storage or HTTP uri for the document.
    # @!attribute [rw] chunk_contents
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Reference::ChunkContent>]
    #     List of cited chunk contents derived from document content.
    class Reference
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Chunk content.
      # @!attribute [rw] content
      #   @return [::String]
      #     Chunk textual content.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      # @!attribute [r] blob_attachment_indexes
      #   @return [::Array<::Integer>]
      #     Output only. Stores indexes of blobattachments linked to this chunk.
      class ChunkContent
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end

    # Stores binarydata attached to text answer, e.g. image, video, audio, etc.
    # @!attribute [r] data
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment::Blob]
    #     Output only. The blob data.
    # @!attribute [r] attribution_type
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment::AttributionType]
    #     Output only. The attribution type of the blob.
    class BlobAttachment
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Stores type and data of the blob.
      # @!attribute [r] mime_type
      #   @return [::String]
      #     Output only. The media type (MIME type) of the generated data.
      # @!attribute [r] data
      #   @return [::String]
      #     Output only. Raw bytes.
      class Blob
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Defines the attribution type of the blob.
      module AttributionType
        # Unspecified attribution type.
        ATTRIBUTION_TYPE_UNSPECIFIED = 0

        # The attachment data is from the corpus.
        CORPUS = 1

        # The attachment data is generated by the model through code
        # generation.
        GENERATED = 2
      end
    end

    # Summary with metadata information.
    # @!attribute [rw] summary
    #   @return [::String]
    #     Summary text with no citation information.
    # @!attribute [rw] citation_metadata
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::CitationMetadata]
    #     Citation metadata for given summary.
    # @!attribute [rw] references
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Reference>]
    #     Document References.
    # @!attribute [r] blob_attachments
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment>]
    #     Output only. Store multimodal data for answer enhancement.
    class SummaryWithMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # An Enum for summary-skipped reasons.
    module SummarySkippedReason
      # Default value. The summary skipped reason is not specified.
      SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0

      # The adversarial query ignored case.
      #
      # Only used when
      # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query}
      # is set to `true`.
      ADVERSARIAL_QUERY_IGNORED = 1

      # The non-summary seeking query ignored case.
      #
      # Google skips the summary if the query is chit chat.
      # Only used when
      # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query}
      # is set to `true`.
      NON_SUMMARY_SEEKING_QUERY_IGNORED = 2

      # The out-of-domain query ignored case.
      #
      # Google skips the summary if there are no high-relevance search results.
      # For example, the data store contains facts about company A but the
      # user query is asking questions about company B.
      OUT_OF_DOMAIN_QUERY_IGNORED = 3

      # The potential policy violation case.
      #
      # Google skips the summary if there is a potential policy violation
      # detected. This includes content that may be violent or toxic.
      POTENTIAL_POLICY_VIOLATION = 4

      # The LLM addon not enabled case.
      #
      # Google skips the summary if the LLM addon is not enabled.
      LLM_ADDON_NOT_ENABLED = 5

      # The no relevant content case.
      #
      # Google skips the summary if there is no relevant content in the
      # retrieved search results.
      NO_RELEVANT_CONTENT = 6

      # The jail-breaking query ignored case.
      #
      # For example, "Reply in the tone of a competing company's CEO".
      # Only used when
      # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query]
      # is set to `true`.
      JAIL_BREAKING_QUERY_IGNORED = 7

      # The customer policy violation case.
      #
      # Google skips the summary if there is a customer policy violation
      # detected. The policy is defined by the customer.
      CUSTOMER_POLICY_VIOLATION = 8

      # The non-answer seeking query ignored case.
      #
      # Google skips the summary if the query doesn't have clear intent.
      # Only used when
      # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query]
      # is set to `true`.
      NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9

      # The time out case.
      #
      # Google skips the summary if the time out.
      TIME_OUT = 10
    end
  end

  # Debug information specifically related to forward geocoding issues arising
  # from Geolocation Search.
  # @!attribute [rw] original_address_query
  #   @return [::String]
  #     The address from which forward geocoding ingestion produced issues.
  # @!attribute [rw] error_message
  #   @return [::String]
  #     The error produced.
  class GeoSearchDebugInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Information describing query expansion including whether expansion has
  # occurred.
  # @!attribute [rw] expanded_query
  #   @return [::Boolean]
  #     Bool describing whether query expansion has occurred.
  # @!attribute [rw] pinned_result_count
  #   @return [::Integer]
  #     Number of pinned results. This field will only be set when expansion
  #     happens and
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results}
  #     is set to true.
  class QueryExpansionInfo
    include ::Google::Protobuf::MessageExts
    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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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]
  #     Name of the session.
  #     If the auto-session mode is used (when
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#session SearchRequest.session}
  #     ends with "-"), this field holds the newly generated session name.
  # @!attribute [rw] query_id
  #   @return [::String]
  #     Query ID that corresponds to this search API call.
  #     One session can have multiple turns, each with a unique query ID.
  #
  #     By specifying the session name and this query ID in the Answer API call,
  #     the answer generation happens in the context of the search results from
  #     this search call.
  class SessionInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # OneBoxResult is a holder for all results of specific type that we want
  # to display in UI differently.
  # @!attribute [rw] one_box_type
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::OneBoxResult::OneBoxType]
  #     The type of One Box result.
  # @!attribute [rw] search_results
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult>]
  #     The search results for this One Box.
  class OneBoxResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The type of One Box result.
    module OneBoxType
      # Default value. Should not be used.
      ONE_BOX_TYPE_UNSPECIFIED = 0

      # One Box result contains people results.
      PEOPLE = 1

      # One Box result contains organization results.
      ORGANIZATION = 2

      # One Box result contains slack results.
      SLACK = 3

      # One Box result contains Knowledge Graph search responses.
      KNOWLEDGE_GRAPH = 4
    end
  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

#session_info::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SessionInfo

Returns Session information.

Only set if SearchRequest.session is provided. See its description for more details.

Returns:



1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
# File 'proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb', line 1646

class SearchResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents the search results.
  # @!attribute [rw] id
  #   @return [::String]
  #     {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id} of the
  #     searched {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}.
  # @!attribute [rw] document
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Document]
  #     The document data snippet in the search response. Only fields that are
  #     marked as `retrievable` are populated.
  # @!attribute [rw] chunk
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Chunk]
  #     The chunk data in the search response if the
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec#search_result_mode SearchRequest.ContentSearchSpec.search_result_mode}
  #     is set to
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS CHUNKS}.
  # @!attribute [r] model_scores
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1beta::DoubleList}]
  #     Output only. Google provided available scores.
  # @!attribute [rw] rank_signals
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals]
  #     Optional. A set of ranking signals associated with the result.
  class SearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A set of ranking signals.
    # @!attribute [rw] keyword_similarity_score
    #   @return [::Float]
    #     Optional. Keyword matching adjustment.
    # @!attribute [rw] relevance_score
    #   @return [::Float]
    #     Optional. Semantic relevance adjustment.
    # @!attribute [rw] semantic_similarity_score
    #   @return [::Float]
    #     Optional. Semantic similarity adjustment.
    # @!attribute [rw] pctr_rank
    #   @return [::Float]
    #     Optional. Predicted conversion rate adjustment as a rank.
    # @!attribute [rw] topicality_rank
    #   @return [::Float]
    #     Optional. Topicality adjustment as a rank.
    # @!attribute [rw] document_age
    #   @return [::Float]
    #     Optional. Age of the document in hours.
    # @!attribute [rw] boosting_factor
    #   @return [::Float]
    #     Optional. Combined custom boosts for a doc.
    # @!attribute [rw] default_rank
    #   @return [::Float]
    #     Optional. The default rank of the result.
    # @!attribute [rw] custom_signals
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals::CustomSignal>]
    #     Optional. A list of custom clearbox signals.
    # @!attribute [rw] precomputed_expression_values
    #   @return [::Array<::Float>]
    #     Optional. A list of precomputed expression results for a given
    #     document, in the same order as requested in
    #     `SearchRequest.custom_ranking_params.expressions_to_precompute`.
    class RankSignals
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Custom clearbox signal represented by name and value pair.
      # @!attribute [rw] name
      #   @return [::String]
      #     Optional. Name of the signal.
      # @!attribute [rw] value
      #   @return [::Float]
      #     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::V1beta::DoubleList]
    class ModelScoresEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A facet result.
  # @!attribute [rw] key
  #   @return [::String]
  #     The key for this facet. For example, `"colors"` or `"price"`. It matches
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#key SearchRequest.FacetSpec.FacetKey.key}.
  # @!attribute [rw] values
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Facet::FacetValue>]
  #     The facet values for this field.
  # @!attribute [rw] dynamic_facet
  #   @return [::Boolean]
  #     Whether the facet is dynamically generated.
  class Facet
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A facet value which contains value names and their count.
    # @!attribute [rw] value
    #   @return [::String]
    #     Text value of a facet, such as "Black" for facet "colors".
    #
    #     Note: The following fields are mutually exclusive: `value`, `interval`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] interval
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Interval]
    #     Interval value for a facet, such as [10, 20) for facet "price". It
    #     matches
    #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals}.
    #
    #     Note: The following fields are mutually exclusive: `interval`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] count
    #   @return [::Integer]
    #     Number of items that have this facet value.
    class FacetValue
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Guided search result. The guided search helps user to refine the search
  # results and narrow down to the real needs from a broaded search results.
  # @!attribute [rw] refinement_attributes
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::GuidedSearchResult::RefinementAttribute>]
  #     A list of ranked refinement attributes.
  # @!attribute [rw] follow_up_questions
  #   @return [::Array<::String>]
  #     Suggested follow-up questions.
  class GuidedSearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Useful attribute for search result refinements.
    # @!attribute [rw] attribute_key
    #   @return [::String]
    #     Attribute key used to refine the results. For example, `"movie_type"`.
    # @!attribute [rw] attribute_value
    #   @return [::String]
    #     Attribute value used to refine the results. For example, `"drama"`.
    class RefinementAttribute
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Summary of the top N search results specified by the summary spec.
  # @!attribute [rw] summary_text
  #   @return [::String]
  #     The summary content.
  # @!attribute [rw] summary_skipped_reasons
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummarySkippedReason>]
  #     Additional summary-skipped reasons. This provides the reason for ignored
  #     cases. If nothing is skipped, this field is not set.
  # @!attribute [rw] safety_attributes
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SafetyAttributes]
  #     A collection of Safety Attribute categories and their associated
  #     confidence scores.
  # @!attribute [rw] summary_with_metadata
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummaryWithMetadata]
  #     Summary with metadata information.
  class Summary
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Safety Attribute categories and their associated confidence scores.
    # @!attribute [rw] categories
    #   @return [::Array<::String>]
    #     The display names of Safety Attribute categories associated with the
    #     generated content. Order matches the Scores.
    # @!attribute [rw] scores
    #   @return [::Array<::Float>]
    #     The confidence scores of the each category, higher
    #     value means higher confidence. Order matches the Categories.
    class SafetyAttributes
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation metadata.
    # @!attribute [rw] citations
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Citation>]
    #     Citations for segments.
    class CitationMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation info for a segment.
    # @!attribute [rw] start_index
    #   @return [::Integer]
    #     Index indicates the start of the segment, measured in bytes/unicode.
    # @!attribute [rw] end_index
    #   @return [::Integer]
    #     End of the attributed segment, exclusive.
    # @!attribute [rw] sources
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::CitationSource>]
    #     Citation sources for the attributed segment.
    class Citation
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation source.
    # @!attribute [rw] reference_index
    #   @return [::Integer]
    #     Document reference index from SummaryWithMetadata.references.
    #     It is 0-indexed and the value will be zero if the reference_index is
    #     not set explicitly.
    class CitationSource
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Document reference.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title of the document.
    # @!attribute [rw] document
    #   @return [::String]
    #     Required.
    #     {::Google::Cloud::DiscoveryEngine::V1beta::Document#name Document.name} of
    #     the document. Full resource name of the referenced document, in the
    #     format
    #     `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
    # @!attribute [rw] uri
    #   @return [::String]
    #     Cloud Storage or HTTP uri for the document.
    # @!attribute [rw] chunk_contents
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Reference::ChunkContent>]
    #     List of cited chunk contents derived from document content.
    class Reference
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Chunk content.
      # @!attribute [rw] content
      #   @return [::String]
      #     Chunk textual content.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      # @!attribute [r] blob_attachment_indexes
      #   @return [::Array<::Integer>]
      #     Output only. Stores indexes of blobattachments linked to this chunk.
      class ChunkContent
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end

    # Stores binarydata attached to text answer, e.g. image, video, audio, etc.
    # @!attribute [r] data
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment::Blob]
    #     Output only. The blob data.
    # @!attribute [r] attribution_type
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment::AttributionType]
    #     Output only. The attribution type of the blob.
    class BlobAttachment
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Stores type and data of the blob.
      # @!attribute [r] mime_type
      #   @return [::String]
      #     Output only. The media type (MIME type) of the generated data.
      # @!attribute [r] data
      #   @return [::String]
      #     Output only. Raw bytes.
      class Blob
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Defines the attribution type of the blob.
      module AttributionType
        # Unspecified attribution type.
        ATTRIBUTION_TYPE_UNSPECIFIED = 0

        # The attachment data is from the corpus.
        CORPUS = 1

        # The attachment data is generated by the model through code
        # generation.
        GENERATED = 2
      end
    end

    # Summary with metadata information.
    # @!attribute [rw] summary
    #   @return [::String]
    #     Summary text with no citation information.
    # @!attribute [rw] citation_metadata
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::CitationMetadata]
    #     Citation metadata for given summary.
    # @!attribute [rw] references
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Reference>]
    #     Document References.
    # @!attribute [r] blob_attachments
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment>]
    #     Output only. Store multimodal data for answer enhancement.
    class SummaryWithMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # An Enum for summary-skipped reasons.
    module SummarySkippedReason
      # Default value. The summary skipped reason is not specified.
      SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0

      # The adversarial query ignored case.
      #
      # Only used when
      # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query}
      # is set to `true`.
      ADVERSARIAL_QUERY_IGNORED = 1

      # The non-summary seeking query ignored case.
      #
      # Google skips the summary if the query is chit chat.
      # Only used when
      # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query}
      # is set to `true`.
      NON_SUMMARY_SEEKING_QUERY_IGNORED = 2

      # The out-of-domain query ignored case.
      #
      # Google skips the summary if there are no high-relevance search results.
      # For example, the data store contains facts about company A but the
      # user query is asking questions about company B.
      OUT_OF_DOMAIN_QUERY_IGNORED = 3

      # The potential policy violation case.
      #
      # Google skips the summary if there is a potential policy violation
      # detected. This includes content that may be violent or toxic.
      POTENTIAL_POLICY_VIOLATION = 4

      # The LLM addon not enabled case.
      #
      # Google skips the summary if the LLM addon is not enabled.
      LLM_ADDON_NOT_ENABLED = 5

      # The no relevant content case.
      #
      # Google skips the summary if there is no relevant content in the
      # retrieved search results.
      NO_RELEVANT_CONTENT = 6

      # The jail-breaking query ignored case.
      #
      # For example, "Reply in the tone of a competing company's CEO".
      # Only used when
      # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query]
      # is set to `true`.
      JAIL_BREAKING_QUERY_IGNORED = 7

      # The customer policy violation case.
      #
      # Google skips the summary if there is a customer policy violation
      # detected. The policy is defined by the customer.
      CUSTOMER_POLICY_VIOLATION = 8

      # The non-answer seeking query ignored case.
      #
      # Google skips the summary if the query doesn't have clear intent.
      # Only used when
      # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query]
      # is set to `true`.
      NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9

      # The time out case.
      #
      # Google skips the summary if the time out.
      TIME_OUT = 10
    end
  end

  # Debug information specifically related to forward geocoding issues arising
  # from Geolocation Search.
  # @!attribute [rw] original_address_query
  #   @return [::String]
  #     The address from which forward geocoding ingestion produced issues.
  # @!attribute [rw] error_message
  #   @return [::String]
  #     The error produced.
  class GeoSearchDebugInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Information describing query expansion including whether expansion has
  # occurred.
  # @!attribute [rw] expanded_query
  #   @return [::Boolean]
  #     Bool describing whether query expansion has occurred.
  # @!attribute [rw] pinned_result_count
  #   @return [::Integer]
  #     Number of pinned results. This field will only be set when expansion
  #     happens and
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results}
  #     is set to true.
  class QueryExpansionInfo
    include ::Google::Protobuf::MessageExts
    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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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]
  #     Name of the session.
  #     If the auto-session mode is used (when
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#session SearchRequest.session}
  #     ends with "-"), this field holds the newly generated session name.
  # @!attribute [rw] query_id
  #   @return [::String]
  #     Query ID that corresponds to this search API call.
  #     One session can have multiple turns, each with a unique query ID.
  #
  #     By specifying the session name and this query ID in the Answer API call,
  #     the answer generation happens in the context of the search results from
  #     this search call.
  class SessionInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # OneBoxResult is a holder for all results of specific type that we want
  # to display in UI differently.
  # @!attribute [rw] one_box_type
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::OneBoxResult::OneBoxType]
  #     The type of One Box result.
  # @!attribute [rw] search_results
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult>]
  #     The search results for this One Box.
  class OneBoxResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The type of One Box result.
    module OneBoxType
      # Default value. Should not be used.
      ONE_BOX_TYPE_UNSPECIFIED = 0

      # One Box result contains people results.
      PEOPLE = 1

      # One Box result contains organization results.
      ORGANIZATION = 2

      # One Box result contains slack results.
      SLACK = 3

      # One Box result contains Knowledge Graph search responses.
      KNOWLEDGE_GRAPH = 4
    end
  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

#suggested_query::String

Corrected query with low confidence, AKA did you mean query. Compared with corrected_query, this field is set when SpellCorrector returned a response, but FPR(full page replacement) is not triggered because the corrction is of low confidence(eg, reversed because there are matches of the original query in document corpus).

Returns:

  • (::String)

    Corrected query with low confidence, AKA did you mean query. Compared with corrected_query, this field is set when SpellCorrector returned a response, but FPR(full page replacement) is not triggered because the corrction is of low confidence(eg, reversed because there are matches of the original query in document corpus).



1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
# File 'proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb', line 1646

class SearchResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents the search results.
  # @!attribute [rw] id
  #   @return [::String]
  #     {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id} of the
  #     searched {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}.
  # @!attribute [rw] document
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Document]
  #     The document data snippet in the search response. Only fields that are
  #     marked as `retrievable` are populated.
  # @!attribute [rw] chunk
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Chunk]
  #     The chunk data in the search response if the
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec#search_result_mode SearchRequest.ContentSearchSpec.search_result_mode}
  #     is set to
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS CHUNKS}.
  # @!attribute [r] model_scores
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1beta::DoubleList}]
  #     Output only. Google provided available scores.
  # @!attribute [rw] rank_signals
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals]
  #     Optional. A set of ranking signals associated with the result.
  class SearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A set of ranking signals.
    # @!attribute [rw] keyword_similarity_score
    #   @return [::Float]
    #     Optional. Keyword matching adjustment.
    # @!attribute [rw] relevance_score
    #   @return [::Float]
    #     Optional. Semantic relevance adjustment.
    # @!attribute [rw] semantic_similarity_score
    #   @return [::Float]
    #     Optional. Semantic similarity adjustment.
    # @!attribute [rw] pctr_rank
    #   @return [::Float]
    #     Optional. Predicted conversion rate adjustment as a rank.
    # @!attribute [rw] topicality_rank
    #   @return [::Float]
    #     Optional. Topicality adjustment as a rank.
    # @!attribute [rw] document_age
    #   @return [::Float]
    #     Optional. Age of the document in hours.
    # @!attribute [rw] boosting_factor
    #   @return [::Float]
    #     Optional. Combined custom boosts for a doc.
    # @!attribute [rw] default_rank
    #   @return [::Float]
    #     Optional. The default rank of the result.
    # @!attribute [rw] custom_signals
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals::CustomSignal>]
    #     Optional. A list of custom clearbox signals.
    # @!attribute [rw] precomputed_expression_values
    #   @return [::Array<::Float>]
    #     Optional. A list of precomputed expression results for a given
    #     document, in the same order as requested in
    #     `SearchRequest.custom_ranking_params.expressions_to_precompute`.
    class RankSignals
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Custom clearbox signal represented by name and value pair.
      # @!attribute [rw] name
      #   @return [::String]
      #     Optional. Name of the signal.
      # @!attribute [rw] value
      #   @return [::Float]
      #     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::V1beta::DoubleList]
    class ModelScoresEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A facet result.
  # @!attribute [rw] key
  #   @return [::String]
  #     The key for this facet. For example, `"colors"` or `"price"`. It matches
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#key SearchRequest.FacetSpec.FacetKey.key}.
  # @!attribute [rw] values
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Facet::FacetValue>]
  #     The facet values for this field.
  # @!attribute [rw] dynamic_facet
  #   @return [::Boolean]
  #     Whether the facet is dynamically generated.
  class Facet
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A facet value which contains value names and their count.
    # @!attribute [rw] value
    #   @return [::String]
    #     Text value of a facet, such as "Black" for facet "colors".
    #
    #     Note: The following fields are mutually exclusive: `value`, `interval`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] interval
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Interval]
    #     Interval value for a facet, such as [10, 20) for facet "price". It
    #     matches
    #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals}.
    #
    #     Note: The following fields are mutually exclusive: `interval`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] count
    #   @return [::Integer]
    #     Number of items that have this facet value.
    class FacetValue
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Guided search result. The guided search helps user to refine the search
  # results and narrow down to the real needs from a broaded search results.
  # @!attribute [rw] refinement_attributes
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::GuidedSearchResult::RefinementAttribute>]
  #     A list of ranked refinement attributes.
  # @!attribute [rw] follow_up_questions
  #   @return [::Array<::String>]
  #     Suggested follow-up questions.
  class GuidedSearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Useful attribute for search result refinements.
    # @!attribute [rw] attribute_key
    #   @return [::String]
    #     Attribute key used to refine the results. For example, `"movie_type"`.
    # @!attribute [rw] attribute_value
    #   @return [::String]
    #     Attribute value used to refine the results. For example, `"drama"`.
    class RefinementAttribute
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Summary of the top N search results specified by the summary spec.
  # @!attribute [rw] summary_text
  #   @return [::String]
  #     The summary content.
  # @!attribute [rw] summary_skipped_reasons
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummarySkippedReason>]
  #     Additional summary-skipped reasons. This provides the reason for ignored
  #     cases. If nothing is skipped, this field is not set.
  # @!attribute [rw] safety_attributes
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SafetyAttributes]
  #     A collection of Safety Attribute categories and their associated
  #     confidence scores.
  # @!attribute [rw] summary_with_metadata
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummaryWithMetadata]
  #     Summary with metadata information.
  class Summary
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Safety Attribute categories and their associated confidence scores.
    # @!attribute [rw] categories
    #   @return [::Array<::String>]
    #     The display names of Safety Attribute categories associated with the
    #     generated content. Order matches the Scores.
    # @!attribute [rw] scores
    #   @return [::Array<::Float>]
    #     The confidence scores of the each category, higher
    #     value means higher confidence. Order matches the Categories.
    class SafetyAttributes
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation metadata.
    # @!attribute [rw] citations
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Citation>]
    #     Citations for segments.
    class CitationMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation info for a segment.
    # @!attribute [rw] start_index
    #   @return [::Integer]
    #     Index indicates the start of the segment, measured in bytes/unicode.
    # @!attribute [rw] end_index
    #   @return [::Integer]
    #     End of the attributed segment, exclusive.
    # @!attribute [rw] sources
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::CitationSource>]
    #     Citation sources for the attributed segment.
    class Citation
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation source.
    # @!attribute [rw] reference_index
    #   @return [::Integer]
    #     Document reference index from SummaryWithMetadata.references.
    #     It is 0-indexed and the value will be zero if the reference_index is
    #     not set explicitly.
    class CitationSource
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Document reference.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title of the document.
    # @!attribute [rw] document
    #   @return [::String]
    #     Required.
    #     {::Google::Cloud::DiscoveryEngine::V1beta::Document#name Document.name} of
    #     the document. Full resource name of the referenced document, in the
    #     format
    #     `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
    # @!attribute [rw] uri
    #   @return [::String]
    #     Cloud Storage or HTTP uri for the document.
    # @!attribute [rw] chunk_contents
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Reference::ChunkContent>]
    #     List of cited chunk contents derived from document content.
    class Reference
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Chunk content.
      # @!attribute [rw] content
      #   @return [::String]
      #     Chunk textual content.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      # @!attribute [r] blob_attachment_indexes
      #   @return [::Array<::Integer>]
      #     Output only. Stores indexes of blobattachments linked to this chunk.
      class ChunkContent
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end

    # Stores binarydata attached to text answer, e.g. image, video, audio, etc.
    # @!attribute [r] data
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment::Blob]
    #     Output only. The blob data.
    # @!attribute [r] attribution_type
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment::AttributionType]
    #     Output only. The attribution type of the blob.
    class BlobAttachment
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Stores type and data of the blob.
      # @!attribute [r] mime_type
      #   @return [::String]
      #     Output only. The media type (MIME type) of the generated data.
      # @!attribute [r] data
      #   @return [::String]
      #     Output only. Raw bytes.
      class Blob
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Defines the attribution type of the blob.
      module AttributionType
        # Unspecified attribution type.
        ATTRIBUTION_TYPE_UNSPECIFIED = 0

        # The attachment data is from the corpus.
        CORPUS = 1

        # The attachment data is generated by the model through code
        # generation.
        GENERATED = 2
      end
    end

    # Summary with metadata information.
    # @!attribute [rw] summary
    #   @return [::String]
    #     Summary text with no citation information.
    # @!attribute [rw] citation_metadata
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::CitationMetadata]
    #     Citation metadata for given summary.
    # @!attribute [rw] references
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Reference>]
    #     Document References.
    # @!attribute [r] blob_attachments
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment>]
    #     Output only. Store multimodal data for answer enhancement.
    class SummaryWithMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # An Enum for summary-skipped reasons.
    module SummarySkippedReason
      # Default value. The summary skipped reason is not specified.
      SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0

      # The adversarial query ignored case.
      #
      # Only used when
      # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query}
      # is set to `true`.
      ADVERSARIAL_QUERY_IGNORED = 1

      # The non-summary seeking query ignored case.
      #
      # Google skips the summary if the query is chit chat.
      # Only used when
      # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query}
      # is set to `true`.
      NON_SUMMARY_SEEKING_QUERY_IGNORED = 2

      # The out-of-domain query ignored case.
      #
      # Google skips the summary if there are no high-relevance search results.
      # For example, the data store contains facts about company A but the
      # user query is asking questions about company B.
      OUT_OF_DOMAIN_QUERY_IGNORED = 3

      # The potential policy violation case.
      #
      # Google skips the summary if there is a potential policy violation
      # detected. This includes content that may be violent or toxic.
      POTENTIAL_POLICY_VIOLATION = 4

      # The LLM addon not enabled case.
      #
      # Google skips the summary if the LLM addon is not enabled.
      LLM_ADDON_NOT_ENABLED = 5

      # The no relevant content case.
      #
      # Google skips the summary if there is no relevant content in the
      # retrieved search results.
      NO_RELEVANT_CONTENT = 6

      # The jail-breaking query ignored case.
      #
      # For example, "Reply in the tone of a competing company's CEO".
      # Only used when
      # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query]
      # is set to `true`.
      JAIL_BREAKING_QUERY_IGNORED = 7

      # The customer policy violation case.
      #
      # Google skips the summary if there is a customer policy violation
      # detected. The policy is defined by the customer.
      CUSTOMER_POLICY_VIOLATION = 8

      # The non-answer seeking query ignored case.
      #
      # Google skips the summary if the query doesn't have clear intent.
      # Only used when
      # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query]
      # is set to `true`.
      NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9

      # The time out case.
      #
      # Google skips the summary if the time out.
      TIME_OUT = 10
    end
  end

  # Debug information specifically related to forward geocoding issues arising
  # from Geolocation Search.
  # @!attribute [rw] original_address_query
  #   @return [::String]
  #     The address from which forward geocoding ingestion produced issues.
  # @!attribute [rw] error_message
  #   @return [::String]
  #     The error produced.
  class GeoSearchDebugInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Information describing query expansion including whether expansion has
  # occurred.
  # @!attribute [rw] expanded_query
  #   @return [::Boolean]
  #     Bool describing whether query expansion has occurred.
  # @!attribute [rw] pinned_result_count
  #   @return [::Integer]
  #     Number of pinned results. This field will only be set when expansion
  #     happens and
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results}
  #     is set to true.
  class QueryExpansionInfo
    include ::Google::Protobuf::MessageExts
    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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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]
  #     Name of the session.
  #     If the auto-session mode is used (when
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#session SearchRequest.session}
  #     ends with "-"), this field holds the newly generated session name.
  # @!attribute [rw] query_id
  #   @return [::String]
  #     Query ID that corresponds to this search API call.
  #     One session can have multiple turns, each with a unique query ID.
  #
  #     By specifying the session name and this query ID in the Answer API call,
  #     the answer generation happens in the context of the search results from
  #     this search call.
  class SessionInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # OneBoxResult is a holder for all results of specific type that we want
  # to display in UI differently.
  # @!attribute [rw] one_box_type
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::OneBoxResult::OneBoxType]
  #     The type of One Box result.
  # @!attribute [rw] search_results
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult>]
  #     The search results for this One Box.
  class OneBoxResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The type of One Box result.
    module OneBoxType
      # Default value. Should not be used.
      ONE_BOX_TYPE_UNSPECIFIED = 0

      # One Box result contains people results.
      PEOPLE = 1

      # One Box result contains organization results.
      ORGANIZATION = 2

      # One Box result contains slack results.
      SLACK = 3

      # One Box result contains Knowledge Graph search responses.
      KNOWLEDGE_GRAPH = 4
    end
  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

#summary::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary

Returns A summary as part of the search results. This field is only returned if SearchRequest.ContentSearchSpec.summary_spec is set.

Returns:



1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
# File 'proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb', line 1646

class SearchResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents the search results.
  # @!attribute [rw] id
  #   @return [::String]
  #     {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id} of the
  #     searched {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}.
  # @!attribute [rw] document
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Document]
  #     The document data snippet in the search response. Only fields that are
  #     marked as `retrievable` are populated.
  # @!attribute [rw] chunk
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Chunk]
  #     The chunk data in the search response if the
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec#search_result_mode SearchRequest.ContentSearchSpec.search_result_mode}
  #     is set to
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS CHUNKS}.
  # @!attribute [r] model_scores
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1beta::DoubleList}]
  #     Output only. Google provided available scores.
  # @!attribute [rw] rank_signals
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals]
  #     Optional. A set of ranking signals associated with the result.
  class SearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A set of ranking signals.
    # @!attribute [rw] keyword_similarity_score
    #   @return [::Float]
    #     Optional. Keyword matching adjustment.
    # @!attribute [rw] relevance_score
    #   @return [::Float]
    #     Optional. Semantic relevance adjustment.
    # @!attribute [rw] semantic_similarity_score
    #   @return [::Float]
    #     Optional. Semantic similarity adjustment.
    # @!attribute [rw] pctr_rank
    #   @return [::Float]
    #     Optional. Predicted conversion rate adjustment as a rank.
    # @!attribute [rw] topicality_rank
    #   @return [::Float]
    #     Optional. Topicality adjustment as a rank.
    # @!attribute [rw] document_age
    #   @return [::Float]
    #     Optional. Age of the document in hours.
    # @!attribute [rw] boosting_factor
    #   @return [::Float]
    #     Optional. Combined custom boosts for a doc.
    # @!attribute [rw] default_rank
    #   @return [::Float]
    #     Optional. The default rank of the result.
    # @!attribute [rw] custom_signals
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals::CustomSignal>]
    #     Optional. A list of custom clearbox signals.
    # @!attribute [rw] precomputed_expression_values
    #   @return [::Array<::Float>]
    #     Optional. A list of precomputed expression results for a given
    #     document, in the same order as requested in
    #     `SearchRequest.custom_ranking_params.expressions_to_precompute`.
    class RankSignals
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Custom clearbox signal represented by name and value pair.
      # @!attribute [rw] name
      #   @return [::String]
      #     Optional. Name of the signal.
      # @!attribute [rw] value
      #   @return [::Float]
      #     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::V1beta::DoubleList]
    class ModelScoresEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A facet result.
  # @!attribute [rw] key
  #   @return [::String]
  #     The key for this facet. For example, `"colors"` or `"price"`. It matches
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#key SearchRequest.FacetSpec.FacetKey.key}.
  # @!attribute [rw] values
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Facet::FacetValue>]
  #     The facet values for this field.
  # @!attribute [rw] dynamic_facet
  #   @return [::Boolean]
  #     Whether the facet is dynamically generated.
  class Facet
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A facet value which contains value names and their count.
    # @!attribute [rw] value
    #   @return [::String]
    #     Text value of a facet, such as "Black" for facet "colors".
    #
    #     Note: The following fields are mutually exclusive: `value`, `interval`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] interval
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Interval]
    #     Interval value for a facet, such as [10, 20) for facet "price". It
    #     matches
    #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals}.
    #
    #     Note: The following fields are mutually exclusive: `interval`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] count
    #   @return [::Integer]
    #     Number of items that have this facet value.
    class FacetValue
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Guided search result. The guided search helps user to refine the search
  # results and narrow down to the real needs from a broaded search results.
  # @!attribute [rw] refinement_attributes
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::GuidedSearchResult::RefinementAttribute>]
  #     A list of ranked refinement attributes.
  # @!attribute [rw] follow_up_questions
  #   @return [::Array<::String>]
  #     Suggested follow-up questions.
  class GuidedSearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Useful attribute for search result refinements.
    # @!attribute [rw] attribute_key
    #   @return [::String]
    #     Attribute key used to refine the results. For example, `"movie_type"`.
    # @!attribute [rw] attribute_value
    #   @return [::String]
    #     Attribute value used to refine the results. For example, `"drama"`.
    class RefinementAttribute
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Summary of the top N search results specified by the summary spec.
  # @!attribute [rw] summary_text
  #   @return [::String]
  #     The summary content.
  # @!attribute [rw] summary_skipped_reasons
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummarySkippedReason>]
  #     Additional summary-skipped reasons. This provides the reason for ignored
  #     cases. If nothing is skipped, this field is not set.
  # @!attribute [rw] safety_attributes
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SafetyAttributes]
  #     A collection of Safety Attribute categories and their associated
  #     confidence scores.
  # @!attribute [rw] summary_with_metadata
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummaryWithMetadata]
  #     Summary with metadata information.
  class Summary
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Safety Attribute categories and their associated confidence scores.
    # @!attribute [rw] categories
    #   @return [::Array<::String>]
    #     The display names of Safety Attribute categories associated with the
    #     generated content. Order matches the Scores.
    # @!attribute [rw] scores
    #   @return [::Array<::Float>]
    #     The confidence scores of the each category, higher
    #     value means higher confidence. Order matches the Categories.
    class SafetyAttributes
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation metadata.
    # @!attribute [rw] citations
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Citation>]
    #     Citations for segments.
    class CitationMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation info for a segment.
    # @!attribute [rw] start_index
    #   @return [::Integer]
    #     Index indicates the start of the segment, measured in bytes/unicode.
    # @!attribute [rw] end_index
    #   @return [::Integer]
    #     End of the attributed segment, exclusive.
    # @!attribute [rw] sources
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::CitationSource>]
    #     Citation sources for the attributed segment.
    class Citation
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation source.
    # @!attribute [rw] reference_index
    #   @return [::Integer]
    #     Document reference index from SummaryWithMetadata.references.
    #     It is 0-indexed and the value will be zero if the reference_index is
    #     not set explicitly.
    class CitationSource
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Document reference.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title of the document.
    # @!attribute [rw] document
    #   @return [::String]
    #     Required.
    #     {::Google::Cloud::DiscoveryEngine::V1beta::Document#name Document.name} of
    #     the document. Full resource name of the referenced document, in the
    #     format
    #     `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
    # @!attribute [rw] uri
    #   @return [::String]
    #     Cloud Storage or HTTP uri for the document.
    # @!attribute [rw] chunk_contents
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Reference::ChunkContent>]
    #     List of cited chunk contents derived from document content.
    class Reference
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Chunk content.
      # @!attribute [rw] content
      #   @return [::String]
      #     Chunk textual content.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      # @!attribute [r] blob_attachment_indexes
      #   @return [::Array<::Integer>]
      #     Output only. Stores indexes of blobattachments linked to this chunk.
      class ChunkContent
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end

    # Stores binarydata attached to text answer, e.g. image, video, audio, etc.
    # @!attribute [r] data
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment::Blob]
    #     Output only. The blob data.
    # @!attribute [r] attribution_type
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment::AttributionType]
    #     Output only. The attribution type of the blob.
    class BlobAttachment
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Stores type and data of the blob.
      # @!attribute [r] mime_type
      #   @return [::String]
      #     Output only. The media type (MIME type) of the generated data.
      # @!attribute [r] data
      #   @return [::String]
      #     Output only. Raw bytes.
      class Blob
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Defines the attribution type of the blob.
      module AttributionType
        # Unspecified attribution type.
        ATTRIBUTION_TYPE_UNSPECIFIED = 0

        # The attachment data is from the corpus.
        CORPUS = 1

        # The attachment data is generated by the model through code
        # generation.
        GENERATED = 2
      end
    end

    # Summary with metadata information.
    # @!attribute [rw] summary
    #   @return [::String]
    #     Summary text with no citation information.
    # @!attribute [rw] citation_metadata
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::CitationMetadata]
    #     Citation metadata for given summary.
    # @!attribute [rw] references
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Reference>]
    #     Document References.
    # @!attribute [r] blob_attachments
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment>]
    #     Output only. Store multimodal data for answer enhancement.
    class SummaryWithMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # An Enum for summary-skipped reasons.
    module SummarySkippedReason
      # Default value. The summary skipped reason is not specified.
      SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0

      # The adversarial query ignored case.
      #
      # Only used when
      # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query}
      # is set to `true`.
      ADVERSARIAL_QUERY_IGNORED = 1

      # The non-summary seeking query ignored case.
      #
      # Google skips the summary if the query is chit chat.
      # Only used when
      # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query}
      # is set to `true`.
      NON_SUMMARY_SEEKING_QUERY_IGNORED = 2

      # The out-of-domain query ignored case.
      #
      # Google skips the summary if there are no high-relevance search results.
      # For example, the data store contains facts about company A but the
      # user query is asking questions about company B.
      OUT_OF_DOMAIN_QUERY_IGNORED = 3

      # The potential policy violation case.
      #
      # Google skips the summary if there is a potential policy violation
      # detected. This includes content that may be violent or toxic.
      POTENTIAL_POLICY_VIOLATION = 4

      # The LLM addon not enabled case.
      #
      # Google skips the summary if the LLM addon is not enabled.
      LLM_ADDON_NOT_ENABLED = 5

      # The no relevant content case.
      #
      # Google skips the summary if there is no relevant content in the
      # retrieved search results.
      NO_RELEVANT_CONTENT = 6

      # The jail-breaking query ignored case.
      #
      # For example, "Reply in the tone of a competing company's CEO".
      # Only used when
      # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query]
      # is set to `true`.
      JAIL_BREAKING_QUERY_IGNORED = 7

      # The customer policy violation case.
      #
      # Google skips the summary if there is a customer policy violation
      # detected. The policy is defined by the customer.
      CUSTOMER_POLICY_VIOLATION = 8

      # The non-answer seeking query ignored case.
      #
      # Google skips the summary if the query doesn't have clear intent.
      # Only used when
      # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query]
      # is set to `true`.
      NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9

      # The time out case.
      #
      # Google skips the summary if the time out.
      TIME_OUT = 10
    end
  end

  # Debug information specifically related to forward geocoding issues arising
  # from Geolocation Search.
  # @!attribute [rw] original_address_query
  #   @return [::String]
  #     The address from which forward geocoding ingestion produced issues.
  # @!attribute [rw] error_message
  #   @return [::String]
  #     The error produced.
  class GeoSearchDebugInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Information describing query expansion including whether expansion has
  # occurred.
  # @!attribute [rw] expanded_query
  #   @return [::Boolean]
  #     Bool describing whether query expansion has occurred.
  # @!attribute [rw] pinned_result_count
  #   @return [::Integer]
  #     Number of pinned results. This field will only be set when expansion
  #     happens and
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results}
  #     is set to true.
  class QueryExpansionInfo
    include ::Google::Protobuf::MessageExts
    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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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]
  #     Name of the session.
  #     If the auto-session mode is used (when
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#session SearchRequest.session}
  #     ends with "-"), this field holds the newly generated session name.
  # @!attribute [rw] query_id
  #   @return [::String]
  #     Query ID that corresponds to this search API call.
  #     One session can have multiple turns, each with a unique query ID.
  #
  #     By specifying the session name and this query ID in the Answer API call,
  #     the answer generation happens in the context of the search results from
  #     this search call.
  class SessionInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # OneBoxResult is a holder for all results of specific type that we want
  # to display in UI differently.
  # @!attribute [rw] one_box_type
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::OneBoxResult::OneBoxType]
  #     The type of One Box result.
  # @!attribute [rw] search_results
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult>]
  #     The search results for this One Box.
  class OneBoxResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The type of One Box result.
    module OneBoxType
      # Default value. Should not be used.
      ONE_BOX_TYPE_UNSPECIFIED = 0

      # One Box result contains people results.
      PEOPLE = 1

      # One Box result contains organization results.
      ORGANIZATION = 2

      # One Box result contains slack results.
      SLACK = 3

      # One Box result contains Knowledge Graph search responses.
      KNOWLEDGE_GRAPH = 4
    end
  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

#total_size::Integer

The estimated total count of matched items irrespective of pagination. The count of results returned by pagination may be less than the total_size that matches.

Returns:

  • (::Integer)

    The estimated total count of matched items irrespective of pagination. The count of results returned by pagination may be less than the total_size that matches.



1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
# File 'proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb', line 1646

class SearchResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents the search results.
  # @!attribute [rw] id
  #   @return [::String]
  #     {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id} of the
  #     searched {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}.
  # @!attribute [rw] document
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Document]
  #     The document data snippet in the search response. Only fields that are
  #     marked as `retrievable` are populated.
  # @!attribute [rw] chunk
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Chunk]
  #     The chunk data in the search response if the
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec#search_result_mode SearchRequest.ContentSearchSpec.search_result_mode}
  #     is set to
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS CHUNKS}.
  # @!attribute [r] model_scores
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1beta::DoubleList}]
  #     Output only. Google provided available scores.
  # @!attribute [rw] rank_signals
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals]
  #     Optional. A set of ranking signals associated with the result.
  class SearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A set of ranking signals.
    # @!attribute [rw] keyword_similarity_score
    #   @return [::Float]
    #     Optional. Keyword matching adjustment.
    # @!attribute [rw] relevance_score
    #   @return [::Float]
    #     Optional. Semantic relevance adjustment.
    # @!attribute [rw] semantic_similarity_score
    #   @return [::Float]
    #     Optional. Semantic similarity adjustment.
    # @!attribute [rw] pctr_rank
    #   @return [::Float]
    #     Optional. Predicted conversion rate adjustment as a rank.
    # @!attribute [rw] topicality_rank
    #   @return [::Float]
    #     Optional. Topicality adjustment as a rank.
    # @!attribute [rw] document_age
    #   @return [::Float]
    #     Optional. Age of the document in hours.
    # @!attribute [rw] boosting_factor
    #   @return [::Float]
    #     Optional. Combined custom boosts for a doc.
    # @!attribute [rw] default_rank
    #   @return [::Float]
    #     Optional. The default rank of the result.
    # @!attribute [rw] custom_signals
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult::RankSignals::CustomSignal>]
    #     Optional. A list of custom clearbox signals.
    # @!attribute [rw] precomputed_expression_values
    #   @return [::Array<::Float>]
    #     Optional. A list of precomputed expression results for a given
    #     document, in the same order as requested in
    #     `SearchRequest.custom_ranking_params.expressions_to_precompute`.
    class RankSignals
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Custom clearbox signal represented by name and value pair.
      # @!attribute [rw] name
      #   @return [::String]
      #     Optional. Name of the signal.
      # @!attribute [rw] value
      #   @return [::Float]
      #     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::V1beta::DoubleList]
    class ModelScoresEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A facet result.
  # @!attribute [rw] key
  #   @return [::String]
  #     The key for this facet. For example, `"colors"` or `"price"`. It matches
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#key SearchRequest.FacetSpec.FacetKey.key}.
  # @!attribute [rw] values
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Facet::FacetValue>]
  #     The facet values for this field.
  # @!attribute [rw] dynamic_facet
  #   @return [::Boolean]
  #     Whether the facet is dynamically generated.
  class Facet
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A facet value which contains value names and their count.
    # @!attribute [rw] value
    #   @return [::String]
    #     Text value of a facet, such as "Black" for facet "colors".
    #
    #     Note: The following fields are mutually exclusive: `value`, `interval`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] interval
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Interval]
    #     Interval value for a facet, such as [10, 20) for facet "price". It
    #     matches
    #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals}.
    #
    #     Note: The following fields are mutually exclusive: `interval`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] count
    #   @return [::Integer]
    #     Number of items that have this facet value.
    class FacetValue
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Guided search result. The guided search helps user to refine the search
  # results and narrow down to the real needs from a broaded search results.
  # @!attribute [rw] refinement_attributes
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::GuidedSearchResult::RefinementAttribute>]
  #     A list of ranked refinement attributes.
  # @!attribute [rw] follow_up_questions
  #   @return [::Array<::String>]
  #     Suggested follow-up questions.
  class GuidedSearchResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Useful attribute for search result refinements.
    # @!attribute [rw] attribute_key
    #   @return [::String]
    #     Attribute key used to refine the results. For example, `"movie_type"`.
    # @!attribute [rw] attribute_value
    #   @return [::String]
    #     Attribute value used to refine the results. For example, `"drama"`.
    class RefinementAttribute
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Summary of the top N search results specified by the summary spec.
  # @!attribute [rw] summary_text
  #   @return [::String]
  #     The summary content.
  # @!attribute [rw] summary_skipped_reasons
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummarySkippedReason>]
  #     Additional summary-skipped reasons. This provides the reason for ignored
  #     cases. If nothing is skipped, this field is not set.
  # @!attribute [rw] safety_attributes
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SafetyAttributes]
  #     A collection of Safety Attribute categories and their associated
  #     confidence scores.
  # @!attribute [rw] summary_with_metadata
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummaryWithMetadata]
  #     Summary with metadata information.
  class Summary
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Safety Attribute categories and their associated confidence scores.
    # @!attribute [rw] categories
    #   @return [::Array<::String>]
    #     The display names of Safety Attribute categories associated with the
    #     generated content. Order matches the Scores.
    # @!attribute [rw] scores
    #   @return [::Array<::Float>]
    #     The confidence scores of the each category, higher
    #     value means higher confidence. Order matches the Categories.
    class SafetyAttributes
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation metadata.
    # @!attribute [rw] citations
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Citation>]
    #     Citations for segments.
    class CitationMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation info for a segment.
    # @!attribute [rw] start_index
    #   @return [::Integer]
    #     Index indicates the start of the segment, measured in bytes/unicode.
    # @!attribute [rw] end_index
    #   @return [::Integer]
    #     End of the attributed segment, exclusive.
    # @!attribute [rw] sources
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::CitationSource>]
    #     Citation sources for the attributed segment.
    class Citation
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Citation source.
    # @!attribute [rw] reference_index
    #   @return [::Integer]
    #     Document reference index from SummaryWithMetadata.references.
    #     It is 0-indexed and the value will be zero if the reference_index is
    #     not set explicitly.
    class CitationSource
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Document reference.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title of the document.
    # @!attribute [rw] document
    #   @return [::String]
    #     Required.
    #     {::Google::Cloud::DiscoveryEngine::V1beta::Document#name Document.name} of
    #     the document. Full resource name of the referenced document, in the
    #     format
    #     `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
    # @!attribute [rw] uri
    #   @return [::String]
    #     Cloud Storage or HTTP uri for the document.
    # @!attribute [rw] chunk_contents
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Reference::ChunkContent>]
    #     List of cited chunk contents derived from document content.
    class Reference
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Chunk content.
      # @!attribute [rw] content
      #   @return [::String]
      #     Chunk textual content.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      # @!attribute [r] blob_attachment_indexes
      #   @return [::Array<::Integer>]
      #     Output only. Stores indexes of blobattachments linked to this chunk.
      class ChunkContent
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end

    # Stores binarydata attached to text answer, e.g. image, video, audio, etc.
    # @!attribute [r] data
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment::Blob]
    #     Output only. The blob data.
    # @!attribute [r] attribution_type
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment::AttributionType]
    #     Output only. The attribution type of the blob.
    class BlobAttachment
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Stores type and data of the blob.
      # @!attribute [r] mime_type
      #   @return [::String]
      #     Output only. The media type (MIME type) of the generated data.
      # @!attribute [r] data
      #   @return [::String]
      #     Output only. Raw bytes.
      class Blob
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Defines the attribution type of the blob.
      module AttributionType
        # Unspecified attribution type.
        ATTRIBUTION_TYPE_UNSPECIFIED = 0

        # The attachment data is from the corpus.
        CORPUS = 1

        # The attachment data is generated by the model through code
        # generation.
        GENERATED = 2
      end
    end

    # Summary with metadata information.
    # @!attribute [rw] summary
    #   @return [::String]
    #     Summary text with no citation information.
    # @!attribute [rw] citation_metadata
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::CitationMetadata]
    #     Citation metadata for given summary.
    # @!attribute [rw] references
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::Reference>]
    #     Document References.
    # @!attribute [r] blob_attachments
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::BlobAttachment>]
    #     Output only. Store multimodal data for answer enhancement.
    class SummaryWithMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # An Enum for summary-skipped reasons.
    module SummarySkippedReason
      # Default value. The summary skipped reason is not specified.
      SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0

      # The adversarial query ignored case.
      #
      # Only used when
      # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query}
      # is set to `true`.
      ADVERSARIAL_QUERY_IGNORED = 1

      # The non-summary seeking query ignored case.
      #
      # Google skips the summary if the query is chit chat.
      # Only used when
      # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query}
      # is set to `true`.
      NON_SUMMARY_SEEKING_QUERY_IGNORED = 2

      # The out-of-domain query ignored case.
      #
      # Google skips the summary if there are no high-relevance search results.
      # For example, the data store contains facts about company A but the
      # user query is asking questions about company B.
      OUT_OF_DOMAIN_QUERY_IGNORED = 3

      # The potential policy violation case.
      #
      # Google skips the summary if there is a potential policy violation
      # detected. This includes content that may be violent or toxic.
      POTENTIAL_POLICY_VIOLATION = 4

      # The LLM addon not enabled case.
      #
      # Google skips the summary if the LLM addon is not enabled.
      LLM_ADDON_NOT_ENABLED = 5

      # The no relevant content case.
      #
      # Google skips the summary if there is no relevant content in the
      # retrieved search results.
      NO_RELEVANT_CONTENT = 6

      # The jail-breaking query ignored case.
      #
      # For example, "Reply in the tone of a competing company's CEO".
      # Only used when
      # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query]
      # is set to `true`.
      JAIL_BREAKING_QUERY_IGNORED = 7

      # The customer policy violation case.
      #
      # Google skips the summary if there is a customer policy violation
      # detected. The policy is defined by the customer.
      CUSTOMER_POLICY_VIOLATION = 8

      # The non-answer seeking query ignored case.
      #
      # Google skips the summary if the query doesn't have clear intent.
      # Only used when
      # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query]
      # is set to `true`.
      NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9

      # The time out case.
      #
      # Google skips the summary if the time out.
      TIME_OUT = 10
    end
  end

  # Debug information specifically related to forward geocoding issues arising
  # from Geolocation Search.
  # @!attribute [rw] original_address_query
  #   @return [::String]
  #     The address from which forward geocoding ingestion produced issues.
  # @!attribute [rw] error_message
  #   @return [::String]
  #     The error produced.
  class GeoSearchDebugInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Information describing query expansion including whether expansion has
  # occurred.
  # @!attribute [rw] expanded_query
  #   @return [::Boolean]
  #     Bool describing whether query expansion has occurred.
  # @!attribute [rw] pinned_result_count
  #   @return [::Integer]
  #     Number of pinned results. This field will only be set when expansion
  #     happens and
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results}
  #     is set to true.
  class QueryExpansionInfo
    include ::Google::Protobuf::MessageExts
    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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::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]
  #     Name of the session.
  #     If the auto-session mode is used (when
  #     {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#session SearchRequest.session}
  #     ends with "-"), this field holds the newly generated session name.
  # @!attribute [rw] query_id
  #   @return [::String]
  #     Query ID that corresponds to this search API call.
  #     One session can have multiple turns, each with a unique query ID.
  #
  #     By specifying the session name and this query ID in the Answer API call,
  #     the answer generation happens in the context of the search results from
  #     this search call.
  class SessionInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # OneBoxResult is a holder for all results of specific type that we want
  # to display in UI differently.
  # @!attribute [rw] one_box_type
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::OneBoxResult::OneBoxType]
  #     The type of One Box result.
  # @!attribute [rw] search_results
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult>]
  #     The search results for this One Box.
  class OneBoxResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The type of One Box result.
    module OneBoxType
      # Default value. Should not be used.
      ONE_BOX_TYPE_UNSPECIFIED = 0

      # One Box result contains people results.
      PEOPLE = 1

      # One Box result contains organization results.
      ORGANIZATION = 2

      # One Box result contains slack results.
      SLACK = 3

      # One Box result contains Knowledge Graph search responses.
      KNOWLEDGE_GRAPH = 4
    end
  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