# Google Cloud Retail V2 Client - Class FrequentlyBoughtTogetherFeaturesConfig (2.5.3)

2.5.3 (latest) 2.5.2 2.4.0 2.3.1 2.2.1 2.1.3 2.0.0 1.7.0 1.6.4 1.5.0 1.4.2 1.3.1 1.2.1 1.1.1 1.0.1 Reference documentation and code samples for the Google Cloud Retail V2 Client class FrequentlyBoughtTogetherFeaturesConfig.

Additional configs for the frequently-bought-together model type.

Generated from protobuf message `google.cloud.retail.v2.Model.FrequentlyBoughtTogetherFeaturesConfig`

## Namespace

Google \\ Cloud \\ Retail \\ V2 \\ Model

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ context_products_type` | `int` Optional. Specifies the context of the model when it is used in predict requests. Can only be set for the `frequently-bought-together` type. If it isn't specified, it defaults to [MULTIPLE_CONTEXT_PRODUCTS](https://docs.cloud.google.com/php/docs/reference/cloud-retail/latest/V2.Model.ContextProductsType#_Google_Cloud_Retail_V2_Model_ContextProductsType__MULTIPLE_CONTEXT_PRODUCTS). |

### getContextProductsType

Optional. Specifies the context of the model when it is used in predict
requests. Can only be set for the `frequently-bought-together` type. If
it isn't specified, it defaults to
[MULTIPLE_CONTEXT_PRODUCTS](https://docs.cloud.google.com/php/docs/reference/cloud-retail/latest/V2.Model.ContextProductsType#_Google_Cloud_Retail_V2_Model_ContextProductsType__MULTIPLE_CONTEXT_PRODUCTS).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [ContextProductsType](https://docs.cloud.google.com/php/docs/reference/cloud-retail/latest/V2.Model.ContextProductsType). |

### setContextProductsType

Optional. Specifies the context of the model when it is used in predict
requests. Can only be set for the `frequently-bought-together` type. If
it isn't specified, it defaults to
[MULTIPLE_CONTEXT_PRODUCTS](https://docs.cloud.google.com/php/docs/reference/cloud-retail/latest/V2.Model.ContextProductsType#_Google_Cloud_Retail_V2_Model_ContextProductsType__MULTIPLE_CONTEXT_PRODUCTS).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [ContextProductsType](https://docs.cloud.google.com/php/docs/reference/cloud-retail/latest/V2.Model.ContextProductsType). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |