Class ProductAttributes.RelatedProduct.Builder (1.23.0)

public static final class ProductAttributes.RelatedProduct.Builder extends GeneratedMessage.Builder<ProductAttributes.RelatedProduct.Builder> implements ProductAttributes.RelatedProductOrBuilder

Specifies how other products are related to this product.

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

Static Methods

getDescriptor()

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

Methods

build()

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

buildPartial()

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

clear()

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

clearId()

public ProductAttributes.RelatedProduct.Builder clearId()

Required. The identifier of the related product.

string id = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ProductAttributes.RelatedProduct.Builder

This builder for chaining.

clearIdType()

public ProductAttributes.RelatedProduct.Builder clearIdType()

Required. The type of the identifier of the related product. For example, GTIN or product ID.

.google.shopping.merchant.products.v1.ProductAttributes.RelatedProduct.IdType id_type = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ProductAttributes.RelatedProduct.Builder

This builder for chaining.

clearRelationshipType()

public ProductAttributes.RelatedProduct.Builder clearRelationshipType()

Required. The type of the relationship between this product and the related product.

.google.shopping.merchant.products.v1.ProductAttributes.RelatedProduct.RelationshipType relationship_type = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ProductAttributes.RelatedProduct.Builder

This builder for chaining.

getDefaultInstanceForType()

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

getDescriptorForType()

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

getId()

public String getId()

Required. The identifier of the related product.

string id = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The id.

getIdBytes()

public ByteString getIdBytes()

Required. The identifier of the related product.

string id = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for id.

getIdType()

public ProductAttributes.RelatedProduct.IdType getIdType()

Required. The type of the identifier of the related product. For example, GTIN or product ID.

.google.shopping.merchant.products.v1.ProductAttributes.RelatedProduct.IdType id_type = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ProductAttributes.RelatedProduct.IdType

The idType.

getIdTypeValue()

public int getIdTypeValue()

Required. The type of the identifier of the related product. For example, GTIN or product ID.

.google.shopping.merchant.products.v1.ProductAttributes.RelatedProduct.IdType id_type = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for idType.

getRelationshipType()

public ProductAttributes.RelatedProduct.RelationshipType getRelationshipType()

Required. The type of the relationship between this product and the related product.

.google.shopping.merchant.products.v1.ProductAttributes.RelatedProduct.RelationshipType relationship_type = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ProductAttributes.RelatedProduct.RelationshipType

The relationshipType.

getRelationshipTypeValue()

public int getRelationshipTypeValue()

Required. The type of the relationship between this product and the related product.

.google.shopping.merchant.products.v1.ProductAttributes.RelatedProduct.RelationshipType relationship_type = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for relationshipType.

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.RelatedProduct.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ProductAttributes.RelatedProduct.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

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

mergeFrom(ProductAttributes.RelatedProduct other)

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

setId(String value)

public ProductAttributes.RelatedProduct.Builder setId(String value)

Required. The identifier of the related product.

string id = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The id to set.

Returns
Type Description
ProductAttributes.RelatedProduct.Builder

This builder for chaining.

setIdBytes(ByteString value)

public ProductAttributes.RelatedProduct.Builder setIdBytes(ByteString value)

Required. The identifier of the related product.

string id = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for id to set.

Returns
Type Description
ProductAttributes.RelatedProduct.Builder

This builder for chaining.

setIdType(ProductAttributes.RelatedProduct.IdType value)

public ProductAttributes.RelatedProduct.Builder setIdType(ProductAttributes.RelatedProduct.IdType value)

Required. The type of the identifier of the related product. For example, GTIN or product ID.

.google.shopping.merchant.products.v1.ProductAttributes.RelatedProduct.IdType id_type = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ProductAttributes.RelatedProduct.IdType

The idType to set.

Returns
Type Description
ProductAttributes.RelatedProduct.Builder

This builder for chaining.

setIdTypeValue(int value)

public ProductAttributes.RelatedProduct.Builder setIdTypeValue(int value)

Required. The type of the identifier of the related product. For example, GTIN or product ID.

.google.shopping.merchant.products.v1.ProductAttributes.RelatedProduct.IdType id_type = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

The enum numeric value on the wire for idType to set.

Returns
Type Description
ProductAttributes.RelatedProduct.Builder

This builder for chaining.

setRelationshipType(ProductAttributes.RelatedProduct.RelationshipType value)

public ProductAttributes.RelatedProduct.Builder setRelationshipType(ProductAttributes.RelatedProduct.RelationshipType value)

Required. The type of the relationship between this product and the related product.

.google.shopping.merchant.products.v1.ProductAttributes.RelatedProduct.RelationshipType relationship_type = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ProductAttributes.RelatedProduct.RelationshipType

The relationshipType to set.

Returns
Type Description
ProductAttributes.RelatedProduct.Builder

This builder for chaining.

setRelationshipTypeValue(int value)

public ProductAttributes.RelatedProduct.Builder setRelationshipTypeValue(int value)

Required. The type of the relationship between this product and the related product.

.google.shopping.merchant.products.v1.ProductAttributes.RelatedProduct.RelationshipType relationship_type = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

The enum numeric value on the wire for relationshipType to set.

Returns
Type Description
ProductAttributes.RelatedProduct.Builder

This builder for chaining.