Class ProductAttributes.VariantOption.Builder (1.23.0)

public static final class ProductAttributes.VariantOption.Builder extends GeneratedMessage.Builder<ProductAttributes.VariantOption.Builder> implements ProductAttributes.VariantOptionOrBuilder

Additional product variants for the product.

Protobuf type google.shopping.merchant.products.v1.ProductAttributes.VariantOption

Static Methods

getDescriptor()

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

Methods

build()

public ProductAttributes.VariantOption build()
Returns
Type Description
ProductAttributes.VariantOption

buildPartial()

public ProductAttributes.VariantOption buildPartial()
Returns
Type Description
ProductAttributes.VariantOption

clear()

public ProductAttributes.VariantOption.Builder clear()
Returns
Type Description
ProductAttributes.VariantOption.Builder
Overrides

clearName()

public ProductAttributes.VariantOption.Builder clearName()

Required. The name of the variant. For example, "Color", "Memory", "Size", "Length"

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ProductAttributes.VariantOption.Builder

This builder for chaining.

clearValue()

public ProductAttributes.VariantOption.Builder clearValue()

Required. The value of the variant. For example, "Red", "128GB", "XL", "100cm"

string value = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ProductAttributes.VariantOption.Builder

This builder for chaining.

getDefaultInstanceForType()

public ProductAttributes.VariantOption getDefaultInstanceForType()
Returns
Type Description
ProductAttributes.VariantOption

getDescriptorForType()

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

getName()

public String getName()

Required. The name of the variant. For example, "Color", "Memory", "Size", "Length"

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Required. The name of the variant. For example, "Color", "Memory", "Size", "Length"

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for name.

getValue()

public String getValue()

Required. The value of the variant. For example, "Red", "128GB", "XL", "100cm"

string value = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The value.

getValueBytes()

public ByteString getValueBytes()

Required. The value of the variant. For example, "Red", "128GB", "XL", "100cm"

string value = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for value.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(ProductAttributes.VariantOption other)

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

setName(String value)

public ProductAttributes.VariantOption.Builder setName(String value)

Required. The name of the variant. For example, "Color", "Memory", "Size", "Length"

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
ProductAttributes.VariantOption.Builder

This builder for chaining.

setNameBytes(ByteString value)

public ProductAttributes.VariantOption.Builder setNameBytes(ByteString value)

Required. The name of the variant. For example, "Color", "Memory", "Size", "Length"

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
ProductAttributes.VariantOption.Builder

This builder for chaining.

setValue(String value)

public ProductAttributes.VariantOption.Builder setValue(String value)

Required. The value of the variant. For example, "Red", "128GB", "XL", "100cm"

string value = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The value to set.

Returns
Type Description
ProductAttributes.VariantOption.Builder

This builder for chaining.

setValueBytes(ByteString value)

public ProductAttributes.VariantOption.Builder setValueBytes(ByteString value)

Required. The value of the variant. For example, "Red", "128GB", "XL", "100cm"

string value = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for value to set.

Returns
Type Description
ProductAttributes.VariantOption.Builder

This builder for chaining.