# Google Shopping Merchant Products V1beta Client - Class InsertProductInputRequest (1.6.0)

1.6.0 (latest) 1.5.0 1.4.1 1.3.1 1.2.0 1.1.0 1.0.0 0.7.0 0.6.1 0.5.0 0.4.0 0.3.0 0.2.1 0.1.1

> [!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 Products V1beta Client class InsertProductInputRequest.

Request message for the InsertProductInput method.

Generated from protobuf message `google.shopping.merchant.products.v1beta.InsertProductInputRequest`

## Namespace

Google \\ Shopping \\ Merchant \\ Products \\ V1beta

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ parent` | `string` Required. The account where this product will be inserted. Format: `accounts/{account}` |
| `↳ product_input` | `https://docs.cloud.google.com/php/docs/reference/shopping-merchant-products/latest/V1beta.ProductInput` Required. The product input to insert. |
| `↳ data_source` | `string` Required. The primary or supplemental product data source name. If the product already exists and data source provided is different, then the product will be moved to a new data source. For more information, see [Overview of Data sources sub-API](https://docs.cloud.google.com/merchant/api/guides/data-sources/overview). Only API data sources are supported. Format: `accounts/{account}/dataSources/{datasource}`. For example, `accounts/123456/dataSources/104628`. |

### getParent

Required. The account where this product will be inserted.

Format: `accounts/{account}`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setParent

Required. The account where this product will be inserted.

Format: `accounts/{account}`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

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

### getProductInput

Required. The product input to insert.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/shopping-merchant-products/latest/V1beta.ProductInput|null` |   |

### hasProductInput

### clearProductInput

### setProductInput

Required. The product input to insert.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/shopping-merchant-products/latest/V1beta.ProductInput` |

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

### getDataSource

Required. The primary or supplemental product data source name. If the
product already exists and data source provided is different, then the
product will be moved to a new data source. For more information, see
[Overview of Data sources
sub-API](https://docs.cloud.google.com/merchant/api/guides/data-sources/overview).

Only API data sources are supported.
Format: `accounts/{account}/dataSources/{datasource}`. For example,
`accounts/123456/dataSources/104628`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setDataSource

Required. The primary or supplemental product data source name. If the
product already exists and data source provided is different, then the
product will be moved to a new data source. For more information, see
[Overview of Data sources
sub-API](https://docs.cloud.google.com/merchant/api/guides/data-sources/overview).

Only API data sources are supported.
Format: `accounts/{account}/dataSources/{datasource}`. For example,
`accounts/123456/dataSources/104628`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

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