# Google Cloud Privileged Access Manager V1 Client - Class CreateGrantRequest (0.4.4)

0.4.4 (latest) 0.4.3 0.3.0 0.2.1 0.1.4 Reference documentation and code samples for the Google Cloud Privileged Access Manager V1 Client class CreateGrantRequest.

Message for creating a grant

Generated from protobuf message `google.cloud.privilegedaccessmanager.v1.CreateGrantRequest`

## Namespace

Google \\ Cloud \\ PrivilegedAccessManager \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ parent` | `string` Required. Name of the parent entitlement for which this grant is being requested. |
| `↳ grant` | `https://docs.cloud.google.com/php/docs/reference/cloud-privilegedaccessmanager/latest/V1.Grant` Required. The resource being created. |
| `↳ request_id` | `string` Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server knows to ignore the request if it has already been completed. The server guarantees this for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate grants. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). |

### getParent

Required. Name of the parent entitlement for which this grant is being
requested.

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

### setParent

Required. Name of the parent entitlement for which this grant is being
requested.

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

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

### getGrant

Required. The resource being created.

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

### hasGrant

### clearGrant

### setGrant

Required. The resource being created.

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

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

### getRequestId

Optional. An optional request ID to identify requests. Specify a unique
request ID so that if you must retry your request, the server knows to
ignore the request if it has already been completed. The server guarantees
this for at least 60 minutes after the first request.

For example, consider a situation where you make an initial request and the
request times out. If you make the request again with the same request
ID, the server can check if original operation with the same request ID
was received, and if so, ignores the second request. This prevents
clients from accidentally creating duplicate grants.
The request ID must be a valid UUID with the exception that zero UUID is
not supported (00000000-0000-0000-0000-000000000000).

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

### setRequestId

Optional. An optional request ID to identify requests. Specify a unique
request ID so that if you must retry your request, the server knows to
ignore the request if it has already been completed. The server guarantees
this for at least 60 minutes after the first request.

For example, consider a situation where you make an initial request and the
request times out. If you make the request again with the same request
ID, the server can check if original operation with the same request ID
was received, and if so, ignores the second request. This prevents
clients from accidentally creating duplicate grants.
The request ID must be a valid UUID with the exception that zero UUID is
not supported (00000000-0000-0000-0000-000000000000).

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

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. Name of the parent entitlement for which this grant is being requested. Please see PrivilegedAccessManagerClient::entitlementName() for help formatting this field. |
| `grant` | `https://docs.cloud.google.com/php/docs/reference/cloud-privilegedaccessmanager/latest/V1.Grant` Required. The resource being created. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-privilegedaccessmanager/latest/V1.CreateGrantRequest` |   |