Class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaConversationalSearchRequest

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

Overview

Request message for ConversationalSearchService.ConversationalSearch method.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2betaConversationalSearchRequest

Returns a new instance of GoogleCloudRetailV2betaConversationalSearchRequest.



3970
3971
3972
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3970

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)


3897
3898
3899
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3897

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)


3905
3906
3907
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3905

def conversation_id
  @conversation_id
end

#conversational_filtering_specGoogle::Apis::RetailV2beta::GoogleCloudRetailV2betaConversationalSearchRequestConversationalFilteringSpec

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



3911
3912
3913
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3911

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>)


3922
3923
3924
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3922

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)


3928
3929
3930
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3928

def query
  @query
end

#safety_settingsArray<Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSafetySetting>

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



3933
3934
3935
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3933

def safety_settings
  @safety_settings
end

#search_paramsGoogle::Apis::RetailV2beta::GoogleCloudRetailV2betaConversationalSearchRequestSearchParams

Search parameters. Corresponds to the JSON property searchParams



3938
3939
3940
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3938

def search_params
  @search_params
end

#user_infoGoogle::Apis::RetailV2beta::GoogleCloudRetailV2betaUserInfo

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



3943
3944
3945
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3943

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>)


3958
3959
3960
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3958

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)


3968
3969
3970
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3968

def visitor_id
  @visitor_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3975

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