Class LocalInventory.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<LocalInventory.Builder>
com.google.cloud.retail.v2alpha.LocalInventory.Builder
All Implemented Interfaces:
LocalInventoryOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
LocalInventory

public static final class LocalInventory.Builder extends com.google.protobuf.GeneratedMessage.Builder<LocalInventory.Builder> implements LocalInventoryOrBuilder
 The inventory information at a place (e.g. a store) identified
 by a place ID.
 
Protobuf type google.cloud.retail.v2alpha.LocalInventory
  • 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.Builder<LocalInventory.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<LocalInventory.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<LocalInventory.Builder>
    • clear

      public LocalInventory.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<LocalInventory.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<LocalInventory.Builder>
    • getDefaultInstanceForType

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

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

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

      public LocalInventory.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<LocalInventory.Builder>
    • mergeFrom

      public LocalInventory.Builder mergeFrom(LocalInventory other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<LocalInventory.Builder>
    • mergeFrom

      public LocalInventory.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<LocalInventory.Builder>
      Throws:
      IOException
    • 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.
    • setPlaceId

      public LocalInventory.Builder setPlaceId(String value)
       Optional. The place ID for the current set of inventory information.
       
      string place_id = 1 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The placeId to set.
      Returns:
      This builder for chaining.
    • clearPlaceId

      public LocalInventory.Builder clearPlaceId()
       Optional. The place ID for the current set of inventory information.
       
      string place_id = 1 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setPlaceIdBytes

      public LocalInventory.Builder setPlaceIdBytes(com.google.protobuf.ByteString value)
       Optional. The place ID for the current set of inventory information.
       
      string place_id = 1 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for placeId to set.
      Returns:
      This builder for chaining.
    • 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.
    • setPriceInfo

      public LocalInventory.Builder setPriceInfo(PriceInfo value)
       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];
    • setPriceInfo

      public LocalInventory.Builder setPriceInfo(PriceInfo.Builder builderForValue)
       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];
    • mergePriceInfo

      public LocalInventory.Builder mergePriceInfo(PriceInfo value)
       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];
    • clearPriceInfo

      public LocalInventory.Builder clearPriceInfo()
       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];
    • getPriceInfoBuilder

      public PriceInfo.Builder getPriceInfoBuilder()
       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];
    • 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.
    • setAvailabilityValue

      public LocalInventory.Builder setAvailabilityValue(int value)
       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];
      Parameters:
      value - The enum numeric value on the wire for availability to set.
      Returns:
      This builder for chaining.
    • 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.
    • setAvailability

      public LocalInventory.Builder setAvailability(LocalInventory.Availability value)
       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];
      Parameters:
      value - The availability to set.
      Returns:
      This builder for chaining.
    • clearAvailability

      public LocalInventory.Builder clearAvailability()
       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];
      Returns:
      This builder for chaining.
    • 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
    • clearAttributes

      public LocalInventory.Builder clearAttributes()
    • removeAttributes

      public LocalInventory.Builder removeAttributes(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];
    • getMutableAttributes

      @Deprecated public Map<String,CustomAttribute> getMutableAttributes()
      Deprecated.
      Use alternate mutation accessors instead.
    • putAttributes

      public LocalInventory.Builder putAttributes(String key, CustomAttribute value)
       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];
    • putAllAttributes

      public LocalInventory.Builder putAllAttributes(Map<String,CustomAttribute> values)
       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];
    • putAttributesBuilderIfAbsent

      public CustomAttribute.Builder putAttributesBuilderIfAbsent(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];
    • 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.
    • setFulfillmentTypes

      public LocalInventory.Builder setFulfillmentTypes(int index, String value)
       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];
      Parameters:
      index - The index to set the value at.
      value - The fulfillmentTypes to set.
      Returns:
      This builder for chaining.
    • addFulfillmentTypes

      public LocalInventory.Builder addFulfillmentTypes(String value)
       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];
      Parameters:
      value - The fulfillmentTypes to add.
      Returns:
      This builder for chaining.
    • addAllFulfillmentTypes

      public LocalInventory.Builder addAllFulfillmentTypes(Iterable<String> values)
       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];
      Parameters:
      values - The fulfillmentTypes to add.
      Returns:
      This builder for chaining.
    • clearFulfillmentTypes

      public LocalInventory.Builder clearFulfillmentTypes()
       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];
      Returns:
      This builder for chaining.
    • addFulfillmentTypesBytes

      public LocalInventory.Builder addFulfillmentTypesBytes(com.google.protobuf.ByteString value)
       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];
      Parameters:
      value - The bytes of the fulfillmentTypes to add.
      Returns:
      This builder for chaining.