Builder for [Topic](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_topic) objects.

Example usage:

```
var topicBuilder = adGroup.display().newTopicBuilder();
var topic = topicBuilder
  .withTopicId(3)                 // required
  .withCpc(0.50)                  // optional
  .build()                        // create the topic
```

### Methods:

| Member | Type | Description |
|---|---|---|
| [build()](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_topicbuilder#build) | `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_topicoperation` | Builds the topic. |
| [exclude()](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_topicbuilder#exclude) | `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_excludedtopicoperation` | Builds the excluded topic. |
| [withCpc(cpc)](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_topicbuilder#withCpc_cpc) | `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_topicbuilder` | Sets the max CPC bid of the new topic to the specified value. |
| [withCpm(cpm)](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_topicbuilder#withCpm_cpm) | `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_topicbuilder` | Sets the CPM bid of the new topic to the specified value. |
| [withTopicId(topicId)](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_topicbuilder#withTopicId_topicId) | `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_topicbuilder` | Sets the topic ID of the topic. |

## `build()`

Builds the topic. Returns a [TopicOperation](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_topicoperation) that corresponds to the creation of the [Topic](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_topic).

### Return values:

| Type | Description |
|---|---|
| `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_topicoperation` | The TopicOperation. |

## `exclude()`

Builds the excluded topic. Returns an [ExcludedTopicOperation](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_excludedtopicoperation) that corresponds to the creation of the [ExcludedTopic](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_excludedtopic).

### Return values:

| Type | Description |
|---|---|
| `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_excludedtopicoperation` | The ExcludedTopicOperation. |

## `withCpc(cpc)`

Sets the max CPC bid of the new topic to the specified value.

### Arguments:

| Name | Type | Description |
|---|---|---|
| cpc | `double` | The max CPC bid of the topic. |

### Return values:

| Type | Description |
|---|---|
| `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_topicbuilder` | The topic builder with the specified max CPC. |

## `withCpm(cpm)`

Sets the CPM bid of the new topic to the specified value.

See [Cost-per-thousand
impressions (CPM)](https://support.google.com/google-ads/answer/6310) for more information.

### Arguments:

| Name | Type | Description |
|---|---|---|
| cpm | `double` | The CPM bid of the topic. |

### Return values:

| Type | Description |
|---|---|
| `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_topicbuilder` | The topic builder with the specified CPM. |

## `withTopicId(topicId)`

Sets the topic ID of the topic. This field is required. The topic ID identifies the topic category. A list of valid topic IDs is available on our [Verticals](https://developers.google.com/google-ads/api/reference/data/verticals) page.

### Arguments:

| Name | Type | Description |
|---|---|---|
| topicId | `String` | The topic ID of the topic. |

### Return values:

| Type | Description |
|---|---|
| `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_topicbuilder` | A TopicBuilder with the specified topic ID. |