# Google API Common Protos V1 Client - Class GetIamPolicyRequest (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 GetIamPolicyRequest.

Request message for `GetIamPolicy` method.

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

## 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 is being requested. See the operation documentation for the appropriate value for this field. |
| `↳ options` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Cloud.Iam.V1.GetPolicyOptions` OPTIONAL: A `GetPolicyOptions` object for specifying options to `GetIamPolicy`. |

### getResource

REQUIRED: The resource for which the policy 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 is being requested.

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

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

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

### getOptions

OPTIONAL: A `GetPolicyOptions` object for specifying options to
`GetIamPolicy`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Cloud.Iam.V1.GetPolicyOptions|null` |   |

### hasOptions

### clearOptions

### setOptions

OPTIONAL: A `GetPolicyOptions` object for specifying options to
`GetIamPolicy`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Cloud.Iam.V1.GetPolicyOptions` |

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