Class LocalInventory

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.retail.v2alpha.LocalInventory
All Implemented Interfaces:
LocalInventoryOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class LocalInventory extends com.google.protobuf.GeneratedMessage implements LocalInventoryOrBuilder
 The inventory information at a place (e.g. a store) identified
 by a place ID.
 
Protobuf type google.cloud.retail.v2alpha.LocalInventory
See Also:
  • Field Details

    • PLACE_ID_FIELD_NUMBER

      public static final int PLACE_ID_FIELD_NUMBER
      See Also:
    • PRICE_INFO_FIELD_NUMBER

      public static final int PRICE_INFO_FIELD_NUMBER
      See Also:
    • AVAILABILITY_FIELD_NUMBER

      public static final int AVAILABILITY_FIELD_NUMBER
      See Also:
    • ATTRIBUTES_FIELD_NUMBER

      public static final int ATTRIBUTES_FIELD_NUMBER
      See Also:
    • FULFILLMENT_TYPES_FIELD_NUMBER

      public static final int FULFILLMENT_TYPES_FIELD_NUMBER
      See Also:
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getPlaceId

      public String getPlaceId()
       Optional. The place ID for the current set of inventory information.
       
      string place_id = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getPlaceId in interface LocalInventoryOrBuilder
      Returns:
      The placeId.
    • getPlaceIdBytes

      public com.google.protobuf.ByteString getPlaceIdBytes()
       Optional. The place ID for the current set of inventory information.
       
      string place_id = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getPlaceIdBytes in interface LocalInventoryOrBuilder
      Returns:
      The bytes for placeId.
    • hasPriceInfo

      public boolean hasPriceInfo()
       Optional. Product price and cost information.
      
       Google Merchant Center property
       [price](https://support.google.com/merchants/answer/6324371).
       
      .google.cloud.retail.v2alpha.PriceInfo price_info = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasPriceInfo in interface LocalInventoryOrBuilder
      Returns:
      Whether the priceInfo field is set.
    • getPriceInfo

      public PriceInfo getPriceInfo()
       Optional. Product price and cost information.
      
       Google Merchant Center property
       [price](https://support.google.com/merchants/answer/6324371).
       
      .google.cloud.retail.v2alpha.PriceInfo price_info = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getPriceInfo in interface LocalInventoryOrBuilder
      Returns:
      The priceInfo.
    • getPriceInfoOrBuilder

      public PriceInfoOrBuilder getPriceInfoOrBuilder()
       Optional. Product price and cost information.
      
       Google Merchant Center property
       [price](https://support.google.com/merchants/answer/6324371).
       
      .google.cloud.retail.v2alpha.PriceInfo price_info = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getPriceInfoOrBuilder in interface LocalInventoryOrBuilder
    • getAvailabilityValue

      public int getAvailabilityValue()
       Optional. The availability of the
       [Product][google.cloud.retail.v2alpha.Product] at this place_id. Default to
       [Availability.IN_STOCK][google.cloud.retail.v2alpha.LocalInventory.Availability.IN_STOCK].
      
       For primary products with variants set the availability of the primary as
       [Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.LocalInventory.Availability.OUT_OF_STOCK]
       and set the true availability at the variant level. This way the primary
       product will be considered "in stock" as long as it has at least one
       variant in stock.
      
       For primary products with no variants set the true availability at the
       primary level.
      
       Corresponding properties: Google Merchant Center property
       [availability](https://support.google.com/merchants/answer/6324448).
       Schema.org property [Offer.availability](https://schema.org/availability).
      
       This field is currently only used by the Recommendations API. For Search,
       please make use of
       [fulfillment_types][google.cloud.retail.v2alpha.LocalInventory.fulfillment_types]
       or custom attributes for similar behaviour. See [here](
       https://cloud.google.com/retail/docs/local-inventory-updates#local-inventory-update-methods)
       for more details.
       
      .google.cloud.retail.v2alpha.LocalInventory.Availability availability = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAvailabilityValue in interface LocalInventoryOrBuilder
      Returns:
      The enum numeric value on the wire for availability.
    • getAvailability

      public LocalInventory.Availability getAvailability()
       Optional. The availability of the
       [Product][google.cloud.retail.v2alpha.Product] at this place_id. Default to
       [Availability.IN_STOCK][google.cloud.retail.v2alpha.LocalInventory.Availability.IN_STOCK].
      
       For primary products with variants set the availability of the primary as
       [Availability.OUT_OF_STOCK][google.cloud.retail.v2alpha.LocalInventory.Availability.OUT_OF_STOCK]
       and set the true availability at the variant level. This way the primary
       product will be considered "in stock" as long as it has at least one
       variant in stock.
      
       For primary products with no variants set the true availability at the
       primary level.
      
       Corresponding properties: Google Merchant Center property
       [availability](https://support.google.com/merchants/answer/6324448).
       Schema.org property [Offer.availability](https://schema.org/availability).
      
       This field is currently only used by the Recommendations API. For Search,
       please make use of
       [fulfillment_types][google.cloud.retail.v2alpha.LocalInventory.fulfillment_types]
       or custom attributes for similar behaviour. See [here](
       https://cloud.google.com/retail/docs/local-inventory-updates#local-inventory-update-methods)
       for more details.
       
      .google.cloud.retail.v2alpha.LocalInventory.Availability availability = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAvailability in interface LocalInventoryOrBuilder
      Returns:
      The availability.
    • getAttributesCount

      public int getAttributesCount()
      Description copied from interface: LocalInventoryOrBuilder
       Optional. 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][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.v2alpha.CustomAttribute> attributes = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAttributesCount in interface LocalInventoryOrBuilder
    • containsAttributes

      public boolean containsAttributes(String key)
       Optional. 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][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.v2alpha.CustomAttribute> attributes = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      containsAttributes in interface LocalInventoryOrBuilder
    • getAttributes

      @Deprecated public Map<String,CustomAttribute> getAttributes()
      Deprecated.
      Use getAttributesMap() instead.
      Specified by:
      getAttributes in interface LocalInventoryOrBuilder
    • getAttributesMap

      public Map<String,CustomAttribute> getAttributesMap()
       Optional. 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][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.v2alpha.CustomAttribute> attributes = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAttributesMap in interface LocalInventoryOrBuilder
    • getAttributesOrDefault

      public CustomAttribute getAttributesOrDefault(String key, CustomAttribute defaultValue)
       Optional. 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][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.v2alpha.CustomAttribute> attributes = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAttributesOrDefault in interface LocalInventoryOrBuilder
    • getAttributesOrThrow

      public CustomAttribute getAttributesOrThrow(String key)
       Optional. 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][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.v2alpha.CustomAttribute> attributes = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAttributesOrThrow in interface LocalInventoryOrBuilder
    • getFulfillmentTypesList

      public com.google.protobuf.ProtocolStringList getFulfillmentTypesList()
       Optional. 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) = OPTIONAL];
      Specified by:
      getFulfillmentTypesList in interface LocalInventoryOrBuilder
      Returns:
      A list containing the fulfillmentTypes.
    • getFulfillmentTypesCount

      public int getFulfillmentTypesCount()
       Optional. 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) = OPTIONAL];
      Specified by:
      getFulfillmentTypesCount in interface LocalInventoryOrBuilder
      Returns:
      The count of fulfillmentTypes.
    • getFulfillmentTypes

      public String getFulfillmentTypes(int index)
       Optional. 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) = OPTIONAL];
      Specified by:
      getFulfillmentTypes in interface LocalInventoryOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The fulfillmentTypes at the given index.
    • getFulfillmentTypesBytes

      public com.google.protobuf.ByteString getFulfillmentTypesBytes(int index)
       Optional. 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) = OPTIONAL];
      Specified by:
      getFulfillmentTypesBytes in interface LocalInventoryOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the fulfillmentTypes at the given index.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static LocalInventory parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static LocalInventory parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static LocalInventory parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static LocalInventory parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static LocalInventory parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static LocalInventory parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static LocalInventory parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static LocalInventory parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static LocalInventory parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static LocalInventory parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static LocalInventory parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static LocalInventory parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public LocalInventory.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static LocalInventory.Builder newBuilder()
    • newBuilder

      public static LocalInventory.Builder newBuilder(LocalInventory prototype)
    • toBuilder

      public LocalInventory.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected LocalInventory.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static LocalInventory getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<LocalInventory> parser()
    • getParserForType

      public com.google.protobuf.Parser<LocalInventory> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public LocalInventory getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder