# Google API Common Protos V1 Client - Class TestIamPermissionsRequest (4.14.0)

4.14.0 (latest) 4.13.0 4.12.5 4.11.0 4.10.0 4.9.0 4.8.3 Reference documentation and code samples for the Google API Common Protos V1 Client class TestIamPermissionsRequest.

Request message for `TestIamPermissions` method.

Generated from protobuf message `google.iam.v1.TestIamPermissionsRequest`

## Namespace

Google \\ Cloud \\ Iam \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ resource` | `string` REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
| `↳ permissions` | `string[]` The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.* ') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |

### getResource

REQUIRED: The resource for which the policy detail is being requested.

See the operation documentation for the appropriate value for this field.

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

### setResource

REQUIRED: The resource for which the policy detail is being requested.

See the operation documentation for the appropriate value for this field.

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

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

### getPermissions

The set of permissions to check for the `resource`. Permissions with
wildcards (such as '*' or 'storage.* ') are not allowed. For more
information see
[IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).

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

### setPermissions

The set of permissions to check for the `resource`. Permissions with
wildcards (such as '*' or 'storage.* ') are not allowed. For more
information see
[IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).

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

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