# Google Cloud Network Security V1 Client - Class AntivirusOverride (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 AntivirusOverride.

Defines what action to take for antivirus threats per protocol.

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

## Namespace

Google \\ Cloud \\ NetworkSecurity \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ protocol` | `int` Required. Protocol to match. |
| `↳ action` | `int` Required. Threat action override. For some threat types, only a subset of actions applies. |

### getProtocol

Required. Protocol to match.

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

### setProtocol

Required. Protocol to match.

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

| **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` |   |