# Class PrivilegedAccessManagerClient (0.47.0)

0.47.0 (latest) 0.45.0 0.42.0 0.41.0 0.39.0 0.37.0 0.36.0 0.34.0 0.32.0 0.30.0 0.29.0 0.28.0 0.27.0 0.26.0 0.24.0 0.22.0 0.21.0 0.18.0 0.17.0 0.16.0 0.14.0 0.13.0 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.7.0 0.6.0 0.5.0 0.3.0 0.2.0 0.1.0

|---|---|---|
| [GitHub Repository](https://github.com/googleapis/google-cloud-java/tree/main/java-privilegedaccessmanager/google-cloud-privilegedaccessmanager/src/main/java/com/google/cloud/privilegedaccessmanager/v1/PrivilegedAccessManagerClient.java) | [Product Reference](https://cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/overview) | [RPC Documentation](https://cloud.google.com/iam/docs/reference/pam/rpc) |

Service Description: This API allows customers to manage temporary, request based privileged
access to their resources.

It defines the following resource model:

- A collection of `Entitlement` resources. An entitlement allows configuring (among other things):

\* Some kind of privileged access that users can request. \* A set of users called
*requesters* who can request this access. \* A maximum duration for which the access can be
requested. \* An optional approval workflow which must be satisfied before access is granted.

- A collection of `Grant` resources. A grant is a request by a requester to get the privileged access specified in an entitlement for some duration.

After the approval workflow as specified in the entitlement is satisfied, the specified access
is given to the requester. The access is automatically taken back after the requested duration is
over.

This class provides the ability to make remote calls to the backing service through method
calls that map to API methods. Sample code to get started:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       CheckOnboardingStatusRequest request =
           CheckOnboardingStatusRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .build();
       CheckOnboardingStatusResponse response =
           privilegedAccessManagerClient.checkOnboardingStatus(request);
     }
     
Note: close() needs to be called on the PrivilegedAccessManagerClient object to clean up
resources such as threads. In the example above, try-with-resources is used, which automatically
calls close().

