Google Cloud Retail V2 Client - Class FacetPositionAdjustment (2.0.0-RC1)

Reference documentation and code samples for the Google Cloud Retail V2 Client class FacetPositionAdjustment.

Each facet position adjustment consists of a single attribute name (i.e.

facet key) along with a specified position.

Generated from protobuf message google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment

Namespace

Google \ Cloud \ Retail \ V2 \ Rule \ ForceReturnFacetAction

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ attribute_name string

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.

↳ position int

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

getAttributeName

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.

Returns
Type Description
string

setAttributeName

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.

Parameter
Name Description
var string
Returns
Type Description
$this

getPosition

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

Returns
Type Description
int

setPosition

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

Parameter
Name Description
var int
Returns
Type Description
$this