Class: Google::Apis::RetailV2::GoogleCloudRetailV2RuleForceReturnFacetActionFacetPositionAdjustment

Inherits:
Object
  • Object
show all
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

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) ⇒ GoogleCloudRetailV2RuleForceReturnFacetActionFacetPositionAdjustment

Returns a new instance of GoogleCloudRetailV2RuleForceReturnFacetActionFacetPositionAdjustment.



4588
4589
4590
# File 'lib/google/apis/retail_v2/classes.rb', line 4588

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)


4580
4581
4582
# File 'lib/google/apis/retail_v2/classes.rb', line 4580

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)


4586
4587
4588
# File 'lib/google/apis/retail_v2/classes.rb', line 4586

def position
  @position
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4593
4594
4595
4596
# File 'lib/google/apis/retail_v2/classes.rb', line 4593

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