# Google Cloud Network Security V1 Client - Class ThreatOverride (1.4.0)

1.4.0 (latest) 1.3.0 1.2.3 1.1.0 1.0.4 0.6.5 0.5.2 0.4.1 0.3.7 Reference documentation and code samples for the Google Cloud Network Security V1 Client class ThreatOverride.

Defines what action to take for a specific threat_id match.

Generated from protobuf message `google.cloud.networksecurity.v1.ThreatOverride`

## Namespace

Google \\ Cloud \\ NetworkSecurity \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ threat_id` | `string` Required. Vendor-specific ID of a threat to override. |
| `↳ type` | `int` Output only. Type of the threat (read only). |
| `↳ action` | `int` Required. Threat action override. For some threat types, only a subset of actions applies. |

### getThreatId

Required. Vendor-specific ID of a threat to override.

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

### setThreatId

Required. Vendor-specific ID of a threat to override.

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

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

### getType

Output only. Type of the threat (read only).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [ThreatType](https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.ThreatType). |

### setType

Output only. Type of the threat (read only).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [ThreatType](https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.ThreatType). |

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

### getAction

Required. Threat action override. For some threat types, only a subset of
actions applies.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [ThreatAction](https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.ThreatAction). |

### setAction

Required. Threat action override. For some threat types, only a subset of
actions applies.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [ThreatAction](https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.ThreatAction). |

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