Class Region.Builder (1.11.0)

public static final class Region.Builder extends GeneratedMessage.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.v1.Region

Implements

RegionOrBuilder

Static Methods

getDescriptor()

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

Methods

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.

clearGeotargetArea()

public Region.Builder clearGeotargetArea()

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

.google.shopping.merchant.accounts.v1.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.

clearPostalCodeArea()

public Region.Builder clearPostalCodeArea()

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

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

Returns
Type Description
Region.Builder

clearRadiusArea()

public Region.Builder clearRadiusArea()

Optional. A radius area that defines the region area.

.google.shopping.merchant.accounts.v1.Region.RadiusArea radius_area = 7 [(.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

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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.Region.PostalCodeArea postal_code_area = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Region.PostalCodeAreaOrBuilder

getRadiusArea()

public Region.RadiusArea getRadiusArea()

Optional. A radius area that defines the region area.

.google.shopping.merchant.accounts.v1.Region.RadiusArea radius_area = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Region.RadiusArea

The radiusArea.

getRadiusAreaBuilder()

public Region.RadiusArea.Builder getRadiusAreaBuilder()

Optional. A radius area that defines the region area.

.google.shopping.merchant.accounts.v1.Region.RadiusArea radius_area = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Region.RadiusArea.Builder

getRadiusAreaOrBuilder()

public Region.RadiusAreaOrBuilder getRadiusAreaOrBuilder()

Optional. A radius area that defines the region area.

.google.shopping.merchant.accounts.v1.Region.RadiusArea radius_area = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Region.RadiusAreaOrBuilder

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.v1.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.v1.Region.PostalCodeArea postal_code_area = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the postalCodeArea field is set.

hasRadiusArea()

public boolean hasRadiusArea()

Optional. A radius area that defines the region area.

.google.shopping.merchant.accounts.v1.Region.RadiusArea radius_area = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the radiusArea 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 GeneratedMessage.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.v1.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.v1.Region.PostalCodeArea postal_code_area = 3 [(.google.api.field_behavior) = OPTIONAL];

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

mergeRadiusArea(Region.RadiusArea value)

public Region.Builder mergeRadiusArea(Region.RadiusArea value)

Optional. A radius area that defines the region area.

.google.shopping.merchant.accounts.v1.Region.RadiusArea radius_area = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Region.RadiusArea
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

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.

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.v1.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.v1.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.v1.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.v1.Region.PostalCodeArea postal_code_area = 3 [(.google.api.field_behavior) = OPTIONAL];

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

setRadiusArea(Region.RadiusArea value)

public Region.Builder setRadiusArea(Region.RadiusArea value)

Optional. A radius area that defines the region area.

.google.shopping.merchant.accounts.v1.Region.RadiusArea radius_area = 7 [(.google.api.field_behavior) = OPTIONAL];

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

setRadiusArea(Region.RadiusArea.Builder builderForValue)

public Region.Builder setRadiusArea(Region.RadiusArea.Builder builderForValue)

Optional. A radius area that defines the region area.

.google.shopping.merchant.accounts.v1.Region.RadiusArea radius_area = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Region.RadiusArea.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

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