Class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaControl

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

Configures dynamic metadata that can be linked to a ServingConfig and affect search or recommendation results at serving time.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2alphaControl

Returns a new instance of GoogleCloudRetailV2alphaControl.



2240
2241
2242
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 2240

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

Instance Attribute Details

#associated_serving_config_idsArray<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

Returns:

  • (Array<String>)


2197
2198
2199
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 2197

def associated_serving_config_ids
  @associated_serving_config_ids
end

#display_nameString

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

Returns:

  • (String)


2204
2205
2206
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 2204

def display_name
  @display_name
end

#facet_specGoogle::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchRequestFacetSpec

A facet specification to perform faceted search. Corresponds to the JSON property facetSpec



2209
2210
2211
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 2209

def facet_spec
  @facet_spec
end

#nameString

Immutable. Fully qualified name projects/*/locations/global/catalogs/*/ controls/* Corresponds to the JSON property name

Returns:

  • (String)


2215
2216
2217
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 2215

def name
  @name
end

#ruleGoogle::Apis::RetailV2alpha::GoogleCloudRetailV2alphaRule

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



2222
2223
2224
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 2222

def rule
  @rule
end

#search_solution_use_caseArray<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

Returns:

  • (Array<String>)


2230
2231
2232
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 2230

def search_solution_use_case
  @search_solution_use_case
end

#solution_typesArray<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

Returns:

  • (Array<String>)


2238
2239
2240
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 2238

def solution_types
  @solution_types
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2245
2246
2247
2248
2249
2250
2251
2252
2253
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 2245

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)
  @facet_spec = args[:facet_spec] if args.key?(:facet_spec)
  @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