| Method | Description | Method Variants |
|---|---|---|
| CheckOnboardingStatus | `CheckOnboardingStatus` reports the onboarding status for a project/folder/organization. Any findings reported by this API need to be fixed before PAM can be used on the resource. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - checkOnboardingStatus(CheckOnboardingStatusRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - checkOnboardingStatusCallable() |
| ListEntitlements | Lists entitlements in a given project/folder/organization and location. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - listEntitlements(ListEntitlementsRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - listEntitlements(FolderLocationName parent) - listEntitlements(LocationName parent) - listEntitlements(OrganizationLocationName parent) - listEntitlements(String parent) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - listEntitlementsPagedCallable() - listEntitlementsCallable() |
| SearchEntitlements | `SearchEntitlements` returns entitlements on which the caller has the specified access. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - searchEntitlements(SearchEntitlementsRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - searchEntitlementsPagedCallable() - searchEntitlementsCallable() |
| GetEntitlement | Gets details of a single entitlement. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - getEntitlement(GetEntitlementRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - getEntitlement(EntitlementName name) - getEntitlement(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - getEntitlementCallable() |
| CreateEntitlement | Creates a new entitlement in a given project/folder/organization and location. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - createEntitlementAsync(CreateEntitlementRequest request) Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. - createEntitlementAsync(FolderLocationName parent, Entitlement entitlement, String entitlementId) - createEntitlementAsync(LocationName parent, Entitlement entitlement, String entitlementId) - createEntitlementAsync(OrganizationLocationName parent, Entitlement entitlement, String entitlementId) - createEntitlementAsync(String parent, Entitlement entitlement, String entitlementId) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - createEntitlementOperationCallable() - createEntitlementCallable() |
| DeleteEntitlement | Deletes a single entitlement. This method can only be called when there are no in-progress (`ACTIVE`/`ACTIVATING`/`REVOKING`) grants under the entitlement. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - deleteEntitlementAsync(DeleteEntitlementRequest request) Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. - deleteEntitlementAsync(EntitlementName name) - deleteEntitlementAsync(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - deleteEntitlementOperationCallable() - deleteEntitlementCallable() |
| UpdateEntitlement | Updates the entitlement specified in the request. Updated fields in the entitlement need to be specified in an update mask. The changes made to an entitlement are applicable only on future grants of the entitlement. However, if new approvers are added or existing approvers are removed from the approval workflow, the changes are effective on existing grants. The following fields are not supported for updates: \* All immutable fields \* Entitlement name \* Resource name \* Resource type \* Adding an approval workflow in an entitlement which previously had no approval workflow. \* Deleting the approval workflow from an entitlement. \* Adding or deleting a step in the approval workflow (only one step is supported) Note that updates are allowed on the list of approvers in an approval workflow step. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - updateEntitlementAsync(UpdateEntitlementRequest request) Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. - updateEntitlementAsync(Entitlement entitlement, FieldMask updateMask) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - updateEntitlementOperationCallable() - updateEntitlementCallable() |
| ListGrants | Lists grants for a given entitlement. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - listGrants(ListGrantsRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - listGrants(EntitlementName parent) - listGrants(String parent) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - listGrantsPagedCallable() - listGrantsCallable() |
| SearchGrants | `SearchGrants` returns grants that are related to the calling user in the specified way. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - searchGrants(SearchGrantsRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - searchGrantsPagedCallable() - searchGrantsCallable() |
| GetGrant | Get details of a single grant. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - getGrant(GetGrantRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - getGrant(GrantName name) - getGrant(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - getGrantCallable() |
| CreateGrant | Creates a new grant in a given project/folder/organization and location. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - createGrant(CreateGrantRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - createGrant(EntitlementName parent, Grant grant) - createGrant(String parent, Grant grant) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - createGrantCallable() |
| ApproveGrant | `ApproveGrant` is used to approve a grant. This method can only be called on a grant when it's in the `APPROVAL_AWAITED` state. This operation can't be undone. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - approveGrant(ApproveGrantRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - approveGrantCallable() |
| DenyGrant | `DenyGrant` is used to deny a grant. This method can only be called on a grant when it's in the `APPROVAL_AWAITED` state. This operation can't be undone. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - denyGrant(DenyGrantRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - denyGrantCallable() |
| RevokeGrant | `RevokeGrant` is used to immediately revoke access for a grant. This method can be called when the grant is in a non-terminal state. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - revokeGrantAsync(RevokeGrantRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - revokeGrantOperationCallable() - revokeGrantCallable() |
| ListLocations | Lists information about the supported locations for this service. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - listLocations(ListLocationsRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - listLocationsPagedCallable() - listLocationsCallable() |
| GetLocation | Gets information about a location. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - getLocation(GetLocationRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - getLocationCallable() |
[Methods]

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with
these names, this class includes a format method for each type of name, and additionally a parse
method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of
PrivilegedAccessManagerSettings to create(). For example:

To customize credentials:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     PrivilegedAccessManagerSettings privilegedAccessManagerSettings =
         PrivilegedAccessManagerSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
             .build();
     PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create(privilegedAccessManagerSettings);
     
To customize the endpoint:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     PrivilegedAccessManagerSettings privilegedAccessManagerSettings =
         PrivilegedAccessManagerSettings.newBuilder().setEndpoint(myEndpoint).build();
     PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create(privilegedAccessManagerSettings);
     
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
the wire:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     PrivilegedAccessManagerSettings privilegedAccessManagerSettings =
         PrivilegedAccessManagerSettings.newHttpJsonBuilder().build();
     PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create(privilegedAccessManagerSettings);
     
Please refer to the GitHub repository's samples for more quickstart code snippets.

## Inheritance

[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> PrivilegedAccessManagerClient

## Static Methods

### create()

    public static final PrivilegedAccessManagerClient create()

Constructs an instance of PrivilegedAccessManagerClient with default settings.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.PrivilegedAccessManagerClient` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |

### create(PrivilegedAccessManagerSettings settings)

    public static final PrivilegedAccessManagerClient create(PrivilegedAccessManagerSettings settings)

Constructs an instance of PrivilegedAccessManagerClient, using the given settings. The channels
are created based on the settings passed in, or defaults for any settings that are not set.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `settings` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.PrivilegedAccessManagerSettings` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.PrivilegedAccessManagerClient` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |

### create(PrivilegedAccessManagerStub stub)

    public static final PrivilegedAccessManagerClient create(PrivilegedAccessManagerStub stub)

Constructs an instance of PrivilegedAccessManagerClient, using the given stub for making calls.
This is for advanced usage - prefer using create(PrivilegedAccessManagerSettings).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `stub` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.stub.PrivilegedAccessManagerStub` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.PrivilegedAccessManagerClient` |   |

## Constructors

### PrivilegedAccessManagerClient(PrivilegedAccessManagerSettings settings)

    protected PrivilegedAccessManagerClient(PrivilegedAccessManagerSettings settings)

Constructs an instance of PrivilegedAccessManagerClient, using the given settings. This is
protected so that it is easy to make a subclass, but otherwise, the static factory methods
should be preferred.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `settings` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.PrivilegedAccessManagerSettings` |

### PrivilegedAccessManagerClient(PrivilegedAccessManagerStub stub)

    protected PrivilegedAccessManagerClient(PrivilegedAccessManagerStub stub)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `stub` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.stub.PrivilegedAccessManagerStub` |

## Methods

### approveGrant(ApproveGrantRequest request)

    public final Grant approveGrant(ApproveGrantRequest request)

`ApproveGrant` is used to approve a grant. This method can only be called on a grant when it's
in the `APPROVAL_AWAITED` state. This operation can't be undone.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       ApproveGrantRequest request =
           ApproveGrantRequest.newBuilder()
               .setName(
                   GrantName.ofProjectLocationEntitlementGrantName(
                           "[PROJECT]", "[LOCATION]", "[ENTITLEMENT]", "[GRANT]")
                       .toString())
               .setReason("reason-934964668")
               .build();
       Grant response = privilegedAccessManagerClient.approveGrant(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.ApproveGrantRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Grant` |   |

### approveGrantCallable()

    public final UnaryCallable<ApproveGrantRequest,Grant> approveGrantCallable()

`ApproveGrant` is used to approve a grant. This method can only be called on a grant when it's
in the `APPROVAL_AWAITED` state. This operation can't be undone.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       ApproveGrantRequest request =
           ApproveGrantRequest.newBuilder()
               .setName(
                   GrantName.ofProjectLocationEntitlementGrantName(
                           "[PROJECT]", "[LOCATION]", "[ENTITLEMENT]", "[GRANT]")
                       .toString())
               .setReason("reason-934964668")
               .build();
       ApiFuture<Grant> future =
           privilegedAccessManagerClient.approveGrantCallable().futureCall(request);
       // Do something.
       Grant response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.ApproveGrantRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Grant>` |   |

### awaitTermination(long duration, TimeUnit unit)

    public boolean awaitTermination(long duration, TimeUnit unit)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `duration` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |
| `unit` | `https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html` |   |

### checkOnboardingStatus(CheckOnboardingStatusRequest request)

    public final CheckOnboardingStatusResponse checkOnboardingStatus(CheckOnboardingStatusRequest request)

`CheckOnboardingStatus` reports the onboarding status for a project/folder/organization. Any
findings reported by this API need to be fixed before PAM can be used on the resource.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       CheckOnboardingStatusRequest request =
           CheckOnboardingStatusRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .build();
       CheckOnboardingStatusResponse response =
           privilegedAccessManagerClient.checkOnboardingStatus(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.CheckOnboardingStatusRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.CheckOnboardingStatusResponse` |   |

### checkOnboardingStatusCallable()

    public final UnaryCallable<CheckOnboardingStatusRequest,CheckOnboardingStatusResponse> checkOnboardingStatusCallable()

`CheckOnboardingStatus` reports the onboarding status for a project/folder/organization. Any
findings reported by this API need to be fixed before PAM can be used on the resource.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       CheckOnboardingStatusRequest request =
           CheckOnboardingStatusRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .build();
       ApiFuture<CheckOnboardingStatusResponse> future =
           privilegedAccessManagerClient.checkOnboardingStatusCallable().futureCall(request);
       // Do something.
       CheckOnboardingStatusResponse response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.CheckOnboardingStatusRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.CheckOnboardingStatusResponse>` |   |

### close()

    public final void close()

### createEntitlementAsync(CreateEntitlementRequest request)

    public final OperationFuture<Entitlement,OperationMetadata> createEntitlementAsync(CreateEntitlementRequest request)

Creates a new entitlement in a given project/folder/organization and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       CreateEntitlementRequest request =
           CreateEntitlementRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setEntitlementId("entitlementId-1302274264")
               .setEntitlement(Entitlement.newBuilder().build())
               .setRequestId("requestId693933066")
               .build();
       Entitlement response = privilegedAccessManagerClient.createEntitlementAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.CreateEntitlementRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Entitlement,https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.OperationMetadata>` |   |

### createEntitlementAsync(FolderLocationName parent, Entitlement entitlement, String entitlementId)

    public final OperationFuture<Entitlement,OperationMetadata> createEntitlementAsync(FolderLocationName parent, Entitlement entitlement, String entitlementId)

Creates a new entitlement in a given project/folder/organization and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]");
       Entitlement entitlement = Entitlement.newBuilder().build();
       String entitlementId = "entitlementId-1302274264";
       Entitlement response =
           privilegedAccessManagerClient
               .createEntitlementAsync(parent, entitlement, entitlementId)
               .get();
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.FolderLocationName` Required. Name of the parent resource for the entitlement. Possible formats: - `organizations/{organization-number}/locations/{region}` - `folders/{folder-number}/locations/{region}` - `projects/{project-id|project-number}/locations/{region}` <br /> |
| `entitlement` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Entitlement` Required. The resource being created |
| `entitlementId` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The ID to use for this entitlement. This becomes the last part of the resource name. This value should be 4-63 characters in length, and valid characters are "\[a-z\]", "\[0-9\]", and "-". The first character should be from \[a-z\]. This value should be unique among all other entitlements under the specified `parent`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Entitlement,https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.OperationMetadata>` |   |

### createEntitlementAsync(LocationName parent, Entitlement entitlement, String entitlementId)

    public final OperationFuture<Entitlement,OperationMetadata> createEntitlementAsync(LocationName parent, Entitlement entitlement, String entitlementId)

Creates a new entitlement in a given project/folder/organization and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
       Entitlement entitlement = Entitlement.newBuilder().build();
       String entitlementId = "entitlementId-1302274264";
       Entitlement response =
           privilegedAccessManagerClient
               .createEntitlementAsync(parent, entitlement, entitlementId)
               .get();
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.LocationName` Required. Name of the parent resource for the entitlement. Possible formats: - `organizations/{organization-number}/locations/{region}` - `folders/{folder-number}/locations/{region}` - `projects/{project-id|project-number}/locations/{region}` <br /> |
| `entitlement` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Entitlement` Required. The resource being created |
| `entitlementId` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The ID to use for this entitlement. This becomes the last part of the resource name. This value should be 4-63 characters in length, and valid characters are "\[a-z\]", "\[0-9\]", and "-". The first character should be from \[a-z\]. This value should be unique among all other entitlements under the specified `parent`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Entitlement,https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.OperationMetadata>` |   |

### createEntitlementAsync(OrganizationLocationName parent, Entitlement entitlement, String entitlementId)

    public final OperationFuture<Entitlement,OperationMetadata> createEntitlementAsync(OrganizationLocationName parent, Entitlement entitlement, String entitlementId)

Creates a new entitlement in a given project/folder/organization and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
       Entitlement entitlement = Entitlement.newBuilder().build();
       String entitlementId = "entitlementId-1302274264";
       Entitlement response =
           privilegedAccessManagerClient
               .createEntitlementAsync(parent, entitlement, entitlementId)
               .get();
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.OrganizationLocationName` Required. Name of the parent resource for the entitlement. Possible formats: - `organizations/{organization-number}/locations/{region}` - `folders/{folder-number}/locations/{region}` - `projects/{project-id|project-number}/locations/{region}` <br /> |
| `entitlement` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Entitlement` Required. The resource being created |
| `entitlementId` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The ID to use for this entitlement. This becomes the last part of the resource name. This value should be 4-63 characters in length, and valid characters are "\[a-z\]", "\[0-9\]", and "-". The first character should be from \[a-z\]. This value should be unique among all other entitlements under the specified `parent`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Entitlement,https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.OperationMetadata>` |   |

### createEntitlementAsync(String parent, Entitlement entitlement, String entitlementId)

    public final OperationFuture<Entitlement,OperationMetadata> createEntitlementAsync(String parent, Entitlement entitlement, String entitlementId)

Creates a new entitlement in a given project/folder/organization and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
       Entitlement entitlement = Entitlement.newBuilder().build();
       String entitlementId = "entitlementId-1302274264";
       Entitlement response =
           privilegedAccessManagerClient
               .createEntitlementAsync(parent, entitlement, entitlementId)
               .get();
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Name of the parent resource for the entitlement. Possible formats: - `organizations/{organization-number}/locations/{region}` - `folders/{folder-number}/locations/{region}` - `projects/{project-id|project-number}/locations/{region}` <br /> |
| `entitlement` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Entitlement` Required. The resource being created |
| `entitlementId` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The ID to use for this entitlement. This becomes the last part of the resource name. This value should be 4-63 characters in length, and valid characters are "\[a-z\]", "\[0-9\]", and "-". The first character should be from \[a-z\]. This value should be unique among all other entitlements under the specified `parent`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Entitlement,https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.OperationMetadata>` |   |

### createEntitlementCallable()

    public final UnaryCallable<CreateEntitlementRequest,Operation> createEntitlementCallable()

Creates a new entitlement in a given project/folder/organization and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       CreateEntitlementRequest request =
           CreateEntitlementRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setEntitlementId("entitlementId-1302274264")
               .setEntitlement(Entitlement.newBuilder().build())
               .setRequestId("requestId693933066")
               .build();
       ApiFuture<Operation> future =
           privilegedAccessManagerClient.createEntitlementCallable().futureCall(request);
       // Do something.
       Operation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.CreateEntitlementRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### createEntitlementOperationCallable()

    public final OperationCallable<CreateEntitlementRequest,Entitlement,OperationMetadata> createEntitlementOperationCallable()

Creates a new entitlement in a given project/folder/organization and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       CreateEntitlementRequest request =
           CreateEntitlementRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setEntitlementId("entitlementId-1302274264")
               .setEntitlement(Entitlement.newBuilder().build())
               .setRequestId("requestId693933066")
               .build();
       OperationFuture<Entitlement, OperationMetadata> future =
           privilegedAccessManagerClient.createEntitlementOperationCallable().futureCall(request);
       // Do something.
       Entitlement response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.CreateEntitlementRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Entitlement,https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.OperationMetadata>` |   |

### createGrant(CreateGrantRequest request)

    public final Grant createGrant(CreateGrantRequest request)

Creates a new grant in a given project/folder/organization and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       CreateGrantRequest request =
           CreateGrantRequest.newBuilder()
               .setParent(
                   EntitlementName.ofProjectLocationEntitlementName(
                           "[PROJECT]", "[LOCATION]", "[ENTITLEMENT]")
                       .toString())
               .setGrant(Grant.newBuilder().build())
               .setRequestId("requestId693933066")
               .build();
       Grant response = privilegedAccessManagerClient.createGrant(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.CreateGrantRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Grant` |   |

### createGrant(EntitlementName parent, Grant grant)

    public final Grant createGrant(EntitlementName parent, Grant grant)

Creates a new grant in a given project/folder/organization and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       EntitlementName parent =
           EntitlementName.ofProjectLocationEntitlementName(
               "[PROJECT]", "[LOCATION]", "[ENTITLEMENT]");
       Grant grant = Grant.newBuilder().build();
       Grant response = privilegedAccessManagerClient.createGrant(parent, grant);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.EntitlementName` Required. Name of the parent entitlement for which this grant is being requested. |
| `grant` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Grant` Required. The resource being created. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Grant` |   |

### createGrant(String parent, Grant grant)

    public final Grant createGrant(String parent, Grant grant)

Creates a new grant in a given project/folder/organization and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       String parent =
           EntitlementName.ofProjectLocationEntitlementName(
                   "[PROJECT]", "[LOCATION]", "[ENTITLEMENT]")
               .toString();
       Grant grant = Grant.newBuilder().build();
       Grant response = privilegedAccessManagerClient.createGrant(parent, grant);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Name of the parent entitlement for which this grant is being requested. |
| `grant` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Grant` Required. The resource being created. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Grant` |   |

### createGrantCallable()

    public final UnaryCallable<CreateGrantRequest,Grant> createGrantCallable()

Creates a new grant in a given project/folder/organization and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       CreateGrantRequest request =
           CreateGrantRequest.newBuilder()
               .setParent(
                   EntitlementName.ofProjectLocationEntitlementName(
                           "[PROJECT]", "[LOCATION]", "[ENTITLEMENT]")
                       .toString())
               .setGrant(Grant.newBuilder().build())
               .setRequestId("requestId693933066")
               .build();
       ApiFuture<Grant> future =
           privilegedAccessManagerClient.createGrantCallable().futureCall(request);
       // Do something.
       Grant response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.CreateGrantRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Grant>` |   |

### deleteEntitlementAsync(DeleteEntitlementRequest request)

    public final OperationFuture<Entitlement,OperationMetadata> deleteEntitlementAsync(DeleteEntitlementRequest request)

Deletes a single entitlement. This method can only be called when there are no in-progress
(`ACTIVE`/`ACTIVATING`/`REVOKING`) grants under the entitlement.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       DeleteEntitlementRequest request =
           DeleteEntitlementRequest.newBuilder()
               .setName(
                   EntitlementName.ofProjectLocationEntitlementName(
                           "[PROJECT]", "[LOCATION]", "[ENTITLEMENT]")
                       .toString())
               .setRequestId("requestId693933066")
               .setForce(true)
               .build();
       Entitlement response = privilegedAccessManagerClient.deleteEntitlementAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.DeleteEntitlementRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Entitlement,https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.OperationMetadata>` |   |

### deleteEntitlementAsync(EntitlementName name)

    public final OperationFuture<Entitlement,OperationMetadata> deleteEntitlementAsync(EntitlementName name)

Deletes a single entitlement. This method can only be called when there are no in-progress
(`ACTIVE`/`ACTIVATING`/`REVOKING`) grants under the entitlement.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       EntitlementName name =
           EntitlementName.ofProjectLocationEntitlementName(
               "[PROJECT]", "[LOCATION]", "[ENTITLEMENT]");
       Entitlement response = privilegedAccessManagerClient.deleteEntitlementAsync(name).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.EntitlementName` Required. Name of the resource. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Entitlement,https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.OperationMetadata>` |   |

### deleteEntitlementAsync(String name)

    public final OperationFuture<Entitlement,OperationMetadata> deleteEntitlementAsync(String name)

Deletes a single entitlement. This method can only be called when there are no in-progress
(`ACTIVE`/`ACTIVATING`/`REVOKING`) grants under the entitlement.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       String name =
           EntitlementName.ofProjectLocationEntitlementName(
                   "[PROJECT]", "[LOCATION]", "[ENTITLEMENT]")
               .toString();
       Entitlement response = privilegedAccessManagerClient.deleteEntitlementAsync(name).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Name of the resource. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Entitlement,https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.OperationMetadata>` |   |

### deleteEntitlementCallable()

    public final UnaryCallable<DeleteEntitlementRequest,Operation> deleteEntitlementCallable()

Deletes a single entitlement. This method can only be called when there are no in-progress
(`ACTIVE`/`ACTIVATING`/`REVOKING`) grants under the entitlement.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       DeleteEntitlementRequest request =
           DeleteEntitlementRequest.newBuilder()
               .setName(
                   EntitlementName.ofProjectLocationEntitlementName(
                           "[PROJECT]", "[LOCATION]", "[ENTITLEMENT]")
                       .toString())
               .setRequestId("requestId693933066")
               .setForce(true)
               .build();
       ApiFuture<Operation> future =
           privilegedAccessManagerClient.deleteEntitlementCallable().futureCall(request);
       // Do something.
       Operation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.DeleteEntitlementRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### deleteEntitlementOperationCallable()

    public final OperationCallable<DeleteEntitlementRequest,Entitlement,OperationMetadata> deleteEntitlementOperationCallable()

Deletes a single entitlement. This method can only be called when there are no in-progress
(`ACTIVE`/`ACTIVATING`/`REVOKING`) grants under the entitlement.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       DeleteEntitlementRequest request =
           DeleteEntitlementRequest.newBuilder()
               .setName(
                   EntitlementName.ofProjectLocationEntitlementName(
                           "[PROJECT]", "[LOCATION]", "[ENTITLEMENT]")
                       .toString())
               .setRequestId("requestId693933066")
               .setForce(true)
               .build();
       OperationFuture<Entitlement, OperationMetadata> future =
           privilegedAccessManagerClient.deleteEntitlementOperationCallable().futureCall(request);
       // Do something.
       Entitlement response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.DeleteEntitlementRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Entitlement,https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.OperationMetadata>` |   |

### denyGrant(DenyGrantRequest request)

    public final Grant denyGrant(DenyGrantRequest request)

`DenyGrant` is used to deny a grant. This method can only be called on a grant when it's in the
`APPROVAL_AWAITED` state. This operation can't be undone.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       DenyGrantRequest request =
           DenyGrantRequest.newBuilder()
               .setName(
                   GrantName.ofProjectLocationEntitlementGrantName(
                           "[PROJECT]", "[LOCATION]", "[ENTITLEMENT]", "[GRANT]")
                       .toString())
               .setReason("reason-934964668")
               .build();
       Grant response = privilegedAccessManagerClient.denyGrant(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.DenyGrantRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Grant` |   |

### denyGrantCallable()

    public final UnaryCallable<DenyGrantRequest,Grant> denyGrantCallable()

`DenyGrant` is used to deny a grant. This method can only be called on a grant when it's in the
`APPROVAL_AWAITED` state. This operation can't be undone.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       DenyGrantRequest request =
           DenyGrantRequest.newBuilder()
               .setName(
                   GrantName.ofProjectLocationEntitlementGrantName(
                           "[PROJECT]", "[LOCATION]", "[ENTITLEMENT]", "[GRANT]")
                       .toString())
               .setReason("reason-934964668")
               .build();
       ApiFuture<Grant> future =
           privilegedAccessManagerClient.denyGrantCallable().futureCall(request);
       // Do something.
       Grant response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.DenyGrantRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Grant>` |   |

### getEntitlement(EntitlementName name)

    public final Entitlement getEntitlement(EntitlementName name)

Gets details of a single entitlement.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       EntitlementName name =
           EntitlementName.ofProjectLocationEntitlementName(
               "[PROJECT]", "[LOCATION]", "[ENTITLEMENT]");
       Entitlement response = privilegedAccessManagerClient.getEntitlement(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.EntitlementName` Required. Name of the resource. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Entitlement` |   |

### getEntitlement(GetEntitlementRequest request)

    public final Entitlement getEntitlement(GetEntitlementRequest request)

Gets details of a single entitlement.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       GetEntitlementRequest request =
           GetEntitlementRequest.newBuilder()
               .setName(
                   EntitlementName.ofProjectLocationEntitlementName(
                           "[PROJECT]", "[LOCATION]", "[ENTITLEMENT]")
                       .toString())
               .build();
       Entitlement response = privilegedAccessManagerClient.getEntitlement(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.GetEntitlementRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Entitlement` |   |

### getEntitlement(String name)

    public final Entitlement getEntitlement(String name)

Gets details of a single entitlement.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       String name =
           EntitlementName.ofProjectLocationEntitlementName(
                   "[PROJECT]", "[LOCATION]", "[ENTITLEMENT]")
               .toString();
       Entitlement response = privilegedAccessManagerClient.getEntitlement(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Name of the resource. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Entitlement` |   |

### getEntitlementCallable()

    public final UnaryCallable<GetEntitlementRequest,Entitlement> getEntitlementCallable()

Gets details of a single entitlement.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       GetEntitlementRequest request =
           GetEntitlementRequest.newBuilder()
               .setName(
                   EntitlementName.ofProjectLocationEntitlementName(
                           "[PROJECT]", "[LOCATION]", "[ENTITLEMENT]")
                       .toString())
               .build();
       ApiFuture<Entitlement> future =
           privilegedAccessManagerClient.getEntitlementCallable().futureCall(request);
       // Do something.
       Entitlement response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.GetEntitlementRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Entitlement>` |   |

### getGrant(GetGrantRequest request)

    public final Grant getGrant(GetGrantRequest request)

Get details of a single grant.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       GetGrantRequest request =
           GetGrantRequest.newBuilder()
               .setName(
                   GrantName.ofProjectLocationEntitlementGrantName(
                           "[PROJECT]", "[LOCATION]", "[ENTITLEMENT]", "[GRANT]")
                       .toString())
               .build();
       Grant response = privilegedAccessManagerClient.getGrant(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.GetGrantRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Grant` |   |

### getGrant(GrantName name)

    public final Grant getGrant(GrantName name)

Get details of a single grant.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       GrantName name =
           GrantName.ofProjectLocationEntitlementGrantName(
               "[PROJECT]", "[LOCATION]", "[ENTITLEMENT]", "[GRANT]");
       Grant response = privilegedAccessManagerClient.getGrant(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.GrantName` Required. Name of the resource. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Grant` |   |

### getGrant(String name)

    public final Grant getGrant(String name)

Get details of a single grant.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       String name =
           GrantName.ofProjectLocationEntitlementGrantName(
                   "[PROJECT]", "[LOCATION]", "[ENTITLEMENT]", "[GRANT]")
               .toString();
       Grant response = privilegedAccessManagerClient.getGrant(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Name of the resource. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Grant` |   |

### getGrantCallable()

    public final UnaryCallable<GetGrantRequest,Grant> getGrantCallable()

Get details of a single grant.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       GetGrantRequest request =
           GetGrantRequest.newBuilder()
               .setName(
                   GrantName.ofProjectLocationEntitlementGrantName(
                           "[PROJECT]", "[LOCATION]", "[ENTITLEMENT]", "[GRANT]")
                       .toString())
               .build();
       ApiFuture<Grant> future =
           privilegedAccessManagerClient.getGrantCallable().futureCall(request);
       // Do something.
       Grant response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.GetGrantRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Grant>` |   |

### getHttpJsonOperationsClient()

    public final OperationsClient getHttpJsonOperationsClient()

> [!WARNING]
> **Beta**
>
> This feature is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1) of the Terms of Service. Pre-GA libraries might have limited support, and changes to pre-GA libraries might not be compatible with other pre-GA versions. For more information, see the launch stage descriptions.

Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.httpjson.longrunning.OperationsClient.html` |   |

### getLocation(GetLocationRequest request)

    public final Location getLocation(GetLocationRequest request)

Gets information about a location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
       Location response = privilegedAccessManagerClient.getLocation(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `com.google.cloud.location.GetLocationRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.cloud.location.Location` |   |

### getLocationCallable()

    public final UnaryCallable<GetLocationRequest,Location> getLocationCallable()

Gets information about a location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
       ApiFuture<Location> future =
           privilegedAccessManagerClient.getLocationCallable().futureCall(request);
       // Do something.
       Location response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location>` |   |

### getOperationsClient()

    public final OperationsClient getOperationsClient()

Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.OperationsClient.html` |   |

### getSettings()

    public final PrivilegedAccessManagerSettings getSettings()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.PrivilegedAccessManagerSettings` |   |

### getStub()

    public PrivilegedAccessManagerStub getStub()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.stub.PrivilegedAccessManagerStub` |   |

### isShutdown()

    public boolean isShutdown()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### isTerminated()

    public boolean isTerminated()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### listEntitlements(FolderLocationName parent)

    public final PrivilegedAccessManagerClient.ListEntitlementsPagedResponse listEntitlements(FolderLocationName parent)

Lists entitlements in a given project/folder/organization and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]");
       for (Entitlement element :
           privilegedAccessManagerClient.listEntitlements(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.FolderLocationName` Required. The parent which owns the entitlement resources. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.PrivilegedAccessManagerClient.ListEntitlementsPagedResponse` |   |

### listEntitlements(ListEntitlementsRequest request)

    public final PrivilegedAccessManagerClient.ListEntitlementsPagedResponse listEntitlements(ListEntitlementsRequest request)

Lists entitlements in a given project/folder/organization and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       ListEntitlementsRequest request =
           ListEntitlementsRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setFilter("filter-1274492040")
               .setOrderBy("orderBy-1207110587")
               .build();
       for (Entitlement element :
           privilegedAccessManagerClient.listEntitlements(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.ListEntitlementsRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.PrivilegedAccessManagerClient.ListEntitlementsPagedResponse` |   |

### listEntitlements(LocationName parent)

    public final PrivilegedAccessManagerClient.ListEntitlementsPagedResponse listEntitlements(LocationName parent)

Lists entitlements in a given project/folder/organization and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
       for (Entitlement element :
           privilegedAccessManagerClient.listEntitlements(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.LocationName` Required. The parent which owns the entitlement resources. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.PrivilegedAccessManagerClient.ListEntitlementsPagedResponse` |   |

### listEntitlements(OrganizationLocationName parent)

    public final PrivilegedAccessManagerClient.ListEntitlementsPagedResponse listEntitlements(OrganizationLocationName parent)

Lists entitlements in a given project/folder/organization and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
       for (Entitlement element :
           privilegedAccessManagerClient.listEntitlements(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.OrganizationLocationName` Required. The parent which owns the entitlement resources. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.PrivilegedAccessManagerClient.ListEntitlementsPagedResponse` |   |

### listEntitlements(String parent)

    public final PrivilegedAccessManagerClient.ListEntitlementsPagedResponse listEntitlements(String parent)

Lists entitlements in a given project/folder/organization and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
       for (Entitlement element :
           privilegedAccessManagerClient.listEntitlements(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The parent which owns the entitlement resources. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.PrivilegedAccessManagerClient.ListEntitlementsPagedResponse` |   |

### listEntitlementsCallable()

    public final UnaryCallable<ListEntitlementsRequest,ListEntitlementsResponse> listEntitlementsCallable()

Lists entitlements in a given project/folder/organization and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       ListEntitlementsRequest request =
           ListEntitlementsRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setFilter("filter-1274492040")
               .setOrderBy("orderBy-1207110587")
               .build();
       while (true) {
         ListEntitlementsResponse response =
             privilegedAccessManagerClient.listEntitlementsCallable().call(request);
         for (Entitlement element : response.getEntitlementsList()) {
           // doThingsWith(element);
         }
         String nextPageToken = response.getNextPageToken();
         if (!Strings.isNullOrEmpty(nextPageToken)) {
           request = request.toBuilder().setPageToken(nextPageToken).build();
         } else {
           break;
         }
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.ListEntitlementsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.ListEntitlementsResponse>` |   |

### listEntitlementsPagedCallable()

    public final UnaryCallable<ListEntitlementsRequest,PrivilegedAccessManagerClient.ListEntitlementsPagedResponse> listEntitlementsPagedCallable()

Lists entitlements in a given project/folder/organization and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       ListEntitlementsRequest request =
           ListEntitlementsRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setFilter("filter-1274492040")
               .setOrderBy("orderBy-1207110587")
               .build();
       ApiFuture<Entitlement> future =
           privilegedAccessManagerClient.listEntitlementsPagedCallable().futureCall(request);
       // Do something.
       for (Entitlement element : future.get().iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.ListEntitlementsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.PrivilegedAccessManagerClient.ListEntitlementsPagedResponse>` |   |

### listGrants(EntitlementName parent)

    public final PrivilegedAccessManagerClient.ListGrantsPagedResponse listGrants(EntitlementName parent)

Lists grants for a given entitlement.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       EntitlementName parent =
           EntitlementName.ofProjectLocationEntitlementName(
               "[PROJECT]", "[LOCATION]", "[ENTITLEMENT]");
       for (Grant element : privilegedAccessManagerClient.listGrants(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.EntitlementName` Required. The parent resource which owns the grants. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.PrivilegedAccessManagerClient.ListGrantsPagedResponse` |   |

### listGrants(ListGrantsRequest request)

    public final PrivilegedAccessManagerClient.ListGrantsPagedResponse listGrants(ListGrantsRequest request)

Lists grants for a given entitlement.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       ListGrantsRequest request =
           ListGrantsRequest.newBuilder()
               .setParent(
                   EntitlementName.ofProjectLocationEntitlementName(
                           "[PROJECT]", "[LOCATION]", "[ENTITLEMENT]")
                       .toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setFilter("filter-1274492040")
               .setOrderBy("orderBy-1207110587")
               .build();
       for (Grant element : privilegedAccessManagerClient.listGrants(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.ListGrantsRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.PrivilegedAccessManagerClient.ListGrantsPagedResponse` |   |

### listGrants(String parent)

    public final PrivilegedAccessManagerClient.ListGrantsPagedResponse listGrants(String parent)

Lists grants for a given entitlement.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       String parent =
           EntitlementName.ofProjectLocationEntitlementName(
                   "[PROJECT]", "[LOCATION]", "[ENTITLEMENT]")
               .toString();
       for (Grant element : privilegedAccessManagerClient.listGrants(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The parent resource which owns the grants. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.PrivilegedAccessManagerClient.ListGrantsPagedResponse` |   |

### listGrantsCallable()

    public final UnaryCallable<ListGrantsRequest,ListGrantsResponse> listGrantsCallable()

Lists grants for a given entitlement.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       ListGrantsRequest request =
           ListGrantsRequest.newBuilder()
               .setParent(
                   EntitlementName.ofProjectLocationEntitlementName(
                           "[PROJECT]", "[LOCATION]", "[ENTITLEMENT]")
                       .toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setFilter("filter-1274492040")
               .setOrderBy("orderBy-1207110587")
               .build();
       while (true) {
         ListGrantsResponse response =
             privilegedAccessManagerClient.listGrantsCallable().call(request);
         for (Grant element : response.getGrantsList()) {
           // doThingsWith(element);
         }
         String nextPageToken = response.getNextPageToken();
         if (!Strings.isNullOrEmpty(nextPageToken)) {
           request = request.toBuilder().setPageToken(nextPageToken).build();
         } else {
           break;
         }
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.ListGrantsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.ListGrantsResponse>` |   |

### listGrantsPagedCallable()

    public final UnaryCallable<ListGrantsRequest,PrivilegedAccessManagerClient.ListGrantsPagedResponse> listGrantsPagedCallable()

Lists grants for a given entitlement.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       ListGrantsRequest request =
           ListGrantsRequest.newBuilder()
               .setParent(
                   EntitlementName.ofProjectLocationEntitlementName(
                           "[PROJECT]", "[LOCATION]", "[ENTITLEMENT]")
                       .toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setFilter("filter-1274492040")
               .setOrderBy("orderBy-1207110587")
               .build();
       ApiFuture<Grant> future =
           privilegedAccessManagerClient.listGrantsPagedCallable().futureCall(request);
       // Do something.
       for (Grant element : future.get().iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.ListGrantsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.PrivilegedAccessManagerClient.ListGrantsPagedResponse>` |   |

### listLocations(ListLocationsRequest request)

    public final PrivilegedAccessManagerClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request)

Lists information about the supported locations for this service.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       ListLocationsRequest request =
           ListLocationsRequest.newBuilder()
               .setName("name3373707")
               .setFilter("filter-1274492040")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       for (Location element : privilegedAccessManagerClient.listLocations(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `com.google.cloud.location.ListLocationsRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.PrivilegedAccessManagerClient.ListLocationsPagedResponse` |   |

### listLocationsCallable()

    public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()

Lists information about the supported locations for this service.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       ListLocationsRequest request =
           ListLocationsRequest.newBuilder()
               .setName("name3373707")
               .setFilter("filter-1274492040")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       while (true) {
         ListLocationsResponse response =
             privilegedAccessManagerClient.listLocationsCallable().call(request);
         for (Location element : response.getLocationsList()) {
           // doThingsWith(element);
         }
         String nextPageToken = response.getNextPageToken();
         if (!Strings.isNullOrEmpty(nextPageToken)) {
           request = request.toBuilder().setPageToken(nextPageToken).build();
         } else {
           break;
         }
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse>` |   |

### listLocationsPagedCallable()

    public final UnaryCallable<ListLocationsRequest,PrivilegedAccessManagerClient.ListLocationsPagedResponse> listLocationsPagedCallable()

Lists information about the supported locations for this service.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       ListLocationsRequest request =
           ListLocationsRequest.newBuilder()
               .setName("name3373707")
               .setFilter("filter-1274492040")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       ApiFuture<Location> future =
           privilegedAccessManagerClient.listLocationsPagedCallable().futureCall(request);
       // Do something.
       for (Location element : future.get().iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<com.google.cloud.location.ListLocationsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.PrivilegedAccessManagerClient.ListLocationsPagedResponse>` |   |

### revokeGrantAsync(RevokeGrantRequest request)

    public final OperationFuture<Grant,OperationMetadata> revokeGrantAsync(RevokeGrantRequest request)

`RevokeGrant` is used to immediately revoke access for a grant. This method can be called when
the grant is in a non-terminal state.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       RevokeGrantRequest request =
           RevokeGrantRequest.newBuilder()
               .setName(
                   GrantName.ofProjectLocationEntitlementGrantName(
                           "[PROJECT]", "[LOCATION]", "[ENTITLEMENT]", "[GRANT]")
                       .toString())
               .setReason("reason-934964668")
               .build();
       Grant response = privilegedAccessManagerClient.revokeGrantAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.RevokeGrantRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Grant,https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.OperationMetadata>` |   |

### revokeGrantCallable()

    public final UnaryCallable<RevokeGrantRequest,Operation> revokeGrantCallable()

`RevokeGrant` is used to immediately revoke access for a grant. This method can be called when
the grant is in a non-terminal state.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       RevokeGrantRequest request =
           RevokeGrantRequest.newBuilder()
               .setName(
                   GrantName.ofProjectLocationEntitlementGrantName(
                           "[PROJECT]", "[LOCATION]", "[ENTITLEMENT]", "[GRANT]")
                       .toString())
               .setReason("reason-934964668")
               .build();
       ApiFuture<Operation> future =
           privilegedAccessManagerClient.revokeGrantCallable().futureCall(request);
       // Do something.
       Operation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.RevokeGrantRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### revokeGrantOperationCallable()

    public final OperationCallable<RevokeGrantRequest,Grant,OperationMetadata> revokeGrantOperationCallable()

`RevokeGrant` is used to immediately revoke access for a grant. This method can be called when
the grant is in a non-terminal state.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       RevokeGrantRequest request =
           RevokeGrantRequest.newBuilder()
               .setName(
                   GrantName.ofProjectLocationEntitlementGrantName(
                           "[PROJECT]", "[LOCATION]", "[ENTITLEMENT]", "[GRANT]")
                       .toString())
               .setReason("reason-934964668")
               .build();
       OperationFuture<Grant, OperationMetadata> future =
           privilegedAccessManagerClient.revokeGrantOperationCallable().futureCall(request);
       // Do something.
       Grant response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.RevokeGrantRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Grant,https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.OperationMetadata>` |   |

### searchEntitlements(SearchEntitlementsRequest request)

    public final PrivilegedAccessManagerClient.SearchEntitlementsPagedResponse searchEntitlements(SearchEntitlementsRequest request)

`SearchEntitlements` returns entitlements on which the caller has the specified access.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       SearchEntitlementsRequest request =
           SearchEntitlementsRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setFilter("filter-1274492040")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       for (Entitlement element :
           privilegedAccessManagerClient.searchEntitlements(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.SearchEntitlementsRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.PrivilegedAccessManagerClient.SearchEntitlementsPagedResponse` |   |

### searchEntitlementsCallable()

    public final UnaryCallable<SearchEntitlementsRequest,SearchEntitlementsResponse> searchEntitlementsCallable()

`SearchEntitlements` returns entitlements on which the caller has the specified access.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       SearchEntitlementsRequest request =
           SearchEntitlementsRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setFilter("filter-1274492040")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       while (true) {
         SearchEntitlementsResponse response =
             privilegedAccessManagerClient.searchEntitlementsCallable().call(request);
         for (Entitlement element : response.getEntitlementsList()) {
           // doThingsWith(element);
         }
         String nextPageToken = response.getNextPageToken();
         if (!Strings.isNullOrEmpty(nextPageToken)) {
           request = request.toBuilder().setPageToken(nextPageToken).build();
         } else {
           break;
         }
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.SearchEntitlementsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.SearchEntitlementsResponse>` |   |

### searchEntitlementsPagedCallable()

    public final UnaryCallable<SearchEntitlementsRequest,PrivilegedAccessManagerClient.SearchEntitlementsPagedResponse> searchEntitlementsPagedCallable()

`SearchEntitlements` returns entitlements on which the caller has the specified access.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       SearchEntitlementsRequest request =
           SearchEntitlementsRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setFilter("filter-1274492040")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       ApiFuture<Entitlement> future =
           privilegedAccessManagerClient.searchEntitlementsPagedCallable().futureCall(request);
       // Do something.
       for (Entitlement element : future.get().iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.SearchEntitlementsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.PrivilegedAccessManagerClient.SearchEntitlementsPagedResponse>` |   |

### searchGrants(SearchGrantsRequest request)

    public final PrivilegedAccessManagerClient.SearchGrantsPagedResponse searchGrants(SearchGrantsRequest request)

`SearchGrants` returns grants that are related to the calling user in the specified way.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       SearchGrantsRequest request =
           SearchGrantsRequest.newBuilder()
               .setParent(
                   EntitlementName.ofProjectLocationEntitlementName(
                           "[PROJECT]", "[LOCATION]", "[ENTITLEMENT]")
                       .toString())
               .setFilter("filter-1274492040")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       for (Grant element : privilegedAccessManagerClient.searchGrants(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.SearchGrantsRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.PrivilegedAccessManagerClient.SearchGrantsPagedResponse` |   |

### searchGrantsCallable()

    public final UnaryCallable<SearchGrantsRequest,SearchGrantsResponse> searchGrantsCallable()

`SearchGrants` returns grants that are related to the calling user in the specified way.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       SearchGrantsRequest request =
           SearchGrantsRequest.newBuilder()
               .setParent(
                   EntitlementName.ofProjectLocationEntitlementName(
                           "[PROJECT]", "[LOCATION]", "[ENTITLEMENT]")
                       .toString())
               .setFilter("filter-1274492040")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       while (true) {
         SearchGrantsResponse response =
             privilegedAccessManagerClient.searchGrantsCallable().call(request);
         for (Grant element : response.getGrantsList()) {
           // doThingsWith(element);
         }
         String nextPageToken = response.getNextPageToken();
         if (!Strings.isNullOrEmpty(nextPageToken)) {
           request = request.toBuilder().setPageToken(nextPageToken).build();
         } else {
           break;
         }
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.SearchGrantsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.SearchGrantsResponse>` |   |

### searchGrantsPagedCallable()

    public final UnaryCallable<SearchGrantsRequest,PrivilegedAccessManagerClient.SearchGrantsPagedResponse> searchGrantsPagedCallable()

`SearchGrants` returns grants that are related to the calling user in the specified way.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       SearchGrantsRequest request =
           SearchGrantsRequest.newBuilder()
               .setParent(
                   EntitlementName.ofProjectLocationEntitlementName(
                           "[PROJECT]", "[LOCATION]", "[ENTITLEMENT]")
                       .toString())
               .setFilter("filter-1274492040")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       ApiFuture<Grant> future =
           privilegedAccessManagerClient.searchGrantsPagedCallable().futureCall(request);
       // Do something.
       for (Grant element : future.get().iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.SearchGrantsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.PrivilegedAccessManagerClient.SearchGrantsPagedResponse>` |   |

### shutdown()

    public void shutdown()

### shutdownNow()

    public void shutdownNow()

### updateEntitlementAsync(Entitlement entitlement, FieldMask updateMask)

    public final OperationFuture<Entitlement,OperationMetadata> updateEntitlementAsync(Entitlement entitlement, FieldMask updateMask)

Updates the entitlement specified in the request. Updated fields in the entitlement need to be
specified in an update mask. The changes made to an entitlement are applicable only on future
grants of the entitlement. However, if new approvers are added or existing approvers are
removed from the approval workflow, the changes are effective on existing grants.

The following fields are not supported for updates:

\* All immutable fields \* Entitlement name \* Resource name \* Resource type
\* Adding an approval workflow in an entitlement which previously had no approval workflow.
\* Deleting the approval workflow from an entitlement. \* Adding or deleting a step in
the approval workflow (only one step is supported)

Note that updates are allowed on the list of approvers in an approval workflow step.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       Entitlement entitlement = Entitlement.newBuilder().build();
       FieldMask updateMask = FieldMask.newBuilder().build();
       Entitlement response =
           privilegedAccessManagerClient.updateEntitlementAsync(entitlement, updateMask).get();
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `entitlement` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Entitlement` Required. The entitlement resource that is updated. |
| `updateMask` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.FieldMask.html` Required. The list of fields to update. A field is overwritten if, and only if, it is in the mask. Any immutable fields set in the mask are ignored by the server. Repeated fields and map fields are only allowed in the last position of a `paths` string and overwrite the existing values. Hence an update to a repeated field or a map should contain the entire list of values. The fields specified in the update_mask are relative to the resource and not to the request. (e.g. `MaxRequestDuration`; \*not\* `entitlement.MaxRequestDuration`) A value of '\*' for this field refers to full replacement of the resource. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Entitlement,https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.OperationMetadata>` |   |

### updateEntitlementAsync(UpdateEntitlementRequest request)

    public final OperationFuture<Entitlement,OperationMetadata> updateEntitlementAsync(UpdateEntitlementRequest request)

Updates the entitlement specified in the request. Updated fields in the entitlement need to be
specified in an update mask. The changes made to an entitlement are applicable only on future
grants of the entitlement. However, if new approvers are added or existing approvers are
removed from the approval workflow, the changes are effective on existing grants.

The following fields are not supported for updates:

\* All immutable fields \* Entitlement name \* Resource name \* Resource type
\* Adding an approval workflow in an entitlement which previously had no approval workflow.
\* Deleting the approval workflow from an entitlement. \* Adding or deleting a step in
the approval workflow (only one step is supported)

Note that updates are allowed on the list of approvers in an approval workflow step.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       UpdateEntitlementRequest request =
           UpdateEntitlementRequest.newBuilder()
               .setEntitlement(Entitlement.newBuilder().build())
               .setUpdateMask(FieldMask.newBuilder().build())
               .build();
       Entitlement response = privilegedAccessManagerClient.updateEntitlementAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.UpdateEntitlementRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Entitlement,https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.OperationMetadata>` |   |

### updateEntitlementCallable()

    public final UnaryCallable<UpdateEntitlementRequest,Operation> updateEntitlementCallable()

Updates the entitlement specified in the request. Updated fields in the entitlement need to be
specified in an update mask. The changes made to an entitlement are applicable only on future
grants of the entitlement. However, if new approvers are added or existing approvers are
removed from the approval workflow, the changes are effective on existing grants.

The following fields are not supported for updates:

\* All immutable fields \* Entitlement name \* Resource name \* Resource type
\* Adding an approval workflow in an entitlement which previously had no approval workflow.
\* Deleting the approval workflow from an entitlement. \* Adding or deleting a step in
the approval workflow (only one step is supported)

Note that updates are allowed on the list of approvers in an approval workflow step.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       UpdateEntitlementRequest request =
           UpdateEntitlementRequest.newBuilder()
               .setEntitlement(Entitlement.newBuilder().build())
               .setUpdateMask(FieldMask.newBuilder().build())
               .build();
       ApiFuture<Operation> future =
           privilegedAccessManagerClient.updateEntitlementCallable().futureCall(request);
       // Do something.
       Operation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.UpdateEntitlementRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### updateEntitlementOperationCallable()

    public final OperationCallable<UpdateEntitlementRequest,Entitlement,OperationMetadata> updateEntitlementOperationCallable()

Updates the entitlement specified in the request. Updated fields in the entitlement need to be
specified in an update mask. The changes made to an entitlement are applicable only on future
grants of the entitlement. However, if new approvers are added or existing approvers are
removed from the approval workflow, the changes are effective on existing grants.

The following fields are not supported for updates:

\* All immutable fields \* Entitlement name \* Resource name \* Resource type
\* Adding an approval workflow in an entitlement which previously had no approval workflow.
\* Deleting the approval workflow from an entitlement. \* Adding or deleting a step in
the approval workflow (only one step is supported)

Note that updates are allowed on the list of approvers in an approval workflow step.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (PrivilegedAccessManagerClient privilegedAccessManagerClient =
         PrivilegedAccessManagerClient.create()) {
       UpdateEntitlementRequest request =
           UpdateEntitlementRequest.newBuilder()
               .setEntitlement(Entitlement.newBuilder().build())
               .setUpdateMask(FieldMask.newBuilder().build())
               .build();
       OperationFuture<Entitlement, OperationMetadata> future =
           privilegedAccessManagerClient.updateEntitlementOperationCallable().futureCall(request);
       // Do something.
       Entitlement response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.UpdateEntitlementRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.Entitlement,https://docs.cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/com.google.cloud.privilegedaccessmanager.v1.OperationMetadata>` |   |