# Class Headers.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 Headers.Builder extends GeneratedMessage.Builder<Headers.Builder> implements HeadersOrBuilder

A non-empty list of row or column headers for a table.
Exactly one of `prices`, `weights`,
`num_items`, `postal_code_group_names`, or
`location` must be set.

Protobuf type `google.shopping.merchant.accounts.v1beta.Headers`

## 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) \> Headers.Builder

## Implements

[HeadersOrBuilder](https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.HeadersOrBuilder)

## 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

### addAllLocations(Iterable\<? extends LocationIdSet\> values)

    public Headers.Builder addAllLocations(Iterable<? extends LocationIdSet> values)

Required. A list of location ID sets. Must be non-empty. Can only be set if
all other fields are not set.

`
repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `values` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html<? extends com.google.shopping.merchant.accounts.v1beta.LocationIdSet>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.Headers.Builder` |   |

### addAllNumberOfItems(Iterable\<String\> values)

    public Headers.Builder addAllNumberOfItems(Iterable<String> values)

Required. A list of inclusive number of items upper bounds. The last value
can be
`"infinity"`. For example
`["10", "50", "infinity"]` represents the headers
"\<= 10 items", "\<= 50 items", and "\> 50 items". Must be non-empty. Can
only be set if all other fields are not set.

`repeated string number_of_items = 3 [(.google.api.field_behavior) = REQUIRED];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `values` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` The numberOfItems to add. |

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

### addAllPostalCodeGroupNames(Iterable\<String\> values)

    public Headers.Builder addAllPostalCodeGroupNames(Iterable<String> values)

Required. A list of postal group names. The last value can be
`"all other locations"`. Example:
`["zone 1", "zone 2", "all other locations"]`. The referred
postal code groups must match the delivery country of the service. Must
be non-empty. Can only be set if all other fields are not set.

`repeated string postal_code_group_names = 4 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `values` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` The postalCodeGroupNames to add. |

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

### addAllPrices(Iterable\<? extends Price\> values)

    public Headers.Builder addAllPrices(Iterable<? extends Price> values)

Required. A list of inclusive order price upper bounds. The last price's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "currency_code": "USD"},
{"amount_micros": 500000000, "currency_code": "USD"},
{"amount_micros": -1, "currency_code": "USD"}]` represents the headers
"\<= $10", "\<= $500", and "\> $500". All prices within a service must have
the same currency. Must be non-empty. Must be positive except -1. Can only
be set if all other fields are not set.

`
repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `values` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html<? extends com.google.shopping.type.Price>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.Headers.Builder` |   |

### addAllWeights(Iterable\<? extends Weight\> values)

    public Headers.Builder addAllWeights(Iterable<? extends Weight> values)

Required. A list of inclusive order weight upper bounds. The last weight's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
"unit": "kg"},
{"amount_micros": -1, "unit": "kg"}]` represents the headers
"\<= 10kg", "\<= 50kg", and "\> 50kg". All weights within a service must have
the same unit. Must be non-empty. Must be positive except -1. Can only be
set if all other fields are not set.

`
repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `values` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html<? extends com.google.shopping.type.Weight>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.Headers.Builder` |   |

### addLocations(LocationIdSet value)

    public Headers.Builder addLocations(LocationIdSet value)

Required. A list of location ID sets. Must be non-empty. Can only be set if
all other fields are not set.

`
repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.LocationIdSet` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.Headers.Builder` |   |

### addLocations(LocationIdSet.Builder builderForValue)

    public Headers.Builder addLocations(LocationIdSet.Builder builderForValue)

Required. A list of location ID sets. Must be non-empty. Can only be set if
all other fields are not set.

`
repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `builderForValue` | `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.LocationIdSet.Builder` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.Headers.Builder` |   |

### addLocations(int index, LocationIdSet value)

    public Headers.Builder addLocations(int index, LocationIdSet value)

Required. A list of location ID sets. Must be non-empty. Can only be set if
all other fields are not set.

`
repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |
| `value` | `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.LocationIdSet` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.Headers.Builder` |   |

### addLocations(int index, LocationIdSet.Builder builderForValue)

    public Headers.Builder addLocations(int index, LocationIdSet.Builder builderForValue)

Required. A list of location ID sets. Must be non-empty. Can only be set if
all other fields are not set.

`
repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |
| `builderForValue` | `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.LocationIdSet.Builder` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.Headers.Builder` |   |

### addLocationsBuilder()

    public LocationIdSet.Builder addLocationsBuilder()

Required. A list of location ID sets. Must be non-empty. Can only be set if
all other fields are not set.

`
repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.LocationIdSet.Builder` |   |

### addLocationsBuilder(int index)

    public LocationIdSet.Builder addLocationsBuilder(int index)

Required. A list of location ID sets. Must be non-empty. Can only be set if
all other fields are not set.

`
repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED];
`

| **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-accounts/latest/com.google.shopping.merchant.accounts.v1beta.LocationIdSet.Builder` |   |

