public final class ProductCatalogItem extends GeneratedMessageV3 implements ProductCatalogItemOrBuilder
ProductCatalogItem captures item metadata specific to retail products.
Protobuf type google.cloud.recommendationengine.v1beta1.ProductCatalogItem
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
Static Fields
AVAILABLE_QUANTITY_FIELD_NUMBER
public static final int AVAILABLE_QUANTITY_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
CANONICAL_PRODUCT_URI_FIELD_NUMBER
public static final int CANONICAL_PRODUCT_URI_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
COSTS_FIELD_NUMBER
public static final int COSTS_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
CURRENCY_CODE_FIELD_NUMBER
public static final int CURRENCY_CODE_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
EXACT_PRICE_FIELD_NUMBER
public static final int EXACT_PRICE_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
IMAGES_FIELD_NUMBER
public static final int IMAGES_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
PRICE_RANGE_FIELD_NUMBER
public static final int PRICE_RANGE_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
STOCK_STATE_FIELD_NUMBER
public static final int STOCK_STATE_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
Static Methods
getDefaultInstance()
public static ProductCatalogItem getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static ProductCatalogItem.Builder newBuilder()
newBuilder(ProductCatalogItem )
public static ProductCatalogItem.Builder newBuilder(ProductCatalogItem )
public static ProductCatalogItem parseDelimitedFrom(InputStream input)
public static ProductCatalogItem parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static ProductCatalogItem parseFrom(byte[] data)
Parameter |
---|
Name | Description |
data | byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static ProductCatalogItem parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static ProductCatalogItem parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static ProductCatalogItem parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static ProductCatalogItem parseFrom(CodedInputStream input)
public static ProductCatalogItem parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static ProductCatalogItem parseFrom(InputStream input)
public static ProductCatalogItem parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static ProductCatalogItem parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static ProductCatalogItem parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<ProductCatalogItem> parser()
Methods
containsCosts(String key)
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];
Parameter |
---|
Name | Description |
key | String
|
equals(Object obj)
public boolean equals(Object obj)
Parameter |
---|
Name | Description |
obj | Object
|
OverridesgetAvailableQuantity()
public long getAvailableQuantity()
Optional. The available quantity of the item.
int64 available_quantity = 6 [(.google.api.field_behavior) = OPTIONAL];
Returns |
---|
Type | Description |
long | 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];
Returns |
---|
Type | Description |
String | The canonicalProductUri. |
getCanonicalProductUriBytes()
public 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];
Returns |
---|
Type | Description |
ByteString | The bytes for canonicalProductUri. |
getCosts()
public Map<String,Float> getCosts()
getCostsCount()
public int getCostsCount()
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];
Returns |
---|
Type | Description |
int | |
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];
getCostsOrDefault(String key, float defaultValue)
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];
Returns |
---|
Type | Description |
float | |
getCostsOrThrow(String key)
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];
Parameter |
---|
Name | Description |
key | String
|
Returns |
---|
Type | Description |
float | |
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];
Returns |
---|
Type | Description |
String | The currencyCode. |
getCurrencyCodeBytes()
public 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];
Returns |
---|
Type | Description |
ByteString | The bytes for currencyCode. |
getDefaultInstanceForType()
public ProductCatalogItem getDefaultInstanceForType()
getExactPrice()
public ProductCatalogItem.ExactPrice getExactPrice()
Optional. The exact product price.
.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.ExactPrice exact_price = 1 [(.google.api.field_behavior) = OPTIONAL];
getExactPriceOrBuilder()
public ProductCatalogItem.ExactPriceOrBuilder getExactPriceOrBuilder()
Optional. The exact product price.
.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.ExactPrice exact_price = 1 [(.google.api.field_behavior) = OPTIONAL];
getImages(int index)
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];
Parameter |
---|
Name | Description |
index | int
|
Returns |
---|
Type | Description |
Image | |
getImagesCount()
public int getImagesCount()
Optional. Product images for the catalog item.
repeated .google.cloud.recommendationengine.v1beta1.Image images = 8 [(.google.api.field_behavior) = OPTIONAL];
Returns |
---|
Type | Description |
int | |
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];
getImagesOrBuilder(int index)
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];
Parameter |
---|
Name | Description |
index | int
|
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];
Returns |
---|
Type | Description |
List<? extends com.google.cloud.recommendationengine.v1beta1.ImageOrBuilder> | |
getParserForType()
public Parser<ProductCatalogItem> getParserForType()
OverridesgetPriceCase()
public ProductCatalogItem.PriceCase getPriceCase()
getPriceRange()
public ProductCatalogItem.PriceRange getPriceRange()
Optional. The product price range.
.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.PriceRange price_range = 2 [(.google.api.field_behavior) = OPTIONAL];
getPriceRangeOrBuilder()
public ProductCatalogItem.PriceRangeOrBuilder getPriceRangeOrBuilder()
Optional. The product price range.
.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.PriceRange price_range = 2 [(.google.api.field_behavior) = OPTIONAL];
getSerializedSize()
public int getSerializedSize()
Returns |
---|
Type | Description |
int | |
OverridesgetStockState()
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];
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];
Returns |
---|
Type | Description |
int | The enum numeric value on the wire for stockState. |
hasExactPrice()
public boolean hasExactPrice()
Optional. The exact product price.
.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.ExactPrice exact_price = 1 [(.google.api.field_behavior) = OPTIONAL];
Returns |
---|
Type | Description |
boolean | Whether the exactPrice field is set. |
hasPriceRange()
public boolean hasPriceRange()
Optional. The product price range.
.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.PriceRange price_range = 2 [(.google.api.field_behavior) = OPTIONAL];
Returns |
---|
Type | Description |
boolean | Whether the priceRange field is set. |
hashCode()
Returns |
---|
Type | Description |
int | |
OverridesinternalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
OverridesinternalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter |
---|
Name | Description |
number | int
|
OverridesisInitialized()
public final boolean isInitialized()
OverridesnewBuilderForType()
public ProductCatalogItem.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected ProductCatalogItem.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
OverridesnewInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
OverridestoBuilder()
public ProductCatalogItem.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides