# Google Cloud Access Approval V1 Client - Class AccessReason (2.1.3)

2.1.3 (latest) 2.1.2 2.0.5 1.2.5 1.1.3 1.0.4 Reference documentation and code samples for the Google Cloud Access Approval V1 Client class AccessReason.

Generated from protobuf message `google.cloud.accessapproval.v1.AccessReason`

## Namespace

Google \\ Cloud \\ AccessApproval \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ type` | `int` Type of access justification. |
| `↳ detail` | `string` More detail about certain reason types. See comments for each type above. |

### getType

Type of access justification.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Type](https://docs.cloud.google.com/php/docs/reference/cloud-access-approval/latest/V1.AccessReason.Type). |

### setType

Type of access justification.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Type](https://docs.cloud.google.com/php/docs/reference/cloud-access-approval/latest/V1.AccessReason.Type). |

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

### getDetail

More detail about certain reason types. See comments for each type above.

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

### setDetail

More detail about certain reason types. See comments for each type above.

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

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