Class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaRuleForceReturnFacetActionFacetPositionAdjustment

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

Each facet position adjustment consists of a single attribute name (i.e. facet key) along with a specified position.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2alphaRuleForceReturnFacetActionFacetPositionAdjustment

Returns a new instance of GoogleCloudRetailV2alphaRuleForceReturnFacetActionFacetPositionAdjustment.



6683
6684
6685
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 6683

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

Instance Attribute Details

#attribute_nameString

The attribute name to force return as a facet. Each attribute name should be a valid attribute name, be non-empty and contain at most 80 characters long. Corresponds to the JSON property attributeName

Returns:

  • (String)


6675
6676
6677
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 6675

def attribute_name
  @attribute_name
end

#positionFixnum

This is the position in the request as explained above. It should be strictly positive be at most 100. Corresponds to the JSON property position

Returns:

  • (Fixnum)


6681
6682
6683
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 6681

def position
  @position
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6688
6689
6690
6691
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 6688

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