Google Shopping Common Protos Client - Class CustomAttribute (0.2.0)

Reference documentation and code samples for the Google Shopping Common Protos Client class CustomAttribute.

A message that represents custom attributes. Exactly one of value or group_values must not be empty.

Generated from protobuf message google.shopping.type.CustomAttribute

Namespace

Google \ Shopping \ Type

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

The name of the attribute.

↳ value string

The value of the attribute. If value is not empty, group_values must be empty.

↳ group_values array<Google\Shopping\Type\CustomAttribute>

Subattributes within this attribute group. If group_values is not empty, value must be empty.

getName

The name of the attribute.

Returns
TypeDescription
string

hasName

clearName

setName

The name of the attribute.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getValue

The value of the attribute. If value is not empty, group_values must be empty.

Returns
TypeDescription
string

hasValue

clearValue

setValue

The value of the attribute. If value is not empty, group_values must be empty.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getGroupValues

Subattributes within this attribute group. If group_values is not empty, value must be empty.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setGroupValues

Subattributes within this attribute group. If group_values is not empty, value must be empty.

Parameter
NameDescription
var array<Google\Shopping\Type\CustomAttribute>
Returns
TypeDescription
$this