# Google Shopping Merchant DataSources V1beta Client - Class FetchSettings (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 FetchSettings.

Fetch details to deliver the data source.

Generated from protobuf message `google.shopping.merchant.datasources.v1beta.FileInput.FetchSettings`

## Namespace

Google \\ Shopping \\ Merchant \\ DataSources \\ V1beta \\ FileInput

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ enabled` | `bool` Optional. Enables or pauses the fetch schedule. |
| `↳ day_of_month` | `int` Optional. The day of the month when the data source file should be fetched (1-31). This field can only be set for monthly frequency. |
| `↳ time_of_day` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.TimeOfDay.html` Optional. The hour of the day when the data source file should be fetched. Minutes and seconds are not supported and will be ignored. |
| `↳ day_of_week` | `int` Optional. The day of the week when the data source file should be fetched. This field can only be set for weekly frequency. |
| `↳ time_zone` | `string` Optional. [Time zone](https://cldr.unicode.org) used for schedule. UTC by default. For example, "America/Los_Angeles". |
| `↳ frequency` | `int` Required. The frequency describing fetch schedule. |
| `↳ fetch_uri` | `string` Optional. The URL where the data source file can be fetched. Google Merchant Center supports automatic scheduled uploads using the HTTP, HTTPS or SFTP protocols, so the value will need to be a valid link using one of those three protocols. Immutable for Google Sheets files. |
| `↳ username` | `string` Optional. An optional user name for [fetch_uri](https://docs.cloud.google.com/php/docs/reference/shopping-merchant-datasources/latest/V1beta.FileInput.FetchSettings#_Google_Shopping_Merchant_DataSources_V1beta_FileInput_FetchSettings__getFetchUri__). Used for [submitting data sources through SFTP](https://support.google.com/merchants/answer/13813117). |
| `↳ password` | `string` Optional. An optional password for [fetch_uri](https://docs.cloud.google.com/php/docs/reference/shopping-merchant-datasources/latest/V1beta.FileInput.FetchSettings#_Google_Shopping_Merchant_DataSources_V1beta_FileInput_FetchSettings__getFetchUri__). Used for [submitting data sources through SFTP](https://support.google.com/merchants/answer/13813117). |

### getEnabled

Optional. Enables or pauses the fetch schedule.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setEnabled

Optional. Enables or pauses the fetch schedule.

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

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

### getDayOfMonth

Optional. The day of the month when the data source file should be
fetched (1-31). This field can only be set for monthly frequency.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setDayOfMonth

Optional. The day of the month when the data source file should be
fetched (1-31). This field can only be set for monthly frequency.

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

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

### getTimeOfDay

Optional. The hour of the day when the data source file should be
fetched. Minutes and seconds are not supported and will be ignored.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.TimeOfDay.html|null` |   |

### hasTimeOfDay

### clearTimeOfDay

### setTimeOfDay

Optional. The hour of the day when the data source file should be
fetched. Minutes and seconds are not supported and will be ignored.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.TimeOfDay.html` |

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

### getDayOfWeek

Optional. The day of the week when the data source file should be
fetched. This field can only be set for weekly frequency.

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

### setDayOfWeek

Optional. The day of the week when the data source file should be
fetched. This field can only be set for weekly frequency.

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

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

### getTimeZone

Optional. [Time zone](https://cldr.unicode.org) used for schedule. UTC by
default. For example, "America/Los_Angeles".

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

### setTimeZone

Optional. [Time zone](https://cldr.unicode.org) used for schedule. UTC by
default. For example, "America/Los_Angeles".

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

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

### getFrequency

Required. The frequency describing fetch schedule.

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

### setFrequency

Required. The frequency describing fetch schedule.

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

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

### getFetchUri

Optional. The URL where the data source file can be fetched. Google
Merchant Center supports automatic scheduled uploads using the HTTP,
HTTPS or SFTP protocols, so the value will need to be a valid link using
one of those three protocols. Immutable for Google Sheets files.

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

### setFetchUri

Optional. The URL where the data source file can be fetched. Google
Merchant Center supports automatic scheduled uploads using the HTTP,
HTTPS or SFTP protocols, so the value will need to be a valid link using
one of those three protocols. Immutable for Google Sheets files.

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

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

### getUsername

Optional. An optional user name for
[fetch_uri](https://docs.cloud.google.com/php/docs/reference/shopping-merchant-datasources/latest/V1beta.FileInput.FetchSettings#_Google_Shopping_Merchant_DataSources_V1beta_FileInput_FetchSettings__getFetchUri__).

Used for [submitting data sources through
SFTP](https://support.google.com/merchants/answer/13813117).

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

### setUsername

Optional. An optional user name for
[fetch_uri](https://docs.cloud.google.com/php/docs/reference/shopping-merchant-datasources/latest/V1beta.FileInput.FetchSettings#_Google_Shopping_Merchant_DataSources_V1beta_FileInput_FetchSettings__getFetchUri__).

Used for [submitting data sources through
SFTP](https://support.google.com/merchants/answer/13813117).

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

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

### getPassword

Optional. An optional password for
[fetch_uri](https://docs.cloud.google.com/php/docs/reference/shopping-merchant-datasources/latest/V1beta.FileInput.FetchSettings#_Google_Shopping_Merchant_DataSources_V1beta_FileInput_FetchSettings__getFetchUri__).

Used for [submitting data sources through
SFTP](https://support.google.com/merchants/answer/13813117).

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

### setPassword

Optional. An optional password for
[fetch_uri](https://docs.cloud.google.com/php/docs/reference/shopping-merchant-datasources/latest/V1beta.FileInput.FetchSettings#_Google_Shopping_Merchant_DataSources_V1beta_FileInput_FetchSettings__getFetchUri__).

Used for [submitting data sources through
SFTP](https://support.google.com/merchants/answer/13813117).

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

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