Class: Google::Apis::RetailV2::GoogleCloudRetailV2Control
- Inherits:
-
Object
- Object
- Google::Apis::RetailV2::GoogleCloudRetailV2Control
- 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
Configures dynamic metadata that can be linked to a ServingConfig and affect search or recommendation results at serving time.
Instance Attribute Summary collapse
-
#associated_serving_config_ids ⇒ Array<String>
Output only.
-
#display_name ⇒ String
Required.
-
#name ⇒ String
Immutable.
-
#rule ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2Rule
A rule is a condition-action pair * A condition defines when a rule is to be triggered.
-
#search_solution_use_case ⇒ Array<String>
Specifies the use case for the control.
-
#solution_types ⇒ Array<String>
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudRetailV2Control
constructor
A new instance of GoogleCloudRetailV2Control.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudRetailV2Control
Returns a new instance of GoogleCloudRetailV2Control.
1183 1184 1185 |
# File 'lib/google/apis/retail_v2/classes.rb', line 1183 def initialize(**args) update!(**args) end |
Instance Attribute Details
#associated_serving_config_ids ⇒ Array<String>
Output only. List of serving config ids that are associated with this control
in the same Catalog. Note the association is managed via the ServingConfig,
this is an output only denormalized view.
Corresponds to the JSON property associatedServingConfigIds
1145 1146 1147 |
# File 'lib/google/apis/retail_v2/classes.rb', line 1145 def associated_serving_config_ids @associated_serving_config_ids end |
#display_name ⇒ String
Required. The human readable control display name. Used in Retail UI. This
field must be a UTF-8 encoded string with a length limit of 128 characters.
Otherwise, an INVALID_ARGUMENT error is thrown.
Corresponds to the JSON property displayName
1152 1153 1154 |
# File 'lib/google/apis/retail_v2/classes.rb', line 1152 def display_name @display_name end |
#name ⇒ String
Immutable. Fully qualified name projects/*/locations/global/catalogs/*/
controls/*
Corresponds to the JSON property name
1158 1159 1160 |
# File 'lib/google/apis/retail_v2/classes.rb', line 1158 def name @name end |
#rule ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2Rule
A rule is a condition-action pair * A condition defines when a rule is to be
triggered. * An action specifies what occurs on that trigger. Currently rules
only work for controls with SOLUTION_TYPE_SEARCH.
Corresponds to the JSON property rule
1165 1166 1167 |
# File 'lib/google/apis/retail_v2/classes.rb', line 1165 def rule @rule end |
#search_solution_use_case ⇒ Array<String>
Specifies the use case for the control. Affects what condition fields can be
set. Only settable by search controls. Will default to
SEARCH_SOLUTION_USE_CASE_SEARCH if not specified. Currently only allow one
search_solution_use_case per control.
Corresponds to the JSON property searchSolutionUseCase
1173 1174 1175 |
# File 'lib/google/apis/retail_v2/classes.rb', line 1173 def search_solution_use_case @search_solution_use_case end |
#solution_types ⇒ Array<String>
Required. Immutable. The solution types that the control is used for.
Currently we support setting only one type of solution at creation time. Only
SOLUTION_TYPE_SEARCH value is supported at the moment. If no solution type is
provided at creation time, will default to SOLUTION_TYPE_SEARCH.
Corresponds to the JSON property solutionTypes
1181 1182 1183 |
# File 'lib/google/apis/retail_v2/classes.rb', line 1181 def solution_types @solution_types end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1188 1189 1190 1191 1192 1193 1194 1195 |
# File 'lib/google/apis/retail_v2/classes.rb', line 1188 def update!(**args) @associated_serving_config_ids = args[:associated_serving_config_ids] if args.key?(:associated_serving_config_ids) @display_name = args[:display_name] if args.key?(:display_name) @name = args[:name] if args.key?(:name) @rule = args[:rule] if args.key?(:rule) @search_solution_use_case = args[:search_solution_use_case] if args.key?(:search_solution_use_case) @solution_types = args[:solution_types] if args.key?(:solution_types) end |