Class Product.Builder (0.4.0)

public static final class Product.Builder extends GeneratedMessageV3.Builder<Product.Builder> implements ProductOrBuilder

The processed product, built from multiple product inputs after applying rules and supplemental data sources. This processed product matches what is shown in your Merchant Center account and in Shopping ads and other surfaces across Google. Each product is built from exactly one primary data source product input, and multiple supplemental data source inputs. After inserting, updating, or deleting a product input, it may take several minutes before the updated processed product can be retrieved.

All fields in the processed product and its sub-messages match the name of their corresponding attribute in the Product data specification with some exceptions.

Protobuf type google.shopping.merchant.products.v1beta.Product

Implements

ProductOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllCustomAttributes(Iterable<? extends CustomAttribute> values)

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

Output only. A list of custom (merchant-provided) attributes. It can also be used to submit any attribute of the data specification in its generic form (for example, { "name": "size type", "value": "regular" }). This is useful for submitting attributes not explicitly exposed by the API, such as additional attributes used for Buy on Google.

repeated .google.shopping.type.CustomAttribute custom_attributes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

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

addCustomAttributes(CustomAttribute value)

public Product.Builder addCustomAttributes(CustomAttribute value)

Output only. A list of custom (merchant-provided) attributes. It can also be used to submit any attribute of the data specification in its generic form (for example, { "name": "size type", "value": "regular" }). This is useful for submitting attributes not explicitly exposed by the API, such as additional attributes used for Buy on Google.

repeated .google.shopping.type.CustomAttribute custom_attributes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value com.google.shopping.type.CustomAttribute
Returns
Type Description
Product.Builder

addCustomAttributes(CustomAttribute.Builder builderForValue)

public Product.Builder addCustomAttributes(CustomAttribute.Builder builderForValue)

Output only. A list of custom (merchant-provided) attributes. It can also be used to submit any attribute of the data specification in its generic form (for example, { "name": "size type", "value": "regular" }). This is useful for submitting attributes not explicitly exposed by the API, such as additional attributes used for Buy on Google.

repeated .google.shopping.type.CustomAttribute custom_attributes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue com.google.shopping.type.CustomAttribute.Builder
Returns
Type Description
Product.Builder

addCustomAttributes(int index, CustomAttribute value)

public Product.Builder addCustomAttributes(int index, CustomAttribute value)

Output only. A list of custom (merchant-provided) attributes. It can also be used to submit any attribute of the data specification in its generic form (for example, { "name": "size type", "value": "regular" }). This is useful for submitting attributes not explicitly exposed by the API, such as additional attributes used for Buy on Google.

repeated .google.shopping.type.CustomAttribute custom_attributes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
value com.google.shopping.type.CustomAttribute
Returns
Type Description
Product.Builder

addCustomAttributes(int index, CustomAttribute.Builder builderForValue)

public Product.Builder addCustomAttributes(int index, CustomAttribute.Builder builderForValue)

Output only. A list of custom (merchant-provided) attributes. It can also be used to submit any attribute of the data specification in its generic form (for example, { "name": "size type", "value": "regular" }). This is useful for submitting attributes not explicitly exposed by the API, such as additional attributes used for Buy on Google.

repeated .google.shopping.type.CustomAttribute custom_attributes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
builderForValue com.google.shopping.type.CustomAttribute.Builder
Returns
Type Description
Product.Builder

addCustomAttributesBuilder()

public CustomAttribute.Builder addCustomAttributesBuilder()

Output only. A list of custom (merchant-provided) attributes. It can also be used to submit any attribute of the data specification in its generic form (for example, { "name": "size type", "value": "regular" }). This is useful for submitting attributes not explicitly exposed by the API, such as additional attributes used for Buy on Google.

repeated .google.shopping.type.CustomAttribute custom_attributes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
com.google.shopping.type.CustomAttribute.Builder

addCustomAttributesBuilder(int index)

public CustomAttribute.Builder addCustomAttributesBuilder(int index)

Output only. A list of custom (merchant-provided) attributes. It can also be used to submit any attribute of the data specification in its generic form (for example, { "name": "size type", "value": "regular" }). This is useful for submitting attributes not explicitly exposed by the API, such as additional attributes used for Buy on Google.

repeated .google.shopping.type.CustomAttribute custom_attributes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
com.google.shopping.type.CustomAttribute.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Product build()
Returns
Type Description
Product

buildPartial()

public Product buildPartial()
Returns
Type Description
Product

clear()

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

clearAttributes()

public Product.Builder clearAttributes()

Output only. A list of product attributes.

.google.shopping.merchant.products.v1beta.Attributes attributes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Product.Builder

clearChannel()

public Product.Builder clearChannel()

Output only. The channel of the product.

.google.shopping.type.Channel.ChannelEnum channel = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Product.Builder

This builder for chaining.

clearContentLanguage()

public Product.Builder clearContentLanguage()

Output only. The two-letter ISO 639-1 language code for the product.

string content_language = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Product.Builder

This builder for chaining.

clearCustomAttributes()

public Product.Builder clearCustomAttributes()

Output only. A list of custom (merchant-provided) attributes. It can also be used to submit any attribute of the data specification in its generic form (for example, { "name": "size type", "value": "regular" }). This is useful for submitting attributes not explicitly exposed by the API, such as additional attributes used for Buy on Google.

repeated .google.shopping.type.CustomAttribute custom_attributes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Product.Builder

clearDataSource()

public Product.Builder clearDataSource()

Output only. The primary data source of the product.

string data_source = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Product.Builder

This builder for chaining.

clearFeedLabel()

public Product.Builder clearFeedLabel()

Output only. The feed label for the product.

string feed_label = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Product.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearName()

public Product.Builder clearName()

The name of the product. Format: "{product.name=accounts/{account}/products/{product}}"

string name = 1;

Returns
Type Description
Product.Builder

This builder for chaining.

clearOfferId()

public Product.Builder clearOfferId()

Output only. Your unique identifier for the product. This is the same for the product input and processed product. Leading and trailing whitespaces are stripped and multiple whitespaces are replaced by a single whitespace upon submission. See the product data specification for details.

string offer_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Product.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearProductStatus()

public Product.Builder clearProductStatus()

Output only. The status of a product, data validation issues, that is, information about a product computed asynchronously.

.google.shopping.merchant.products.v1beta.ProductStatus product_status = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Product.Builder

clearVersionNumber()

public Product.Builder clearVersionNumber()

Output only. Represents the existing version (freshness) of the product, which can be used to preserve the right order when multiple updates are done at the same time.

If set, the insertion is prevented when version number is lower than the current version number of the existing product. Re-insertion (for example, product refresh after 30 days) can be performed with the current version_number.

Only supported for insertions into primary data sources.

If the operation is prevented, the aborted exception will be thrown.

optional int64 version_number = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Product.Builder

This builder for chaining.

clone()

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

getAttributes()

public Attributes getAttributes()

Output only. A list of product attributes.

.google.shopping.merchant.products.v1beta.Attributes attributes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Attributes

The attributes.

getAttributesBuilder()

public Attributes.Builder getAttributesBuilder()

Output only. A list of product attributes.

.google.shopping.merchant.products.v1beta.Attributes attributes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Attributes.Builder

getAttributesOrBuilder()

public AttributesOrBuilder getAttributesOrBuilder()

Output only. A list of product attributes.

.google.shopping.merchant.products.v1beta.Attributes attributes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
AttributesOrBuilder

getChannel()

public Channel.ChannelEnum getChannel()

Output only. The channel of the product.

.google.shopping.type.Channel.ChannelEnum channel = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
com.google.shopping.type.Channel.ChannelEnum

The channel.

getChannelValue()

public int getChannelValue()

Output only. The channel of the product.

.google.shopping.type.Channel.ChannelEnum channel = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for channel.

getContentLanguage()

public String getContentLanguage()

Output only. The two-letter ISO 639-1 language code for the product.

string content_language = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The contentLanguage.

getContentLanguageBytes()

public ByteString getContentLanguageBytes()

Output only. The two-letter ISO 639-1 language code for the product.

string content_language = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for contentLanguage.

getCustomAttributes(int index)

public CustomAttribute getCustomAttributes(int index)

Output only. A list of custom (merchant-provided) attributes. It can also be used to submit any attribute of the data specification in its generic form (for example, { "name": "size type", "value": "regular" }). This is useful for submitting attributes not explicitly exposed by the API, such as additional attributes used for Buy on Google.

repeated .google.shopping.type.CustomAttribute custom_attributes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
com.google.shopping.type.CustomAttribute

getCustomAttributesBuilder(int index)

public CustomAttribute.Builder getCustomAttributesBuilder(int index)

Output only. A list of custom (merchant-provided) attributes. It can also be used to submit any attribute of the data specification in its generic form (for example, { "name": "size type", "value": "regular" }). This is useful for submitting attributes not explicitly exposed by the API, such as additional attributes used for Buy on Google.

repeated .google.shopping.type.CustomAttribute custom_attributes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
com.google.shopping.type.CustomAttribute.Builder

getCustomAttributesBuilderList()

public List<CustomAttribute.Builder> getCustomAttributesBuilderList()

Output only. A list of custom (merchant-provided) attributes. It can also be used to submit any attribute of the data specification in its generic form (for example, { "name": "size type", "value": "regular" }). This is useful for submitting attributes not explicitly exposed by the API, such as additional attributes used for Buy on Google.

repeated .google.shopping.type.CustomAttribute custom_attributes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<com.google.shopping.type.CustomAttribute.Builder>

getCustomAttributesCount()

public int getCustomAttributesCount()

Output only. A list of custom (merchant-provided) attributes. It can also be used to submit any attribute of the data specification in its generic form (for example, { "name": "size type", "value": "regular" }). This is useful for submitting attributes not explicitly exposed by the API, such as additional attributes used for Buy on Google.

repeated .google.shopping.type.CustomAttribute custom_attributes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

getCustomAttributesList()

public List<CustomAttribute> getCustomAttributesList()

Output only. A list of custom (merchant-provided) attributes. It can also be used to submit any attribute of the data specification in its generic form (for example, { "name": "size type", "value": "regular" }). This is useful for submitting attributes not explicitly exposed by the API, such as additional attributes used for Buy on Google.

repeated .google.shopping.type.CustomAttribute custom_attributes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<com.google.shopping.type.CustomAttribute>

getCustomAttributesOrBuilder(int index)

public CustomAttributeOrBuilder getCustomAttributesOrBuilder(int index)

Output only. A list of custom (merchant-provided) attributes. It can also be used to submit any attribute of the data specification in its generic form (for example, { "name": "size type", "value": "regular" }). This is useful for submitting attributes not explicitly exposed by the API, such as additional attributes used for Buy on Google.

repeated .google.shopping.type.CustomAttribute custom_attributes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
com.google.shopping.type.CustomAttributeOrBuilder

getCustomAttributesOrBuilderList()

public List<? extends CustomAttributeOrBuilder> getCustomAttributesOrBuilderList()

Output only. A list of custom (merchant-provided) attributes. It can also be used to submit any attribute of the data specification in its generic form (for example, { "name": "size type", "value": "regular" }). This is useful for submitting attributes not explicitly exposed by the API, such as additional attributes used for Buy on Google.

repeated .google.shopping.type.CustomAttribute custom_attributes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

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

getDataSource()

public String getDataSource()

Output only. The primary data source of the product.

string data_source = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The dataSource.

getDataSourceBytes()

public ByteString getDataSourceBytes()

Output only. The primary data source of the product.

string data_source = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for dataSource.

getDefaultInstanceForType()

public Product getDefaultInstanceForType()
Returns
Type Description
Product

getDescriptorForType()

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

getFeedLabel()

public String getFeedLabel()

Output only. The feed label for the product.

string feed_label = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The feedLabel.

getFeedLabelBytes()

public ByteString getFeedLabelBytes()

Output only. The feed label for the product.

string feed_label = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for feedLabel.

getName()

public String getName()

The name of the product. Format: "{product.name=accounts/{account}/products/{product}}"

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

The name of the product. Format: "{product.name=accounts/{account}/products/{product}}"

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getOfferId()

public String getOfferId()

Output only. Your unique identifier for the product. This is the same for the product input and processed product. Leading and trailing whitespaces are stripped and multiple whitespaces are replaced by a single whitespace upon submission. See the product data specification for details.

string offer_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The offerId.

getOfferIdBytes()

public ByteString getOfferIdBytes()

Output only. Your unique identifier for the product. This is the same for the product input and processed product. Leading and trailing whitespaces are stripped and multiple whitespaces are replaced by a single whitespace upon submission. See the product data specification for details.

string offer_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for offerId.

getProductStatus()

public ProductStatus getProductStatus()

Output only. The status of a product, data validation issues, that is, information about a product computed asynchronously.

.google.shopping.merchant.products.v1beta.ProductStatus product_status = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ProductStatus

The productStatus.

getProductStatusBuilder()

