0.17.0 (latest) 0.16.0 0.15.1 0.14.1 0.8.0 0.7.0 0.6.2 0.5.0 0.4.1 0.3.1 0.2.0 0.1.3 Reference documentation and code samples for the Google Ads Ad Manager V1 Client class Value.

Represent custom field value type.

Generated from protobuf message `google.ads.admanager.v1.CustomFieldValue.Value`

## Namespace

Google \\ Ads \\ AdManager \\ V1 \\ CustomFieldValue

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ dropdown_value` | `int|string` The custom_field_option_id, if the [CustomFieldDataType](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.CustomFieldDataTypeEnum.CustomFieldDataType.md.txt) is DROPDOWN. |
| `↳ string_value` | `string` The value, if the [CustomFieldDataType](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.CustomFieldDataTypeEnum.CustomFieldDataType.md.txt) is [STRING](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.CustomFieldDataTypeEnum.CustomFieldDataType.md.txt#_Google_Ads_AdManager_V1_CustomFieldDataTypeEnum_CustomFieldDataType__STRING). |
| `↳ number_value` | `float` The value, if the [CustomFieldDataType](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.CustomFieldDataTypeEnum.CustomFieldDataType.md.txt) is [NUMBER](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.CustomFieldDataTypeEnum.CustomFieldDataType.md.txt#_Google_Ads_AdManager_V1_CustomFieldDataTypeEnum_CustomFieldDataType__NUMBER). |
| `↳ toggle_value` | `bool` The value, if the [CustomFieldDataType](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.CustomFieldDataTypeEnum.CustomFieldDataType.md.txt) is [TOGGLE](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.CustomFieldDataTypeEnum.CustomFieldDataType.md.txt#_Google_Ads_AdManager_V1_CustomFieldDataTypeEnum_CustomFieldDataType__TOGGLE). |

### getDropdownValue

The custom_field_option_id, if the
[CustomFieldDataType](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.CustomFieldDataTypeEnum.CustomFieldDataType.md.txt)
is DROPDOWN.

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

### hasDropdownValue

### setDropdownValue

The custom_field_option_id, if the
[CustomFieldDataType](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.CustomFieldDataTypeEnum.CustomFieldDataType.md.txt)
is DROPDOWN.

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

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

### getStringValue

The value, if the
[CustomFieldDataType](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.CustomFieldDataTypeEnum.CustomFieldDataType.md.txt)
is
[STRING](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.CustomFieldDataTypeEnum.CustomFieldDataType.md.txt#_Google_Ads_AdManager_V1_CustomFieldDataTypeEnum_CustomFieldDataType__STRING).

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

### hasStringValue

### setStringValue

The value, if the
[CustomFieldDataType](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.CustomFieldDataTypeEnum.CustomFieldDataType.md.txt)
is
[STRING](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.CustomFieldDataTypeEnum.CustomFieldDataType.md.txt#_Google_Ads_AdManager_V1_CustomFieldDataTypeEnum_CustomFieldDataType__STRING).

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

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

### getNumberValue

The value, if the
[CustomFieldDataType](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.CustomFieldDataTypeEnum.CustomFieldDataType.md.txt)
is
[NUMBER](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.CustomFieldDataTypeEnum.CustomFieldDataType.md.txt#_Google_Ads_AdManager_V1_CustomFieldDataTypeEnum_CustomFieldDataType__NUMBER).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### hasNumberValue

### setNumberValue

The value, if the
[CustomFieldDataType](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.CustomFieldDataTypeEnum.CustomFieldDataType.md.txt)
is
[NUMBER](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.CustomFieldDataTypeEnum.CustomFieldDataType.md.txt#_Google_Ads_AdManager_V1_CustomFieldDataTypeEnum_CustomFieldDataType__NUMBER).

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

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

### getToggleValue

The value, if the
[CustomFieldDataType](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.CustomFieldDataTypeEnum.CustomFieldDataType.md.txt)
is
[TOGGLE](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.CustomFieldDataTypeEnum.CustomFieldDataType.md.txt#_Google_Ads_AdManager_V1_CustomFieldDataTypeEnum_CustomFieldDataType__TOGGLE).

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

### hasToggleValue

### setToggleValue

The value, if the
[CustomFieldDataType](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.CustomFieldDataTypeEnum.CustomFieldDataType.md.txt)
is
[TOGGLE](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.CustomFieldDataTypeEnum.CustomFieldDataType.md.txt#_Google_Ads_AdManager_V1_CustomFieldDataTypeEnum_CustomFieldDataType__TOGGLE).

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

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

### getValue

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