Class: Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaControlBoostAction

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

Adjusts order of products in returned list.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1alphaControlBoostAction

Returns a new instance of GoogleCloudDiscoveryengineV1alphaControlBoostAction.



520
521
522
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 520

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

Instance Attribute Details

#boostFloat

Required. Strength of the boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0 (No-op). Corresponds to the JSON property boost

Returns:

  • (Float)


510
511
512
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 510

def boost
  @boost
end

#filterString

Required. Specifies which products to apply the boost to. If no filter is provided all products will be boosted (No-op). Syntax documentation: https:// cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown. Corresponds to the JSON property filter

Returns:

  • (String)


518
519
520
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 518

def filter
  @filter
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



525
526
527
528
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 525

def update!(**args)
  @boost = args[:boost] if args.key?(:boost)
  @filter = args[:filter] if args.key?(:filter)
end