# Class UserListDirectLicenseServiceClient (0.14.0)

0.14.0 (latest) 0.12.0 0.9.0 0.8.0 0.6.0 0.4.0 0.3.0 0.2.0 0.1.0

|---|---|---|
| [GitHub Repository](https://github.com/googleapis/google-cloud-java/tree/main/java-datamanager/data-manager/src/main/java/com/google/ads/datamanager/v1/UserListDirectLicenseServiceClient.java) | [Product Reference](https://developers.google.com/data-manager) | [RPC Documentation](https://developers.google.com/data-manager/api/reference/rpc) |

Service Description: Service for managing user list direct licenses. Delete is not a supported
operation for UserListDirectLicenses. Callers should update the license status to DISABLED to
instead to deactivate a license.

This feature is only available to data partners.

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 (UserListDirectLicenseServiceClient userListDirectLicenseServiceClient =
         UserListDirectLicenseServiceClient.create()) {
       AccountName parent = AccountName.of("[ACCOUNT_TYPE]", "[ACCOUNT]");
       UserListDirectLicense userListDirectLicense = UserListDirectLicense.newBuilder().build();
       UserListDirectLicense response =
           userListDirectLicenseServiceClient.createUserListDirectLicense(
               parent, userListDirectLicense);
     }
     
Note: close() needs to be called on the UserListDirectLicenseServiceClient 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 |
|---|---|---|
| CreateUserListDirectLicense | Creates a user list direct license. This feature is only available to data partners. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - createUserListDirectLicense(CreateUserListDirectLicenseRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - createUserListDirectLicense(AccountName parent, UserListDirectLicense userListDirectLicense) - createUserListDirectLicense(String parent, UserListDirectLicense userListDirectLicense) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - createUserListDirectLicenseCallable() |
| GetUserListDirectLicense | Retrieves a user list direct license. This feature is only available to data partners. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - getUserListDirectLicense(GetUserListDirectLicenseRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - getUserListDirectLicense(UserListDirectLicenseName name) - getUserListDirectLicense(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. - getUserListDirectLicenseCallable() |
| UpdateUserListDirectLicense | Updates a user list direct license. This feature is only available to data partners. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - updateUserListDirectLicense(UpdateUserListDirectLicenseRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - updateUserListDirectLicense(UserListDirectLicense userListDirectLicense, 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. - updateUserListDirectLicenseCallable() |
| ListUserListDirectLicenses | Lists all user list direct licenses owned by the parent account. This feature is only available to data partners. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - listUserListDirectLicenses(ListUserListDirectLicensesRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - listUserListDirectLicenses(AccountName parent) - listUserListDirectLicenses(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. - listUserListDirectLicensesPagedCallable() - listUserListDirectLicensesCallable() |
[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
UserListDirectLicenseServiceSettings 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
     UserListDirectLicenseServiceSettings userListDirectLicenseServiceSettings =
         UserListDirectLicenseServiceSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
             .build();
     UserListDirectLicenseServiceClient userListDirectLicenseServiceClient =
         UserListDirectLicenseServiceClient.create(userListDirectLicenseServiceSettings);
     
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
     UserListDirectLicenseServiceSettings userListDirectLicenseServiceSettings =
         UserListDirectLicenseServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
     UserListDirectLicenseServiceClient userListDirectLicenseServiceClient =
         UserListDirectLicenseServiceClient.create(userListDirectLicenseServiceSettings);
     
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
     UserListDirectLicenseServiceSettings userListDirectLicenseServiceSettings =
         UserListDirectLicenseServiceSettings.newHttpJsonBuilder().build();
     UserListDirectLicenseServiceClient userListDirectLicenseServiceClient =
         UserListDirectLicenseServiceClient.create(userListDirectLicenseServiceSettings);
     
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) \> UserListDirectLicenseServiceClient

## Static Methods

### create()

    public static final UserListDirectLicenseServiceClient create()

Constructs an instance of UserListDirectLicenseServiceClient with default settings.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.UserListDirectLicenseServiceClient` |   |

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

### create(UserListDirectLicenseServiceSettings settings)

    public static final UserListDirectLicenseServiceClient create(UserListDirectLicenseServiceSettings settings)

Constructs an instance of UserListDirectLicenseServiceClient, 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/data-manager/latest/com.google.ads.datamanager.v1.UserListDirectLicenseServiceSettings` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.UserListDirectLicenseServiceClient` |   |

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

### create(UserListDirectLicenseServiceStub stub)

    public static final UserListDirectLicenseServiceClient create(UserListDirectLicenseServiceStub stub)

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `stub` | `https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.stub.UserListDirectLicenseServiceStub` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.UserListDirectLicenseServiceClient` |   |

## Constructors

### UserListDirectLicenseServiceClient(UserListDirectLicenseServiceSettings settings)

    protected UserListDirectLicenseServiceClient(UserListDirectLicenseServiceSettings settings)

Constructs an instance of UserListDirectLicenseServiceClient, 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/data-manager/latest/com.google.ads.datamanager.v1.UserListDirectLicenseServiceSettings` |

### UserListDirectLicenseServiceClient(UserListDirectLicenseServiceStub stub)

    protected UserListDirectLicenseServiceClient(UserListDirectLicenseServiceStub stub)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `stub` | `https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.stub.UserListDirectLicenseServiceStub` |

## Methods

### 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` |   |

### close()

    public final void close()

### createUserListDirectLicense(AccountName parent, UserListDirectLicense userListDirectLicense)

    public final UserListDirectLicense createUserListDirectLicense(AccountName parent, UserListDirectLicense userListDirectLicense)

Creates a user list direct license.

This feature is only available to data partners.

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 (UserListDirectLicenseServiceClient userListDirectLicenseServiceClient =
         UserListDirectLicenseServiceClient.create()) {
       AccountName parent = AccountName.of("[ACCOUNT_TYPE]", "[ACCOUNT]");
       UserListDirectLicense userListDirectLicense = UserListDirectLicense.newBuilder().build();
       UserListDirectLicense response =
           userListDirectLicenseServiceClient.createUserListDirectLicense(
               parent, userListDirectLicense);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.AccountName` Required. The account that owns the user list being licensed. Should be in the format accountTypes/{ACCOUNT_TYPE}/accounts/{ACCOUNT_ID} |
| `userListDirectLicense` | `https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.UserListDirectLicense` Required. The user list direct license to create. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.UserListDirectLicense` |   |

### createUserListDirectLicense(CreateUserListDirectLicenseRequest request)

    public final UserListDirectLicense createUserListDirectLicense(CreateUserListDirectLicenseRequest request)

Creates a user list direct license.

This feature is only available to data partners.

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 (UserListDirectLicenseServiceClient userListDirectLicenseServiceClient =
         UserListDirectLicenseServiceClient.create()) {
       CreateUserListDirectLicenseRequest request =
           CreateUserListDirectLicenseRequest.newBuilder()
               .setParent(AccountName.of("[ACCOUNT_TYPE]", "[ACCOUNT]").toString())
               .setUserListDirectLicense(UserListDirectLicense.newBuilder().build())
               .build();
       UserListDirectLicense response =
           userListDirectLicenseServiceClient.createUserListDirectLicense(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.CreateUserListDirectLicenseRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.UserListDirectLicense` |   |

### createUserListDirectLicense(String parent, UserListDirectLicense userListDirectLicense)

    public final UserListDirectLicense createUserListDirectLicense(String parent, UserListDirectLicense userListDirectLicense)

Creates a user list direct license.

This feature is only available to data partners.

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 (UserListDirectLicenseServiceClient userListDirectLicenseServiceClient =
         UserListDirectLicenseServiceClient.create()) {
       String parent = AccountName.of("[ACCOUNT_TYPE]", "[ACCOUNT]").toString();
       UserListDirectLicense userListDirectLicense = UserListDirectLicense.newBuilder().build();
       UserListDirectLicense response =
           userListDirectLicenseServiceClient.createUserListDirectLicense(
               parent, userListDirectLicense);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The account that owns the user list being licensed. Should be in the format accountTypes/{ACCOUNT_TYPE}/accounts/{ACCOUNT_ID} |
| `userListDirectLicense` | `https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.UserListDirectLicense` Required. The user list direct license to create. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.UserListDirectLicense` |   |

### createUserListDirectLicenseCallable()

    public final UnaryCallable<CreateUserListDirectLicenseRequest,UserListDirectLicense> createUserListDirectLicenseCallable()

Creates a user list direct license.

This feature is only available to data partners.

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 (UserListDirectLicenseServiceClient userListDirectLicenseServiceClient =
         UserListDirectLicenseServiceClient.create()) {
       CreateUserListDirectLicenseRequest request =
           CreateUserListDirectLicenseRequest.newBuilder()
               .setParent(AccountName.of("[ACCOUNT_TYPE]", "[ACCOUNT]").toString())
               .setUserListDirectLicense(UserListDirectLicense.newBuilder().build())
               .build();
       ApiFuture<UserListDirectLicense> future =
           userListDirectLicenseServiceClient
               .createUserListDirectLicenseCallable()
               .futureCall(request);
       // Do something.
       UserListDirectLicense 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/data-manager/latest/com.google.ads.datamanager.v1.CreateUserListDirectLicenseRequest,https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.UserListDirectLicense>` |   |

### getSettings()

    public final UserListDirectLicenseServiceSettings getSettings()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.UserListDirectLicenseServiceSettings` |   |

### getStub()

    public UserListDirectLicenseServiceStub getStub()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.stub.UserListDirectLicenseServiceStub` |   |

### getUserListDirectLicense(GetUserListDirectLicenseRequest request)

    public final UserListDirectLicense getUserListDirectLicense(GetUserListDirectLicenseRequest request)

Retrieves a user list direct license.

This feature is only available to data partners.

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 (UserListDirectLicenseServiceClient userListDirectLicenseServiceClient =
         UserListDirectLicenseServiceClient.create()) {
       GetUserListDirectLicenseRequest request =
           GetUserListDirectLicenseRequest.newBuilder()
               .setName(
                   UserListDirectLicenseName.of(
                           "[ACCOUNT_TYPE]", "[ACCOUNT]", "[USER_LIST_DIRECT_LICENSE]")
                       .toString())
               .build();
       UserListDirectLicense response =
           userListDirectLicenseServiceClient.getUserListDirectLicense(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.GetUserListDirectLicenseRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.UserListDirectLicense` |   |

### getUserListDirectLicense(UserListDirectLicenseName name)

    public final UserListDirectLicense getUserListDirectLicense(UserListDirectLicenseName name)

Retrieves a user list direct license.

This feature is only available to data partners.

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 (UserListDirectLicenseServiceClient userListDirectLicenseServiceClient =
         UserListDirectLicenseServiceClient.create()) {
       UserListDirectLicenseName name =
           UserListDirectLicenseName.of("[ACCOUNT_TYPE]", "[ACCOUNT]", "[USER_LIST_DIRECT_LICENSE]");
       UserListDirectLicense response =
           userListDirectLicenseServiceClient.getUserListDirectLicense(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.UserListDirectLicenseName` Required. The resource name of the user list direct license. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.UserListDirectLicense` |   |

### getUserListDirectLicense(String name)

    public final UserListDirectLicense getUserListDirectLicense(String name)

Retrieves a user list direct license.

This feature is only available to data partners.

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 (UserListDirectLicenseServiceClient userListDirectLicenseServiceClient =
         UserListDirectLicenseServiceClient.create()) {
       String name =
           UserListDirectLicenseName.of("[ACCOUNT_TYPE]", "[ACCOUNT]", "[USER_LIST_DIRECT_LICENSE]")
               .toString();
       UserListDirectLicense response =
           userListDirectLicenseServiceClient.getUserListDirectLicense(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The resource name of the user list direct license. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.UserListDirectLicense` |   |

### getUserListDirectLicenseCallable()

    public final UnaryCallable<GetUserListDirectLicenseRequest,UserListDirectLicense> getUserListDirectLicenseCallable()

Retrieves a user list direct license.

This feature is only available to data partners.

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 (UserListDirectLicenseServiceClient userListDirectLicenseServiceClient =
         UserListDirectLicenseServiceClient.create()) {
       GetUserListDirectLicenseRequest request =
           GetUserListDirectLicenseRequest.newBuilder()
               .setName(
                   UserListDirectLicenseName.of(
                           "[ACCOUNT_TYPE]", "[ACCOUNT]", "[USER_LIST_DIRECT_LICENSE]")
                       .toString())
               .build();
       ApiFuture<UserListDirectLicense> future =
           userListDirectLicenseServiceClient.getUserListDirectLicenseCallable().futureCall(request);
       // Do something.
       UserListDirectLicense 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/data-manager/latest/com.google.ads.datamanager.v1.GetUserListDirectLicenseRequest,https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.UserListDirectLicense>` |   |

### 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` |   |

### listUserListDirectLicenses(AccountName parent)

    public final UserListDirectLicenseServiceClient.ListUserListDirectLicensesPagedResponse listUserListDirectLicenses(AccountName parent)

Lists all user list direct licenses owned by the parent account.

This feature is only available to data partners.

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 (UserListDirectLicenseServiceClient userListDirectLicenseServiceClient =
         UserListDirectLicenseServiceClient.create()) {
       AccountName parent = AccountName.of("[ACCOUNT_TYPE]", "[ACCOUNT]");
       for (UserListDirectLicense element :
           userListDirectLicenseServiceClient.listUserListDirectLicenses(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.AccountName` Required. The account whose licenses are being queried. Should be in the format accountTypes/{ACCOUNT_TYPE}/accounts/{ACCOUNT_ID} |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.UserListDirectLicenseServiceClient.ListUserListDirectLicensesPagedResponse` |   |

### listUserListDirectLicenses(ListUserListDirectLicensesRequest request)

    public final UserListDirectLicenseServiceClient.ListUserListDirectLicensesPagedResponse listUserListDirectLicenses(ListUserListDirectLicensesRequest request)

Lists all user list direct licenses owned by the parent account.

This feature is only available to data partners.

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 (UserListDirectLicenseServiceClient userListDirectLicenseServiceClient =
         UserListDirectLicenseServiceClient.create()) {
       ListUserListDirectLicensesRequest request =
           ListUserListDirectLicensesRequest.newBuilder()
               .setParent(AccountName.of("[ACCOUNT_TYPE]", "[ACCOUNT]").toString())
               .setFilter("filter-1274492040")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       for (UserListDirectLicense element :
           userListDirectLicenseServiceClient.listUserListDirectLicenses(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.ListUserListDirectLicensesRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.UserListDirectLicenseServiceClient.ListUserListDirectLicensesPagedResponse` |   |

### listUserListDirectLicenses(String parent)

    public final UserListDirectLicenseServiceClient.ListUserListDirectLicensesPagedResponse listUserListDirectLicenses(String parent)

Lists all user list direct licenses owned by the parent account.

This feature is only available to data partners.

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 (UserListDirectLicenseServiceClient userListDirectLicenseServiceClient =
         UserListDirectLicenseServiceClient.create()) {
       String parent = AccountName.of("[ACCOUNT_TYPE]", "[ACCOUNT]").toString();
       for (UserListDirectLicense element :
           userListDirectLicenseServiceClient.listUserListDirectLicenses(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The account whose licenses are being queried. Should be in the format accountTypes/{ACCOUNT_TYPE}/accounts/{ACCOUNT_ID} |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.UserListDirectLicenseServiceClient.ListUserListDirectLicensesPagedResponse` |   |

### listUserListDirectLicensesCallable()

    public final UnaryCallable<ListUserListDirectLicensesRequest,ListUserListDirectLicensesResponse> listUserListDirectLicensesCallable()

Lists all user list direct licenses owned by the parent account.

This feature is only available to data partners.

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 (UserListDirectLicenseServiceClient userListDirectLicenseServiceClient =
         UserListDirectLicenseServiceClient.create()) {
       ListUserListDirectLicensesRequest request =
           ListUserListDirectLicensesRequest.newBuilder()
               .setParent(AccountName.of("[ACCOUNT_TYPE]", "[ACCOUNT]").toString())
               .setFilter("filter-1274492040")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       while (true) {
         ListUserListDirectLicensesResponse response =
             userListDirectLicenseServiceClient.listUserListDirectLicensesCallable().call(request);
         for (UserListDirectLicense element : response.getUserListDirectLicensesList()) {
           // 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/data-manager/latest/com.google.ads.datamanager.v1.ListUserListDirectLicensesRequest,https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.ListUserListDirectLicensesResponse>` |   |

### listUserListDirectLicensesPagedCallable()

    public final UnaryCallable<ListUserListDirectLicensesRequest,UserListDirectLicenseServiceClient.ListUserListDirectLicensesPagedResponse> listUserListDirectLicensesPagedCallable()

Lists all user list direct licenses owned by the parent account.

This feature is only available to data partners.

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 (UserListDirectLicenseServiceClient userListDirectLicenseServiceClient =
         UserListDirectLicenseServiceClient.create()) {
       ListUserListDirectLicensesRequest request =
           ListUserListDirectLicensesRequest.newBuilder()
               .setParent(AccountName.of("[ACCOUNT_TYPE]", "[ACCOUNT]").toString())
               .setFilter("filter-1274492040")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       ApiFuture<UserListDirectLicense> future =
           userListDirectLicenseServiceClient
               .listUserListDirectLicensesPagedCallable()
               .futureCall(request);
       // Do something.
       for (UserListDirectLicense 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/data-manager/latest/com.google.ads.datamanager.v1.ListUserListDirectLicensesRequest,https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.UserListDirectLicenseServiceClient.ListUserListDirectLicensesPagedResponse>` |   |

### shutdown()

    public void shutdown()

### shutdownNow()

    public void shutdownNow()

### updateUserListDirectLicense(UpdateUserListDirectLicenseRequest request)

    public final UserListDirectLicense updateUserListDirectLicense(UpdateUserListDirectLicenseRequest request)

Updates a user list direct license.

This feature is only available to data partners.

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 (UserListDirectLicenseServiceClient userListDirectLicenseServiceClient =
         UserListDirectLicenseServiceClient.create()) {
       UpdateUserListDirectLicenseRequest request =
           UpdateUserListDirectLicenseRequest.newBuilder()
               .setUserListDirectLicense(UserListDirectLicense.newBuilder().build())
               .setUpdateMask(FieldMask.newBuilder().build())
               .build();
       UserListDirectLicense response =
           userListDirectLicenseServiceClient.updateUserListDirectLicense(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.UserListDirectLicense` |   |

### updateUserListDirectLicense(UserListDirectLicense userListDirectLicense, FieldMask updateMask)

    public final UserListDirectLicense updateUserListDirectLicense(UserListDirectLicense userListDirectLicense, FieldMask updateMask)

Updates a user list direct license.

This feature is only available to data partners.

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 (UserListDirectLicenseServiceClient userListDirectLicenseServiceClient =
         UserListDirectLicenseServiceClient.create()) {
       UserListDirectLicense userListDirectLicense = UserListDirectLicense.newBuilder().build();
       FieldMask updateMask = FieldMask.newBuilder().build();
       UserListDirectLicense response =
           userListDirectLicenseServiceClient.updateUserListDirectLicense(
               userListDirectLicense, updateMask);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `userListDirectLicense` | `https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.UserListDirectLicense` Required. The licenses' `name` field is used to identify the license to update. |
| `updateMask` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.FieldMask.html` Optional. The list of fields to update. The special character `*` is not supported and an `INVALID_UPDATE_MASK` error will be thrown if used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.UserListDirectLicense` |   |

### updateUserListDirectLicenseCallable()

    public final UnaryCallable<UpdateUserListDirectLicenseRequest,UserListDirectLicense> updateUserListDirectLicenseCallable()

Updates a user list direct license.

This feature is only available to data partners.

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 (UserListDirectLicenseServiceClient userListDirectLicenseServiceClient =
         UserListDirectLicenseServiceClient.create()) {
       UpdateUserListDirectLicenseRequest request =
           UpdateUserListDirectLicenseRequest.newBuilder()
               .setUserListDirectLicense(UserListDirectLicense.newBuilder().build())
               .setUpdateMask(FieldMask.newBuilder().build())
               .build();
       ApiFuture<UserListDirectLicense> future =
           userListDirectLicenseServiceClient
               .updateUserListDirectLicenseCallable()
               .futureCall(request);
       // Do something.
       UserListDirectLicense 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/data-manager/latest/com.google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest,https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.UserListDirectLicense>` |   |