Class LocalInventory

  • All Implemented Interfaces:
    LocalInventoryOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class LocalInventory
    extends com.google.protobuf.GeneratedMessageV3
    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:
    Serialized Form
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

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

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3
      • internalGetFieldAccessorTable

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

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

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

        public boolean hasPriceInfo()
         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;
        Specified by:
        hasPriceInfo in interface LocalInventoryOrBuilder
        Returns:
        Whether the priceInfo field is set.
      • getPriceInfo

        public PriceInfo getPriceInfo()
         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;
        Specified by:
        getPriceInfo in interface LocalInventoryOrBuilder
        Returns:
        The priceInfo.
      • getPriceInfoOrBuilder

        public PriceInfoOrBuilder getPriceInfoOrBuilder()
         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;
        Specified by:
        getPriceInfoOrBuilder in interface LocalInventoryOrBuilder
      • getAttributesCount

        public int getAttributesCount()
        Description copied from interface: LocalInventoryOrBuilder
         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;
        Specified by:
        getAttributesCount in interface LocalInventoryOrBuilder
      • containsAttributes

        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][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;
        Specified by:
        containsAttributes in interface LocalInventoryOrBuilder
      • 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][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;
        Specified by:
        getAttributesMap in interface LocalInventoryOrBuilder
      • getAttributesOrDefault

        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][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;
        Specified by:
        getAttributesOrDefault in interface LocalInventoryOrBuilder
      • getAttributesOrThrow

        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][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;
        Specified by:
        getAttributesOrThrow in interface LocalInventoryOrBuilder
      • getFulfillmentTypesList

        public com.google.protobuf.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];
        Specified by:
        getFulfillmentTypesList in interface LocalInventoryOrBuilder
        Returns:
        A list containing the fulfillmentTypes.
      • 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];
        Specified by:
        getFulfillmentTypesCount in interface LocalInventoryOrBuilder
        Returns:
        The count of fulfillmentTypes.
      • getFulfillmentTypes

        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];
        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)
         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];
        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.GeneratedMessageV3
      • 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.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • 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​(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
      • 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.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • 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.GeneratedMessageV3
      • getDefaultInstanceForType

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