Class CustomAttribute.Builder (0.5.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
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.shopping.type.CustomAttribute>
Returns
TypeDescription
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
NameDescription
valueCustomAttribute
Returns
TypeDescription
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
NameDescription
builderForValueCustomAttribute.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueCustomAttribute
Returns
TypeDescription
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
NameDescription
indexint
builderForValueCustomAttribute.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
CustomAttribute.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public CustomAttribute.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
CustomAttribute.Builder
Overrides

build()

public CustomAttribute build()
Returns
TypeDescription
CustomAttribute

buildPartial()

public CustomAttribute buildPartial()
Returns
TypeDescription
CustomAttribute

clear()

public CustomAttribute.Builder clear()
Returns
TypeDescription
CustomAttribute.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public CustomAttribute.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
CustomAttribute.Builder

clearName()

public CustomAttribute.Builder clearName()

The name of the attribute.

optional string name = 1;

Returns
TypeDescription
CustomAttribute.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public CustomAttribute.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
CustomAttribute.Builder

This builder for chaining.

clone()

public CustomAttribute.Builder clone()
Returns
TypeDescription
CustomAttribute.Builder
Overrides

getDefaultInstanceForType()

public CustomAttribute getDefaultInstanceForType()
Returns
TypeDescription
CustomAttribute

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
List<? extends com.google.shopping.type.CustomAttributeOrBuilder>

getName()

public String getName()

The name of the attribute.

optional string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

The name of the attribute.

optional string name = 1;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for value.

hasName()

public boolean hasName()

The name of the attribute.

optional string name = 1;

Returns
TypeDescription
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
TypeDescription
boolean

Whether the value field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public CustomAttribute.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CustomAttribute.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public CustomAttribute.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
CustomAttribute.Builder
Overrides

mergeFrom(CustomAttribute other)

public CustomAttribute.Builder mergeFrom(CustomAttribute other)
Parameter
NameDescription
otherCustomAttribute
Returns
TypeDescription
CustomAttribute.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final CustomAttribute.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
CustomAttribute.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public CustomAttribute.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
indexint
valueCustomAttribute
Returns
TypeDescription
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
NameDescription
indexint
builderForValueCustomAttribute.Builder
Returns
TypeDescription
CustomAttribute.Builder

setName(String value)

public CustomAttribute.Builder setName(String value)

The name of the attribute.

optional string name = 1;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
CustomAttribute.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final CustomAttribute.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueString

The value to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for value to set.

Returns
TypeDescription
CustomAttribute.Builder

This builder for chaining.