Class Region (0.10.0)

public final class Region extends GeneratedMessageV3 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 Fields

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
Type Description
int

GEOTARGET_AREA_FIELD_NUMBER

public static final int GEOTARGET_AREA_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

POSTAL_CODE_AREA_FIELD_NUMBER

public static final int POSTAL_CODE_AREA_FIELD_NUMBER
Field Value
Type Description
int

REGIONAL_INVENTORY_ELIGIBLE_FIELD_NUMBER

public static final int REGIONAL_INVENTORY_ELIGIBLE_FIELD_NUMBER
Field Value
Type Description
int

SHIPPING_ELIGIBLE_FIELD_NUMBER

public static final int SHIPPING_ELIGIBLE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Region getDefaultInstance()
Returns
Type Description
Region

getDescriptor()

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

newBuilder()

public static Region.Builder newBuilder()
Returns
Type Description
Region.Builder

newBuilder(Region prototype)

public static Region.Builder newBuilder(Region prototype)
Parameter
Name Description
prototype Region
Returns
Type Description
Region.Builder

parseDelimitedFrom(InputStream input)

public static Region parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Region
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Region parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Region
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Region parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Region
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Region parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Region
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Region parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Region
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Region parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Region
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Region parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Region
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Region parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Region
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Region parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Region
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Region parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Region
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Region parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Region
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Region parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Region
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Region> parser()
Returns
Type Description
Parser<Region>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public Region getDefaultInstanceForType()
Returns
Type Description
Region

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.

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.

getParserForType()

public Parser<Region> getParserForType()
Returns
Type Description
Parser<Region>
Overrides

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.

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.

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

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Region.Builder newBuilderForType()
Returns
Type Description
Region.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Region.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Region.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public Region.Builder toBuilder()
Returns
Type Description
Region.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException