Class RegionalInventory.Builder (0.29.0)

public static final class RegionalInventory.Builder extends GeneratedMessageV3.Builder<RegionalInventory.Builder> implements RegionalInventoryOrBuilder

Regional inventory information for the product. Represents specific information like price and availability for a given product in a specific region. For a list of all accepted attribute values, see the regional product inventory data specification.

Protobuf type google.shopping.merchant.inventories.v1beta.RegionalInventory

Static Methods

getDescriptor()

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

Methods

addAllCustomAttributes(Iterable<? extends CustomAttribute> values)

public RegionalInventory.Builder addAllCustomAttributes(Iterable<? extends CustomAttribute> values)

A list of custom (merchant-provided) attributes. You can also use CustomAttribute to submit any attribute of the data specification in its generic form.

repeated .google.shopping.type.CustomAttribute custom_attributes = 8;

Parameter
Name Description
values Iterable<? extends com.google.shopping.type.CustomAttribute>
Returns
Type Description
RegionalInventory.Builder

addCustomAttributes(CustomAttribute value)

public RegionalInventory.Builder addCustomAttributes(CustomAttribute value)

A list of custom (merchant-provided) attributes. You can also use CustomAttribute to submit any attribute of the data specification in its generic form.

repeated .google.shopping.type.CustomAttribute custom_attributes = 8;

Parameter
Name Description
value com.google.shopping.type.CustomAttribute
Returns
Type Description
RegionalInventory.Builder

addCustomAttributes(CustomAttribute.Builder builderForValue)

public RegionalInventory.Builder addCustomAttributes(CustomAttribute.Builder builderForValue)

A list of custom (merchant-provided) attributes. You can also use CustomAttribute to submit any attribute of the data specification in its generic form.

repeated .google.shopping.type.CustomAttribute custom_attributes = 8;

Parameter
Name Description
builderForValue com.google.shopping.type.CustomAttribute.Builder
Returns
Type Description
RegionalInventory.Builder

addCustomAttributes(int index, CustomAttribute value)

public RegionalInventory.Builder addCustomAttributes(int index, CustomAttribute value)

A list of custom (merchant-provided) attributes. You can also use CustomAttribute to submit any attribute of the data specification in its generic form.

repeated .google.shopping.type.CustomAttribute custom_attributes = 8;

Parameters
Name Description
index int
value com.google.shopping.type.CustomAttribute
Returns
Type Description
RegionalInventory.Builder

addCustomAttributes(int index, CustomAttribute.Builder builderForValue)

public RegionalInventory.Builder addCustomAttributes(int index, CustomAttribute.Builder builderForValue)

A list of custom (merchant-provided) attributes. You can also use CustomAttribute to submit any attribute of the data specification in its generic form.

repeated .google.shopping.type.CustomAttribute custom_attributes = 8;

Parameters
Name Description
index int
builderForValue com.google.shopping.type.CustomAttribute.Builder
Returns
Type Description
RegionalInventory.Builder

addCustomAttributesBuilder()

public CustomAttribute.Builder addCustomAttributesBuilder()

A list of custom (merchant-provided) attributes. You can also use CustomAttribute to submit any attribute of the data specification in its generic form.

repeated .google.shopping.type.CustomAttribute custom_attributes = 8;

Returns
Type Description
com.google.shopping.type.CustomAttribute.Builder

addCustomAttributesBuilder(int index)

public CustomAttribute.Builder addCustomAttributesBuilder(int index)

A list of custom (merchant-provided) attributes. You can also use CustomAttribute to submit any attribute of the data specification in its generic form.

repeated .google.shopping.type.CustomAttribute custom_attributes = 8;

Parameter
Name Description
index int
Returns
Type Description
com.google.shopping.type.CustomAttribute.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public RegionalInventory build()
Returns
Type Description
RegionalInventory

buildPartial()

public RegionalInventory buildPartial()
Returns
Type Description
RegionalInventory

clear()

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

clearAccount()

public RegionalInventory.Builder clearAccount()

Output only. The account that owns the product. This field will be ignored if set by the client.

int64 account = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
RegionalInventory.Builder

This builder for chaining.

clearAvailability()

public RegionalInventory.Builder clearAvailability()

Availability of the product in this region. For accepted attribute values, see the regional product inventory data specification

optional string availability = 7;

Returns
Type Description
RegionalInventory.Builder

This builder for chaining.

clearCustomAttributes()

public RegionalInventory.Builder clearCustomAttributes()

A list of custom (merchant-provided) attributes. You can also use CustomAttribute to submit any attribute of the data specification in its generic form.

repeated .google.shopping.type.CustomAttribute custom_attributes = 8;

Returns
Type Description
RegionalInventory.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearName()

public RegionalInventory.Builder clearName()

Output only. The name of the RegionalInventory resource. Format: {regional_inventory.name=accounts/{account}/products/{product}/regionalInventories/{region}

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

Returns
Type Description
RegionalInventory.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPrice()

public RegionalInventory.Builder clearPrice()

Price of the product in this region.

.google.shopping.type.Price price = 4;

Returns
Type Description
RegionalInventory.Builder

clearRegion()

public RegionalInventory.Builder clearRegion()

Required. Immutable. ID of the region for this RegionalInventory resource. See the Regional availability and pricing for more details.

string region = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
RegionalInventory.Builder

This builder for chaining.

clearSalePrice()

public RegionalInventory.Builder clearSalePrice()

Sale price of the product in this region. Mandatory if salePriceEffectiveDate is defined.

.google.shopping.type.Price sale_price = 5;

Returns
Type Description
RegionalInventory.Builder

clearSalePriceEffectiveDate()

public RegionalInventory.Builder clearSalePriceEffectiveDate()

The TimePeriod of the sale price in this region.

.google.type.Interval sale_price_effective_date = 6;

Returns
Type Description
RegionalInventory.Builder

clone()

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

getAccount()

public long getAccount()

Output only. The account that owns the product. This field will be ignored if set by the client.

int64 account = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
long

The account.

getAvailability()

public String getAvailability()

Availability of the product in this region. For accepted attribute values, see the regional product inventory data specification

optional string availability = 7;

Returns
Type Description
String

The availability.

getAvailabilityBytes()

public ByteString getAvailabilityBytes()

Availability of the product in this region. For accepted attribute values, see the regional product inventory data specification

optional string availability = 7;

Returns
Type Description
ByteString

The bytes for availability.

getCustomAttributes(int index)

public CustomAttribute getCustomAttributes(int index)

A list of custom (merchant-provided) attributes. You can also use CustomAttribute to submit any attribute of the data specification in its generic form.

repeated .google.shopping.type.CustomAttribute custom_attributes = 8;

Parameter
Name Description
index int
Returns
Type Description
com.google.shopping.type.CustomAttribute

getCustomAttributesBuilder(int index)

public CustomAttribute.Builder getCustomAttributesBuilder(int index)

A list of custom (merchant-provided) attributes. You can also use CustomAttribute to submit any attribute of the data specification in its generic form.

repeated .google.shopping.type.CustomAttribute custom_attributes = 8;

Parameter
Name Description
index int
Returns
Type Description
com.google.shopping.type.CustomAttribute.Builder

getCustomAttributesBuilderList()

public List<CustomAttribute.Builder> getCustomAttributesBuilderList()

A list of custom (merchant-provided) attributes. You can also use CustomAttribute to submit any attribute of the data specification in its generic form.

repeated .google.shopping.type.CustomAttribute custom_attributes = 8;

Returns
Type Description
List<com.google.shopping.type.CustomAttribute.Builder>

getCustomAttributesCount()

public int getCustomAttributesCount()

A list of custom (merchant-provided) attributes. You can also use CustomAttribute to submit any attribute of the data specification in its generic form.

repeated .google.shopping.type.CustomAttribute custom_attributes = 8;

Returns
Type Description
int

getCustomAttributesList()

public List<CustomAttribute> getCustomAttributesList()

A list of custom (merchant-provided) attributes. You can also use CustomAttribute to submit any attribute of the data specification in its generic form.

repeated .google.shopping.type.CustomAttribute custom_attributes = 8;

Returns
Type Description
List<com.google.shopping.type.CustomAttribute>

getCustomAttributesOrBuilder(int index)

public CustomAttributeOrBuilder getCustomAttributesOrBuilder(int index)

A list of custom (merchant-provided) attributes. You can also use CustomAttribute to submit any attribute of the data specification in its generic form.

repeated .google.shopping.type.CustomAttribute custom_attributes = 8;

Parameter
Name Description
index int
Returns
Type Description
com.google.shopping.type.CustomAttributeOrBuilder

getCustomAttributesOrBuilderList()

public List<? extends CustomAttributeOrBuilder> getCustomAttributesOrBuilderList()

A list of custom (merchant-provided) attributes. You can also use CustomAttribute to submit any attribute of the data specification in its generic form.

repeated .google.shopping.type.CustomAttribute custom_attributes = 8;

Returns
Type Description
List<? extends com.google.shopping.type.CustomAttributeOrBuilder>

getDefaultInstanceForType()

public RegionalInventory getDefaultInstanceForType()
Returns
Type Description
RegionalInventory

getDescriptorForType()

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

getName()

public String getName()

Output only. The name of the RegionalInventory resource. Format: {regional_inventory.name=accounts/{account}/products/{product}/regionalInventories/{region}

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

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. The name of the RegionalInventory resource. Format: {regional_inventory.name=accounts/{account}/products/{product}/regionalInventories/{region}

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

Returns
Type Description
ByteString

The bytes for name.

getPrice()

public Price getPrice()

Price of the product in this region.

.google.shopping.type.Price price = 4;

Returns
Type Description
com.google.shopping.type.Price

The price.

getPriceBuilder()

public Price.Builder getPriceBuilder()

Price of the product in this region.

.google.shopping.type.Price price = 4;

Returns
Type Description
com.google.shopping.type.Price.Builder

getPriceOrBuilder()

public PriceOrBuilder getPriceOrBuilder()

Price of the product in this region.

.google.shopping.type.Price price = 4;

Returns
Type Description
com.google.shopping.type.PriceOrBuilder

getRegion()

public String getRegion()

Required. Immutable. ID of the region for this RegionalInventory resource. See the Regional availability and pricing for more details.

string region = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The region.

getRegionBytes()

public ByteString getRegionBytes()

Required. Immutable. ID of the region for this RegionalInventory resource. See the Regional availability and pricing for more details.

string region = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for region.

getSalePrice()

public Price getSalePrice()

Sale price of the product in this region. Mandatory if salePriceEffectiveDate is defined.

.google.shopping.type.Price sale_price = 5;

Returns
Type Description
com.google.shopping.type.Price

The salePrice.

getSalePriceBuilder()

public Price.Builder getSalePriceBuilder()

Sale price of the product in this region. Mandatory if salePriceEffectiveDate is defined.

.google.shopping.type.Price sale_price = 5;

Returns
Type Description
com.google.shopping.type.Price.Builder

getSalePriceEffectiveDate()

public Interval getSalePriceEffectiveDate()

The TimePeriod of the sale price in this region.

.google.type.Interval sale_price_effective_date = 6;

Returns
Type Description
com.google.type.Interval

The salePriceEffectiveDate.

getSalePriceEffectiveDateBuilder()

public Interval.Builder getSalePriceEffectiveDateBuilder()

The TimePeriod of the sale price in this region.

.google.type.Interval sale_price_effective_date = 6;

Returns
Type Description
com.google.type.Interval.Builder

getSalePriceEffectiveDateOrBuilder()

public IntervalOrBuilder getSalePriceEffectiveDateOrBuilder()

The TimePeriod of the sale price in this region.

.google.type.Interval sale_price_effective_date = 6;

Returns
Type Description
com.google.type.IntervalOrBuilder

getSalePriceOrBuilder()

public PriceOrBuilder getSalePriceOrBuilder()

Sale price of the product in this region. Mandatory if salePriceEffectiveDate is defined.

.google.shopping.type.Price sale_price = 5;

Returns
Type Description
com.google.shopping.type.PriceOrBuilder

hasAvailability()

public boolean hasAvailability()

Availability of the product in this region. For accepted attribute values, see the regional product inventory data specification

optional string availability = 7;

Returns
Type Description
boolean

Whether the availability field is set.

hasPrice()

public boolean hasPrice()

Price of the product in this region.

.google.shopping.type.Price price = 4;

Returns
Type Description
boolean

Whether the price field is set.

hasSalePrice()

public boolean hasSalePrice()

Sale price of the product in this region. Mandatory if salePriceEffectiveDate is defined.

.google.shopping.type.Price sale_price = 5;

Returns
Type Description
boolean

Whether the salePrice field is set.

hasSalePriceEffectiveDate()

public boolean hasSalePriceEffectiveDate()

The TimePeriod of the sale price in this region.

.google.type.Interval sale_price_effective_date = 6;

Returns
Type Description
boolean

Whether the salePriceEffectiveDate 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 RegionalInventory.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
RegionalInventory.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

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

mergeFrom(RegionalInventory other)

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

mergePrice(Price value)

public RegionalInventory.Builder mergePrice(Price value)

Price of the product in this region.

.google.shopping.type.Price price = 4;

Parameter
Name Description
value com.google.shopping.type.Price
Returns
Type Description
RegionalInventory.Builder

mergeSalePrice(Price value)

public RegionalInventory.Builder mergeSalePrice(Price value)

Sale price of the product in this region. Mandatory if salePriceEffectiveDate is defined.

.google.shopping.type.Price sale_price = 5;

Parameter
Name Description
value com.google.shopping.type.Price
Returns
Type Description
RegionalInventory.Builder

mergeSalePriceEffectiveDate(Interval value)

public RegionalInventory.Builder mergeSalePriceEffectiveDate(Interval value)

The TimePeriod of the sale price in this region.

.google.type.Interval sale_price_effective_date = 6;

Parameter
Name Description
value com.google.type.Interval
Returns
Type Description
RegionalInventory.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeCustomAttributes(int index)

public RegionalInventory.Builder removeCustomAttributes(int index)

A list of custom (merchant-provided) attributes. You can also use CustomAttribute to submit any attribute of the data specification in its generic form.

repeated .google.shopping.type.CustomAttribute custom_attributes = 8;

Parameter
Name Description
index int
Returns
Type Description
RegionalInventory.Builder

setAccount(long value)

public RegionalInventory.Builder setAccount(long value)

Output only. The account that owns the product. This field will be ignored if set by the client.

int64 account = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value long

The account to set.

Returns
Type Description
RegionalInventory.Builder

This builder for chaining.

setAvailability(String value)

public RegionalInventory.Builder setAvailability(String value)

Availability of the product in this region. For accepted attribute values, see the regional product inventory data specification

optional string availability = 7;

Parameter
Name Description
value String

The availability to set.

Returns
Type Description
RegionalInventory.Builder

This builder for chaining.

setAvailabilityBytes(ByteString value)

public RegionalInventory.Builder setAvailabilityBytes(ByteString value)

Availability of the product in this region. For accepted attribute values, see the regional product inventory data specification

optional string availability = 7;

Parameter
Name Description
value ByteString

The bytes for availability to set.

Returns
Type Description
RegionalInventory.Builder

This builder for chaining.

setCustomAttributes(int index, CustomAttribute value)

public RegionalInventory.Builder setCustomAttributes(int index, CustomAttribute value)

A list of custom (merchant-provided) attributes. You can also use CustomAttribute to submit any attribute of the data specification in its generic form.

repeated .google.shopping.type.CustomAttribute custom_attributes = 8;

Parameters
Name Description
index int
value com.google.shopping.type.CustomAttribute
Returns
Type Description
RegionalInventory.Builder

setCustomAttributes(int index, CustomAttribute.Builder builderForValue)

public RegionalInventory.Builder setCustomAttributes(int index, CustomAttribute.Builder builderForValue)

A list of custom (merchant-provided) attributes. You can also use CustomAttribute to submit any attribute of the data specification in its generic form.

repeated .google.shopping.type.CustomAttribute custom_attributes = 8;

Parameters
Name Description
index int
builderForValue com.google.shopping.type.CustomAttribute.Builder
Returns
Type Description
RegionalInventory.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public RegionalInventory.Builder setName(String value)

Output only. The name of the RegionalInventory resource. Format: {regional_inventory.name=accounts/{account}/products/{product}/regionalInventories/{region}

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

Parameter
Name Description
value String

The name to set.

Returns
Type Description
RegionalInventory.Builder

This builder for chaining.

setNameBytes(ByteString value)

public RegionalInventory.Builder setNameBytes(ByteString value)

Output only. The name of the RegionalInventory resource. Format: {regional_inventory.name=accounts/{account}/products/{product}/regionalInventories/{region}

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

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
RegionalInventory.Builder

This builder for chaining.

setPrice(Price value)

public RegionalInventory.Builder setPrice(Price value)

Price of the product in this region.

.google.shopping.type.Price price = 4;

Parameter
Name Description
value com.google.shopping.type.Price
Returns
Type Description
RegionalInventory.Builder

setPrice(Price.Builder builderForValue)

public RegionalInventory.Builder setPrice(Price.Builder builderForValue)

Price of the product in this region.

.google.shopping.type.Price price = 4;

Parameter
Name Description
builderForValue com.google.shopping.type.Price.Builder
Returns
Type Description
RegionalInventory.Builder

setRegion(String value)

public RegionalInventory.Builder setRegion(String value)

Required. Immutable. ID of the region for this RegionalInventory resource. See the Regional availability and pricing for more details.

string region = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value String

The region to set.

Returns
Type Description
RegionalInventory.Builder

This builder for chaining.

setRegionBytes(ByteString value)

public RegionalInventory.Builder setRegionBytes(ByteString value)

Required. Immutable. ID of the region for this RegionalInventory resource. See the Regional availability and pricing for more details.

string region = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value ByteString

The bytes for region to set.

Returns
Type Description
RegionalInventory.Builder

This builder for chaining.

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

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

setSalePrice(Price value)

public RegionalInventory.Builder setSalePrice(Price value)

Sale price of the product in this region. Mandatory if salePriceEffectiveDate is defined.

.google.shopping.type.Price sale_price = 5;

Parameter
Name Description
value com.google.shopping.type.Price
Returns
Type Description
RegionalInventory.Builder

setSalePrice(Price.Builder builderForValue)

public RegionalInventory.Builder setSalePrice(Price.Builder builderForValue)

Sale price of the product in this region. Mandatory if salePriceEffectiveDate is defined.

.google.shopping.type.Price sale_price = 5;

Parameter
Name Description
builderForValue com.google.shopping.type.Price.Builder
Returns
Type Description
RegionalInventory.Builder

setSalePriceEffectiveDate(Interval value)

public RegionalInventory.Builder setSalePriceEffectiveDate(Interval value)

The TimePeriod of the sale price in this region.

.google.type.Interval sale_price_effective_date = 6;

Parameter
Name Description
value com.google.type.Interval
Returns
Type Description
RegionalInventory.Builder

setSalePriceEffectiveDate(Interval.Builder builderForValue)

public RegionalInventory.Builder setSalePriceEffectiveDate(Interval.Builder builderForValue)

The TimePeriod of the sale price in this region.

.google.type.Interval sale_price_effective_date = 6;

Parameter
Name Description
builderForValue com.google.type.Interval.Builder
Returns
Type Description
RegionalInventory.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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