### addNumberOfItems(String value)

    public Headers.Builder addNumberOfItems(String value)

Required. A list of inclusive number of items upper bounds. The last value
can be
`"infinity"`. For example
`["10", "50", "infinity"]` represents the headers
"\<= 10 items", "\<= 50 items", and "\> 50 items". Must be non-empty. Can
only be set if all other fields are not set.

`repeated string number_of_items = 3 [(.google.api.field_behavior) = REQUIRED];`

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

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

### addNumberOfItemsBytes(ByteString value)

    public Headers.Builder addNumberOfItemsBytes(ByteString value)

Required. A list of inclusive number of items upper bounds. The last value
can be
`"infinity"`. For example
`["10", "50", "infinity"]` represents the headers
"\<= 10 items", "\<= 50 items", and "\> 50 items". Must be non-empty. Can
only be set if all other fields are not set.

`repeated string number_of_items = 3 [(.google.api.field_behavior) = REQUIRED];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` The bytes of the numberOfItems to add. |

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

### addPostalCodeGroupNames(String value)

    public Headers.Builder addPostalCodeGroupNames(String value)

Required. A list of postal group names. The last value can be
`"all other locations"`. Example:
`["zone 1", "zone 2", "all other locations"]`. The referred
postal code groups must match the delivery country of the service. Must
be non-empty. Can only be set if all other fields are not set.

`repeated string postal_code_group_names = 4 [(.google.api.field_behavior) = REQUIRED];
`

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

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

### addPostalCodeGroupNamesBytes(ByteString value)

    public Headers.Builder addPostalCodeGroupNamesBytes(ByteString value)

Required. A list of postal group names. The last value can be
`"all other locations"`. Example:
`["zone 1", "zone 2", "all other locations"]`. The referred
postal code groups must match the delivery country of the service. Must
be non-empty. Can only be set if all other fields are not set.

`repeated string postal_code_group_names = 4 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` The bytes of the postalCodeGroupNames to add. |

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

### addPrices(Price value)

    public Headers.Builder addPrices(Price value)

Required. A list of inclusive order price upper bounds. The last price's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "currency_code": "USD"},
{"amount_micros": 500000000, "currency_code": "USD"},
{"amount_micros": -1, "currency_code": "USD"}]` represents the headers
"\<= $10", "\<= $500", and "\> $500". All prices within a service must have
the same currency. Must be non-empty. Must be positive except -1. Can only
be set if all other fields are not set.

`
repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `com.google.shopping.type.Price` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.Headers.Builder` |   |

### addPrices(Price.Builder builderForValue)

    public Headers.Builder addPrices(Price.Builder builderForValue)

Required. A list of inclusive order price upper bounds. The last price's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "currency_code": "USD"},
{"amount_micros": 500000000, "currency_code": "USD"},
{"amount_micros": -1, "currency_code": "USD"}]` represents the headers
"\<= $10", "\<= $500", and "\> $500". All prices within a service must have
the same currency. Must be non-empty. Must be positive except -1. Can only
be set if all other fields are not set.

`
repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `builderForValue` | `com.google.shopping.type.Price.Builder` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.Headers.Builder` |   |

### addPrices(int index, Price value)

    public Headers.Builder addPrices(int index, Price value)

Required. A list of inclusive order price upper bounds. The last price's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "currency_code": "USD"},
{"amount_micros": 500000000, "currency_code": "USD"},
{"amount_micros": -1, "currency_code": "USD"}]` represents the headers
"\<= $10", "\<= $500", and "\> $500". All prices within a service must have
the same currency. Must be non-empty. Must be positive except -1. Can only
be set if all other fields are not set.

`
repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |
| `value` | `com.google.shopping.type.Price` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.Headers.Builder` |   |

### addPrices(int index, Price.Builder builderForValue)

    public Headers.Builder addPrices(int index, Price.Builder builderForValue)

Required. A list of inclusive order price upper bounds. The last price's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "currency_code": "USD"},
{"amount_micros": 500000000, "currency_code": "USD"},
{"amount_micros": -1, "currency_code": "USD"}]` represents the headers
"\<= $10", "\<= $500", and "\> $500". All prices within a service must have
the same currency. Must be non-empty. Must be positive except -1. Can only
be set if all other fields are not set.

`
repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |
| `builderForValue` | `com.google.shopping.type.Price.Builder` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.Headers.Builder` |   |

### addPricesBuilder()

    public Price.Builder addPricesBuilder()

Required. A list of inclusive order price upper bounds. The last price's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "currency_code": "USD"},
{"amount_micros": 500000000, "currency_code": "USD"},
{"amount_micros": -1, "currency_code": "USD"}]` represents the headers
"\<= $10", "\<= $500", and "\> $500". All prices within a service must have
the same currency. Must be non-empty. Must be positive except -1. Can only
be set if all other fields are not set.

`
repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED];
`

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

### addPricesBuilder(int index)

    public Price.Builder addPricesBuilder(int index)

Required. A list of inclusive order price upper bounds. The last price's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "currency_code": "USD"},
{"amount_micros": 500000000, "currency_code": "USD"},
{"amount_micros": -1, "currency_code": "USD"}]` represents the headers
"\<= $10", "\<= $500", and "\> $500". All prices within a service must have
the same currency. Must be non-empty. Must be positive except -1. Can only
be set if all other fields are not set.

`
repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

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

### addWeights(Weight value)

    public Headers.Builder addWeights(Weight value)

Required. A list of inclusive order weight upper bounds. The last weight's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
"unit": "kg"},
{"amount_micros": -1, "unit": "kg"}]` represents the headers
"\<= 10kg", "\<= 50kg", and "\> 50kg". All weights within a service must have
the same unit. Must be non-empty. Must be positive except -1. Can only be
set if all other fields are not set.

`
repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `com.google.shopping.type.Weight` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.Headers.Builder` |   |

### addWeights(Weight.Builder builderForValue)

    public Headers.Builder addWeights(Weight.Builder builderForValue)

Required. A list of inclusive order weight upper bounds. The last weight's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
"unit": "kg"},
{"amount_micros": -1, "unit": "kg"}]` represents the headers
"\<= 10kg", "\<= 50kg", and "\> 50kg". All weights within a service must have
the same unit. Must be non-empty. Must be positive except -1. Can only be
set if all other fields are not set.

`
repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `builderForValue` | `com.google.shopping.type.Weight.Builder` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.Headers.Builder` |   |

### addWeights(int index, Weight value)

    public Headers.Builder addWeights(int index, Weight value)

Required. A list of inclusive order weight upper bounds. The last weight's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
"unit": "kg"},
{"amount_micros": -1, "unit": "kg"}]` represents the headers
"\<= 10kg", "\<= 50kg", and "\> 50kg". All weights within a service must have
the same unit. Must be non-empty. Must be positive except -1. Can only be
set if all other fields are not set.

`
repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |
| `value` | `com.google.shopping.type.Weight` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.Headers.Builder` |   |

### addWeights(int index, Weight.Builder builderForValue)

    public Headers.Builder addWeights(int index, Weight.Builder builderForValue)

Required. A list of inclusive order weight upper bounds. The last weight's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
"unit": "kg"},
{"amount_micros": -1, "unit": "kg"}]` represents the headers
"\<= 10kg", "\<= 50kg", and "\> 50kg". All weights within a service must have
the same unit. Must be non-empty. Must be positive except -1. Can only be
set if all other fields are not set.

`
repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |
| `builderForValue` | `com.google.shopping.type.Weight.Builder` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.Headers.Builder` |   |

### addWeightsBuilder()

    public Weight.Builder addWeightsBuilder()

Required. A list of inclusive order weight upper bounds. The last weight's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
"unit": "kg"},
{"amount_micros": -1, "unit": "kg"}]` represents the headers
"\<= 10kg", "\<= 50kg", and "\> 50kg". All weights within a service must have
the same unit. Must be non-empty. Must be positive except -1. Can only be
set if all other fields are not set.

