Represents a Google Ads negative keyword.

Negative keywords can exist either at the ad group level or the campaign
level.


### Methods:

| Member | Type | Description |
|---|---|---|
| [getAdGroup()](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_negativekeyword#getAdGroup) | `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_adgroup` | Returns the [AdGroup](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_adgroup) to which the negative keyword belongs. |
| [getBaseAdGroup()](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_negativekeyword#getBaseAdGroup) | `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_adgroup` | Returns the base [AdGroup](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_adgroup) to which the negative keyword belongs. |
| [getBaseCampaign()](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_negativekeyword#getBaseCampaign) | `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_campaign` | Returns the base campaign to which this negative keyword belongs or `null` if it does not belong to a search or display campaign. |
| [getCampaign()](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_negativekeyword#getCampaign) | `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_campaign` | Returns the campaign to which this negative keyword belongs or `null` if it does not belong to a search or display campaign. |
| [getCampaignType()](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_negativekeyword#getCampaignType) | `String` | Returns the campaign type. |
| [getEntityType()](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_negativekeyword#getEntityType) | `String` | Returns the type of this entity as a `String`, in this case, `"NegativeKeyword"`. |
| [getMatchType()](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_negativekeyword#getMatchType) | `String` | Returns the match type of the negative keyword. |
| [getShoppingAdGroup()](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_negativekeyword#getShoppingAdGroup) | `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_shoppingadgroup` | Returns the [ShoppingAdGroup](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_shoppingadgroup) to which the negative keyword belongs. |
| [getShoppingCampaign()](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_negativekeyword#getShoppingCampaign) | `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_shoppingcampaign` | Returns the shopping campaign to which this negative keyword belongs or `null` if it does not belong to a shopping campaign. |
| [getText()](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_negativekeyword#getText) | `String` | Returns the text of the negative keyword. |
| [remove()](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_negativekeyword#remove) | `void` | Removes the negative keyword. |

## `getAdGroup()`

Returns the [AdGroup](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_adgroup) to which the negative keyword belongs. This will return `null` for campaign-level negative keywords and negative keywords which do not belong to a search or display ad group.

### Return values:

| Type | Description |
|---|---|
| `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_adgroup` | The [AdGroup](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_adgroup) to which the negative keyword belongs. |

## `getBaseAdGroup()`

Returns the base [AdGroup](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_adgroup) to which the negative keyword belongs. This will return `null` for campaign-level negative keywords and negative keywords which do not belong to a search or display ad group.

### Return values:

| Type | Description |
|---|---|
| `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_adgroup` | The base [AdGroup](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_adgroup) to which the negative keyword belongs. |

## `getBaseCampaign()`

Returns the base campaign to which this negative keyword belongs or `null` if it does not belong to a search or display campaign.

### Return values:

| Type | Description |
|---|---|
| `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_campaign` | The base campaign to which this negative keyword belongs or `null` if it does not belong to a search or display campaign. |

## `getCampaign()`

Returns the campaign to which this negative keyword belongs or `null` if it does not belong to a search or display campaign.

### Return values:

| Type | Description |
|---|---|
| `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_campaign` | The campaign to which this negative keyword belongs or `null` if it does not belong to a search or display campaign. |

## `getCampaignType()`

Returns the campaign type. Possible return values:

`SEARCH_OR_DISPLAY, VIDEO, SHOPPING`

### Return values:

| Type | Description |
|---|---|
| `String` | Video campaign type. |

## `getEntityType()`

Returns the type of this entity as a `String`, in this case, `"NegativeKeyword"`.

### Return values:

| Type | Description |
|---|---|
| `String` | Type of this entity: `"NegativeKeyword"`. |

## `getMatchType()`

Returns the match type of the negative keyword. Possible values: `BROAD, PHRASE, EXACT`.

### Return values:

| Type | Description |
|---|---|
| `String` | The match type of the negative keyword. |

## `getShoppingAdGroup()`

Returns the [ShoppingAdGroup](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_shoppingadgroup) to which the negative keyword belongs. This will return `null` for campaign-level negative keywords and negative keywords which do not belong to a shopping ad group.

### Return values:

| Type | Description |
|---|---|
| `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_shoppingadgroup` | The [ShoppingAdGroup](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_shoppingadgroup) to which the negative keyword belongs. |

## `getShoppingCampaign()`

Returns the shopping campaign to which this negative keyword belongs or `null` if it does not belong to a shopping campaign.

### Return values:

| Type | Description |
|---|---|
| `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_shoppingcampaign` | The shopping campaign to which this negative keyword belongs or `null` if it does not belong to a shopping campaign. |

## `getText()`

Returns the text of the negative keyword. The returned value will be formatted as follows, depending on the match type:

- `shoes` - broad match
- `"shoes"` - phrase match
- `[leather shoes]` - exact match

### Return values:

| Type | Description |
|---|---|
| `String` | The text of the negative keyword. |

## `remove()`

Removes the negative keyword.

Returns nothing.