Class: Google::Apis::RetailV2::GoogleCloudRetailV2SearchResponse

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/retail_v2/classes.rb,
lib/google/apis/retail_v2/representations.rb,
lib/google/apis/retail_v2/representations.rb

Overview

Response message for SearchService.Search method.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2SearchResponse

Returns a new instance of GoogleCloudRetailV2SearchResponse.



2807
2808
2809
# File 'lib/google/apis/retail_v2/classes.rb', line 2807

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#attribution_tokenString

A unique search token. This should be included in the UserEvent logs resulting from this search, which enables accurate attribution of search model performance. Corresponds to the JSON property attributionToken

Returns:

  • (String)


2764
2765
2766
# File 'lib/google/apis/retail_v2/classes.rb', line 2764

def attribution_token
  @attribution_token
end

#corrected_queryString

If spell correction applies, the corrected query. Otherwise, empty. Corresponds to the JSON property correctedQuery

Returns:

  • (String)


2769
2770
2771
# File 'lib/google/apis/retail_v2/classes.rb', line 2769

def corrected_query
  @corrected_query
end

#facetsArray<Google::Apis::RetailV2::GoogleCloudRetailV2SearchResponseFacet>

Results of facets requested by user. Corresponds to the JSON property facets



2774
2775
2776
# File 'lib/google/apis/retail_v2/classes.rb', line 2774

def facets
  @facets
end

#next_page_tokenString

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. Corresponds to the JSON property nextPageToken

Returns:

  • (String)


2780
2781
2782
# File 'lib/google/apis/retail_v2/classes.rb', line 2780

def next_page_token
  @next_page_token
end

#query_expansion_infoGoogle::Apis::RetailV2::GoogleCloudRetailV2SearchResponseQueryExpansionInfo

Information describing query expansion including whether expansion has occurred. Corresponds to the JSON property queryExpansionInfo



2786
2787
2788
# File 'lib/google/apis/retail_v2/classes.rb', line 2786

def query_expansion_info
  @query_expansion_info
end

#redirect_uriString

The URI of a customer-defined redirect page. If redirect action is triggered, no search will be performed, and only redirect_uri and attribution_token will be set in the response. Corresponds to the JSON property redirectUri

Returns:

  • (String)


2793
2794
2795
# File 'lib/google/apis/retail_v2/classes.rb', line 2793

def redirect_uri
  @redirect_uri
end

#resultsArray<Google::Apis::RetailV2::GoogleCloudRetailV2SearchResponseSearchResult>

A list of matched items. The order represents the ranking. Corresponds to the JSON property results



2798
2799
2800
# File 'lib/google/apis/retail_v2/classes.rb', line 2798

def results
  @results
end

#total_sizeFixnum

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. Corresponds to the JSON property totalSize

Returns:

  • (Fixnum)


2805
2806
2807
# File 'lib/google/apis/retail_v2/classes.rb', line 2805

def total_size
  @total_size
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
# File 'lib/google/apis/retail_v2/classes.rb', line 2812

def update!(**args)
  @attribution_token = args[:attribution_token] if args.key?(:attribution_token)
  @corrected_query = args[:corrected_query] if args.key?(:corrected_query)
  @facets = args[:facets] if args.key?(:facets)
  @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
  @query_expansion_info = args[:query_expansion_info] if args.key?(:query_expansion_info)
  @redirect_uri = args[:redirect_uri] if args.key?(:redirect_uri)
  @results = args[:results] if args.key?(:results)
  @total_size = args[:total_size] if args.key?(:total_size)
end