Class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaConversationalSearchRequest

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

Overview

Request message for ConversationalSearchService.ConversationalSearch method.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2alphaConversationalSearchRequest

Returns a new instance of GoogleCloudRetailV2alphaConversationalSearchRequest.



2890
2891
2892
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 2890

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

Instance Attribute Details

#branchString

Required. The branch resource name, such as projects/*/locations/global/ catalogs/default_catalog/branches/0. Use "default_branch" as the branch ID or leave this field empty, to search products under the default branch. Corresponds to the JSON property branch

Returns:

  • (String)


2817
2818
2819
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 2817

def branch
  @branch
end

#conversation_idString

Optional. This field specifies the conversation id, which maintains the state of the conversation between client side and server side. Use the value from the previous ConversationalSearchResponse.conversation_id. For the initial request, this should be empty. Corresponds to the JSON property conversationId

Returns:

  • (String)


2825
2826
2827
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 2825

def conversation_id
  @conversation_id
end

#conversational_filtering_specGoogle::Apis::RetailV2alpha::GoogleCloudRetailV2alphaConversationalSearchRequestConversationalFilteringSpec

This field specifies all conversational filtering related parameters addition to conversational retail search. Corresponds to the JSON property conversationalFilteringSpec



2831
2832
2833
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 2831

def conversational_filtering_spec
  @conversational_filtering_spec
end

#page_categoriesArray<String>

Optional. The categories associated with a category page. Must be set for category navigation queries to achieve good search quality. The format should be the same as UserEvent.page_categories; To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: "pageCategories" : ["Sales > 2017 Black Friday Deals"]. Corresponds to the JSON property pageCategories

Returns:

  • (Array<String>)


2842
2843
2844
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 2842

def page_categories
  @page_categories
end

#queryString

Optional. Raw search query to be searched for. If this field is empty, the request is considered a category browsing request. Corresponds to the JSON property query

Returns:

  • (String)


2848
2849
2850
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 2848

def query
  @query
end

#safety_settingsArray<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSafetySetting>

Optional. The safety settings to be applied to the generated content. Corresponds to the JSON property safetySettings



2853
2854
2855
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 2853

def safety_settings
  @safety_settings
end

#search_paramsGoogle::Apis::RetailV2alpha::GoogleCloudRetailV2alphaConversationalSearchRequestSearchParams

Search parameters. Corresponds to the JSON property searchParams



2858
2859
2860
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 2858

def search_params
  @search_params
end

#user_infoGoogle::Apis::RetailV2alpha::GoogleCloudRetailV2alphaUserInfo

Information of an end user. Corresponds to the JSON property userInfo



2863
2864
2865
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 2863

def 
  @user_info
end

#user_labelsHash<String,String>

Optional. The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64.

  • Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See Google Cloud Document for more details. Corresponds to the JSON property userLabels

Returns:

  • (Hash<String,String>)


2878
2879
2880
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 2878

def user_labels
  @user_labels
end

#visitor_idString

Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This should be the same identifier as UserEvent.visitor_id. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponds to the JSON property visitorId

Returns:

  • (String)


2888
2889
2890
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 2888

def visitor_id
  @visitor_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 2895

def update!(**args)
  @branch = args[:branch] if args.key?(:branch)
  @conversation_id = args[:conversation_id] if args.key?(:conversation_id)
  @conversational_filtering_spec = args[:conversational_filtering_spec] if args.key?(:conversational_filtering_spec)
  @page_categories = args[:page_categories] if args.key?(:page_categories)
  @query = args[:query] if args.key?(:query)
  @safety_settings = args[:safety_settings] if args.key?(:safety_settings)
  @search_params = args[:search_params] if args.key?(:search_params)
  @user_info = args[:user_info] if args.key?(:user_info)
  @user_labels = args[:user_labels] if args.key?(:user_labels)
  @visitor_id = args[:visitor_id] if args.key?(:visitor_id)
end