# Google Cloud Iam V2 Client - Class PolicyRule (1.3.0)

1.3.0 (latest) 1.2.2 1.1.1 1.0.3 0.5.5 0.4.2 0.3.1 0.2.0 0.1.7 Reference documentation and code samples for the Google Cloud Iam V2 Client class PolicyRule.

A single rule in a `Policy`.

Generated from protobuf message `google.iam.v2.PolicyRule`

## Namespace

Google \\ Cloud \\ Iam \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ deny_rule` | `https://docs.cloud.google.com/php/docs/reference/cloud-iam/latest/V2.DenyRule` A rule for a deny policy. |
| `↳ description` | `string` A user-specified description of the rule. This value can be up to 256 characters. |

### getDenyRule

A rule for a deny policy.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-iam/latest/V2.DenyRule|null` |   |

### hasDenyRule

### setDenyRule

A rule for a deny policy.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-iam/latest/V2.DenyRule` |

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

### getDescription

A user-specified description of the rule. This value can be up to 256
characters.

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

### setDescription

A user-specified description of the rule. This value can be up to 256
characters.

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

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

### getKind

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