`
repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED];
`

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

### addWeightsBuilder(int index)

    public Weight.Builder addWeightsBuilder(int index)

Required. A list of inclusive order weight upper bounds. The last weight's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
"unit": "kg"},
{"amount_micros": -1, "unit": "kg"}]` represents the headers
"\<= 10kg", "\<= 50kg", and "\> 50kg". All weights within a service must have
the same unit. Must be non-empty. Must be positive except -1. Can only be
set if all other fields are not set.

`
repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

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

### build()

    public Headers build()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.Headers` |   |

### buildPartial()

    public Headers buildPartial()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.Headers` |   |

### clear()

    public Headers.Builder clear()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.Headers.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__)

### clearLocations()

    public Headers.Builder clearLocations()

Required. A list of location ID sets. Must be non-empty. Can only be set if
all other fields are not set.

`
repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.Headers.Builder` |   |

### clearNumberOfItems()

    public Headers.Builder clearNumberOfItems()

Required. A list of inclusive number of items upper bounds. The last value
can be
`"infinity"`. For example
`["10", "50", "infinity"]` represents the headers
"\<= 10 items", "\<= 50 items", and "\> 50 items". Must be non-empty. Can
only be set if all other fields are not set.

`repeated string number_of_items = 3 [(.google.api.field_behavior) = REQUIRED];`

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

### clearPostalCodeGroupNames()

    public Headers.Builder clearPostalCodeGroupNames()

Required. A list of postal group names. The last value can be
`"all other locations"`. Example:
`["zone 1", "zone 2", "all other locations"]`. The referred
postal code groups must match the delivery country of the service. Must
be non-empty. Can only be set if all other fields are not set.

`repeated string postal_code_group_names = 4 [(.google.api.field_behavior) = REQUIRED];
`

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

### clearPrices()

    public Headers.Builder clearPrices()

Required. A list of inclusive order price upper bounds. The last price's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "currency_code": "USD"},
{"amount_micros": 500000000, "currency_code": "USD"},
{"amount_micros": -1, "currency_code": "USD"}]` represents the headers
"\<= $10", "\<= $500", and "\> $500". All prices within a service must have
the same currency. Must be non-empty. Must be positive except -1. Can only
be set if all other fields are not set.

`
repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.Headers.Builder` |   |

### clearWeights()

    public Headers.Builder clearWeights()

Required. A list of inclusive order weight upper bounds. The last weight's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
"unit": "kg"},
{"amount_micros": -1, "unit": "kg"}]` represents the headers
"\<= 10kg", "\<= 50kg", and "\> 50kg". All weights within a service must have
the same unit. Must be non-empty. Must be positive except -1. Can only be
set if all other fields are not set.

`
repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.Headers.Builder` |   |

### getDefaultInstanceForType()

    public Headers getDefaultInstanceForType()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.Headers` |   |

### 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__)

### getLocations(int index)

    public LocationIdSet getLocations(int index)

Required. A list of location ID sets. Must be non-empty. Can only be set if
all other fields are not set.

`
repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED];
`

| **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-accounts/latest/com.google.shopping.merchant.accounts.v1beta.LocationIdSet` |   |

### getLocationsBuilder(int index)

    public LocationIdSet.Builder getLocationsBuilder(int index)

Required. A list of location ID sets. Must be non-empty. Can only be set if
all other fields are not set.

`
repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED];
`

| **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-accounts/latest/com.google.shopping.merchant.accounts.v1beta.LocationIdSet.Builder` |   |

### getLocationsBuilderList()

    public List<LocationIdSet.Builder> getLocationsBuilderList()

Required. A list of location ID sets. Must be non-empty. Can only be set if
all other fields are not set.

`
repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.LocationIdSet.Builder>` |   |

### getLocationsCount()

    public int getLocationsCount()

Required. A list of location ID sets. Must be non-empty. Can only be set if
all other fields are not set.

`
repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED];
`

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

### getLocationsList()

    public List<LocationIdSet> getLocationsList()

Required. A list of location ID sets. Must be non-empty. Can only be set if
all other fields are not set.

`
repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.LocationIdSet>` |   |

### getLocationsOrBuilder(int index)

    public LocationIdSetOrBuilder getLocationsOrBuilder(int index)

Required. A list of location ID sets. Must be non-empty. Can only be set if
all other fields are not set.

`
repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED];
`

| **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-accounts/latest/com.google.shopping.merchant.accounts.v1beta.LocationIdSetOrBuilder` |   |

