Class LocalInventory (2.48.0)

public final class LocalInventory extends GeneratedMessageV3 implements LocalInventoryOrBuilder

The inventory information at a place (e.g. a store) identified by a place ID.

Protobuf type google.cloud.retail.v2.LocalInventory

Static Fields

ATTRIBUTES_FIELD_NUMBER

public static final int ATTRIBUTES_FIELD_NUMBER
Field Value
Type Description
int

FULFILLMENT_TYPES_FIELD_NUMBER

public static final int FULFILLMENT_TYPES_FIELD_NUMBER
Field Value
Type Description
int

PLACE_ID_FIELD_NUMBER

public static final int PLACE_ID_FIELD_NUMBER
Field Value
Type Description
int

PRICE_INFO_FIELD_NUMBER

public static final int PRICE_INFO_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static LocalInventory getDefaultInstance()
Returns
Type Description
LocalInventory

getDescriptor()

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

newBuilder()

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

newBuilder(LocalInventory prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

containsAttributes(String key)

public boolean containsAttributes(String key)

Additional local inventory attributes, for example, store name, promotion tags, etc.

This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned:

  • At most 30 attributes are allowed.
  • The key must be a UTF-8 encoded string with a length limit of 32 characters.
  • The key must match the pattern: a-zA-Z0-9*. For example, key0LikeThis or KEY_1_LIKE_THIS.
  • The attribute values must be of the same type (text or number).
  • Only 1 value is allowed for each attribute.
  • For text values, the length limit is 256 UTF-8 characters.
  • The attribute does not support search. The searchable field should be unset or set to false.
  • The max summed total bytes of custom attribute keys and values per product is 5MiB.

map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 3;

Parameter
Name Description
key String
Returns
Type Description
boolean

equals(Object obj)

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

getAttributes() (deprecated)

public Map<String,CustomAttribute> getAttributes()

Use #getAttributesMap() instead.

Returns
Type Description
Map<String,CustomAttribute>

getAttributesCount()

public int getAttributesCount()

Additional local inventory attributes, for example, store name, promotion tags, etc.

This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned:

  • At most 30 attributes are allowed.
  • The key must be a UTF-8 encoded string with a length limit of 32 characters.
  • The key must match the pattern: a-zA-Z0-9*. For example, key0LikeThis or KEY_1_LIKE_THIS.
  • The attribute values must be of the same type (text or number).
  • Only 1 value is allowed for each attribute.
  • For text values, the length limit is 256 UTF-8 characters.
  • The attribute does not support search. The searchable field should be unset or set to false.
  • The max summed total bytes of custom attribute keys and values per product is 5MiB.

map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 3;

Returns
Type Description
int

getAttributesMap()

public Map<String,CustomAttribute> getAttributesMap()

Additional local inventory attributes, for example, store name, promotion tags, etc.

This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned:

  • At most 30 attributes are allowed.
  • The key must be a UTF-8 encoded string with a length limit of 32 characters.
  • The key must match the pattern: a-zA-Z0-9*. For example, key0LikeThis or KEY_1_LIKE_THIS.
  • The attribute values must be of the same type (text or number).
  • Only 1 value is allowed for each attribute.
  • For text values, the length limit is 256 UTF-8 characters.
  • The attribute does not support search. The searchable field should be unset or set to false.
  • The max summed total bytes of custom attribute keys and values per product is 5MiB.

map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 3;

Returns
Type Description
Map<String,CustomAttribute>

getAttributesOrDefault(String key, CustomAttribute defaultValue)

public CustomAttribute getAttributesOrDefault(String key, CustomAttribute defaultValue)

Additional local inventory attributes, for example, store name, promotion tags, etc.

This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned:

  • At most 30 attributes are allowed.
  • The key must be a UTF-8 encoded string with a length limit of 32 characters.
  • The key must match the pattern: a-zA-Z0-9*. For example, key0LikeThis or KEY_1_LIKE_THIS.
  • The attribute values must be of the same type (text or number).
  • Only 1 value is allowed for each attribute.
  • For text values, the length limit is 256 UTF-8 characters.
  • The attribute does not support search. The searchable field should be unset or set to false.
  • The max summed total bytes of custom attribute keys and values per product is 5MiB.

map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 3;

Parameters
Name Description
key String
defaultValue CustomAttribute
Returns
Type Description
CustomAttribute

getAttributesOrThrow(String key)

public CustomAttribute getAttributesOrThrow(String key)

Additional local inventory attributes, for example, store name, promotion tags, etc.

This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned:

  • At most 30 attributes are allowed.
  • The key must be a UTF-8 encoded string with a length limit of 32 characters.
  • The key must match the pattern: a-zA-Z0-9*. For example, key0LikeThis or KEY_1_LIKE_THIS.
  • The attribute values must be of the same type (text or number).
  • Only 1 value is allowed for each attribute.
  • For text values, the length limit is 256 UTF-8 characters.
  • The attribute does not support search. The searchable field should be unset or set to false.
  • The max summed total bytes of custom attribute keys and values per product is 5MiB.

map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 3;

Parameter
Name Description
key String
Returns
Type Description
CustomAttribute

getDefaultInstanceForType()

public LocalInventory getDefaultInstanceForType()
Returns
Type Description
LocalInventory

getFulfillmentTypes(int index)

public String getFulfillmentTypes(int index)

Input only. Supported fulfillment types. Valid fulfillment type values include commonly used types (such as pickup in store and same day delivery), and custom types. Customers have to map custom types to their display names before rendering UI.

Supported values:

  • "pickup-in-store"
  • "ship-to-store"
  • "same-day-delivery"
  • "next-day-delivery"
  • "custom-type-1"
  • "custom-type-2"
  • "custom-type-3"
  • "custom-type-4"
  • "custom-type-5"

    If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned.

    All the elements must be distinct. Otherwise, an INVALID_ARGUMENT error is returned.

repeated string fulfillment_types = 4 [(.google.api.field_behavior) = INPUT_ONLY];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The fulfillmentTypes at the given index.

getFulfillmentTypesBytes(int index)

public ByteString getFulfillmentTypesBytes(int index)

Input only. Supported fulfillment types. Valid fulfillment type values include commonly used types (such as pickup in store and same day delivery), and custom types. Customers have to map custom types to their display names before rendering UI.

Supported values:

  • "pickup-in-store"
  • "ship-to-store"
  • "same-day-delivery"
  • "next-day-delivery"
  • "custom-type-1"
  • "custom-type-2"
  • "custom-type-3"
  • "custom-type-4"
  • "custom-type-5"

    If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned.

    All the elements must be distinct. Otherwise, an INVALID_ARGUMENT error is returned.

repeated string fulfillment_types = 4 [(.google.api.field_behavior) = INPUT_ONLY];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the fulfillmentTypes at the given index.

getFulfillmentTypesCount()

public int getFulfillmentTypesCount()

Input only. Supported fulfillment types. Valid fulfillment type values include commonly used types (such as pickup in store and same day delivery), and custom types. Customers have to map custom types to their display names before rendering UI.

Supported values:

  • "pickup-in-store"
  • "ship-to-store"
  • "same-day-delivery"
  • "next-day-delivery"
  • "custom-type-1"
  • "custom-type-2"
  • "custom-type-3"
  • "custom-type-4"
  • "custom-type-5"

    If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned.

    All the elements must be distinct. Otherwise, an INVALID_ARGUMENT error is returned.

repeated string fulfillment_types = 4 [(.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
int

The count of fulfillmentTypes.

getFulfillmentTypesList()

public ProtocolStringList getFulfillmentTypesList()

Input only. Supported fulfillment types. Valid fulfillment type values include commonly used types (such as pickup in store and same day delivery), and custom types. Customers have to map custom types to their display names before rendering UI.

Supported values:

  • "pickup-in-store"
  • "ship-to-store"
  • "same-day-delivery"
  • "next-day-delivery"
  • "custom-type-1"
  • "custom-type-2"
  • "custom-type-3"
  • "custom-type-4"
  • "custom-type-5"

    If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned.

    All the elements must be distinct. Otherwise, an INVALID_ARGUMENT error is returned.

repeated string fulfillment_types = 4 [(.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
ProtocolStringList

A list containing the fulfillmentTypes.

getParserForType()

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

getPlaceId()

public String getPlaceId()

The place ID for the current set of inventory information.

string place_id = 1;

Returns
Type Description
String

The placeId.

getPlaceIdBytes()

public ByteString getPlaceIdBytes()

The place ID for the current set of inventory information.

string place_id = 1;

Returns
Type Description
ByteString

The bytes for placeId.

getPriceInfo()

public PriceInfo getPriceInfo()

Product price and cost information.

Google Merchant Center property price.

.google.cloud.retail.v2.PriceInfo price_info = 2;

Returns
Type Description
PriceInfo

The priceInfo.

getPriceInfoOrBuilder()

public PriceInfoOrBuilder getPriceInfoOrBuilder()

Product price and cost information.

Google Merchant Center property price.

.google.cloud.retail.v2.PriceInfo price_info = 2;

Returns
Type Description
PriceInfoOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hasPriceInfo()

public boolean hasPriceInfo()

Product price and cost information.

Google Merchant Center property price.

.google.cloud.retail.v2.PriceInfo price_info = 2;

Returns
Type Description
boolean

Whether the priceInfo field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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