# Google Cloud Access Approval V1 Client - Class ApprovalRequest (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 ApprovalRequest.

A request for the customer to approve access to a resource.

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

## Namespace

Google \\ Cloud \\ AccessApproval \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` The resource name of the request. Format is "{projects\|folders\|organizations}/{id}/approvalRequests/{approval_request}". |
| `↳ requested_resource_name` | `string` The resource for which approval is being requested. The format of the resource name is defined at <https://cloud.google.com/apis/design/resource_names>. The resource name here may either be a "full" resource name (e.g. "//library.googleapis.com/shelves/shelf1/books/book2") or a "relative" resource name (e.g. "shelves/shelf1/books/book2") as described in the resource name specification. |
| `↳ requested_resource_properties` | `https://docs.cloud.google.com/php/docs/reference/cloud-access-approval/latest/V1.ResourceProperties` Properties related to the resource represented by requested_resource_name. |
| `↳ requested_reason` | `https://docs.cloud.google.com/php/docs/reference/cloud-access-approval/latest/V1.AccessReason` The justification for which approval is being requested. |
| `↳ requested_locations` | `https://docs.cloud.google.com/php/docs/reference/cloud-access-approval/latest/V1.AccessLocations` The locations for which approval is being requested. |
| `↳ request_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` The time at which approval was requested. |
| `↳ requested_expiration` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` The requested expiration for the approval. If the request is approved, access will be granted from the time of approval until the expiration time. |
| `↳ approve` | `https://docs.cloud.google.com/php/docs/reference/cloud-access-approval/latest/V1.ApproveDecision` Access was approved. |
| `↳ dismiss` | `https://docs.cloud.google.com/php/docs/reference/cloud-access-approval/latest/V1.DismissDecision` The request was dismissed. |

### getName

The resource name of the request. Format is
"{projects\|folders\|organizations}/{id}/approvalRequests/{approval_request}".

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

### setName

The resource name of the request. Format is
"{projects\|folders\|organizations}/{id}/approvalRequests/{approval_request}".

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

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

### getRequestedResourceName

The resource for which approval is being requested. The format of the
resource name is defined at
<https://cloud.google.com/apis/design/resource_names>. The resource name here
may either be a "full" resource name (e.g.

"//library.googleapis.com/shelves/shelf1/books/book2") or a "relative"
resource name (e.g. "shelves/shelf1/books/book2") as described in the
resource name specification.

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

### setRequestedResourceName

The resource for which approval is being requested. The format of the
resource name is defined at
<https://cloud.google.com/apis/design/resource_names>. The resource name here
may either be a "full" resource name (e.g.

"//library.googleapis.com/shelves/shelf1/books/book2") or a "relative"
resource name (e.g. "shelves/shelf1/books/book2") as described in the
resource name specification.

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

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

### getRequestedResourceProperties

Properties related to the resource represented by requested_resource_name.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-access-approval/latest/V1.ResourceProperties|null` |   |

### hasRequestedResourceProperties

### clearRequestedResourceProperties

### setRequestedResourceProperties

Properties related to the resource represented by requested_resource_name.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-access-approval/latest/V1.ResourceProperties` |

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

### getRequestedReason

The justification for which approval is being requested.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-access-approval/latest/V1.AccessReason|null` |   |

### hasRequestedReason

### clearRequestedReason

### setRequestedReason

The justification for which approval is being requested.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-access-approval/latest/V1.AccessReason` |

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

### getRequestedLocations

The locations for which approval is being requested.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-access-approval/latest/V1.AccessLocations|null` |   |

### hasRequestedLocations

### clearRequestedLocations

### setRequestedLocations

The locations for which approval is being requested.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-access-approval/latest/V1.AccessLocations` |

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

### getRequestTime

The time at which approval was requested.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasRequestTime

### clearRequestTime

### setRequestTime

The time at which approval was requested.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

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

### getRequestedExpiration

The requested expiration for the approval. If the request is approved,
access will be granted from the time of approval until the expiration time.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasRequestedExpiration

### clearRequestedExpiration

### setRequestedExpiration

The requested expiration for the approval. If the request is approved,
access will be granted from the time of approval until the expiration time.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

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

### getApprove

Access was approved.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-access-approval/latest/V1.ApproveDecision|null` |   |

### hasApprove

### setApprove

Access was approved.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-access-approval/latest/V1.ApproveDecision` |

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

### getDismiss

The request was dismissed.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-access-approval/latest/V1.DismissDecision|null` |   |

### hasDismiss

### setDismiss

The request was dismissed.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-access-approval/latest/V1.DismissDecision` |

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

### getDecision

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