0.20.0 (latest) 0.16.0 0.15.0 0.14.0 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/PartnerLinkServiceClient.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 partner links.

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 (PartnerLinkServiceClient partnerLinkServiceClient = PartnerLinkServiceClient.create()) {
       AccountName parent = AccountName.of("[ACCOUNT_TYPE]", "[ACCOUNT]");
       PartnerLink partnerLink = PartnerLink.newBuilder().build();
       PartnerLink response = partnerLinkServiceClient.createPartnerLink(parent, partnerLink);
     }
     
Note: close() needs to be called on the PartnerLinkServiceClient 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 |
|---|---|---|
| CreatePartnerLink | Creates a partner link for the given account. Authorization Headers: This method supports the following optional headers to define how the API authorizes access for the request: - `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}` | Request object method variants only take one parameter, a request object, which must be constructed before the call. - createPartnerLink(CreatePartnerLinkRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - createPartnerLink(AccountName parent, PartnerLink partnerLink) - createPartnerLink(String parent, PartnerLink partnerLink) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - createPartnerLinkCallable() |
| DeletePartnerLink | Deletes a partner link for the given account. Authorization Headers: This method supports the following optional headers to define how the API authorizes access for the request: - `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}` | Request object method variants only take one parameter, a request object, which must be constructed before the call. - deletePartnerLink(DeletePartnerLinkRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - deletePartnerLink(PartnerLinkName name) - deletePartnerLink(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. - deletePartnerLinkCallable() |
| SearchPartnerLinks | Searches for all partner links to and from a given account. Authorization Headers: This method supports the following optional headers to define how the API authorizes access for the request: - `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}` | Request object method variants only take one parameter, a request object, which must be constructed before the call. - searchPartnerLinks(SearchPartnerLinksRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - searchPartnerLinks(AccountName parent) - searchPartnerLinks(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. - searchPartnerLinksPagedCallable() - searchPartnerLinksCallable() |
[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 PartnerLinkServiceSettings 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
     PartnerLinkServiceSettings partnerLinkServiceSettings =
         PartnerLinkServiceSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
             .build();
     PartnerLinkServiceClient partnerLinkServiceClient =
         PartnerLinkServiceClient.create(partnerLinkServiceSettings);
     
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
     PartnerLinkServiceSettings partnerLinkServiceSettings =
         PartnerLinkServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
     PartnerLinkServiceClient partnerLinkServiceClient =
         PartnerLinkServiceClient.create(partnerLinkServiceSettings);
     
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
     PartnerLinkServiceSettings partnerLinkServiceSettings =
         PartnerLinkServiceSettings.newHttpJsonBuilder().build();
     PartnerLinkServiceClient partnerLinkServiceClient =
         PartnerLinkServiceClient.create(partnerLinkServiceSettings);
     
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) \> PartnerLinkServiceClient

## Static Methods

### create()

    public static final PartnerLinkServiceClient create()

Constructs an instance of PartnerLinkServiceClient with default settings.

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

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

### create(PartnerLinkServiceSettings settings)

    public static final PartnerLinkServiceClient create(PartnerLinkServiceSettings settings)

Constructs an instance of PartnerLinkServiceClient, 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.PartnerLinkServiceSettings` |

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

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

### create(PartnerLinkServiceStub stub)

    public static final PartnerLinkServiceClient create(PartnerLinkServiceStub stub)

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

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

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

## Constructors

### PartnerLinkServiceClient(PartnerLinkServiceSettings settings)

    protected PartnerLinkServiceClient(PartnerLinkServiceSettings settings)

Constructs an instance of PartnerLinkServiceClient, 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.PartnerLinkServiceSettings` |

### PartnerLinkServiceClient(PartnerLinkServiceStub stub)

    protected PartnerLinkServiceClient(PartnerLinkServiceStub stub)

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

## 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()

### createPartnerLink(@Nullable AccountName parent, PartnerLink partnerLink)

    public final PartnerLink createPartnerLink(@Nullable AccountName parent, PartnerLink partnerLink)

Creates a partner link for the given account.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access
for the request:

- `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}`

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 (PartnerLinkServiceClient partnerLinkServiceClient = PartnerLinkServiceClient.create()) {
       AccountName parent = AccountName.of("[ACCOUNT_TYPE]", "[ACCOUNT]");
       PartnerLink partnerLink = PartnerLink.newBuilder().build();
       PartnerLink response = partnerLinkServiceClient.createPartnerLink(parent, partnerLink);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `@org.jspecify.annotations.Nullable com.google.ads.datamanager.v1.AccountName` Required. The parent, which owns this collection of partner links. Format: accountTypes/{account_type}/accounts/{account} |
| `partnerLink` | `https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.PartnerLink` Required. The partner link to create. |

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

### createPartnerLink(CreatePartnerLinkRequest request)

    public final PartnerLink createPartnerLink(CreatePartnerLinkRequest request)

Creates a partner link for the given account.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access
for the request:

- `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}`

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 (PartnerLinkServiceClient partnerLinkServiceClient = PartnerLinkServiceClient.create()) {
       CreatePartnerLinkRequest request =
           CreatePartnerLinkRequest.newBuilder()
               .setParent(AccountName.of("[ACCOUNT_TYPE]", "[ACCOUNT]").toString())
               .setPartnerLink(PartnerLink.newBuilder().build())
               .build();
       PartnerLink response = partnerLinkServiceClient.createPartnerLink(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.CreatePartnerLinkRequest` 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.PartnerLink` |   |

### createPartnerLink(String parent, PartnerLink partnerLink)

    public final PartnerLink createPartnerLink(String parent, PartnerLink partnerLink)

Creates a partner link for the given account.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access
for the request:

- `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}`

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 (PartnerLinkServiceClient partnerLinkServiceClient = PartnerLinkServiceClient.create()) {
       String parent = AccountName.of("[ACCOUNT_TYPE]", "[ACCOUNT]").toString();
       PartnerLink partnerLink = PartnerLink.newBuilder().build();
       PartnerLink response = partnerLinkServiceClient.createPartnerLink(parent, partnerLink);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The parent, which owns this collection of partner links. Format: accountTypes/{account_type}/accounts/{account} |
| `partnerLink` | `https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.PartnerLink` Required. The partner link to create. |

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

### createPartnerLinkCallable()

    public final UnaryCallable<CreatePartnerLinkRequest,PartnerLink> createPartnerLinkCallable()

Creates a partner link for the given account.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access
for the request:

- `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}`

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

### deletePartnerLink(@Nullable PartnerLinkName name)

    public final void deletePartnerLink(@Nullable PartnerLinkName name)

Deletes a partner link for the given account.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access
for the request:

- `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}`

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 (PartnerLinkServiceClient partnerLinkServiceClient = PartnerLinkServiceClient.create()) {
       PartnerLinkName name = PartnerLinkName.of("[ACCOUNT_TYPE]", "[ACCOUNT]", "[PARTNER_LINK]");
       partnerLinkServiceClient.deletePartnerLink(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `@org.jspecify.annotations.Nullable com.google.ads.datamanager.v1.PartnerLinkName` Required. The resource name of the partner link to delete. Format: accountTypes/{account_type}/accounts/{account}/partnerLinks/{partner_link} |

### deletePartnerLink(DeletePartnerLinkRequest request)

    public final void deletePartnerLink(DeletePartnerLinkRequest request)

Deletes a partner link for the given account.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access
for the request:

- `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}`

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

### deletePartnerLink(String name)

    public final void deletePartnerLink(String name)

Deletes a partner link for the given account.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access
for the request:

- `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}`

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 (PartnerLinkServiceClient partnerLinkServiceClient = PartnerLinkServiceClient.create()) {
       String name = PartnerLinkName.of("[ACCOUNT_TYPE]", "[ACCOUNT]", "[PARTNER_LINK]").toString();
       partnerLinkServiceClient.deletePartnerLink(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The resource name of the partner link to delete. Format: accountTypes/{account_type}/accounts/{account}/partnerLinks/{partner_link} |

### deletePartnerLinkCallable()

    public final UnaryCallable<DeletePartnerLinkRequest,Empty> deletePartnerLinkCallable()

Deletes a partner link for the given account.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access
for the request:

- `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}`

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 (PartnerLinkServiceClient partnerLinkServiceClient = PartnerLinkServiceClient.create()) {
       DeletePartnerLinkRequest request =
           DeletePartnerLinkRequest.newBuilder()
               .setName(
                   PartnerLinkName.of("[ACCOUNT_TYPE]", "[ACCOUNT]", "[PARTNER_LINK]").toString())
               .build();
       ApiFuture<Empty> future =
           partnerLinkServiceClient.deletePartnerLinkCallable().futureCall(request);
       // Do something.
       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.DeletePartnerLinkRequest,https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html>` |   |

### getSettings()

    public final @Nullable PartnerLinkServiceSettings getSettings()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `@org.jspecify.annotations.Nullable com.google.ads.datamanager.v1.PartnerLinkServiceSettings` |   |

### getStub()

    public PartnerLinkServiceStub getStub()

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

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

### searchPartnerLinks(@Nullable AccountName parent)

    public final PartnerLinkServiceClient.SearchPartnerLinksPagedResponse searchPartnerLinks(@Nullable AccountName parent)

Searches for all partner links to and from a given account.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access
for the request:

- `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}`

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 (PartnerLinkServiceClient partnerLinkServiceClient = PartnerLinkServiceClient.create()) {
       AccountName parent = AccountName.of("[ACCOUNT_TYPE]", "[ACCOUNT]");
       for (PartnerLink element : partnerLinkServiceClient.searchPartnerLinks(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `@org.jspecify.annotations.Nullable com.google.ads.datamanager.v1.AccountName` Required. Account to search for partner links. If no `filter` is specified, all partner links where this account is either the `owning_account` or `partner_account` are returned. Format: `accountTypes/{account_type}/accounts/{account}` |

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

### searchPartnerLinks(SearchPartnerLinksRequest request)

    public final PartnerLinkServiceClient.SearchPartnerLinksPagedResponse searchPartnerLinks(SearchPartnerLinksRequest request)

Searches for all partner links to and from a given account.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access
for the request:

- `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}`

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 (PartnerLinkServiceClient partnerLinkServiceClient = PartnerLinkServiceClient.create()) {
       SearchPartnerLinksRequest request =
           SearchPartnerLinksRequest.newBuilder()
               .setParent(AccountName.of("[ACCOUNT_TYPE]", "[ACCOUNT]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setFilter("filter-1274492040")
               .build();
       for (PartnerLink element :
           partnerLinkServiceClient.searchPartnerLinks(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/data-manager/latest/com.google.ads.datamanager.v1.SearchPartnerLinksRequest` 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.PartnerLinkServiceClient.SearchPartnerLinksPagedResponse` |   |

### searchPartnerLinks(String parent)

    public final PartnerLinkServiceClient.SearchPartnerLinksPagedResponse searchPartnerLinks(String parent)

Searches for all partner links to and from a given account.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access
for the request:

- `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}`

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 (PartnerLinkServiceClient partnerLinkServiceClient = PartnerLinkServiceClient.create()) {
       String parent = AccountName.of("[ACCOUNT_TYPE]", "[ACCOUNT]").toString();
       for (PartnerLink element : partnerLinkServiceClient.searchPartnerLinks(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Account to search for partner links. If no `filter` is specified, all partner links where this account is either the `owning_account` or `partner_account` are returned. Format: `accountTypes/{account_type}/accounts/{account}` |

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

### searchPartnerLinksCallable()

    public final UnaryCallable<SearchPartnerLinksRequest,SearchPartnerLinksResponse> searchPartnerLinksCallable()

Searches for all partner links to and from a given account.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access
for the request:

- `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}`

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

### searchPartnerLinksPagedCallable()

    public final UnaryCallable<SearchPartnerLinksRequest,PartnerLinkServiceClient.SearchPartnerLinksPagedResponse> searchPartnerLinksPagedCallable()

Searches for all partner links to and from a given account.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access
for the request:

- `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}`

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

### shutdown()

    public void shutdown()

### shutdownNow()

    public void shutdownNow()