Class: Google::Apis::RetailV2::GoogleCloudRetailV2ConversationalSearchRequest
- Inherits:
-
Object
- Object
- Google::Apis::RetailV2::GoogleCloudRetailV2ConversationalSearchRequest
- 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
Request message for ConversationalSearchService.ConversationalSearch method.
Instance Attribute Summary collapse
-
#branch ⇒ String
Required.
-
#conversation_id ⇒ String
Optional.
-
#conversational_filtering_spec ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2ConversationalSearchRequestConversationalFilteringSpec
This field specifies all conversational filtering related parameters addition to conversational retail search.
-
#page_categories ⇒ Array<String>
Optional.
-
#query ⇒ String
Optional.
-
#safety_settings ⇒ Array<Google::Apis::RetailV2::GoogleCloudRetailV2SafetySetting>
Optional.
-
#search_params ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2ConversationalSearchRequestSearchParams
Search parameters.
-
#user_info ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2UserInfo
Information of an end user.
-
#user_labels ⇒ Hash<String,String>
Optional.
-
#visitor_id ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudRetailV2ConversationalSearchRequest
constructor
A new instance of GoogleCloudRetailV2ConversationalSearchRequest.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudRetailV2ConversationalSearchRequest
Returns a new instance of GoogleCloudRetailV2ConversationalSearchRequest.
1673 1674 1675 |
# File 'lib/google/apis/retail_v2/classes.rb', line 1673 def initialize(**args) update!(**args) end |
Instance Attribute Details
#branch ⇒ String
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
1599 1600 1601 |
# File 'lib/google/apis/retail_v2/classes.rb', line 1599 def branch @branch end |
#conversation_id ⇒ String
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
1607 1608 1609 |
# File 'lib/google/apis/retail_v2/classes.rb', line 1607 def conversation_id @conversation_id end |
#conversational_filtering_spec ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2ConversationalSearchRequestConversationalFilteringSpec
This field specifies all conversational filtering related parameters addition
to conversational retail search.
Corresponds to the JSON property conversationalFilteringSpec
1613 1614 1615 |
# File 'lib/google/apis/retail_v2/classes.rb', line 1613 def conversational_filtering_spec @conversational_filtering_spec end |
#page_categories ⇒ Array<String>
Optional. The categories associated with a category page. Must be set for
category navigation queries to achieve good search quality. The format should
be the same as UserEvent.page_categories; To represent the full path of
category, use the '>' sign, with one space on each side, 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
1625 1626 1627 |
# File 'lib/google/apis/retail_v2/classes.rb', line 1625 def page_categories @page_categories end |
#query ⇒ String
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
1631 1632 1633 |
# File 'lib/google/apis/retail_v2/classes.rb', line 1631 def query @query end |
#safety_settings ⇒ Array<Google::Apis::RetailV2::GoogleCloudRetailV2SafetySetting>
Optional. The safety settings to be applied to the generated content.
Corresponds to the JSON property safetySettings
1636 1637 1638 |
# File 'lib/google/apis/retail_v2/classes.rb', line 1636 def safety_settings @safety_settings end |
#search_params ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2ConversationalSearchRequestSearchParams
Search parameters.
Corresponds to the JSON property searchParams
1641 1642 1643 |
# File 'lib/google/apis/retail_v2/classes.rb', line 1641 def search_params @search_params end |
#user_info ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2UserInfo
Information of an end user.
Corresponds to the JSON property userInfo
1646 1647 1648 |
# File 'lib/google/apis/retail_v2/classes.rb', line 1646 def user_info @user_info end |
#user_labels ⇒ Hash<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
1661 1662 1663 |
# File 'lib/google/apis/retail_v2/classes.rb', line 1661 def user_labels @user_labels end |
#visitor_id ⇒ String
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
1671 1672 1673 |
# File 'lib/google/apis/retail_v2/classes.rb', line 1671 def visitor_id @visitor_id end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 |
# File 'lib/google/apis/retail_v2/classes.rb', line 1678 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 |