Class Region.Builder (0.5.0)

public static final class Region.Builder extends GeneratedMessageV3.Builder<Region.Builder> implements RegionOrBuilder

Represents a geographic region that you can use as a target with both the RegionalInventory and ShippingSettings services. You can define regions as collections of either postal codes or, in some countries, using predefined geotargets. For more information, see Set up regions for more information.

Protobuf type google.shopping.merchant.accounts.v1beta.Region

Implements

RegionOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Region build()
Returns
Type Description
Region

buildPartial()

public Region buildPartial()
Returns
Type Description
Region

clear()

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

clearDisplayName()

public Region.Builder clearDisplayName()

Optional. The display name of the region.

optional string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Region.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearGeotargetArea()

public Region.Builder clearGeotargetArea()

Optional. A list of geotargets that defines the region area.

.google.shopping.merchant.accounts.v1beta.Region.GeoTargetArea geotarget_area = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Region.Builder

clearName()

public Region.Builder clearName()

Identifier. The resource name of the region. Format: accounts/{account}/regions/{region}

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

Returns
Type Description
Region.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPostalCodeArea()

public Region.Builder clearPostalCodeArea()

Optional. A list of postal codes that defines the region area.

.google.shopping.merchant.accounts.v1beta.Region.PostalCodeArea postal_code_area = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Region.Builder

clearRegionalInventoryEligible()

public Region.Builder clearRegionalInventoryEligible()

Output only. Indicates if the region is eligible for use in the Regional Inventory configuration.

.google.protobuf.BoolValue regional_inventory_eligible = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Region.Builder

clearShippingEligible()

public Region.Builder clearShippingEligible()

Output only. Indicates if the region is eligible for use in the Shipping Services configuration.

.google.protobuf.BoolValue shipping_eligible = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Region.Builder

clone()

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

getDefaultInstanceForType()

public Region getDefaultInstanceForType()
Returns
Type Description
Region

getDescriptorForType()

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

getDisplayName()

public String getDisplayName()

Optional. The display name of the region.

optional string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Optional. The display name of the region.

optional string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for displayName.

getGeotargetArea()

public Region.GeoTargetArea getGeotargetArea()

Optional. A list of geotargets that defines the region area.

.google.shopping.merchant.accounts.v1beta.Region.GeoTargetArea geotarget_area = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Region.GeoTargetArea

The geotargetArea.

getGeotargetAreaBuilder()

public Region.GeoTargetArea.Builder getGeotargetAreaBuilder()

Optional. A list of geotargets that defines the region area.

.google.shopping.merchant.accounts.v1beta.Region.GeoTargetArea geotarget_area = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Region.GeoTargetArea.Builder

getGeotargetAreaOrBuilder()

public Region.GeoTargetAreaOrBuilder getGeotargetAreaOrBuilder()

Optional. A list of geotargets that defines the region area.

.google.shopping.merchant.accounts.v1beta.Region.GeoTargetArea geotarget_area = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Region.GeoTargetAreaOrBuilder

getName()

public String getName()

Identifier. The resource name of the region. Format: accounts/{account}/regions/{region}

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

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. The resource name of the region. Format: accounts/{account}/regions/{region}

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

Returns
Type Description
ByteString

The bytes for name.

getPostalCodeArea()

public Region.PostalCodeArea getPostalCodeArea()

Optional. A list of postal codes that defines the region area.

.google.shopping.merchant.accounts.v1beta.Region.PostalCodeArea postal_code_area = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Region.PostalCodeArea

The postalCodeArea.

getPostalCodeAreaBuilder()

public Region.PostalCodeArea.Builder getPostalCodeAreaBuilder()

Optional. A list of postal codes that defines the region area.

.google.shopping.merchant.accounts.v1beta.Region.PostalCodeArea postal_code_area = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Region.PostalCodeArea.Builder

getPostalCodeAreaOrBuilder()

public Region.PostalCodeAreaOrBuilder getPostalCodeAreaOrBuilder()

Optional. A list of postal codes that defines the region area.

.google.shopping.merchant.accounts.v1beta.Region.PostalCodeArea postal_code_area = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Region.PostalCodeAreaOrBuilder

getRegionalInventoryEligible()

public BoolValue getRegionalInventoryEligible()

Output only. Indicates if the region is eligible for use in the Regional Inventory configuration.

.google.protobuf.BoolValue regional_inventory_eligible = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
BoolValue

The regionalInventoryEligible.

getRegionalInventoryEligibleBuilder()

public BoolValue.Builder getRegionalInventoryEligibleBuilder()

Output only. Indicates if the region is eligible for use in the Regional Inventory configuration.

.google.protobuf.BoolValue regional_inventory_eligible = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getRegionalInventoryEligibleOrBuilder()

public BoolValueOrBuilder getRegionalInventoryEligibleOrBuilder()

Output only. Indicates if the region is eligible for use in the Regional Inventory configuration.

.google.protobuf.BoolValue regional_inventory_eligible = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
BoolValueOrBuilder

getShippingEligible()

public BoolValue getShippingEligible()

Output only. Indicates if the region is eligible for use in the Shipping Services configuration.

.google.protobuf.BoolValue shipping_eligible = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
BoolValue

The shippingEligible.

getShippingEligibleBuilder()

public BoolValue.Builder getShippingEligibleBuilder()

Output only. Indicates if the region is eligible for use in the Shipping Services configuration.

.google.protobuf.BoolValue shipping_eligible = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getShippingEligibleOrBuilder()

public BoolValueOrBuilder getShippingEligibleOrBuilder()

Output only. Indicates if the region is eligible for use in the Shipping Services configuration.

.google.protobuf.BoolValue shipping_eligible = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
BoolValueOrBuilder