public ProductStatus.Builder getProductStatusBuilder()

Output only. The status of a product, data validation issues, that is, information about a product computed asynchronously.

.google.shopping.merchant.products.v1beta.ProductStatus product_status = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ProductStatus.Builder

getProductStatusOrBuilder()

public ProductStatusOrBuilder getProductStatusOrBuilder()

Output only. The status of a product, data validation issues, that is, information about a product computed asynchronously.

.google.shopping.merchant.products.v1beta.ProductStatus product_status = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ProductStatusOrBuilder

getVersionNumber()

public long getVersionNumber()

Output only. Represents the existing version (freshness) of the product, which can be used to preserve the right order when multiple updates are done at the same time.

If set, the insertion is prevented when version number is lower than the current version number of the existing product. Re-insertion (for example, product refresh after 30 days) can be performed with the current version_number.

Only supported for insertions into primary data sources.

If the operation is prevented, the aborted exception will be thrown.

optional int64 version_number = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
long

The versionNumber.

hasAttributes()

public boolean hasAttributes()

Output only. A list of product attributes.

.google.shopping.merchant.products.v1beta.Attributes attributes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the attributes field is set.

hasProductStatus()

public boolean hasProductStatus()

Output only. The status of a product, data validation issues, that is, information about a product computed asynchronously.

.google.shopping.merchant.products.v1beta.ProductStatus product_status = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the productStatus field is set.

hasVersionNumber()

public boolean hasVersionNumber()

Output only. Represents the existing version (freshness) of the product, which can be used to preserve the right order when multiple updates are done at the same time.

If set, the insertion is prevented when version number is lower than the current version number of the existing product. Re-insertion (for example, product refresh after 30 days) can be performed with the current version_number.

Only supported for insertions into primary data sources.

If the operation is prevented, the aborted exception will be thrown.

optional int64 version_number = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the versionNumber field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeAttributes(Attributes value)

public Product.Builder mergeAttributes(Attributes value)

Output only. A list of product attributes.

.google.shopping.merchant.products.v1beta.Attributes attributes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Attributes
Returns
Type Description
Product.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(Product other)

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

mergeProductStatus(ProductStatus value)

public Product.Builder mergeProductStatus(ProductStatus value)

Output only. The status of a product, data validation issues, that is, information about a product computed asynchronously.

.google.shopping.merchant.products.v1beta.ProductStatus product_status = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ProductStatus
Returns
Type Description
Product.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeCustomAttributes(int index)

public Product.Builder removeCustomAttributes(int index)

Output only. A list of custom (merchant-provided) attributes. It can also be used to submit any attribute of the data specification in its generic form (for example, { "name": "size type", "value": "regular" }). This is useful for submitting attributes not explicitly exposed by the API, such as additional attributes used for Buy on Google.

repeated .google.shopping.type.CustomAttribute custom_attributes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
Product.Builder

setAttributes(Attributes value)

public Product.Builder setAttributes(Attributes value)

Output only. A list of product attributes.

.google.shopping.merchant.products.v1beta.Attributes attributes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Attributes
Returns
Type Description
Product.Builder

setAttributes(Attributes.Builder builderForValue)

public Product.Builder setAttributes(Attributes.Builder builderForValue)

Output only. A list of product attributes.

.google.shopping.merchant.products.v1beta.Attributes attributes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Attributes.Builder
Returns
Type Description
Product.Builder

setChannel(Channel.ChannelEnum value)

public Product.Builder setChannel(Channel.ChannelEnum value)

Output only. The channel of the product.

.google.shopping.type.Channel.ChannelEnum channel = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value com.google.shopping.type.Channel.ChannelEnum

The channel to set.

Returns
Type Description
Product.Builder

This builder for chaining.

setChannelValue(int value)

public Product.Builder setChannelValue(int value)

Output only. The channel of the product.

.google.shopping.type.Channel.ChannelEnum channel = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

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

Returns
Type Description
Product.Builder

This builder for chaining.

setContentLanguage(String value)

public Product.Builder setContentLanguage(String value)

Output only. The two-letter ISO 639-1 language code for the product.

string content_language = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The contentLanguage to set.

Returns
Type Description
Product.Builder

This builder for chaining.

setContentLanguageBytes(ByteString value)

public Product.Builder setContentLanguageBytes(ByteString value)

Output only. The two-letter ISO 639-1 language code for the product.

string content_language = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for contentLanguage to set.

