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

A URL filter defines an action to take for some URL match.

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

## Namespace

Google \\ Cloud \\ NetworkSecurity \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ filtering_action` | `int` Required. The action taken when this filter is applied. |
| `↳ urls` | `string[]` Required. The list of strings that a URL must match with for this filter to be applied. |
| `↳ priority` | `int` Required. The priority of this filter within the URL Filtering Profile. Lower integers indicate higher priorities. The priority of a filter must be unique within a URL Filtering Profile. |

### getFilteringAction

Required. The action taken when this filter is applied.

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

### setFilteringAction

Required. The action taken when this filter is applied.

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

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

### getUrls

Required. The list of strings that a URL must match with for this filter to
be applied.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setUrls

Required. The list of strings that a URL must match with for this filter to
be applied.

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

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

### getPriority

Required. The priority of this filter within the URL Filtering Profile.

Lower integers indicate higher priorities. The priority of a filter must be
unique within a URL Filtering Profile.

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

### hasPriority

### clearPriority

### setPriority

Required. The priority of this filter within the URL Filtering Profile.

Lower integers indicate higher priorities. The priority of a filter must be
unique within a URL Filtering Profile.

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

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