hasDisplayName()

public boolean hasDisplayName()

Optional. The display name of the region.

optional string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the displayName field is set.

hasGeotargetArea()

public boolean hasGeotargetArea()

Optional. A list of geotargets that defines the region area.

.google.shopping.merchant.accounts.v1beta.Region.GeoTargetArea geotarget_area = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the geotargetArea field is set.

hasPostalCodeArea()

public boolean hasPostalCodeArea()

Optional. A list of postal codes that defines the region area.

.google.shopping.merchant.accounts.v1beta.Region.PostalCodeArea postal_code_area = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the postalCodeArea field is set.

hasRegionalInventoryEligible()

public boolean hasRegionalInventoryEligible()

Output only. Indicates if the region is eligible for use in the Regional Inventory configuration.

.google.protobuf.BoolValue regional_inventory_eligible = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the regionalInventoryEligible field is set.

hasShippingEligible()

public boolean hasShippingEligible()

Output only. Indicates if the region is eligible for use in the Shipping Services configuration.

.google.protobuf.BoolValue shipping_eligible = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the shippingEligible field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(Region other)

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

mergeGeotargetArea(Region.GeoTargetArea value)

public Region.Builder mergeGeotargetArea(Region.GeoTargetArea value)

Optional. A list of geotargets that defines the region area.

.google.shopping.merchant.accounts.v1beta.Region.GeoTargetArea geotarget_area = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Region.GeoTargetArea
Returns
Type Description
Region.Builder

mergePostalCodeArea(Region.PostalCodeArea value)

public Region.Builder mergePostalCodeArea(Region.PostalCodeArea value)

Optional. A list of postal codes that defines the region area.

.google.shopping.merchant.accounts.v1beta.Region.PostalCodeArea postal_code_area = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Region.PostalCodeArea
Returns
Type Description
Region.Builder

mergeRegionalInventoryEligible(BoolValue value)

public Region.Builder mergeRegionalInventoryEligible(BoolValue value)

Output only. Indicates if the region is eligible for use in the Regional Inventory configuration.

.google.protobuf.BoolValue regional_inventory_eligible = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value BoolValue
Returns
Type Description
Region.Builder

mergeShippingEligible(BoolValue value)

public Region.Builder mergeShippingEligible(BoolValue value)

Output only. Indicates if the region is eligible for use in the Shipping Services configuration.

.google.protobuf.BoolValue shipping_eligible = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value BoolValue
Returns
Type Description
Region.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setDisplayName(String value)

public Region.Builder setDisplayName(String value)

Optional. The display name of the region.

optional string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
Region.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public Region.Builder setDisplayNameBytes(ByteString value)

Optional. The display name of the region.

optional string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
Region.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setGeotargetArea(Region.GeoTargetArea value)

public Region.Builder setGeotargetArea(Region.GeoTargetArea value)

Optional. A list of geotargets that defines the region area.

.google.shopping.merchant.accounts.v1beta.Region.GeoTargetArea geotarget_area = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Region.GeoTargetArea
Returns
Type Description
Region.Builder

setGeotargetArea(Region.GeoTargetArea.Builder builderForValue)

public Region.Builder setGeotargetArea(Region.GeoTargetArea.Builder builderForValue)

Optional. A list of geotargets that defines the region area.

.google.shopping.merchant.accounts.v1beta.Region.GeoTargetArea geotarget_area = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Region.GeoTargetArea.Builder
Returns
Type Description
Region.Builder

setName(String value)

public Region.Builder setName(String value)

Identifier. The resource name of the region. Format: accounts/{account}/regions/{region}

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

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Region.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Region.Builder setNameBytes(ByteString value)

Identifier. The resource name of the region. Format: accounts/{account}/regions/{region}

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

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Region.Builder

This builder for chaining.

setPostalCodeArea(Region.PostalCodeArea value)

public Region.Builder setPostalCodeArea(Region.PostalCodeArea value)

Optional. A list of postal codes that defines the region area.

.google.shopping.merchant.accounts.v1beta.Region.PostalCodeArea postal_code_area = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Region.PostalCodeArea
Returns
Type Description
Region.Builder

setPostalCodeArea(Region.PostalCodeArea.Builder builderForValue)

public Region.Builder setPostalCodeArea(Region.PostalCodeArea.Builder builderForValue)

Optional. A list of postal codes that defines the region area.

.google.shopping.merchant.accounts.v1beta.Region.PostalCodeArea postal_code_area = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Region.PostalCodeArea.Builder
Returns
Type Description
Region.Builder

setRegionalInventoryEligible(BoolValue value)

public Region.Builder setRegionalInventoryEligible(BoolValue value)

Output only. Indicates if the region is eligible for use in the Regional Inventory configuration.

.google.protobuf.BoolValue regional_inventory_eligible = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value BoolValue
Returns
Type Description
Region.Builder

setRegionalInventoryEligible(BoolValue.Builder builderForValue)

public Region.Builder setRegionalInventoryEligible(BoolValue.Builder builderForValue)

Output only. Indicates if the region is eligible for use in the Regional Inventory configuration.

.google.protobuf.BoolValue regional_inventory_eligible = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Region.Builder

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

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

setShippingEligible(BoolValue value)

public Region.Builder setShippingEligible(BoolValue value)

Output only. Indicates if the region is eligible for use in the Shipping Services configuration.

.google.protobuf.BoolValue shipping_eligible = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value BoolValue
Returns
Type Description
Region.Builder

setShippingEligible(BoolValue.Builder builderForValue)

public Region.Builder setShippingEligible(BoolValue.Builder builderForValue)

Output only. Indicates if the region is eligible for use in the Shipping Services configuration.

.google.protobuf.BoolValue shipping_eligible = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Region.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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