Class ProductInput.Builder (0.11.0)

public static final class ProductInput.Builder extends GeneratedMessageV3.Builder<ProductInput.Builder> implements ProductInputOrBuilder

This resource represents input data you submit for a product, not the processed product that you see in Merchant Center, in Shopping ads, or across Google surfaces. Product inputs, rules and supplemental data source data are combined to create the processed Product.

Required product input attributes to pass data validation checks are primarily defined in the Products Data Specification.

The following attributes are required: feedLabel, contentLanguage and offerId.

After inserting, updating, or deleting a product input, it may take several minutes before the processed product can be retrieved.

All fields in the product input and its sub-messages match the English name of their corresponding attribute in the vertical spec with some exceptions.

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

Static Methods

getDescriptor()

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

Methods

addAllCustomAttributes(Iterable<? extends CustomAttribute> values)

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

Optional. A list of custom (merchant-provided) attributes. It can also be used for submitting 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. Maximum allowed number of characters for each custom attribute is 10240 (represents sum of characters for name and value). Maximum 2500 custom attributes can be set per product, with total size of 102.4kB. Underscores in custom attribute names are replaced by spaces upon insertion.

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

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

addCustomAttributes(CustomAttribute value)

public ProductInput.Builder addCustomAttributes(CustomAttribute value)

Optional. A list of custom (merchant-provided) attributes. It can also be used for submitting 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. Maximum allowed number of characters for each custom attribute is 10240 (represents sum of characters for name and value). Maximum 2500 custom attributes can be set per product, with total size of 102.4kB. Underscores in custom attribute names are replaced by spaces upon insertion.

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

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

addCustomAttributes(CustomAttribute.Builder builderForValue)

public ProductInput.Builder addCustomAttributes(CustomAttribute.Builder builderForValue)

Optional. A list of custom (merchant-provided) attributes. It can also be used for submitting 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. Maximum allowed number of characters for each custom attribute is 10240 (represents sum of characters for name and value). Maximum 2500 custom attributes can be set per product, with total size of 102.4kB. Underscores in custom attribute names are replaced by spaces upon insertion.

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

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

addCustomAttributes(int index, CustomAttribute value)

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

Optional. A list of custom (merchant-provided) attributes. It can also be used for submitting 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. Maximum allowed number of characters for each custom attribute is 10240 (represents sum of characters for name and value). Maximum 2500 custom attributes can be set per product, with total size of 102.4kB. Underscores in custom attribute names are replaced by spaces upon insertion.

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

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

addCustomAttributes(int index, CustomAttribute.Builder builderForValue)

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

Optional. A list of custom (merchant-provided) attributes. It can also be used for submitting 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. Maximum allowed number of characters for each custom attribute is 10240 (represents sum of characters for name and value). Maximum 2500 custom attributes can be set per product, with total size of 102.4kB. Underscores in custom attribute names are replaced by spaces upon insertion.

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

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

addCustomAttributesBuilder()

public CustomAttribute.Builder addCustomAttributesBuilder()

Optional. A list of custom (merchant-provided) attributes. It can also be used for submitting 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. Maximum allowed number of characters for each custom attribute is 10240 (represents sum of characters for name and value). Maximum 2500 custom attributes can be set per product, with total size of 102.4kB. Underscores in custom attribute names are replaced by spaces upon insertion.

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

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

addCustomAttributesBuilder(int index)

public CustomAttribute.Builder addCustomAttributesBuilder(int index)

Optional. A list of custom (merchant-provided) attributes. It can also be used for submitting 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. Maximum allowed number of characters for each custom attribute is 10240 (represents sum of characters for name and value). Maximum 2500 custom attributes can be set per product, with total size of 102.4kB. Underscores in custom attribute names are replaced by spaces upon insertion.

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

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

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ProductInput build()
Returns
Type Description
ProductInput

buildPartial()

public ProductInput buildPartial()
Returns
Type Description
ProductInput

clear()

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

clearAttributes()

public ProductInput.Builder clearAttributes()

Optional. A list of product attributes.

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

Returns
Type Description
ProductInput.Builder

clearChannel()

public ProductInput.Builder clearChannel()

Required. Immutable. The channel of the product.

.google.shopping.type.Channel.ChannelEnum channel = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ProductInput.Builder

This builder for chaining.

clearContentLanguage()

public ProductInput.Builder clearContentLanguage()

Required. Immutable. The two-letter ISO 639-1 language code for the product.

string content_language = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ProductInput.Builder

This builder for chaining.

clearCustomAttributes()

public ProductInput.Builder clearCustomAttributes()

Optional. A list of custom (merchant-provided) attributes. It can also be used for submitting 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. Maximum allowed number of characters for each custom attribute is 10240 (represents sum of characters for name and value). Maximum 2500 custom attributes can be set per product, with total size of 102.4kB. Underscores in custom attribute names are replaced by spaces upon insertion.

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

Returns
Type Description
ProductInput.Builder

clearFeedLabel()

public ProductInput.Builder clearFeedLabel()

Required. Immutable. The feed label for the product.

string feed_label = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ProductInput.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearName()

public ProductInput.Builder clearName()

Identifier. The name of the product input. Format: "{productinput.name=accounts/{account}/productInputs/{productinput}}" where the last section productinput consists of 4 parts: channel~content_language~feed_label~offer_id example for product input name is "accounts/123/productInputs/online~en~US~sku123"

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

Returns
Type Description
ProductInput.Builder

This builder for chaining.

clearOfferId()

public ProductInput.Builder clearOfferId()

Required. Immutable. 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 products data specification for details.

string offer_id = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ProductInput.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearProduct()

public ProductInput.Builder clearProduct()

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

string product = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ProductInput.Builder

This builder for chaining.

clearVersionNumber()

public ProductInput.Builder clearVersionNumber()

Optional. 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) = OPTIONAL];

Returns
Type Description
ProductInput.Builder

This builder for chaining.

clone()

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

getAttributes()

public Attributes getAttributes()

Optional. A list of product attributes.

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

Returns
Type Description
Attributes

The attributes.

getAttributesBuilder()

public Attributes.Builder getAttributesBuilder()

Optional. A list of product attributes.

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

Returns
Type Description
Attributes.Builder

getAttributesOrBuilder()

public AttributesOrBuilder getAttributesOrBuilder()

Optional. A list of product attributes.

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

Returns
Type Description
AttributesOrBuilder

getChannel()

public Channel.ChannelEnum getChannel()

Required. Immutable. The channel of the product.

.google.shopping.type.Channel.ChannelEnum channel = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

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

The channel.

getChannelValue()

public int getChannelValue()

Required. Immutable. The channel of the product.

.google.shopping.type.Channel.ChannelEnum channel = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
int

The enum numeric value on the wire for channel.

getContentLanguage()

public String getContentLanguage()

Required. Immutable. The two-letter ISO 639-1 language code for the product.

string content_language = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The contentLanguage.

getContentLanguageBytes()

public ByteString getContentLanguageBytes()

Required. Immutable. The two-letter ISO 639-1 language code for the product.

string content_language = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for contentLanguage.

getCustomAttributes(int index)

public CustomAttribute getCustomAttributes(int index)

Optional. A list of custom (merchant-provided) attributes. It can also be used for submitting 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. Maximum allowed number of characters for each custom attribute is 10240 (represents sum of characters for name and value). Maximum 2500 custom attributes can be set per product, with total size of 102.4kB. Underscores in custom attribute names are replaced by spaces upon insertion.

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

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

getCustomAttributesBuilder(int index)

public CustomAttribute.Builder getCustomAttributesBuilder(int index)

Optional. A list of custom (merchant-provided) attributes. It can also be used for submitting 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. Maximum allowed number of characters for each custom attribute is 10240 (represents sum of characters for name and value). Maximum 2500 custom attributes can be set per product, with total size of 102.4kB. Underscores in custom attribute names are replaced by spaces upon insertion.

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

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

getCustomAttributesBuilderList()

public List<CustomAttribute.Builder> getCustomAttributesBuilderList()

Optional. A list of custom (merchant-provided) attributes. It can also be used for submitting 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. Maximum allowed number of characters for each custom attribute is 10240 (represents sum of characters for name and value). Maximum 2500 custom attributes can be set per product, with total size of 102.4kB. Underscores in custom attribute names are replaced by spaces upon insertion.

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

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

getCustomAttributesCount()

public int getCustomAttributesCount()

Optional. A list of custom (merchant-provided) attributes. It can also be used for submitting 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. Maximum allowed number of characters for each custom attribute is 10240 (represents sum of characters for name and value). Maximum 2500 custom attributes can be set per product, with total size of 102.4kB. Underscores in custom attribute names are replaced by spaces upon insertion.

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

Returns
Type Description
int

getCustomAttributesList()

public List<CustomAttribute> getCustomAttributesList()

Optional. A list of custom (merchant-provided) attributes. It can also be used for submitting 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. Maximum allowed number of characters for each custom attribute is 10240 (represents sum of characters for name and value). Maximum 2500 custom attributes can be set per product, with total size of 102.4kB. Underscores in custom attribute names are replaced by spaces upon insertion.

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

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

getCustomAttributesOrBuilder(int index)

public CustomAttributeOrBuilder getCustomAttributesOrBuilder(int index)

Optional. A list of custom (merchant-provided) attributes. It can also be used for submitting 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. Maximum allowed number of characters for each custom attribute is 10240 (represents sum of characters for name and value). Maximum 2500 custom attributes can be set per product, with total size of 102.4kB. Underscores in custom attribute names are replaced by spaces upon insertion.

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

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

getCustomAttributesOrBuilderList()

public List<? extends CustomAttributeOrBuilder> getCustomAttributesOrBuilderList()

Optional. A list of custom (merchant-provided) attributes. It can also be used for submitting 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. Maximum allowed number of characters for each custom attribute is 10240 (represents sum of characters for name and value). Maximum 2500 custom attributes can be set per product, with total size of 102.4kB. Underscores in custom attribute names are replaced by spaces upon insertion.

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

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

getDefaultInstanceForType()

public ProductInput getDefaultInstanceForType()
Returns
Type Description
ProductInput

getDescriptorForType()

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

getFeedLabel()

public String getFeedLabel()

Required. Immutable. The feed label for the product.

string feed_label = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The feedLabel.

getFeedLabelBytes()

public ByteString getFeedLabelBytes()

Required. Immutable. The feed label for the product.

string feed_label = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for feedLabel.

getName()

public String getName()

Identifier. The name of the product input. Format: "{productinput.name=accounts/{account}/productInputs/{productinput}}" where the last section productinput consists of 4 parts: channel~content_language~feed_label~offer_id example for product input name is "accounts/123/productInputs/online~en~US~sku123"

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

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. The name of the product input. Format: "{productinput.name=accounts/{account}/productInputs/{productinput}}" where the last section productinput consists of 4 parts: channel~content_language~feed_label~offer_id example for product input name is "accounts/123/productInputs/online~en~US~sku123"

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

Returns
Type Description
ByteString

The bytes for name.

getOfferId()

public String getOfferId()

Required. Immutable. 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 products data specification for details.

string offer_id = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The offerId.

getOfferIdBytes()

public ByteString getOfferIdBytes()

Required. Immutable. 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 products data specification for details.

string offer_id = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for offerId.

getProduct()

public String getProduct()

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

string product = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The product.

getProductBytes()

public ByteString getProductBytes()

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

string product = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for product.

getVersionNumber()

public long getVersionNumber()

Optional. 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) = OPTIONAL];

Returns
Type Description
long

The versionNumber.

hasAttributes()

public boolean hasAttributes()

Optional. A list of product attributes.

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

Returns
Type Description
boolean

Whether the attributes field is set.

hasVersionNumber()

public boolean hasVersionNumber()

Optional. 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) = OPTIONAL];

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 ProductInput.Builder mergeAttributes(Attributes value)

Optional. A list of product attributes.

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

