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 CustomTargetingKey.

The `CustomTargetingKey` resource.

Generated from protobuf message `google.ads.admanager.v1.CustomTargetingKey`

## Namespace

Google \\ Ads \\ AdManager \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Identifier. The resource name of the `CustomTargetingKey`. Format: `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}` |
| `↳ custom_targeting_key_id` | `int|string` Output only. Deprecated: `CustomTargetingKey` ID. |
| `↳ ad_tag_name` | `string` Immutable. Name of the key. Keys can contain up to 10 characters each. You can use alphanumeric characters and symbols other than the following: ", ', =, !, +, #, \*, \~, ;, \^, (, ), \<, \>, \[, \], the white space character. |
| `↳ display_name` | `string` Optional. Descriptive name for the `CustomTargetingKey`. |
| `↳ type` | `int` Required. Indicates whether users will select from predefined values or create new targeting values, while specifying targeting criteria for a line item. |
| `↳ status` | `int` Output only. Status of the `CustomTargetingKey`. |
| `↳ reportable_type` | `int` Required. Reportable state of the `CustomTargetingKey`. |

### getName

Identifier. The resource name of the `CustomTargetingKey`.

Format:
`networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}`

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

### setName

Identifier. The resource name of the `CustomTargetingKey`.

Format:
`networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}`

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

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

### getCustomTargetingKeyId

Output only. Deprecated: `CustomTargetingKey` ID.

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

### hasCustomTargetingKeyId

### clearCustomTargetingKeyId

### setCustomTargetingKeyId

Output only. Deprecated: `CustomTargetingKey` ID.

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

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

### getAdTagName

Immutable. Name of the key. Keys can contain up to 10 characters each. You
can use alphanumeric characters and symbols other than the following:
", ', =, !, +, #, \*, \~, ;, \^, (, ), \<, \>, \[, \], the white space character.

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

### hasAdTagName

### clearAdTagName

### setAdTagName

Immutable. Name of the key. Keys can contain up to 10 characters each. You
can use alphanumeric characters and symbols other than the following:
", ', =, !, +, #, \*, \~, ;, \^, (, ), \<, \>, \[, \], the white space character.

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

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

### getDisplayName

Optional. Descriptive name for the `CustomTargetingKey`.

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

### hasDisplayName

### clearDisplayName

### setDisplayName

Optional. Descriptive name for the `CustomTargetingKey`.

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

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

### getType

Required. Indicates whether users will select from predefined values or
create new targeting values, while specifying targeting criteria for a line
item.

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

### hasType

### clearType

### setType

Required. Indicates whether users will select from predefined values or
create new targeting values, while specifying targeting criteria for a line
item.

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

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

### getStatus

Output only. Status of the `CustomTargetingKey`.

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

### hasStatus

### clearStatus

### setStatus

Output only. Status of the `CustomTargetingKey`.

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

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

### getReportableType

Required. Reportable state of the `CustomTargetingKey`.

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

### hasReportableType

### clearReportableType

### setReportableType

Required. Reportable state of the `CustomTargetingKey`.

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

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