Class LocalInventory (0.4.0)

public final class LocalInventory extends GeneratedMessageV3 implements LocalInventoryOrBuilder

Local inventory information for the product. Represents in-store information for a specific product at the store specified by storeCode. For a list of all accepted attribute values, see the local product inventory feed specification.

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

Static Fields

ACCOUNT_FIELD_NUMBER

public static final int ACCOUNT_FIELD_NUMBER
Field Value
TypeDescription
int

AVAILABILITY_FIELD_NUMBER

public static final int AVAILABILITY_FIELD_NUMBER
Field Value
TypeDescription
int

CUSTOM_ATTRIBUTES_FIELD_NUMBER

public static final int CUSTOM_ATTRIBUTES_FIELD_NUMBER
Field Value
TypeDescription
int

INSTORE_PRODUCT_LOCATION_FIELD_NUMBER

public static final int INSTORE_PRODUCT_LOCATION_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

PICKUP_METHOD_FIELD_NUMBER

public static final int PICKUP_METHOD_FIELD_NUMBER
Field Value
TypeDescription
int

PICKUP_SLA_FIELD_NUMBER

public static final int PICKUP_SLA_FIELD_NUMBER
Field Value
TypeDescription
int

PRICE_FIELD_NUMBER

public static final int PRICE_FIELD_NUMBER
Field Value
TypeDescription
int

QUANTITY_FIELD_NUMBER

public static final int QUANTITY_FIELD_NUMBER
Field Value
TypeDescription
int

SALE_PRICE_EFFECTIVE_DATE_FIELD_NUMBER

public static final int SALE_PRICE_EFFECTIVE_DATE_FIELD_NUMBER
Field Value
TypeDescription
int

SALE_PRICE_FIELD_NUMBER

public static final int SALE_PRICE_FIELD_NUMBER
Field Value
TypeDescription
int

STORE_CODE_FIELD_NUMBER

public static final int STORE_CODE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static LocalInventory getDefaultInstance()
Returns
TypeDescription
LocalInventory

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static LocalInventory.Builder newBuilder()
Returns
TypeDescription
LocalInventory.Builder

newBuilder(LocalInventory prototype)

public static LocalInventory.Builder newBuilder(LocalInventory prototype)
Parameter
NameDescription
prototypeLocalInventory
Returns
TypeDescription
LocalInventory.Builder

parseDelimitedFrom(InputStream input)

public static LocalInventory parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
LocalInventory
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static LocalInventory parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
LocalInventory
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static LocalInventory parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
LocalInventory
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static LocalInventory parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
LocalInventory
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static LocalInventory parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
LocalInventory
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static LocalInventory parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
LocalInventory
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static LocalInventory parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
LocalInventory
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static LocalInventory parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
LocalInventory
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static LocalInventory parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
LocalInventory
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static LocalInventory parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
LocalInventory
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static LocalInventory parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
LocalInventory
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static LocalInventory parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
LocalInventory
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<LocalInventory> parser()
Returns
TypeDescription
Parser<LocalInventory>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
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 at this store. For accepted attribute values, see the local product inventory feed specification

optional string availability = 7;

Returns
TypeDescription
String

The availability.

getAvailabilityBytes()

public ByteString getAvailabilityBytes()

Availability of the product at this store. For accepted attribute values, see the local 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 = 12;

Parameter
NameDescription
indexint
Returns
TypeDescription
CustomAttribute

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 = 12;

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 = 12;

Returns
TypeDescription
List<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 = 12;

Parameter
NameDescription
indexint
Returns
TypeDescription
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 = 12;

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

getDefaultInstanceForType()

public LocalInventory getDefaultInstanceForType()
Returns
TypeDescription
LocalInventory

getInstoreProductLocation()

public String getInstoreProductLocation()

Location of the product inside the store. Maximum length is 20 bytes.

optional string instore_product_location = 11;

Returns
TypeDescription
String

The instoreProductLocation.

getInstoreProductLocationBytes()

public ByteString getInstoreProductLocationBytes()

Location of the product inside the store. Maximum length is 20 bytes.

optional string instore_product_location = 11;

Returns
TypeDescription
ByteString

The bytes for instoreProductLocation.

getName()

public String getName()

Output only. The name of the LocalInventory resource. Format: accounts/{account}/products/{product}/localInventories/{store_code}

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

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. The name of the LocalInventory resource. Format: accounts/{account}/products/{product}/localInventories/{store_code}

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

Returns
TypeDescription
ByteString

The bytes for name.

getParserForType()

public Parser<LocalInventory> getParserForType()
Returns
TypeDescription
Parser<LocalInventory>
Overrides

getPickupMethod()

public String getPickupMethod()

Supported pickup method for this product. Unless the value is "not supported", this field must be submitted together with pickupSla. For accepted attribute values, see the local product inventory feed specification

optional string pickup_method = 9;

Returns
TypeDescription
String

The pickupMethod.

getPickupMethodBytes()

public ByteString getPickupMethodBytes()

Supported pickup method for this product. Unless the value is "not supported", this field must be submitted together with pickupSla. For accepted attribute values, see the local product inventory feed specification

optional string pickup_method = 9;

Returns
TypeDescription
ByteString

The bytes for pickupMethod.

getPickupSla()

public String getPickupSla()

Relative time period from the order date for an order for this product, from this store, to be ready for pickup. Must be submitted with pickupMethod. For accepted attribute values, see the local product inventory feed specification

optional string pickup_sla = 10;

Returns
TypeDescription
String

The pickupSla.

getPickupSlaBytes()

public ByteString getPickupSlaBytes()

Relative time period from the order date for an order for this product, from this store, to be ready for pickup. Must be submitted with pickupMethod. For accepted attribute values, see the local product inventory feed specification

optional string pickup_sla = 10;

Returns
TypeDescription
ByteString

The bytes for pickupSla.

getPrice()

public Price getPrice()

Price of the product at this store.

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

Returns
TypeDescription
Price

The price.

getPriceOrBuilder()

public PriceOrBuilder getPriceOrBuilder()

Price of the product at this store.

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

Returns
TypeDescription
PriceOrBuilder

getQuantity()

public long getQuantity()

Quantity of the product available at this store. Must be greater than or equal to zero.

optional int64 quantity = 8;

Returns
TypeDescription
long

The quantity.

getSalePrice()

public Price getSalePrice()

Sale price of the product at this store. Mandatory if salePriceEffectiveDate is defined.

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

Returns
TypeDescription
Price

The salePrice.

getSalePriceEffectiveDate()

public Interval getSalePriceEffectiveDate()

The TimePeriod of the sale at this store.

.google.type.Interval sale_price_effective_date = 6;

Returns
TypeDescription
com.google.type.Interval

The salePriceEffectiveDate.

getSalePriceEffectiveDateOrBuilder()

public IntervalOrBuilder getSalePriceEffectiveDateOrBuilder()

The TimePeriod of the sale at this store.

.google.type.Interval sale_price_effective_date = 6;

Returns
TypeDescription
com.google.type.IntervalOrBuilder

getSalePriceOrBuilder()

public PriceOrBuilder getSalePriceOrBuilder()

Sale price of the product at this store. Mandatory if salePriceEffectiveDate is defined.

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

Returns
TypeDescription
PriceOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getStoreCode()

public String getStoreCode()

Required. Store code (the store ID from your Business Profile) of the physical store the product is sold in. See the Local product inventory feed specification for more information.

string store_code = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
String

The storeCode.

getStoreCodeBytes()

public ByteString getStoreCodeBytes()

Required. Store code (the store ID from your Business Profile) of the physical store the product is sold in. See the Local product inventory feed specification for more information.

string store_code = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
ByteString

The bytes for storeCode.

hasAvailability()

public boolean hasAvailability()

Availability of the product at this store. For accepted attribute values, see the local product inventory feed specification

optional string availability = 7;

Returns
TypeDescription
boolean

Whether the availability field is set.

hasInstoreProductLocation()

public boolean hasInstoreProductLocation()

Location of the product inside the store. Maximum length is 20 bytes.

optional string instore_product_location = 11;

Returns
TypeDescription
boolean

Whether the instoreProductLocation field is set.

hasPickupMethod()

public boolean hasPickupMethod()

Supported pickup method for this product. Unless the value is "not supported", this field must be submitted together with pickupSla. For accepted attribute values, see the local product inventory feed specification

optional string pickup_method = 9;

Returns
TypeDescription
boolean

Whether the pickupMethod field is set.

hasPickupSla()

public boolean hasPickupSla()

Relative time period from the order date for an order for this product, from this store, to be ready for pickup. Must be submitted with pickupMethod. For accepted attribute values, see the local product inventory feed specification

optional string pickup_sla = 10;

Returns
TypeDescription
boolean

Whether the pickupSla field is set.

hasPrice()

public boolean hasPrice()

Price of the product at this store.

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

Returns
TypeDescription
boolean

Whether the price field is set.

hasQuantity()

public boolean hasQuantity()

Quantity of the product available at this store. Must be greater than or equal to zero.

optional int64 quantity = 8;

Returns
TypeDescription
boolean

Whether the quantity field is set.

hasSalePrice()

public boolean hasSalePrice()

Sale price of the product at this store. 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 at this store.

.google.type.Interval sale_price_effective_date = 6;

Returns
TypeDescription
boolean

Whether the salePriceEffectiveDate field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public LocalInventory.Builder newBuilderForType()
Returns
TypeDescription
LocalInventory.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected LocalInventory.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
LocalInventory.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public LocalInventory.Builder toBuilder()
Returns
TypeDescription
LocalInventory.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException