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

Conditions to match against the incoming request.

Generated from protobuf message `google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule`

## Namespace

Google \\ Cloud \\ NetworkSecurity \\ V1 \\ AuthzPolicy

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ from` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.AuthzPolicy.AuthzRule.From` Optional. Describes properties of a source of a request. |
| `↳ to` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.AuthzPolicy.AuthzRule.To` Optional. Describes properties of a target of a request. |
| `↳ when` | `string` Optional. CEL expression that describes the conditions to be satisfied for the action. The result of the CEL expression is ANDed with the from and to. Refer to the CEL language reference for a list of available attributes. |

### getFrom

Optional. Describes properties of a source of a request.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.AuthzPolicy.AuthzRule.From|null` |   |

### hasFrom

### clearFrom

### setFrom

Optional. Describes properties of a source of a request.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.AuthzPolicy.AuthzRule.From` |

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

### getTo

Optional. Describes properties of a target of a request.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.AuthzPolicy.AuthzRule.To|null` |   |

### hasTo

### clearTo

### setTo

Optional. Describes properties of a target of a request.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.AuthzPolicy.AuthzRule.To` |

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

### getWhen

Optional. CEL expression that describes the conditions to be satisfied
for the action. The result of the CEL expression is ANDed with the from
and to. Refer to the CEL language reference for a list of available
attributes.

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

### setWhen

Optional. CEL expression that describes the conditions to be satisfied
for the action. The result of the CEL expression is ANDed with the from
and to. Refer to the CEL language reference for a list of available
attributes.

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

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