Parameter
Name Description
value Attributes
Returns
Type Description
ProductInput.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(ProductInput other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeCustomAttributes(int index)

public ProductInput.Builder removeCustomAttributes(int index)

Optional. A list of custom (merchant-provided) attributes. It can also be used for submitting 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. Maximum allowed number of characters for each custom attribute is 10240 (represents sum of characters for name and value). Maximum 2500 custom attributes can be set per product, with total size of 102.4kB. Underscores in custom attribute names are replaced by spaces upon insertion.

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

Parameter
Name Description
index int
Returns
Type Description
ProductInput.Builder

setAttributes(Attributes value)

public ProductInput.Builder setAttributes(Attributes value)

Optional. A list of product attributes.

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

Parameter
Name Description
value Attributes
Returns
Type Description
ProductInput.Builder

setAttributes(Attributes.Builder builderForValue)

public ProductInput.Builder setAttributes(Attributes.Builder builderForValue)

Optional. A list of product attributes.

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

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

setChannel(Channel.ChannelEnum value)

public ProductInput.Builder setChannel(Channel.ChannelEnum value)

Required. Immutable. The channel of the product.

.google.shopping.type.Channel.ChannelEnum channel = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

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

The channel to set.

Returns
Type Description
ProductInput.Builder

This builder for chaining.

setChannelValue(int value)

public ProductInput.Builder setChannelValue(int value)

Required. Immutable. The channel of the product.

.google.shopping.type.Channel.ChannelEnum channel = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value int

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

Returns
Type Description
ProductInput.Builder

This builder for chaining.

setContentLanguage(String value)

public ProductInput.Builder setContentLanguage(String value)

Required. Immutable. The two-letter ISO 639-1 language code for the product.

string content_language = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value String

The contentLanguage to set.

Returns
Type Description
ProductInput.Builder

This builder for chaining.

setContentLanguageBytes(ByteString value)

public ProductInput.Builder setContentLanguageBytes(ByteString value)

Required. Immutable. The two-letter ISO 639-1 language code for the product.

string content_language = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value ByteString

The bytes for contentLanguage to set.

Returns
Type Description
ProductInput.Builder

This builder for chaining.

setCustomAttributes(int index, CustomAttribute value)

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

Optional. A list of custom (merchant-provided) attributes. It can also be used for submitting 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. Maximum allowed number of characters for each custom attribute is 10240 (represents sum of characters for name and value). Maximum 2500 custom attributes can be set per product, with total size of 102.4kB. Underscores in custom attribute names are replaced by spaces upon insertion.

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

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

setCustomAttributes(int index, CustomAttribute.Builder builderForValue)

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

Optional. A list of custom (merchant-provided) attributes. It can also be used for submitting 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. Maximum allowed number of characters for each custom attribute is 10240 (represents sum of characters for name and value). Maximum 2500 custom attributes can be set per product, with total size of 102.4kB. Underscores in custom attribute names are replaced by spaces upon insertion.

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

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

setFeedLabel(String value)

public ProductInput.Builder setFeedLabel(String value)

Required. Immutable. The feed label for the product.

string feed_label = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value String

The feedLabel to set.

Returns
Type Description
ProductInput.Builder

This builder for chaining.

setFeedLabelBytes(ByteString value)

public ProductInput.Builder setFeedLabelBytes(ByteString value)

Required. Immutable. The feed label for the product.

string feed_label = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value ByteString

The bytes for feedLabel to set.

Returns
Type Description
ProductInput.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public ProductInput.Builder setName(String value)

Identifier. The name of the product input. Format: "{productinput.name=accounts/{account}/productInputs/{productinput}}" where the last section productinput consists of 4 parts: channel~content_language~feed_label~offer_id example for product input name is "accounts/123/productInputs/online~en~US~sku123"

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

Parameter
Name Description
value String

The name to set.

Returns
Type Description
ProductInput.Builder

This builder for chaining.

setNameBytes(ByteString value)

public ProductInput.Builder setNameBytes(ByteString value)

Identifier. The name of the product input. Format: "{productinput.name=accounts/{account}/productInputs/{productinput}}" where the last section productinput consists of 4 parts: channel~content_language~feed_label~offer_id example for product input name is "accounts/123/productInputs/online~en~US~sku123"

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

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
ProductInput.Builder

This builder for chaining.

setOfferId(String value)

public ProductInput.Builder setOfferId(String value)

Required. Immutable. 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 products data specification for details.

string offer_id = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value String

The offerId to set.

Returns
Type Description
ProductInput.Builder

This builder for chaining.

setOfferIdBytes(ByteString value)

public ProductInput.Builder setOfferIdBytes(ByteString value)

Required. Immutable. 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 products data specification for details.

string offer_id = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value ByteString

The bytes for offerId to set.

Returns
Type Description
ProductInput.Builder

This builder for chaining.

setProduct(String value)

public ProductInput.Builder setProduct(String value)

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

string product = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The product to set.

Returns
Type Description
ProductInput.Builder

This builder for chaining.

setProductBytes(ByteString value)

public ProductInput.Builder setProductBytes(ByteString value)

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

string product = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for product to set.

Returns
Type Description
ProductInput.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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

setVersionNumber(long value)

public ProductInput.Builder setVersionNumber(long value)

Optional. 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) = OPTIONAL];

Parameter
Name Description
value long

The versionNumber to set.

Returns
Type Description
ProductInput.Builder

This builder for chaining.