### getLocationsOrBuilderList()

    public List<? extends LocationIdSetOrBuilder> getLocationsOrBuilderList()

Required. A list of location ID sets. Must be non-empty. Can only be set if
all other fields are not set.

`
repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<? extends com.google.shopping.merchant.accounts.v1beta.LocationIdSetOrBuilder>` |   |

### getNumberOfItems(int index)

    public String getNumberOfItems(int index)

Required. A list of inclusive number of items upper bounds. The last value
can be
`"infinity"`. For example
`["10", "50", "infinity"]` represents the headers
"\<= 10 items", "\<= 50 items", and "\> 50 items". Must be non-empty. Can
only be set if all other fields are not set.

`repeated string number_of_items = 3 [(.google.api.field_behavior) = REQUIRED];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the element to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The numberOfItems at the given index. |

### getNumberOfItemsBytes(int index)

    public ByteString getNumberOfItemsBytes(int index)

Required. A list of inclusive number of items upper bounds. The last value
can be
`"infinity"`. For example
`["10", "50", "infinity"]` represents the headers
"\<= 10 items", "\<= 50 items", and "\> 50 items". Must be non-empty. Can
only be set if all other fields are not set.

`repeated string number_of_items = 3 [(.google.api.field_behavior) = REQUIRED];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the value to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes of the numberOfItems at the given index. |

### getNumberOfItemsCount()

    public int getNumberOfItemsCount()

Required. A list of inclusive number of items upper bounds. The last value
can be
`"infinity"`. For example
`["10", "50", "infinity"]` represents the headers
"\<= 10 items", "\<= 50 items", and "\> 50 items". Must be non-empty. Can
only be set if all other fields are not set.

`repeated string number_of_items = 3 [(.google.api.field_behavior) = REQUIRED];`

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

### getNumberOfItemsList()

    public ProtocolStringList getNumberOfItemsList()

Required. A list of inclusive number of items upper bounds. The last value
can be
`"infinity"`. For example
`["10", "50", "infinity"]` represents the headers
"\<= 10 items", "\<= 50 items", and "\> 50 items". Must be non-empty. Can
only be set if all other fields are not set.

`repeated string number_of_items = 3 [(.google.api.field_behavior) = REQUIRED];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ProtocolStringList.html` | A list containing the numberOfItems. |

### getPostalCodeGroupNames(int index)

    public String getPostalCodeGroupNames(int index)

Required. A list of postal group names. The last value can be
`"all other locations"`. Example:
`["zone 1", "zone 2", "all other locations"]`. The referred
postal code groups must match the delivery country of the service. Must
be non-empty. Can only be set if all other fields are not set.

`repeated string postal_code_group_names = 4 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the element to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The postalCodeGroupNames at the given index. |

### getPostalCodeGroupNamesBytes(int index)

    public ByteString getPostalCodeGroupNamesBytes(int index)

Required. A list of postal group names. The last value can be
`"all other locations"`. Example:
`["zone 1", "zone 2", "all other locations"]`. The referred
postal code groups must match the delivery country of the service. Must
be non-empty. Can only be set if all other fields are not set.

`repeated string postal_code_group_names = 4 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the value to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes of the postalCodeGroupNames at the given index. |

### getPostalCodeGroupNamesCount()

    public int getPostalCodeGroupNamesCount()

Required. A list of postal group names. The last value can be
`"all other locations"`. Example:
`["zone 1", "zone 2", "all other locations"]`. The referred
postal code groups must match the delivery country of the service. Must
be non-empty. Can only be set if all other fields are not set.

`repeated string postal_code_group_names = 4 [(.google.api.field_behavior) = REQUIRED];
`

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

### getPostalCodeGroupNamesList()

    public ProtocolStringList getPostalCodeGroupNamesList()

Required. A list of postal group names. The last value can be
`"all other locations"`. Example:
`["zone 1", "zone 2", "all other locations"]`. The referred
postal code groups must match the delivery country of the service. Must
be non-empty. Can only be set if all other fields are not set.

