# Google Shopping Merchant DataSources V1beta Client - Class Destination (2.0.0)

2.0.0 (latest) 1.3.1 1.2.1 1.1.1 1.0.0 0.6.0 0.5.1 0.4.0 0.3.1 0.2.3 0.1.0

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

Reference documentation and code samples for the Google Shopping Merchant DataSources V1beta Client class Destination.

Destinations also known as [Marketing
methods](https://support.google.com/merchants/answer/15130232) selections.

Generated from protobuf message `google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination`

## Namespace

Google \\ Shopping \\ Merchant \\ DataSources \\ V1beta \\ PrimaryProductDataSource

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ destination` | `int` [Marketing methods](https://support.google.com/merchants/answer/15130232) (also known as destination) selections. |
| `↳ state` | `int` The state of the destination. |

### getDestination

[Marketing methods](https://support.google.com/merchants/answer/15130232)
(also known as destination) selections.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [DestinationEnum](https://docs.cloud.google.com/php/docs/reference/shopping-common-protos/latest/Type.Destination.DestinationEnum.html). |

### setDestination

[Marketing methods](https://support.google.com/merchants/answer/15130232)
(also known as destination) selections.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [DestinationEnum](https://docs.cloud.google.com/php/docs/reference/shopping-common-protos/latest/Type.Destination.DestinationEnum.html). |

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

### getState

The state of the destination.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [State](https://docs.cloud.google.com/php/docs/reference/shopping-merchant-datasources/latest/V1beta.PrimaryProductDataSource.Destination.State). |

### setState

The state of the destination.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [State](https://docs.cloud.google.com/php/docs/reference/shopping-merchant-datasources/latest/V1beta.PrimaryProductDataSource.Destination.State). |

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