Class RegionalInventory.Builder (0.17.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 feed specification.

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

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
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 feed specification in its generic form.

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

Parameter
NameDescription
valuesIterable<? extends com.google.shopping.type.CustomAttribute>
Returns
TypeDescription
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 feed specification in its generic form.

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

Parameter
NameDescription
valuecom.google.shopping.type.CustomAttribute
Returns
TypeDescription
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 feed specification in its generic form.

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

Parameter
NameDescription
builderForValuecom.google.shopping.type.CustomAttribute.Builder
Returns
TypeDescription
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 feed specification in its generic form.

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

Parameters
NameDescription
indexint
valuecom.google.shopping.type.CustomAttribute
Returns
TypeDescription
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 feed specification in its generic form.

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

Parameters
NameDescription
indexint
builderForValuecom.google.shopping.type.CustomAttribute.Builder
Returns
TypeDescription
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 feed specification in its generic form.

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

Returns
TypeDescription
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 feed specification in its generic form.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
com.google.shopping.type.CustomAttribute.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public RegionalInventory.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
RegionalInventory.Builder
Overrides

build()

public RegionalInventory build()
Returns
TypeDescription
RegionalInventory

buildPartial()

public RegionalInventory buildPartial()
Returns
TypeDescription
RegionalInventory

clear()

public RegionalInventory.Builder clear()
Returns
TypeDescription
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
TypeDescription
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 feed specification

optional string availability = 7;

Returns
TypeDescription
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 feed specification in its generic form.

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

Returns
TypeDescription
RegionalInventory.Builder

clearField(Descriptors.FieldDescriptor field)

public RegionalInventory.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
RegionalInventory.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public RegionalInventory.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
RegionalInventory.Builder
Overrides

clearPrice()

public RegionalInventory.Builder clearPrice()

Price of the product in this region.

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

Returns
TypeDescription
RegionalInventory.Builder

clearRegion()

public RegionalInventory.Builder clearRegion()

Required. 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];

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
RegionalInventory.Builder

clone()

public RegionalInventory.Builder clone()
Returns
TypeDescription
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
TypeDescription
long

The account.

getAvailability()

public String getAvailability()

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

optional string availability = 7;

Returns
TypeDescription
String

The availability.

getAvailabilityBytes()

public ByteString getAvailabilityBytes()

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

optional string availability = 7;

Returns
TypeDescription
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 feed specification in its generic form.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
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 feed specification in its generic form.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
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 feed specification in its generic form.

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

Returns
TypeDescription
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 feed specification in its generic form.

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

Returns
TypeDescription
int

getCustomAttributesList()

public List<CustomAttribute> getCustomAttributesList()

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

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

Returns
TypeDescription
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 feed specification in its generic form.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
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 feed specification in its generic form.

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

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

getDefaultInstanceForType()

public RegionalInventory getDefaultInstanceForType()
Returns
TypeDescription
RegionalInventory

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for name.

getPrice()

public Price getPrice()

Price of the product in this region.

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

Returns
TypeDescription
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
TypeDescription
com.google.shopping.type.Price.Builder

getPriceOrBuilder()

public PriceOrBuilder getPriceOrBuilder()

Price of the product in this region.

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

Returns
TypeDescription
com.google.shopping.type.PriceOrBuilder

getRegion()

public String getRegion()

Required. 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];

Returns
TypeDescription
String

The region.

getRegionBytes()

public ByteString getRegionBytes()

Required. 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];

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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 feed specification

optional string availability = 7;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the salePriceEffectiveDate field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public RegionalInventory.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RegionalInventory.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public RegionalInventory.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
RegionalInventory.Builder
Overrides

mergeFrom(RegionalInventory other)

public RegionalInventory.Builder mergeFrom(RegionalInventory other)
Parameter
NameDescription
otherRegionalInventory
Returns
TypeDescription
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
NameDescription
valuecom.google.shopping.type.Price
Returns
TypeDescription
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
NameDescription
valuecom.google.shopping.type.Price
Returns
TypeDescription
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
NameDescription
valuecom.google.type.Interval
Returns
TypeDescription
RegionalInventory.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final RegionalInventory.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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 feed specification in its generic form.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
valuelong

The account to set.

Returns
TypeDescription
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 feed specification

optional string availability = 7;

Parameter
NameDescription
valueString

The availability to set.

Returns
TypeDescription
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 feed specification

optional string availability = 7;

Parameter
NameDescription
valueByteString

The bytes for availability to set.

Returns
TypeDescription
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 feed specification in its generic form.

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

Parameters
NameDescription
indexint
valuecom.google.shopping.type.CustomAttribute
Returns
TypeDescription
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 feed specification in its generic form.

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

Parameters
NameDescription
indexint
builderForValuecom.google.shopping.type.CustomAttribute.Builder
Returns
TypeDescription
RegionalInventory.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public RegionalInventory.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The name to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
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
NameDescription
valuecom.google.shopping.type.Price
Returns
TypeDescription
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
NameDescription
builderForValuecom.google.shopping.type.Price.Builder
Returns
TypeDescription
RegionalInventory.Builder

setRegion(String value)

public RegionalInventory.Builder setRegion(String value)

Required. 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];

Parameter
NameDescription
valueString

The region to set.

Returns
TypeDescription
RegionalInventory.Builder

This builder for chaining.

setRegionBytes(ByteString value)

public RegionalInventory.Builder setRegionBytes(ByteString value)

Required. 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];

Parameter
NameDescription
valueByteString

The bytes for region to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valuecom.google.shopping.type.Price
Returns
TypeDescription
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
NameDescription
builderForValuecom.google.shopping.type.Price.Builder
Returns
TypeDescription
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
NameDescription
valuecom.google.type.Interval
Returns
TypeDescription
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
NameDescription
builderForValuecom.google.type.Interval.Builder
Returns
TypeDescription
RegionalInventory.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final RegionalInventory.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
RegionalInventory.Builder
Overrides