# Interface ProductCatalogItemOrBuilder (0.100.0)

0.100.0 (latest) 0.98.0 0.95.0 0.94.0 0.92.0 0.90.0 0.89.0 0.87.0 0.85.0 0.83.0 0.82.0 0.81.0 0.80.0 0.79.0 0.77.0 0.75.0 0.74.0 0.71.0 0.70.0 0.69.0 0.67.0 0.66.0 0.65.0 0.64.0 0.63.0 0.62.0 0.61.0 0.60.0 0.59.0 0.58.0 0.56.0 0.55.0 0.54.0 0.53.0 0.52.0 0.51.0 0.50.0 0.49.0 0.48.0 0.47.0 0.46.0 0.44.0 0.43.0 0.42.0 0.41.0 0.40.0 0.39.0 0.38.0 0.37.0 0.36.0 0.35.0 0.34.0 0.31.0 0.30.0 0.29.0 0.28.0 0.27.0 0.26.0 0.25.0 0.24.0 0.23.0 0.22.0 0.21.0 0.20.0 0.19.0 0.18.0 0.16.0 0.15.0 0.14.0 0.13.0 0.12.0 0.11.0 0.10.4 0.8.10

    public interface ProductCatalogItemOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### containsCosts(String key)

    public abstract 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` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getAvailableQuantity()

    public abstract long getAvailableQuantity()

Optional. The available quantity of the item.

`int64 available_quantity = 6 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The availableQuantity. |

### getCanonicalProductUri()

    public abstract 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** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The canonicalProductUri. |

### getCanonicalProductUriBytes()

    public abstract 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** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for canonicalProductUri. |

### getCosts() (deprecated)

    public abstract Map<String,Float> getCosts()

Use [#getCostsMap()](https://docs.cloud.google.com/java/docs/reference/google-cloud-recommendations-ai/latest/com.google.cloud.recommendationengine.v1beta1.ProductCatalogItemOrBuilder#com_google_cloud_recommendationengine_v1beta1_ProductCatalogItemOrBuilder_getCostsMap__) instead.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.oracle.com/javase/8/docs/api/java/lang/Float.html>` |   |

### getCostsCount()

    public abstract 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** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getCostsMap()

    public abstract 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];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.oracle.com/javase/8/docs/api/java/lang/Float.html>` |   |

### getCostsOrDefault(String key, float defaultValue)

    public abstract 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];`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |
| `defaultValue` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getCostsOrThrow(String key)

    public abstract 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` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getCurrencyCode()

    public abstract 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** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The currencyCode. |

### getCurrencyCodeBytes()

    public abstract 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** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for currencyCode. |

### getExactPrice()

    public abstract ProductCatalogItem.ExactPrice getExactPrice()

Optional. The exact product price.

`
.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.ExactPrice exact_price = 1 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-recommendations-ai/latest/com.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.ExactPrice` | The exactPrice. |

### getExactPriceOrBuilder()

    public abstract ProductCatalogItem.ExactPriceOrBuilder getExactPriceOrBuilder()

Optional. The exact product price.

`
.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.ExactPrice exact_price = 1 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-recommendations-ai/latest/com.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.ExactPriceOrBuilder` |   |

### getImages(int index)

    public abstract 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` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-recommendations-ai/latest/com.google.cloud.recommendationengine.v1beta1.Image` |   |

### getImagesCount()

    public abstract 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** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getImagesList()

    public abstract List<Image> getImagesList()

Optional. Product images for the catalog item.

`
repeated .google.cloud.recommendationengine.v1beta1.Image images = 8 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-recommendations-ai/latest/com.google.cloud.recommendationengine.v1beta1.Image>` |   |

### getImagesOrBuilder(int index)

    public abstract 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` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-recommendations-ai/latest/com.google.cloud.recommendationengine.v1beta1.ImageOrBuilder` |   |

### getImagesOrBuilderList()

    public abstract 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** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<? extends com.google.cloud.recommendationengine.v1beta1.ImageOrBuilder>` |   |

### getPriceCase()

    public abstract ProductCatalogItem.PriceCase getPriceCase()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-recommendations-ai/latest/com.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.PriceCase` |   |

### getPriceRange()

    public abstract ProductCatalogItem.PriceRange getPriceRange()

Optional. The product price range.

`
.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.PriceRange price_range = 2 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-recommendations-ai/latest/com.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.PriceRange` | The priceRange. |

### getPriceRangeOrBuilder()

    public abstract ProductCatalogItem.PriceRangeOrBuilder getPriceRangeOrBuilder()

Optional. The product price range.

`
.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.PriceRange price_range = 2 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-recommendations-ai/latest/com.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.PriceRangeOrBuilder` |   |

### getStockState()

    public abstract 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];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-recommendations-ai/latest/com.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.StockState` | The stockState. |

### getStockStateValue()

    public abstract 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** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for stockState. |

### hasExactPrice()

    public abstract boolean hasExactPrice()

Optional. The exact product price.

`
.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.ExactPrice exact_price = 1 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the exactPrice field is set. |

### hasPriceRange()

    public abstract boolean hasPriceRange()

Optional. The product price range.

`
.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.PriceRange price_range = 2 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the priceRange field is set. |