Class: Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1Control

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

Overview

Defines a conditioned behavior to employ during serving. Must be attached to a ServingConfig to be considered at serving time. Permitted actions dependent on SolutionType.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1Control

Returns a new instance of GoogleCloudDiscoveryengineV1Control.



827
828
829
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 827

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

Instance Attribute Details

#associated_serving_config_idsArray<String>

Output only. List of all ServingConfig ids this control is attached to. May take up to 10 minutes to update after changes. Corresponds to the JSON property associatedServingConfigIds

Returns:

  • (Array<String>)


769
770
771
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 769

def associated_serving_config_ids
  @associated_serving_config_ids
end

#boost_actionGoogle::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1ControlBoostAction

Adjusts order of products in returned list. Corresponds to the JSON property boostAction



774
775
776
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 774

def boost_action
  @boost_action
end

#conditionsArray<Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1Condition>

Determines when the associated action will trigger. Omit to always apply the action. Currently only a single condition may be specified. Otherwise an INVALID ARGUMENT error is thrown. Corresponds to the JSON property conditions



781
782
783
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 781

def conditions
  @conditions
end

#display_nameString

Required. Human readable name. The identifier used in UI views. Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID ARGUMENT error is thrown. Corresponds to the JSON property displayName

Returns:

  • (String)


788
789
790
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 788

def display_name
  @display_name
end

#filter_actionGoogle::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1ControlFilterAction

Specified which products may be included in results. Uses same filter as boost. Corresponds to the JSON property filterAction



793
794
795
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 793

def filter_action
  @filter_action
end

#nameString

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

Returns:

  • (String)


799
800
801
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 799

def name
  @name
end

#redirect_actionGoogle::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1ControlRedirectAction

Redirects a shopper to the provided URI. Corresponds to the JSON property redirectAction



804
805
806
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 804

def redirect_action
  @redirect_action
end

#solution_typeString

Required. Immutable. What solution the control belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown. Corresponds to the JSON property solutionType

Returns:

  • (String)


810
811
812
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 810

def solution_type
  @solution_type
end

#synonyms_actionGoogle::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1ControlSynonymsAction

Creates a set of terms that will act as synonyms of one another. Example: " happy" will also be considered as "glad", "glad" will also be considered as " happy". Corresponds to the JSON property synonymsAction



817
818
819
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 817

def synonyms_action
  @synonyms_action
end

#use_casesArray<String>

Specifies the use case for the control. Affects what condition fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only allow one use case per control. Must be set when solution_type is SolutionType. SOLUTION_TYPE_SEARCH. Corresponds to the JSON property useCases

Returns:

  • (Array<String>)


825
826
827
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 825

def use_cases
  @use_cases
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



832
833
834
835
836
837
838
839
840
841
842
843
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 832

def update!(**args)
  @associated_serving_config_ids = args[:associated_serving_config_ids] if args.key?(:associated_serving_config_ids)
  @boost_action = args[:boost_action] if args.key?(:boost_action)
  @conditions = args[:conditions] if args.key?(:conditions)
  @display_name = args[:display_name] if args.key?(:display_name)
  @filter_action = args[:filter_action] if args.key?(:filter_action)
  @name = args[:name] if args.key?(:name)
  @redirect_action = args[:redirect_action] if args.key?(:redirect_action)
  @solution_type = args[:solution_type] if args.key?(:solution_type)
  @synonyms_action = args[:synonyms_action] if args.key?(:synonyms_action)
  @use_cases = args[:use_cases] if args.key?(:use_cases)
end