Class CustomAttribute.Builder (2.40.0)

public static final class CustomAttribute.Builder extends GeneratedMessageV3.Builder<CustomAttribute.Builder> implements CustomAttributeOrBuilder

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

Protobuf type google.shopping.type.CustomAttribute

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllGroupValues(Iterable<? extends CustomAttribute> values)

public CustomAttribute.Builder addAllGroupValues(Iterable<? extends CustomAttribute> values)

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

repeated .google.shopping.type.CustomAttribute group_values = 3;

Parameter
Name Description
values Iterable<? extends com.google.shopping.type.CustomAttribute>
Returns
Type Description
CustomAttribute.Builder

addGroupValues(CustomAttribute value)

public CustomAttribute.Builder addGroupValues(CustomAttribute value)

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

repeated .google.shopping.type.CustomAttribute group_values = 3;

Parameter
Name Description
value CustomAttribute
Returns
Type Description
CustomAttribute.Builder

addGroupValues(CustomAttribute.Builder builderForValue)

public CustomAttribute.Builder addGroupValues(CustomAttribute.Builder builderForValue)

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

repeated .google.shopping.type.CustomAttribute group_values = 3;

Parameter
Name Description
builderForValue CustomAttribute.Builder
Returns
Type Description
CustomAttribute.Builder

addGroupValues(int index, CustomAttribute value)

public CustomAttribute.Builder addGroupValues(int index, CustomAttribute value)

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

repeated .google.shopping.type.CustomAttribute group_values = 3;

Parameters
Name Description
index int
value CustomAttribute
Returns
Type Description
CustomAttribute.Builder

addGroupValues(int index, CustomAttribute.Builder builderForValue)

public CustomAttribute.Builder addGroupValues(int index, CustomAttribute.Builder builderForValue)

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

repeated .google.shopping.type.CustomAttribute group_values = 3;

Parameters
Name Description
index int
builderForValue CustomAttribute.Builder
Returns
Type Description
CustomAttribute.Builder

addGroupValuesBuilder()

public CustomAttribute.Builder addGroupValuesBuilder()

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

repeated .google.shopping.type.CustomAttribute group_values = 3;

Returns
Type Description
CustomAttribute.Builder

addGroupValuesBuilder(int index)

public CustomAttribute.Builder addGroupValuesBuilder(int index)

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

repeated .google.shopping.type.CustomAttribute group_values = 3;

Parameter
Name Description
index int
Returns
Type Description
CustomAttribute.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public CustomAttribute.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
CustomAttribute.Builder
Overrides

build()

public CustomAttribute build()
Returns
Type Description
CustomAttribute

buildPartial()

public CustomAttribute buildPartial()
Returns
Type Description
CustomAttribute

clear()

public CustomAttribute.Builder clear()
Returns
Type Description
CustomAttribute.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public CustomAttribute.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
CustomAttribute.Builder
Overrides

clearGroupValues()

public CustomAttribute.Builder clearGroupValues()

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

repeated .google.shopping.type.CustomAttribute group_values = 3;

Returns
Type Description
CustomAttribute.Builder

clearName()

public CustomAttribute.Builder clearName()

The name of the attribute.

optional string name = 1;

Returns
Type Description
CustomAttribute.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public CustomAttribute.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
CustomAttribute.Builder
Overrides

clearValue()

public CustomAttribute.Builder clearValue()

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

optional string value = 2;

Returns
Type Description
CustomAttribute.Builder

This builder for chaining.

clone()

public CustomAttribute.Builder clone()
Returns
Type Description
CustomAttribute.Builder
Overrides

getDefaultInstanceForType()

public CustomAttribute getDefaultInstanceForType()
Returns
Type Description
CustomAttribute

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getGroupValues(int index)

public CustomAttribute getGroupValues(int index)

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

repeated .google.shopping.type.CustomAttribute group_values = 3;

Parameter
Name Description
index int
Returns
Type Description
CustomAttribute

getGroupValuesBuilder(int index)

public CustomAttribute.Builder getGroupValuesBuilder(int index)

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

repeated .google.shopping.type.CustomAttribute group_values = 3;

