Class ProductCatalogItem
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- com.google.cloud.recommendationengine.v1beta1.ProductCatalogItem
-
- All Implemented Interfaces:
ProductCatalogItemOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
public final class ProductCatalogItem extends com.google.protobuf.GeneratedMessageV3 implements ProductCatalogItemOrBuilder
ProductCatalogItem captures item metadata specific to retail products.
Protobuf typegoogle.cloud.recommendationengine.v1beta1.ProductCatalogItem- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classProductCatalogItem.BuilderProductCatalogItem captures item metadata specific to retail products.static classProductCatalogItem.ExactPriceExact product price.static interfaceProductCatalogItem.ExactPriceOrBuilderstatic classProductCatalogItem.PriceCasestatic classProductCatalogItem.PriceRangeProduct price range when there are a range of prices for different variations of the same product.static interfaceProductCatalogItem.PriceRangeOrBuilderstatic classProductCatalogItem.StockStateItem stock state.-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static intAVAILABLE_QUANTITY_FIELD_NUMBERstatic intCANONICAL_PRODUCT_URI_FIELD_NUMBERstatic intCOSTS_FIELD_NUMBERstatic intCURRENCY_CODE_FIELD_NUMBERstatic intEXACT_PRICE_FIELD_NUMBERstatic intIMAGES_FIELD_NUMBERstatic intPRICE_RANGE_FIELD_NUMBERstatic intSTOCK_STATE_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleancontainsCosts(String key)Optional.booleanequals(Object obj)longgetAvailableQuantity()Optional.StringgetCanonicalProductUri()Optional.com.google.protobuf.ByteStringgetCanonicalProductUriBytes()Optional.Map<String,Float>getCosts()Deprecated.intgetCostsCount()Optional.Map<String,Float>getCostsMap()Optional.floatgetCostsOrDefault(String key, float defaultValue)Optional.floatgetCostsOrThrow(String key)Optional.StringgetCurrencyCode()Optional.com.google.protobuf.ByteStringgetCurrencyCodeBytes()Optional.static ProductCatalogItemgetDefaultInstance()ProductCatalogItemgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()ProductCatalogItem.ExactPricegetExactPrice()Optional.ProductCatalogItem.ExactPriceOrBuildergetExactPriceOrBuilder()Optional.ImagegetImages(int index)Optional.intgetImagesCount()Optional.List<Image>getImagesList()Optional.ImageOrBuildergetImagesOrBuilder(int index)Optional.List<? extends ImageOrBuilder>getImagesOrBuilderList()Optional.com.google.protobuf.Parser<ProductCatalogItem>getParserForType()ProductCatalogItem.PriceCasegetPriceCase()ProductCatalogItem.PriceRangegetPriceRange()Optional.ProductCatalogItem.PriceRangeOrBuildergetPriceRangeOrBuilder()Optional.intgetSerializedSize()ProductCatalogItem.StockStategetStockState()Optional.intgetStockStateValue()Optional.booleanhasExactPrice()Optional.inthashCode()booleanhasPriceRange()Optional.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()protected com.google.protobuf.MapFieldinternalGetMapField(int number)booleanisInitialized()static ProductCatalogItem.BuildernewBuilder()static ProductCatalogItem.BuildernewBuilder(ProductCatalogItem prototype)ProductCatalogItem.BuildernewBuilderForType()protected ProductCatalogItem.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static ProductCatalogItemparseDelimitedFrom(InputStream input)static ProductCatalogItemparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static ProductCatalogItemparseFrom(byte[] data)static ProductCatalogItemparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static ProductCatalogItemparseFrom(com.google.protobuf.ByteString data)static ProductCatalogItemparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static ProductCatalogItemparseFrom(com.google.protobuf.CodedInputStream input)static ProductCatalogItemparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static ProductCatalogItemparseFrom(InputStream input)static ProductCatalogItemparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static ProductCatalogItemparseFrom(ByteBuffer data)static ProductCatalogItemparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<ProductCatalogItem>parser()ProductCatalogItem.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
EXACT_PRICE_FIELD_NUMBER
public static final int EXACT_PRICE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PRICE_RANGE_FIELD_NUMBER
public static final int PRICE_RANGE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
COSTS_FIELD_NUMBER
public static final int COSTS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
CURRENCY_CODE_FIELD_NUMBER
public static final int CURRENCY_CODE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
STOCK_STATE_FIELD_NUMBER
public static final int STOCK_STATE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
AVAILABLE_QUANTITY_FIELD_NUMBER
public static final int AVAILABLE_QUANTITY_FIELD_NUMBER
- See Also:
- Constant Field Values
-
CANONICAL_PRODUCT_URI_FIELD_NUMBER
public static final int CANONICAL_PRODUCT_URI_FIELD_NUMBER
- See Also:
- Constant Field Values
-
IMAGES_FIELD_NUMBER
public static final int IMAGES_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetMapField
protected com.google.protobuf.MapField internalGetMapField(int number)
- Overrides:
internalGetMapFieldin classcom.google.protobuf.GeneratedMessageV3
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getPriceCase
public ProductCatalogItem.PriceCase getPriceCase()
- Specified by:
getPriceCasein interfaceProductCatalogItemOrBuilder
-
hasExactPrice
public boolean hasExactPrice()
Optional. The exact product price.
.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.ExactPrice exact_price = 1 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
hasExactPricein interfaceProductCatalogItemOrBuilder- Returns:
- Whether the exactPrice field is set.
-
getExactPrice
public ProductCatalogItem.ExactPrice getExactPrice()
Optional. The exact product price.
.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.ExactPrice exact_price = 1 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getExactPricein interfaceProductCatalogItemOrBuilder- Returns:
- The exactPrice.
-
getExactPriceOrBuilder
public ProductCatalogItem.ExactPriceOrBuilder getExactPriceOrBuilder()
Optional. The exact product price.
.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.ExactPrice exact_price = 1 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getExactPriceOrBuilderin interfaceProductCatalogItemOrBuilder
-
hasPriceRange
public boolean hasPriceRange()
Optional. The product price range.
.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.PriceRange price_range = 2 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
hasPriceRangein interfaceProductCatalogItemOrBuilder- Returns:
- Whether the priceRange field is set.
-
getPriceRange
public ProductCatalogItem.PriceRange getPriceRange()
Optional. The product price range.
.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.PriceRange price_range = 2 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getPriceRangein interfaceProductCatalogItemOrBuilder- Returns:
- The priceRange.
-
getPriceRangeOrBuilder
public ProductCatalogItem.PriceRangeOrBuilder getPriceRangeOrBuilder()
Optional. The product price range.
.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.PriceRange price_range = 2 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getPriceRangeOrBuilderin interfaceProductCatalogItemOrBuilder
-
getCostsCount
public int getCostsCount()
Description copied from interface:ProductCatalogItemOrBuilderOptional. A map to pass the costs associated with the product. For example: {"manufacturing": 45.5} The profit of selling this item is computed like so: * If 'exactPrice' is provided, profit = displayPrice - sum(costs) * If 'priceRange' is provided, profit = minPrice - sum(costs)map<string, float> costs = 3 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getCostsCountin interfaceProductCatalogItemOrBuilder
-
containsCosts
public boolean containsCosts(String key)
Optional. A map to pass the costs associated with the product. For example: {"manufacturing": 45.5} The profit of selling this item is computed like so: * If 'exactPrice' is provided, profit = displayPrice - sum(costs) * If 'priceRange' is provided, profit = minPrice - sum(costs)map<string, float> costs = 3 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
containsCostsin interfaceProductCatalogItemOrBuilder
-
getCosts
@Deprecated public Map<String,Float> getCosts()
Deprecated.UsegetCostsMap()instead.- Specified by:
getCostsin interfaceProductCatalogItemOrBuilder
-
getCostsMap
public Map<String,Float> getCostsMap()
Optional. A map to pass the costs associated with the product. For example: {"manufacturing": 45.5} The profit of selling this item is computed like so: * If 'exactPrice' is provided, profit = displayPrice - sum(costs) * If 'priceRange' is provided, profit = minPrice - sum(costs)map<string, float> costs = 3 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getCostsMapin interfaceProductCatalogItemOrBuilder
-
getCostsOrDefault
public float getCostsOrDefault(String key, float defaultValue)
Optional. A map to pass the costs associated with the product. For example: {"manufacturing": 45.5} The profit of selling this item is computed like so: * If 'exactPrice' is provided, profit = displayPrice - sum(costs) * If 'priceRange' is provided, profit = minPrice - sum(costs)map<string, float> costs = 3 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getCostsOrDefaultin interfaceProductCatalogItemOrBuilder
-
getCostsOrThrow
public float getCostsOrThrow(String key)
Optional. A map to pass the costs associated with the product. For example: {"manufacturing": 45.5} The profit of selling this item is computed like so: * If 'exactPrice' is provided, profit = displayPrice - sum(costs) * If 'priceRange' is provided, profit = minPrice - sum(costs)map<string, float> costs = 3 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getCostsOrThrowin interfaceProductCatalogItemOrBuilder
-
getCurrencyCode
public String getCurrencyCode()
Optional. Only required if the price is set. Currency code for price/costs. Use three-character ISO-4217 code.
string currency_code = 4 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getCurrencyCodein interfaceProductCatalogItemOrBuilder- Returns:
- The currencyCode.
-
getCurrencyCodeBytes
public com.google.protobuf.ByteString getCurrencyCodeBytes()
Optional. Only required if the price is set. Currency code for price/costs. Use three-character ISO-4217 code.
string currency_code = 4 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getCurrencyCodeBytesin interfaceProductCatalogItemOrBuilder- Returns:
- The bytes for currencyCode.
-
getStockStateValue
public int getStockStateValue()
Optional. Online stock state of the catalog item. Default is `IN_STOCK`.
.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.StockState stock_state = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getStockStateValuein interfaceProductCatalogItemOrBuilder- Returns:
- The enum numeric value on the wire for stockState.
-
getStockState
public ProductCatalogItem.StockState getStockState()
Optional. Online stock state of the catalog item. Default is `IN_STOCK`.
.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.StockState stock_state = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getStockStatein interfaceProductCatalogItemOrBuilder- Returns:
- The stockState.
-
getAvailableQuantity
public long getAvailableQuantity()
Optional. The available quantity of the item.
int64 available_quantity = 6 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getAvailableQuantityin interfaceProductCatalogItemOrBuilder- Returns:
- The availableQuantity.
-
getCanonicalProductUri
public String getCanonicalProductUri()
Optional. Canonical URL directly linking to the item detail page with a length limit of 5 KiB..
string canonical_product_uri = 7 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getCanonicalProductUriin interfaceProductCatalogItemOrBuilder- Returns:
- The canonicalProductUri.
-
getCanonicalProductUriBytes
public com.google.protobuf.ByteString getCanonicalProductUriBytes()
Optional. Canonical URL directly linking to the item detail page with a length limit of 5 KiB..
string canonical_product_uri = 7 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getCanonicalProductUriBytesin interfaceProductCatalogItemOrBuilder- Returns:
- The bytes for canonicalProductUri.
-
getImagesList
public List<Image> getImagesList()
Optional. Product images for the catalog item.
repeated .google.cloud.recommendationengine.v1beta1.Image images = 8 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getImagesListin interfaceProductCatalogItemOrBuilder
-
getImagesOrBuilderList
public List<? extends ImageOrBuilder> getImagesOrBuilderList()
Optional. Product images for the catalog item.
repeated .google.cloud.recommendationengine.v1beta1.Image images = 8 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getImagesOrBuilderListin interfaceProductCatalogItemOrBuilder
-
getImagesCount
public int getImagesCount()
Optional. Product images for the catalog item.
repeated .google.cloud.recommendationengine.v1beta1.Image images = 8 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getImagesCountin interfaceProductCatalogItemOrBuilder
-
getImages
public Image getImages(int index)
Optional. Product images for the catalog item.
repeated .google.cloud.recommendationengine.v1beta1.Image images = 8 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getImagesin interfaceProductCatalogItemOrBuilder
-
getImagesOrBuilder
public ImageOrBuilder getImagesOrBuilder(int index)
Optional. Product images for the catalog item.
repeated .google.cloud.recommendationengine.v1beta1.Image images = 8 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getImagesOrBuilderin interfaceProductCatalogItemOrBuilder
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static ProductCatalogItem parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ProductCatalogItem parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ProductCatalogItem parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ProductCatalogItem parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ProductCatalogItem parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ProductCatalogItem parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ProductCatalogItem parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static ProductCatalogItem parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static ProductCatalogItem parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static ProductCatalogItem parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static ProductCatalogItem parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static ProductCatalogItem parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public ProductCatalogItem.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static ProductCatalogItem.Builder newBuilder()
-
newBuilder
public static ProductCatalogItem.Builder newBuilder(ProductCatalogItem prototype)
-
toBuilder
public ProductCatalogItem.Builder toBuilder()
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected ProductCatalogItem.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static ProductCatalogItem getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<ProductCatalogItem> parser()
-
getParserForType
public com.google.protobuf.Parser<ProductCatalogItem> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public ProductCatalogItem getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-