Returns
Type Description
Product.Builder

This builder for chaining.

setCustomAttributes(int index, CustomAttribute value)

public Product.Builder setCustomAttributes(int index, CustomAttribute value)

Output only. A list of custom (merchant-provided) attributes. It can also be used to submit any attribute of the data specification in its generic form (for example, { "name": "size type", "value": "regular" }). This is useful for submitting attributes not explicitly exposed by the API, such as additional attributes used for Buy on Google.

repeated .google.shopping.type.CustomAttribute custom_attributes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
value com.google.shopping.type.CustomAttribute
Returns
Type Description
Product.Builder

setCustomAttributes(int index, CustomAttribute.Builder builderForValue)

public Product.Builder setCustomAttributes(int index, CustomAttribute.Builder builderForValue)

Output only. A list of custom (merchant-provided) attributes. It can also be used to submit any attribute of the data specification in its generic form (for example, { "name": "size type", "value": "regular" }). This is useful for submitting attributes not explicitly exposed by the API, such as additional attributes used for Buy on Google.

repeated .google.shopping.type.CustomAttribute custom_attributes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
builderForValue com.google.shopping.type.CustomAttribute.Builder
Returns
Type Description
Product.Builder

setDataSource(String value)

public Product.Builder setDataSource(String value)

Output only. The primary data source of the product.

string data_source = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The dataSource to set.

Returns
Type Description
Product.Builder

This builder for chaining.

setDataSourceBytes(ByteString value)

public Product.Builder setDataSourceBytes(ByteString value)

Output only. The primary data source of the product.

string data_source = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for dataSource to set.

Returns
Type Description
Product.Builder

This builder for chaining.

setFeedLabel(String value)

public Product.Builder setFeedLabel(String value)

Output only. The feed label for the product.

string feed_label = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The feedLabel to set.

Returns
Type Description
Product.Builder

This builder for chaining.

setFeedLabelBytes(ByteString value)

public Product.Builder setFeedLabelBytes(ByteString value)

Output only. The feed label for the product.

string feed_label = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for feedLabel to set.

Returns
Type Description
Product.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public Product.Builder setName(String value)

The name of the product. Format: "{product.name=accounts/{account}/products/{product}}"

string name = 1;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Product.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Product.Builder setNameBytes(ByteString value)

The name of the product. Format: "{product.name=accounts/{account}/products/{product}}"

string name = 1;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Product.Builder

This builder for chaining.

setOfferId(String value)

public Product.Builder setOfferId(String value)

Output only. Your unique identifier for the product. This is the same for the product input and processed product. Leading and trailing whitespaces are stripped and multiple whitespaces are replaced by a single whitespace upon submission. See the product data specification for details.

string offer_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The offerId to set.

Returns
Type Description
Product.Builder

This builder for chaining.

setOfferIdBytes(ByteString value)

public Product.Builder setOfferIdBytes(ByteString value)

Output only. Your unique identifier for the product. This is the same for the product input and processed product. Leading and trailing whitespaces are stripped and multiple whitespaces are replaced by a single whitespace upon submission. See the product data specification for details.

string offer_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for offerId to set.

Returns
Type Description
Product.Builder

This builder for chaining.

setProductStatus(ProductStatus value)

public Product.Builder setProductStatus(ProductStatus value)

Output only. The status of a product, data validation issues, that is, information about a product computed asynchronously.

.google.shopping.merchant.products.v1beta.ProductStatus product_status = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ProductStatus
Returns
Type Description
Product.Builder

setProductStatus(ProductStatus.Builder builderForValue)

public Product.Builder setProductStatus(ProductStatus.Builder builderForValue)

Output only. The status of a product, data validation issues, that is, information about a product computed asynchronously.

.google.shopping.merchant.products.v1beta.ProductStatus product_status = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue ProductStatus.Builder
Returns
Type Description
Product.Builder

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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

setVersionNumber(long value)

public Product.Builder setVersionNumber(long value)

Output only. Represents the existing version (freshness) of the product, which can be used to preserve the right order when multiple updates are done at the same time.

If set, the insertion is prevented when version number is lower than the current version number of the existing product. Re-insertion (for example, product refresh after 30 days) can be performed with the current version_number.

Only supported for insertions into primary data sources.

If the operation is prevented, the aborted exception will be thrown.

optional int64 version_number = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value long

The versionNumber to set.

Returns
Type Description
Product.Builder

This builder for chaining.