Parameter
Name Description
index int
Returns
Type Description
CustomAttribute.Builder

getGroupValuesBuilderList()

public List<CustomAttribute.Builder> getGroupValuesBuilderList()

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

repeated .google.shopping.type.CustomAttribute group_values = 3;

Returns
Type Description
List<Builder>

getGroupValuesCount()

public int getGroupValuesCount()

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

repeated .google.shopping.type.CustomAttribute group_values = 3;

Returns
Type Description
int

getGroupValuesList()

public List<CustomAttribute> getGroupValuesList()

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

repeated .google.shopping.type.CustomAttribute group_values = 3;

Returns
Type Description
List<CustomAttribute>

getGroupValuesOrBuilder(int index)

public CustomAttributeOrBuilder getGroupValuesOrBuilder(int index)

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

repeated .google.shopping.type.CustomAttribute group_values = 3;

Parameter
Name Description
index int
Returns
Type Description
CustomAttributeOrBuilder

getGroupValuesOrBuilderList()

public List<? extends CustomAttributeOrBuilder> getGroupValuesOrBuilderList()

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

repeated .google.shopping.type.CustomAttribute group_values = 3;

Returns
Type Description
List<? extends com.google.shopping.type.CustomAttributeOrBuilder>

getName()

public String getName()

The name of the attribute.

optional string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

The name of the attribute.

optional string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getValue()

public String getValue()

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

optional string value = 2;

Returns
Type Description
String

The value.

getValueBytes()

public ByteString getValueBytes()

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

optional string value = 2;

Returns
Type Description
ByteString

The bytes for value.

hasName()

public boolean hasName()

The name of the attribute.

optional string name = 1;

Returns
Type Description
boolean

Whether the name field is set.

hasValue()

public boolean hasValue()

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

optional string value = 2;

Returns
Type Description
boolean

Whether the value field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public CustomAttribute.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CustomAttribute.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public CustomAttribute.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
CustomAttribute.Builder
Overrides

mergeFrom(CustomAttribute other)

public CustomAttribute.Builder mergeFrom(CustomAttribute other)
Parameter
Name Description
other CustomAttribute
Returns
Type Description
CustomAttribute.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final CustomAttribute.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
CustomAttribute.Builder
Overrides

removeGroupValues(int index)

public CustomAttribute.Builder removeGroupValues(int index)

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

repeated .google.shopping.type.CustomAttribute group_values = 3;

Parameter
Name Description
index int
Returns
Type Description
CustomAttribute.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public CustomAttribute.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
CustomAttribute.Builder
Overrides

setGroupValues(int index, CustomAttribute value)

public CustomAttribute.Builder setGroupValues(int index, CustomAttribute value)

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

repeated .google.shopping.type.CustomAttribute group_values = 3;

Parameters
Name Description
index int
value CustomAttribute
Returns
Type Description
CustomAttribute.Builder

setGroupValues(int index, CustomAttribute.Builder builderForValue)

public CustomAttribute.Builder setGroupValues(int index, CustomAttribute.Builder builderForValue)

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

repeated .google.shopping.type.CustomAttribute group_values = 3;

Parameters
Name Description
index int
builderForValue CustomAttribute.Builder
Returns
Type Description
CustomAttribute.Builder

setName(String value)

public CustomAttribute.Builder setName(String value)

The name of the attribute.

optional string name = 1;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
CustomAttribute.Builder

This builder for chaining.

setNameBytes(ByteString value)

public CustomAttribute.Builder setNameBytes(ByteString value)

The name of the attribute.

optional string name = 1;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
CustomAttribute.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public CustomAttribute.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
CustomAttribute.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final CustomAttribute.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
CustomAttribute.Builder
Overrides

setValue(String value)

public CustomAttribute.Builder setValue(String value)

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

optional string value = 2;

Parameter
Name Description
value String

The value to set.

Returns
Type Description
CustomAttribute.Builder

This builder for chaining.

setValueBytes(ByteString value)

public CustomAttribute.Builder setValueBytes(ByteString value)

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

optional string value = 2;

Parameter
Name Description
value ByteString

The bytes for value to set.

Returns
Type Description
CustomAttribute.Builder

This builder for chaining.