`repeated string postal_code_group_names = 4 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ProtocolStringList.html` | A list containing the postalCodeGroupNames. |

### getPrices(int index)

    public Price getPrices(int index)

Required. A list of inclusive order price upper bounds. The last price's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "currency_code": "USD"},
{"amount_micros": 500000000, "currency_code": "USD"},
{"amount_micros": -1, "currency_code": "USD"}]` represents the headers
"\<= $10", "\<= $500", and "\> $500". All prices within a service must have
the same currency. Must be non-empty. Must be positive except -1. Can only
be set if all other fields are not set.

`
repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

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

### getPricesBuilder(int index)

    public Price.Builder getPricesBuilder(int index)

Required. A list of inclusive order price upper bounds. The last price's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "currency_code": "USD"},
{"amount_micros": 500000000, "currency_code": "USD"},
{"amount_micros": -1, "currency_code": "USD"}]` represents the headers
"\<= $10", "\<= $500", and "\> $500". All prices within a service must have
the same currency. Must be non-empty. Must be positive except -1. Can only
be set if all other fields are not set.

`
repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

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

### getPricesBuilderList()

    public List<Price.Builder> getPricesBuilderList()

Required. A list of inclusive order price upper bounds. The last price's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "currency_code": "USD"},
{"amount_micros": 500000000, "currency_code": "USD"},
{"amount_micros": -1, "currency_code": "USD"}]` represents the headers
"\<= $10", "\<= $500", and "\> $500". All prices within a service must have
the same currency. Must be non-empty. Must be positive except -1. Can only
be set if all other fields are not set.

`
repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<com.google.shopping.type.Price.Builder>` |   |

### getPricesCount()

    public int getPricesCount()

Required. A list of inclusive order price upper bounds. The last price's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "currency_code": "USD"},
{"amount_micros": 500000000, "currency_code": "USD"},
{"amount_micros": -1, "currency_code": "USD"}]` represents the headers
"\<= $10", "\<= $500", and "\> $500". All prices within a service must have
the same currency. Must be non-empty. Must be positive except -1. Can only
be set if all other fields are not set.

`
repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED];
`

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

### getPricesList()

    public List<Price> getPricesList()

Required. A list of inclusive order price upper bounds. The last price's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "currency_code": "USD"},
{"amount_micros": 500000000, "currency_code": "USD"},
{"amount_micros": -1, "currency_code": "USD"}]` represents the headers
"\<= $10", "\<= $500", and "\> $500". All prices within a service must have
the same currency. Must be non-empty. Must be positive except -1. Can only
be set if all other fields are not set.

`
repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<com.google.shopping.type.Price>` |   |

### getPricesOrBuilder(int index)

    public PriceOrBuilder getPricesOrBuilder(int index)

Required. A list of inclusive order price upper bounds. The last price's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "currency_code": "USD"},
{"amount_micros": 500000000, "currency_code": "USD"},
{"amount_micros": -1, "currency_code": "USD"}]` represents the headers
"\<= $10", "\<= $500", and "\> $500". All prices within a service must have
the same currency. Must be non-empty. Must be positive except -1. Can only
be set if all other fields are not set.

`
repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

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

### getPricesOrBuilderList()

    public List<? extends PriceOrBuilder> getPricesOrBuilderList()

Required. A list of inclusive order price upper bounds. The last price's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "currency_code": "USD"},
{"amount_micros": 500000000, "currency_code": "USD"},
{"amount_micros": -1, "currency_code": "USD"}]` represents the headers
"\<= $10", "\<= $500", and "\> $500". All prices within a service must have
the same currency. Must be non-empty. Must be positive except -1. Can only
be set if all other fields are not set.

`
repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<? extends com.google.shopping.type.PriceOrBuilder>` |   |

### getWeights(int index)

    public Weight getWeights(int index)

Required. A list of inclusive order weight upper bounds. The last weight's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
"unit": "kg"},
{"amount_micros": -1, "unit": "kg"}]` represents the headers
"\<= 10kg", "\<= 50kg", and "\> 50kg". All weights within a service must have
the same unit. Must be non-empty. Must be positive except -1. Can only be
set if all other fields are not set.

`
repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

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

### getWeightsBuilder(int index)

    public Weight.Builder getWeightsBuilder(int index)

