# Recommendations AI v1beta1 API - Class ProductDetail (2.0.0-beta07)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.0.0-beta07 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.ProductDetail)
- [2.0.0-beta06](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/2.0.0-beta06/Google.Cloud.RecommendationEngine.V1Beta1.ProductDetail)
- [1.0.0-beta03](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/1.0.0-beta03/Google.Cloud.RecommendationEngine.V1Beta1.ProductDetail)

    public sealed class ProductDetail : IMessage<ProductDetail>, IEquatable<ProductDetail>, IDeepCloneable<ProductDetail>, IBufferMessage, IMessage

Reference documentation and code samples for the Recommendations AI v1beta1 API class ProductDetail.

Detailed product information associated with a user event.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> ProductDetail

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[ProductDetail](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.ProductDetail), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[ProductDetail](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.ProductDetail), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[ProductDetail](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.ProductDetail), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.RecommendationEngine.V1Beta1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1)

## Assembly

Google.Cloud.RecommendationEngine.V1Beta1.dll

## Constructors

### ProductDetail()

    public ProductDetail()

### ProductDetail(ProductDetail)

    public ProductDetail(ProductDetail other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.ProductDetail` |

## Properties

### AvailableQuantity

    public int AvailableQuantity { get; set; }

Optional. Quantity of the products in stock when a user event happens.
Optional. If provided, this overrides the available quantity in Catalog for
this event. and can only be set if `stock_status` is set to `IN_STOCK`.

Note that if an item is out of stock, you must set the `stock_state` field
to be `OUT_OF_STOCK`. Leaving this field unspecified / as zero is not
sufficient to mark the item out of stock.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### CurrencyCode

    public string CurrencyCode { get; set; }

Optional. Currency code for price/costs. Use three-character ISO-4217
code. Required only if originalPrice or displayPrice is set.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### DisplayPrice

    public float DisplayPrice { get; set; }

Optional. Display price of the product (e.g. discounted price). If
provided, this will override the display price in Catalog for this product.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.single` |   |

### Id

    public string Id { get; set; }

Required. Catalog item ID. UTF-8 encoded string with a length limit of 128
characters.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### ItemAttributes

    public FeatureMap ItemAttributes { get; set; }

Optional. Extra features associated with a product in the user event.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.FeatureMap` |   |

### OriginalPrice

    public float OriginalPrice { get; set; }

Optional. Original price of the product. If provided, this will override
the original price in Catalog for this product.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.single` |   |

### Quantity

    public int Quantity { get; set; }

Optional. Quantity of the product associated with the user event. For
example, this field will be 2 if two products are added to the shopping
cart for `add-to-cart` event. Required for `add-to-cart`, `add-to-list`,
`remove-from-cart`, `checkout-start`, `purchase-complete`, `refund` event
types.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### StockState

    public ProductCatalogItem.Types.StockState StockState { get; set; }

Optional. Item stock state. If provided, this overrides the stock state
in Catalog for items in this event.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.ProductCatalogItemhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.ProductCatalogItem.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.ProductCatalogItem.Types.StockState` |   |