# Class ProductInput.Builder (1.21.0)

1.21.0 (latest) 1.19.0 1.16.0 1.15.0 1.13.0 1.11.0 1.10.0 1.8.0 1.6.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0 0.26.0 0.24.0 0.23.0 0.20.0 0.19.0 0.18.0 0.16.0 0.15.0 0.14.0 0.13.0 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.7.0 0.5.0 0.4.0 0.3.0 0.2.0 0.1.0

    public static final class ProductInput.Builder extends GeneratedMessage.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. For more
information, see [Manage products](https://docs.cloud.google.com/merchant/api/guides/products/overview).

Required product input attributes to pass data validation checks are
primarily defined in the [Products Data
Specification](https://support.google.com/merchants/answer/188494).

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 [Products Data
Specification](https://support.google.com/merchants/answer/188494) with
[some exceptions](https://support.google.com/merchants/answer/7052112).
The following reference documentation lists the field names in the
**camelCase** casing style while the Products Data Specification lists the
names in the **snake_case** casing style.

Protobuf type `google.shopping.merchant.products.v1.ProductInput`

## Inheritance

[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> [AbstractMessageLite.Builder\<MessageType,BuilderType\>](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite.Builder.html) \> [AbstractMessage.Builder\<BuilderType\>](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html) \> [GeneratedMessage.Builder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html) \> ProductInput.Builder

## Implements

[ProductInputOrBuilder](https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInputOrBuilder)

## Inherited Members

[AbstractMessage.Builder.findInitializationErrors()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_findInitializationErrors__) [AbstractMessage.Builder.getInitializationErrorString()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_getInitializationErrorString__) [AbstractMessage.Builder.internalMergeFrom(AbstractMessageLite)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_internalMergeFrom_com_google_protobuf_AbstractMessageLite_) [AbstractMessage.Builder.mergeFrom(byte\[\])](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_byte___) [AbstractMessage.Builder.mergeFrom(byte\[\],ExtensionRegistryLite)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_byte___com_google_protobuf_ExtensionRegistryLite_) [AbstractMessage.Builder.mergeFrom(byte\[\],int,int)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_byte___int_int_) [AbstractMessage.Builder.mergeFrom(byte\[\],int,int,ExtensionRegistryLite)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_byte___int_int_com_google_protobuf_ExtensionRegistryLite_) [AbstractMessage.Builder.mergeFrom(ByteString)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_com_google_protobuf_ByteString_) [AbstractMessage.Builder.mergeFrom(ByteString,ExtensionRegistryLite)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_com_google_protobuf_ByteString_com_google_protobuf_ExtensionRegistryLite_) [AbstractMessage.Builder.mergeFrom(CodedInputStream)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_com_google_protobuf_CodedInputStream_) [AbstractMessage.Builder.mergeFrom(CodedInputStream,ExtensionRegistryLite)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_com_google_protobuf_CodedInputStream_com_google_protobuf_ExtensionRegistryLite_) [AbstractMessage.Builder.mergeFrom(Message)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_com_google_protobuf_Message_) [AbstractMessage.Builder.mergeFrom(InputStream)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_java_io_InputStream_) [AbstractMessage.Builder.mergeFrom(InputStream,ExtensionRegistryLite)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_java_io_InputStream_com_google_protobuf_ExtensionRegistryLite_) [AbstractMessage.Builder.newUninitializedMessageException(Message)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_newUninitializedMessageException_com_google_protobuf_Message_) [AbstractMessage.Builder.toString()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_toString__) [AbstractMessageLite.Builder.\<T\>addAll(Iterable\<T\>,Collection\<? super T\>)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite.Builder.html#com_google_protobuf_AbstractMessageLite_Builder__T_addAll_java_lang_Iterable_T__java_util_Collection___super_T__) [AbstractMessageLite.Builder.\<T\>addAll(Iterable\<T\>,List\<? super T\>)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite.Builder.html#com_google_protobuf_AbstractMessageLite_Builder__T_addAll_java_lang_Iterable_T__java_util_List___super_T__) [AbstractMessageLite.Builder.internalMergeFrom(MessageType)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite.Builder.html#com_google_protobuf_AbstractMessageLite_Builder_internalMergeFrom_MessageType_) [AbstractMessageLite.Builder.mergeDelimitedFrom(InputStream)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite.Builder.html#com_google_protobuf_AbstractMessageLite_Builder_mergeDelimitedFrom_java_io_InputStream_) [AbstractMessageLite.Builder.mergeDelimitedFrom(InputStream,ExtensionRegistryLite)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite.Builder.html#com_google_protobuf_AbstractMessageLite_Builder_mergeDelimitedFrom_java_io_InputStream_com_google_protobuf_ExtensionRegistryLite_) [AbstractMessageLite.Builder.mergeFrom(MessageLite)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite.Builder.html#com_google_protobuf_AbstractMessageLite_Builder_mergeFrom_com_google_protobuf_MessageLite_) [AbstractMessageLite.Builder.newUninitializedMessageException(MessageLite)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite.Builder.html#com_google_protobuf_AbstractMessageLite_Builder_newUninitializedMessageException_com_google_protobuf_MessageLite_) [GeneratedMessage.Builder.addRepeatedField(Descriptors.FieldDescriptor,Object)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_addRepeatedField_com_google_protobuf_Descriptors_FieldDescriptor_java_lang_Object_) [GeneratedMessage.Builder.clear()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_clear__) [GeneratedMessage.Builder.clearField(Descriptors.FieldDescriptor)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_clearField_com_google_protobuf_Descriptors_FieldDescriptor_) [GeneratedMessage.Builder.clearOneof(Descriptors.OneofDescriptor)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_clearOneof_com_google_protobuf_Descriptors_OneofDescriptor_) [GeneratedMessage.Builder.clone()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_clone__) [GeneratedMessage.Builder.getAllFields()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_getAllFields__) [GeneratedMessage.Builder.getDescriptorForType()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_getDescriptorForType__) [GeneratedMessage.Builder.getField(Descriptors.FieldDescriptor)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_getField_com_google_protobuf_Descriptors_FieldDescriptor_) [GeneratedMessage.Builder.getFieldBuilder(Descriptors.FieldDescriptor)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_getFieldBuilder_com_google_protobuf_Descriptors_FieldDescriptor_) [GeneratedMessage.Builder.getOneofFieldDescriptor(Descriptors.OneofDescriptor)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_getOneofFieldDescriptor_com_google_protobuf_Descriptors_OneofDescriptor_) [GeneratedMessage.Builder.getParentForChildren()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_getParentForChildren__) [GeneratedMessage.Builder.getRepeatedField(Descriptors.FieldDescriptor,int)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_getRepeatedField_com_google_protobuf_Descriptors_FieldDescriptor_int_) [GeneratedMessage.Builder.getRepeatedFieldBuilder(Descriptors.FieldDescriptor,int)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_getRepeatedFieldBuilder_com_google_protobuf_Descriptors_FieldDescriptor_int_) [GeneratedMessage.Builder.getRepeatedFieldCount(Descriptors.FieldDescriptor)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_getRepeatedFieldCount_com_google_protobuf_Descriptors_FieldDescriptor_) com.google.protobuf.GeneratedMessage.Builder.getUnknownFieldSetBuilder() [GeneratedMessage.Builder.getUnknownFields()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_getUnknownFields__) [GeneratedMessage.Builder.hasField(Descriptors.FieldDescriptor)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_hasField_com_google_protobuf_Descriptors_FieldDescriptor_) [GeneratedMessage.Builder.hasOneof(Descriptors.OneofDescriptor)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_hasOneof_com_google_protobuf_Descriptors_OneofDescriptor_) [GeneratedMessage.Builder.internalGetFieldAccessorTable()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_internalGetFieldAccessorTable__) [GeneratedMessage.Builder.internalGetMapField(int)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_internalGetMapField_int_) com.google.protobuf.GeneratedMessage.Builder.internalGetMapFieldReflection(int) [GeneratedMessage.Builder.internalGetMutableMapField(int)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_internalGetMutableMapField_int_) com.google.protobuf.GeneratedMessage.Builder.internalGetMutableMapFieldReflection(int) [GeneratedMessage.Builder.isClean()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_isClean__) [GeneratedMessage.Builder.isInitialized()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_isInitialized__) [GeneratedMessage.Builder.markClean()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_markClean__) [GeneratedMessage.Builder.mergeUnknownFields(UnknownFieldSet)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_mergeUnknownFields_com_google_protobuf_UnknownFieldSet_) com.google.protobuf.GeneratedMessage.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString) com.google.protobuf.GeneratedMessage.Builder.mergeUnknownVarintField(int,int) [GeneratedMessage.Builder.newBuilderForField(Descriptors.FieldDescriptor)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_newBuilderForField_com_google_protobuf_Descriptors_FieldDescriptor_) [GeneratedMessage.Builder.onBuilt()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_onBuilt__) [GeneratedMessage.Builder.onChanged()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_onChanged__) com.google.protobuf.GeneratedMessage.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int) [GeneratedMessage.Builder.setField(Descriptors.FieldDescriptor,Object)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_setField_com_google_protobuf_Descriptors_FieldDescriptor_java_lang_Object_) [GeneratedMessage.Builder.setRepeatedField(Descriptors.FieldDescriptor,int,Object)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_setRepeatedField_com_google_protobuf_Descriptors_FieldDescriptor_int_java_lang_Object_) com.google.protobuf.GeneratedMessage.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder) [GeneratedMessage.Builder.setUnknownFields(UnknownFieldSet)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_setUnknownFields_com_google_protobuf_UnknownFieldSet_) com.google.protobuf.GeneratedMessage.Builder.setUnknownFieldsProto3(com.google.protobuf.UnknownFieldSet) [Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) [Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) [Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) [Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) [Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) [Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) [Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) [Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) [Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)

## Static Methods

### getDescriptor()

    public static final Descriptors.Descriptor getDescriptor()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.Descriptor.html` |   |

## 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.
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` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html<? extends com.google.shopping.type.CustomAttribute>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.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.
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** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.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.
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** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.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.
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` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |
| `value` | `com.google.shopping.type.CustomAttribute` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.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.
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` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |
| `builderForValue` | `com.google.shopping.type.CustomAttribute.Builder` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.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.
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.
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` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.shopping.type.CustomAttribute.Builder` |   |

### build()

    public ProductInput build()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput` |   |

### buildPartial()

    public ProductInput buildPartial()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput` |   |

### clear()

    public ProductInput.Builder clear()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput.Builder` |   |

**Overrides** [GeneratedMessage.Builder\<BuilderType\>.clear()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_clear__)

### clearBase64EncodedName()

    public ProductInput.Builder clearBase64EncodedName()

Output only. The **unpadded base64url encoded name** of the product input.
Format:
`accounts/{account}/productInputs/{productinput}` where the last
section `productinput` is the unpadded base64url encoding of the
`content_language~feed_label~offer_id` name.
Example: `accounts/123/productInputs/ZW5-VVN-c2t1LzEyMw` for the decoded
product input name `accounts/123/productInputs/en~US~sku/123`. This field
can be used directly as input to the API methods that require the product
input name to be encoded if it contains special characters, for example
[`GetProductInput`](https://developers.google.com/merchant/api/reference/rest/products_v1/accounts.productInputs/get).

`string base64_encoded_name = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput.Builder` | This builder for chaining. |

### clearBase64EncodedProduct()

    public ProductInput.Builder clearBase64EncodedProduct()

Output only. The **unpadded base64url encoded name** of the processed
product. Format: `accounts/{account}/products/{product}` where the last
section `product` is the unpadded base64url encoding of the
`content_language~feed_label~offer_id` name.
Example: `accounts/123/products/ZW5-VVN-c2t1LzEyMw` for the decoded
product name `accounts/123/products/en~US~sku/123`. This field can be used
directly as input to the API methods that require the product name to be
encoded if it contains special characters, for example
[`GetProduct`](https://developers.google.com/merchant/api/reference/rest/products_v1/accounts.products/get).

`string base64_encoded_product = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput.Builder` | This builder for chaining. |

### clearContentLanguage()

    public ProductInput.Builder clearContentLanguage()

Required. Immutable. The two-letter [ISO
639-1](http://en.wikipedia.org/wiki/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** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.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.
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** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput.Builder` |   |

### clearFeedLabel()

    public ProductInput.Builder clearFeedLabel()

Required. Immutable. The feed label that lets you categorize and identify
your products. The maximum allowed characters are 20, and the supported
characters are `A-Z`, `0-9`, hyphen, and underscore. The feed label must
not include any spaces. For more information, see [Using feed
labels](https://support.google.com/merchants/answer/14994087).

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput.Builder` | This builder for chaining. |

### clearLegacyLocal()

    public ProductInput.Builder clearLegacyLocal()

Immutable. Determines whether the product is **only** targeting
local destinations and whether the product name should be distinguished
with a `local~` prefix. For example,
`accounts/123/productInputs/local~en~US~sku123`. If a product that is not
`legacy_local` is already targeting local destinations,
creating a `legacy_local` product with an otherwise matching name will
fail.

`bool legacy_local = 10 [(.google.api.field_behavior) = IMMUTABLE];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput.Builder` | This builder for chaining. |

### clearName()

    public ProductInput.Builder clearName()

Identifier. The name of the product.
Format: `accounts/{account}/productInputs/{productinput}`

The {productinput} segment is a unique identifier for the product.
This identifier must be unique within a merchant account and generally
follows the structure: `content_language~feed_label~offer_id`. Example:
`en~US~sku123` For legacy local products, the structure is:
`local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123`

The format of the {productinput} segment in the URL is automatically
detected by the server, supporting two options:

1. **Encoded Format** : The `{productinput}` segment is an unpadded base64url encoded string (RFC 4648 Section 5). The decoded string must result in the `content_language~feed_label~offer_id` structure. This encoding MUST be used if any part of the product identifier (like `offer_id`) contains characters such as `/`, `%`, or `~`.
2. Example: To represent the product ID `en~US~sku/123`, the
   `{productinput}` segment must be the unpadded base64url encoding of
   this string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name
   for the product would be
   `accounts/123/productInputs/ZW5-VVN-c2t1LzEyMw`.

3. **Plain Format** : The `{productinput}` segment is the tilde-separated
   string
   `content_language~feed_label~offer_id`. This format is suitable only
   when `content_language`, `feed_label`, and `offer_id` do not contain
   URL-problematic characters like `/`, `%`, or `~`.

   We recommend using the **Encoded Format** for all product IDs to ensure
   correct parsing, especially those containing special characters. The
   presence of tilde (`~`) characters in the `{productinput}` segment is used
   to differentiate between the two formats.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.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](https://support.google.com/merchants/answer/188494#id) for
details.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput.Builder` | This builder for chaining. |

### clearProduct()

    public ProductInput.Builder clearProduct()

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

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput.Builder` | This builder for chaining. |

### clearProductAttributes()

    public ProductInput.Builder clearProductAttributes()

Optional. A list of strongly-typed product attributes.

`
.google.shopping.merchant.products.v1.ProductAttributes product_attributes = 11 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput.Builder` |   |

### clearVersionNumber()

    public ProductInput.Builder clearVersionNumber()

Optional. Immutable. 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.
Do not set this field for updates.
Do not set this field for insertions into supplemental data sources.

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

`
optional int64 version_number = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput.Builder` | This builder for chaining. |

### getBase64EncodedName()

    public String getBase64EncodedName()

Output only. The **unpadded base64url encoded name** of the product input.
Format:
`accounts/{account}/productInputs/{productinput}` where the last
section `productinput` is the unpadded base64url encoding of the
`content_language~feed_label~offer_id` name.
Example: `accounts/123/productInputs/ZW5-VVN-c2t1LzEyMw` for the decoded
product input name `accounts/123/productInputs/en~US~sku/123`. This field
can be used directly as input to the API methods that require the product
input name to be encoded if it contains special characters, for example
[`GetProductInput`](https://developers.google.com/merchant/api/reference/rest/products_v1/accounts.productInputs/get).

`string base64_encoded_name = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The base64EncodedName. |

### getBase64EncodedNameBytes()

    public ByteString getBase64EncodedNameBytes()

Output only. The **unpadded base64url encoded name** of the product input.
Format:
`accounts/{account}/productInputs/{productinput}` where the last
section `productinput` is the unpadded base64url encoding of the
`content_language~feed_label~offer_id` name.
Example: `accounts/123/productInputs/ZW5-VVN-c2t1LzEyMw` for the decoded
product input name `accounts/123/productInputs/en~US~sku/123`. This field
can be used directly as input to the API methods that require the product
input name to be encoded if it contains special characters, for example
[`GetProductInput`](https://developers.google.com/merchant/api/reference/rest/products_v1/accounts.productInputs/get).

`string base64_encoded_name = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for base64EncodedName. |

### getBase64EncodedProduct()

    public String getBase64EncodedProduct()

Output only. The **unpadded base64url encoded name** of the processed
product. Format: `accounts/{account}/products/{product}` where the last
section `product` is the unpadded base64url encoding of the
`content_language~feed_label~offer_id` name.
Example: `accounts/123/products/ZW5-VVN-c2t1LzEyMw` for the decoded
product name `accounts/123/products/en~US~sku/123`. This field can be used
directly as input to the API methods that require the product name to be
encoded if it contains special characters, for example
[`GetProduct`](https://developers.google.com/merchant/api/reference/rest/products_v1/accounts.products/get).

`string base64_encoded_product = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The base64EncodedProduct. |

### getBase64EncodedProductBytes()

    public ByteString getBase64EncodedProductBytes()

Output only. The **unpadded base64url encoded name** of the processed
product. Format: `accounts/{account}/products/{product}` where the last
section `product` is the unpadded base64url encoding of the
`content_language~feed_label~offer_id` name.
Example: `accounts/123/products/ZW5-VVN-c2t1LzEyMw` for the decoded
product name `accounts/123/products/en~US~sku/123`. This field can be used
directly as input to the API methods that require the product name to be
encoded if it contains special characters, for example
[`GetProduct`](https://developers.google.com/merchant/api/reference/rest/products_v1/accounts.products/get).

`string base64_encoded_product = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for base64EncodedProduct. |

### getContentLanguage()

    public String getContentLanguage()

Required. Immutable. The two-letter [ISO
639-1](http://en.wikipedia.org/wiki/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** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The contentLanguage. |

### getContentLanguageBytes()

    public ByteString getContentLanguageBytes()

Required. Immutable. The two-letter [ISO
639-1](http://en.wikipedia.org/wiki/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** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | 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.
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` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **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.
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` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **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.
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** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<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.
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** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### 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.
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** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<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.
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` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **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.
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** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<? extends com.google.shopping.type.CustomAttributeOrBuilder>` |   |

### getDefaultInstanceForType()

    public ProductInput getDefaultInstanceForType()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput` |   |

### getDescriptorForType()

    public Descriptors.Descriptor getDescriptorForType()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.Descriptor.html` |   |

**Overrides** [GeneratedMessage.Builder\<BuilderType\>.getDescriptorForType()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_getDescriptorForType__)

### getFeedLabel()

    public String getFeedLabel()

Required. Immutable. The feed label that lets you categorize and identify
your products. The maximum allowed characters are 20, and the supported
characters are `A-Z`, `0-9`, hyphen, and underscore. The feed label must
not include any spaces. For more information, see [Using feed
labels](https://support.google.com/merchants/answer/14994087).

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The feedLabel. |

### getFeedLabelBytes()

    public ByteString getFeedLabelBytes()

Required. Immutable. The feed label that lets you categorize and identify
your products. The maximum allowed characters are 20, and the supported
characters are `A-Z`, `0-9`, hyphen, and underscore. The feed label must
not include any spaces. For more information, see [Using feed
labels](https://support.google.com/merchants/answer/14994087).

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for feedLabel. |

### getLegacyLocal()

    public boolean getLegacyLocal()

Immutable. Determines whether the product is **only** targeting
local destinations and whether the product name should be distinguished
with a `local~` prefix. For example,
`accounts/123/productInputs/local~en~US~sku123`. If a product that is not
`legacy_local` is already targeting local destinations,
creating a `legacy_local` product with an otherwise matching name will
fail.

`bool legacy_local = 10 [(.google.api.field_behavior) = IMMUTABLE];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The legacyLocal. |

### getName()

    public String getName()

Identifier. The name of the product.
Format: `accounts/{account}/productInputs/{productinput}`

The {productinput} segment is a unique identifier for the product.
This identifier must be unique within a merchant account and generally
follows the structure: `content_language~feed_label~offer_id`. Example:
`en~US~sku123` For legacy local products, the structure is:
`local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123`

The format of the {productinput} segment in the URL is automatically
detected by the server, supporting two options:

1. **Encoded Format** : The `{productinput}` segment is an unpadded base64url encoded string (RFC 4648 Section 5). The decoded string must result in the `content_language~feed_label~offer_id` structure. This encoding MUST be used if any part of the product identifier (like `offer_id`) contains characters such as `/`, `%`, or `~`.
2. Example: To represent the product ID `en~US~sku/123`, the
   `{productinput}` segment must be the unpadded base64url encoding of
   this string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name
   for the product would be
   `accounts/123/productInputs/ZW5-VVN-c2t1LzEyMw`.

3. **Plain Format** : The `{productinput}` segment is the tilde-separated
   string
   `content_language~feed_label~offer_id`. This format is suitable only
   when `content_language`, `feed_label`, and `offer_id` do not contain
   URL-problematic characters like `/`, `%`, or `~`.

   We recommend using the **Encoded Format** for all product IDs to ensure
   correct parsing, especially those containing special characters. The
   presence of tilde (`~`) characters in the `{productinput}` segment is used
   to differentiate between the two formats.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The name. |

### getNameBytes()

    public ByteString getNameBytes()

Identifier. The name of the product.
Format: `accounts/{account}/productInputs/{productinput}`

The {productinput} segment is a unique identifier for the product.
This identifier must be unique within a merchant account and generally
follows the structure: `content_language~feed_label~offer_id`. Example:
`en~US~sku123` For legacy local products, the structure is:
`local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123`

The format of the {productinput} segment in the URL is automatically
detected by the server, supporting two options:

1. **Encoded Format** : The `{productinput}` segment is an unpadded base64url encoded string (RFC 4648 Section 5). The decoded string must result in the `content_language~feed_label~offer_id` structure. This encoding MUST be used if any part of the product identifier (like `offer_id`) contains characters such as `/`, `%`, or `~`.
2. Example: To represent the product ID `en~US~sku/123`, the
   `{productinput}` segment must be the unpadded base64url encoding of
   this string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name
   for the product would be
   `accounts/123/productInputs/ZW5-VVN-c2t1LzEyMw`.

3. **Plain Format** : The `{productinput}` segment is the tilde-separated
   string
   `content_language~feed_label~offer_id`. This format is suitable only
   when `content_language`, `feed_label`, and `offer_id` do not contain
   URL-problematic characters like `/`, `%`, or `~`.

   We recommend using the **Encoded Format** for all product IDs to ensure
   correct parsing, especially those containing special characters. The
   presence of tilde (`~`) characters in the `{productinput}` segment is used
   to differentiate between the two formats.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | 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](https://support.google.com/merchants/answer/188494#id) for
details.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | 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](https://support.google.com/merchants/answer/188494#id) for
details.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for offerId. |

### getProduct()

    public String getProduct()

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

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The product. |

### getProductAttributes()

    public ProductAttributes getProductAttributes()

Optional. A list of strongly-typed product attributes.

`
.google.shopping.merchant.products.v1.ProductAttributes product_attributes = 11 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductAttributes` | The productAttributes. |

### getProductAttributesBuilder()

    public ProductAttributes.Builder getProductAttributesBuilder()

Optional. A list of strongly-typed product attributes.

`
.google.shopping.merchant.products.v1.ProductAttributes product_attributes = 11 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductAttributes.Builder` |   |

### getProductAttributesOrBuilder()

    public ProductAttributesOrBuilder getProductAttributesOrBuilder()

Optional. A list of strongly-typed product attributes.

`
.google.shopping.merchant.products.v1.ProductAttributes product_attributes = 11 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductAttributesOrBuilder` |   |

### getProductBytes()

    public ByteString getProductBytes()

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

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for product. |

### getVersionNumber()

    public long getVersionNumber()

Optional. Immutable. 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.
Do not set this field for updates.
Do not set this field for insertions into supplemental data sources.

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

`
optional int64 version_number = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The versionNumber. |

### hasProductAttributes()

    public boolean hasProductAttributes()

Optional. A list of strongly-typed product attributes.

`
.google.shopping.merchant.products.v1.ProductAttributes product_attributes = 11 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the productAttributes field is set. |

### hasVersionNumber()

    public boolean hasVersionNumber()

Optional. Immutable. 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.
Do not set this field for updates.
Do not set this field for insertions into supplemental data sources.

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

`
optional int64 version_number = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the versionNumber field is set. |

### internalGetFieldAccessorTable()

    protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.FieldAccessorTable.html` |   |

**Overrides** [GeneratedMessage.Builder\<BuilderType\>.internalGetFieldAccessorTable()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_internalGetFieldAccessorTable__)

### isInitialized()

    public final boolean isInitialized()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

**Overrides** [GeneratedMessage.Builder\<BuilderType\>.isInitialized()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_isInitialized__)

### mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

    public ProductInput.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `input` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.CodedInputStream.html` |
| `extensionRegistry` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ExtensionRegistryLite.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput.Builder` |   |

**Overrides** [AbstractMessage.Builder\<BuilderType\>.mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_com_google_protobuf_CodedInputStream_com_google_protobuf_ExtensionRegistryLite_)

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |

### mergeFrom(Message other)

    public ProductInput.Builder mergeFrom(Message other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Message.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput.Builder` |   |

**Overrides** [AbstractMessage.Builder\<BuilderType\>.mergeFrom(Message other)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_com_google_protobuf_Message_)

### mergeFrom(ProductInput other)

    public ProductInput.Builder mergeFrom(ProductInput other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput.Builder` |   |

### mergeProductAttributes(ProductAttributes value)

    public ProductInput.Builder mergeProductAttributes(ProductAttributes value)

Optional. A list of strongly-typed product attributes.

`
.google.shopping.merchant.products.v1.ProductAttributes product_attributes = 11 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductAttributes` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput.Builder` |   |

### 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.
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` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput.Builder` |   |

### setBase64EncodedName(String value)

    public ProductInput.Builder setBase64EncodedName(String value)

Output only. The **unpadded base64url encoded name** of the product input.
Format:
`accounts/{account}/productInputs/{productinput}` where the last
section `productinput` is the unpadded base64url encoding of the
`content_language~feed_label~offer_id` name.
Example: `accounts/123/productInputs/ZW5-VVN-c2t1LzEyMw` for the decoded
product input name `accounts/123/productInputs/en~US~sku/123`. This field
can be used directly as input to the API methods that require the product
input name to be encoded if it contains special characters, for example
[`GetProductInput`](https://developers.google.com/merchant/api/reference/rest/products_v1/accounts.productInputs/get).

`string base64_encoded_name = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` The base64EncodedName to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput.Builder` | This builder for chaining. |

### setBase64EncodedNameBytes(ByteString value)

    public ProductInput.Builder setBase64EncodedNameBytes(ByteString value)

Output only. The **unpadded base64url encoded name** of the product input.
Format:
`accounts/{account}/productInputs/{productinput}` where the last
section `productinput` is the unpadded base64url encoding of the
`content_language~feed_label~offer_id` name.
Example: `accounts/123/productInputs/ZW5-VVN-c2t1LzEyMw` for the decoded
product input name `accounts/123/productInputs/en~US~sku/123`. This field
can be used directly as input to the API methods that require the product
input name to be encoded if it contains special characters, for example
[`GetProductInput`](https://developers.google.com/merchant/api/reference/rest/products_v1/accounts.productInputs/get).

`string base64_encoded_name = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` The bytes for base64EncodedName to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput.Builder` | This builder for chaining. |

### setBase64EncodedProduct(String value)

    public ProductInput.Builder setBase64EncodedProduct(String value)

Output only. The **unpadded base64url encoded name** of the processed
product. Format: `accounts/{account}/products/{product}` where the last
section `product` is the unpadded base64url encoding of the
`content_language~feed_label~offer_id` name.
Example: `accounts/123/products/ZW5-VVN-c2t1LzEyMw` for the decoded
product name `accounts/123/products/en~US~sku/123`. This field can be used
directly as input to the API methods that require the product name to be
encoded if it contains special characters, for example
[`GetProduct`](https://developers.google.com/merchant/api/reference/rest/products_v1/accounts.products/get).

`string base64_encoded_product = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` The base64EncodedProduct to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput.Builder` | This builder for chaining. |

### setBase64EncodedProductBytes(ByteString value)

    public ProductInput.Builder setBase64EncodedProductBytes(ByteString value)

Output only. The **unpadded base64url encoded name** of the processed
product. Format: `accounts/{account}/products/{product}` where the last
section `product` is the unpadded base64url encoding of the
`content_language~feed_label~offer_id` name.
Example: `accounts/123/products/ZW5-VVN-c2t1LzEyMw` for the decoded
product name `accounts/123/products/en~US~sku/123`. This field can be used
directly as input to the API methods that require the product name to be
encoded if it contains special characters, for example
[`GetProduct`](https://developers.google.com/merchant/api/reference/rest/products_v1/accounts.products/get).

`string base64_encoded_product = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` The bytes for base64EncodedProduct to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput.Builder` | This builder for chaining. |

### setContentLanguage(String value)

    public ProductInput.Builder setContentLanguage(String value)

Required. Immutable. The two-letter [ISO
639-1](http://en.wikipedia.org/wiki/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` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` The contentLanguage to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput.Builder` | This builder for chaining. |

### setContentLanguageBytes(ByteString value)

    public ProductInput.Builder setContentLanguageBytes(ByteString value)

Required. Immutable. The two-letter [ISO
639-1](http://en.wikipedia.org/wiki/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` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` The bytes for contentLanguage to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.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.
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` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |
| `value` | `com.google.shopping.type.CustomAttribute` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.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.
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` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |
| `builderForValue` | `com.google.shopping.type.CustomAttribute.Builder` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput.Builder` |   |

### setFeedLabel(String value)

    public ProductInput.Builder setFeedLabel(String value)

Required. Immutable. The feed label that lets you categorize and identify
your products. The maximum allowed characters are 20, and the supported
characters are `A-Z`, `0-9`, hyphen, and underscore. The feed label must
not include any spaces. For more information, see [Using feed
labels](https://support.google.com/merchants/answer/14994087).

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` The feedLabel to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput.Builder` | This builder for chaining. |

### setFeedLabelBytes(ByteString value)

    public ProductInput.Builder setFeedLabelBytes(ByteString value)

Required. Immutable. The feed label that lets you categorize and identify
your products. The maximum allowed characters are 20, and the supported
characters are `A-Z`, `0-9`, hyphen, and underscore. The feed label must
not include any spaces. For more information, see [Using feed
labels](https://support.google.com/merchants/answer/14994087).

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` The bytes for feedLabel to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput.Builder` | This builder for chaining. |

### setLegacyLocal(boolean value)

    public ProductInput.Builder setLegacyLocal(boolean value)

Immutable. Determines whether the product is **only** targeting
local destinations and whether the product name should be distinguished
with a `local~` prefix. For example,
`accounts/123/productInputs/local~en~US~sku123`. If a product that is not
`legacy_local` is already targeting local destinations,
creating a `legacy_local` product with an otherwise matching name will
fail.

`bool legacy_local = 10 [(.google.api.field_behavior) = IMMUTABLE];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The legacyLocal to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput.Builder` | This builder for chaining. |

### setName(String value)

    public ProductInput.Builder setName(String value)

Identifier. The name of the product.
Format: `accounts/{account}/productInputs/{productinput}`

The {productinput} segment is a unique identifier for the product.
This identifier must be unique within a merchant account and generally
follows the structure: `content_language~feed_label~offer_id`. Example:
`en~US~sku123` For legacy local products, the structure is:
`local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123`

The format of the {productinput} segment in the URL is automatically
detected by the server, supporting two options:

1. **Encoded Format** : The `{productinput}` segment is an unpadded base64url encoded string (RFC 4648 Section 5). The decoded string must result in the `content_language~feed_label~offer_id` structure. This encoding MUST be used if any part of the product identifier (like `offer_id`) contains characters such as `/`, `%`, or `~`.
2. Example: To represent the product ID `en~US~sku/123`, the
   `{productinput}` segment must be the unpadded base64url encoding of
   this string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name
   for the product would be
   `accounts/123/productInputs/ZW5-VVN-c2t1LzEyMw`.

3. **Plain Format** : The `{productinput}` segment is the tilde-separated
   string
   `content_language~feed_label~offer_id`. This format is suitable only
   when `content_language`, `feed_label`, and `offer_id` do not contain
   URL-problematic characters like `/`, `%`, or `~`.

   We recommend using the **Encoded Format** for all product IDs to ensure
   correct parsing, especially those containing special characters. The
   presence of tilde (`~`) characters in the `{productinput}` segment is used
   to differentiate between the two formats.

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` The name to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput.Builder` | This builder for chaining. |

### setNameBytes(ByteString value)

    public ProductInput.Builder setNameBytes(ByteString value)

Identifier. The name of the product.
Format: `accounts/{account}/productInputs/{productinput}`

The {productinput} segment is a unique identifier for the product.
This identifier must be unique within a merchant account and generally
follows the structure: `content_language~feed_label~offer_id`. Example:
`en~US~sku123` For legacy local products, the structure is:
`local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123`

The format of the {productinput} segment in the URL is automatically
detected by the server, supporting two options:

1. **Encoded Format** : The `{productinput}` segment is an unpadded base64url encoded string (RFC 4648 Section 5). The decoded string must result in the `content_language~feed_label~offer_id` structure. This encoding MUST be used if any part of the product identifier (like `offer_id`) contains characters such as `/`, `%`, or `~`.
2. Example: To represent the product ID `en~US~sku/123`, the
   `{productinput}` segment must be the unpadded base64url encoding of
   this string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name
   for the product would be
   `accounts/123/productInputs/ZW5-VVN-c2t1LzEyMw`.

3. **Plain Format** : The `{productinput}` segment is the tilde-separated
   string
   `content_language~feed_label~offer_id`. This format is suitable only
   when `content_language`, `feed_label`, and `offer_id` do not contain
   URL-problematic characters like `/`, `%`, or `~`.

   We recommend using the **Encoded Format** for all product IDs to ensure
   correct parsing, especially those containing special characters. The
   presence of tilde (`~`) characters in the `{productinput}` segment is used
   to differentiate between the two formats.

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` The bytes for name to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.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](https://support.google.com/merchants/answer/188494#id) for
details.

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` The offerId to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.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](https://support.google.com/merchants/answer/188494#id) for
details.

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` The bytes for offerId to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput.Builder` | This builder for chaining. |

### setProduct(String value)

    public ProductInput.Builder setProduct(String value)

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

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` The product to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput.Builder` | This builder for chaining. |

### setProductAttributes(ProductAttributes value)

    public ProductInput.Builder setProductAttributes(ProductAttributes value)

Optional. A list of strongly-typed product attributes.

`
.google.shopping.merchant.products.v1.ProductAttributes product_attributes = 11 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductAttributes` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput.Builder` |   |

### setProductAttributes(ProductAttributes.Builder builderForValue)

    public ProductInput.Builder setProductAttributes(ProductAttributes.Builder builderForValue)

Optional. A list of strongly-typed product attributes.

`
.google.shopping.merchant.products.v1.ProductAttributes product_attributes = 11 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `builderForValue` | `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductAttributes.Builder` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput.Builder` |   |

### setProductBytes(ByteString value)

    public ProductInput.Builder setProductBytes(ByteString value)

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

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` The bytes for product to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput.Builder` | This builder for chaining. |

### setVersionNumber(long value)

    public ProductInput.Builder setVersionNumber(long value)

Optional. Immutable. 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.
Do not set this field for updates.
Do not set this field for insertions into supplemental data sources.

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

`
optional int64 version_number = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The versionNumber to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput.Builder` | This builder for chaining. |