Required. A list of inclusive order weight upper bounds. The last weight's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
"unit": "kg"},
{"amount_micros": -1, "unit": "kg"}]` represents the headers
"\<= 10kg", "\<= 50kg", and "\> 50kg". All weights within a service must have
the same unit. Must be non-empty. Must be positive except -1. Can only be
set if all other fields are not set.

`
repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

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

### getWeightsBuilderList()

    public List<Weight.Builder> getWeightsBuilderList()

Required. A list of inclusive order weight upper bounds. The last weight's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
"unit": "kg"},
{"amount_micros": -1, "unit": "kg"}]` represents the headers
"\<= 10kg", "\<= 50kg", and "\> 50kg". All weights within a service must have
the same unit. Must be non-empty. Must be positive except -1. Can only be
set if all other fields are not set.

`
repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<com.google.shopping.type.Weight.Builder>` |   |

### getWeightsCount()

    public int getWeightsCount()

Required. A list of inclusive order weight upper bounds. The last weight's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
"unit": "kg"},
{"amount_micros": -1, "unit": "kg"}]` represents the headers
"\<= 10kg", "\<= 50kg", and "\> 50kg". All weights within a service must have
the same unit. Must be non-empty. Must be positive except -1. Can only be
set if all other fields are not set.

`
repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED];
`

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

### getWeightsList()

    public List<Weight> getWeightsList()

Required. A list of inclusive order weight upper bounds. The last weight's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
"unit": "kg"},
{"amount_micros": -1, "unit": "kg"}]` represents the headers
"\<= 10kg", "\<= 50kg", and "\> 50kg". All weights within a service must have
the same unit. Must be non-empty. Must be positive except -1. Can only be
set if all other fields are not set.

`
repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<com.google.shopping.type.Weight>` |   |

### getWeightsOrBuilder(int index)

    public WeightOrBuilder getWeightsOrBuilder(int index)

Required. A list of inclusive order weight upper bounds. The last weight's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
"unit": "kg"},
{"amount_micros": -1, "unit": "kg"}]` represents the headers
"\<= 10kg", "\<= 50kg", and "\> 50kg". All weights within a service must have
the same unit. Must be non-empty. Must be positive except -1. Can only be
set if all other fields are not set.

`
repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

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

### getWeightsOrBuilderList()

    public List<? extends WeightOrBuilder> getWeightsOrBuilderList()

Required. A list of inclusive order weight upper bounds. The last weight's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
"unit": "kg"},
{"amount_micros": -1, "unit": "kg"}]` represents the headers
"\<= 10kg", "\<= 50kg", and "\> 50kg". All weights within a service must have
the same unit. Must be non-empty. Must be positive except -1. Can only be
set if all other fields are not set.

`
repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<? extends com.google.shopping.type.WeightOrBuilder>` |   |

### 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 Headers.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-accounts/latest/com.google.shopping.merchant.accounts.v1beta.Headers.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 Headers.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-accounts/latest/com.google.shopping.merchant.accounts.v1beta.Headers.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(Headers other)

    public Headers.Builder mergeFrom(Headers other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.Headers` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.Headers.Builder` |   |

### removeLocations(int index)

    public Headers.Builder removeLocations(int index)

Required. A list of location ID sets. Must be non-empty. Can only be set if
all other fields are not set.

`
repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED];
`

| **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-accounts/latest/com.google.shopping.merchant.accounts.v1beta.Headers.Builder` |   |

### removePrices(int index)

    public Headers.Builder removePrices(int index)

Required. A list of inclusive order price upper bounds. The last price's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "currency_code": "USD"},
{"amount_micros": 500000000, "currency_code": "USD"},
{"amount_micros": -1, "currency_code": "USD"}]` represents the headers
"\<= $10", "\<= $500", and "\> $500". All prices within a service must have
the same currency. Must be non-empty. Must be positive except -1. Can only
be set if all other fields are not set.

`
repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED];
`

| **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-accounts/latest/com.google.shopping.merchant.accounts.v1beta.Headers.Builder` |   |

### removeWeights(int index)

    public Headers.Builder removeWeights(int index)

Required. A list of inclusive order weight upper bounds. The last weight's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
"unit": "kg"},
{"amount_micros": -1, "unit": "kg"}]` represents the headers
"\<= 10kg", "\<= 50kg", and "\> 50kg". All weights within a service must have
the same unit. Must be non-empty. Must be positive except -1. Can only be
set if all other fields are not set.

`
repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED];
`

| **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-accounts/latest/com.google.shopping.merchant.accounts.v1beta.Headers.Builder` |   |

### setLocations(int index, LocationIdSet value)

    public Headers.Builder setLocations(int index, LocationIdSet value)

Required. A list of location ID sets. Must be non-empty. Can only be set if
all other fields are not set.

`
repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |
| `value` | `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.LocationIdSet` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.Headers.Builder` |   |

### setLocations(int index, LocationIdSet.Builder builderForValue)

    public Headers.Builder setLocations(int index, LocationIdSet.Builder builderForValue)

Required. A list of location ID sets. Must be non-empty. Can only be set if
all other fields are not set.

`
repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |
| `builderForValue` | `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.LocationIdSet.Builder` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.Headers.Builder` |   |

### setNumberOfItems(int index, String value)

    public Headers.Builder setNumberOfItems(int index, String value)

Required. A list of inclusive number of items upper bounds. The last value
can be
`"infinity"`. For example
`["10", "50", "infinity"]` represents the headers
"\<= 10 items", "\<= 50 items", and "\> 50 items". Must be non-empty. Can
only be set if all other fields are not set.

`repeated string number_of_items = 3 [(.google.api.field_behavior) = REQUIRED];`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index to set the value at. |
| `value` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` The numberOfItems to set. |

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

### setPostalCodeGroupNames(int index, String value)

    public Headers.Builder setPostalCodeGroupNames(int index, String value)

Required. A list of postal group names. The last value can be
`"all other locations"`. Example:
`["zone 1", "zone 2", "all other locations"]`. The referred
postal code groups must match the delivery country of the service. Must
be non-empty. Can only be set if all other fields are not set.

`repeated string postal_code_group_names = 4 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index to set the value at. |
| `value` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` The postalCodeGroupNames to set. |

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

### setPrices(int index, Price value)

    public Headers.Builder setPrices(int index, Price value)

Required. A list of inclusive order price upper bounds. The last price's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "currency_code": "USD"},
{"amount_micros": 500000000, "currency_code": "USD"},
{"amount_micros": -1, "currency_code": "USD"}]` represents the headers
"\<= $10", "\<= $500", and "\> $500". All prices within a service must have
the same currency. Must be non-empty. Must be positive except -1. Can only
be set if all other fields are not set.

`
repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |
| `value` | `com.google.shopping.type.Price` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.Headers.Builder` |   |

### setPrices(int index, Price.Builder builderForValue)

    public Headers.Builder setPrices(int index, Price.Builder builderForValue)

Required. A list of inclusive order price upper bounds. The last price's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "currency_code": "USD"},
{"amount_micros": 500000000, "currency_code": "USD"},
{"amount_micros": -1, "currency_code": "USD"}]` represents the headers
"\<= $10", "\<= $500", and "\> $500". All prices within a service must have
the same currency. Must be non-empty. Must be positive except -1. Can only
be set if all other fields are not set.

`
repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |
| `builderForValue` | `com.google.shopping.type.Price.Builder` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.Headers.Builder` |   |

### setWeights(int index, Weight value)

    public Headers.Builder setWeights(int index, Weight value)

Required. A list of inclusive order weight upper bounds. The last weight's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
"unit": "kg"},
{"amount_micros": -1, "unit": "kg"}]` represents the headers
"\<= 10kg", "\<= 50kg", and "\> 50kg". All weights within a service must have
the same unit. Must be non-empty. Must be positive except -1. Can only be
set if all other fields are not set.

`
repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |
| `value` | `com.google.shopping.type.Weight` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.Headers.Builder` |   |

### setWeights(int index, Weight.Builder builderForValue)

    public Headers.Builder setWeights(int index, Weight.Builder builderForValue)

Required. A list of inclusive order weight upper bounds. The last weight's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
"unit": "kg"},
{"amount_micros": -1, "unit": "kg"}]` represents the headers
"\<= 10kg", "\<= 50kg", and "\> 50kg". All weights within a service must have
the same unit. Must be non-empty. Must be positive except -1. Can only be
set if all other fields are not set.

`
repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |
| `builderForValue` | `com.google.shopping.type.Weight.Builder` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1beta.Headers.Builder` |   |