0.44.0 (latest) 0.43.0 0.42.0 0.40.0 0.37.0 0.36.0 0.34.0 0.32.0 0.31.0 0.30.0 0.29.0 0.27.0 0.25.0 0.24.0 0.23.0 0.22.0 0.21.0 0.19.0 0.17.0 0.16.0 0.13.0 0.12.0 0.11.0 0.9.0 0.8.0 0.7.0 0.6.0 0.5.0 0.4.0 0.3.0 0.2.0 0.1.0

> [!WARNING]
> **Beta**
>
>
> This library 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](https://docs.cloud.google.com/products#product-launch-stages).

|---|---|
| [GitHub Repository](https://github.com/googleapis/google-cloud-java/tree/main/java-marketingplatformadminapi/admin/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/MarketingplatformAdminServiceClient.java) | [Product Reference](https://developers.google.com/analytics/devguides/config/gmp/v1) |

Service Description: Service Interface for the Google Marketing Platform Admin API.

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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
         MarketingplatformAdminServiceClient.create()) {
       OrganizationName name = OrganizationName.of("[ORGANIZATION]");
       Organization response = marketingplatformAdminServiceClient.getOrganization(name);
     }
     
Note: close() needs to be called on the MarketingplatformAdminServiceClient 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 |
|---|---|---|
| GetOrganization | Lookup for a single organization. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - getOrganization(GetOrganizationRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - getOrganization(OrganizationName name) - getOrganization(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. - getOrganizationCallable() |
| ListOrganizations | Returns a list of organizations that the user has access to. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - listOrganizations(ListOrganizationsRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - listOrganizationsPagedCallable() - listOrganizationsCallable() |
| FindSalesPartnerManagedClients | Returns a list of clients managed by the sales partner organization. User needs to be an OrgAdmin/BillingAdmin on the sales partner organization in order to view the end clients. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - findSalesPartnerManagedClients(FindSalesPartnerManagedClientsRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - findSalesPartnerManagedClientsCallable() |
| ListAnalyticsAccountLinks | Lists the Google Analytics accounts link to the specified Google Marketing Platform organization. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - listAnalyticsAccountLinks(ListAnalyticsAccountLinksRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - listAnalyticsAccountLinks(OrganizationName parent) - listAnalyticsAccountLinks(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. - listAnalyticsAccountLinksPagedCallable() - listAnalyticsAccountLinksCallable() |
| CreateAnalyticsAccountLink | Creates the link between the Analytics account and the Google Marketing Platform organization. User needs to be an org user, and admin on the Analytics account to create the link. If the account is already linked to an organization, user needs to unlink the account from the current organization, then try link again. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - createAnalyticsAccountLink(CreateAnalyticsAccountLinkRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - createAnalyticsAccountLink(OrganizationName parent, AnalyticsAccountLink analyticsAccountLink) - createAnalyticsAccountLink(String parent, AnalyticsAccountLink analyticsAccountLink) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - createAnalyticsAccountLinkCallable() |
| DeleteAnalyticsAccountLink | Deletes the AnalyticsAccountLink, which detaches the Analytics account from the Google Marketing Platform organization. User needs to be an org user, and admin on the Analytics account in order to delete the link. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - deleteAnalyticsAccountLink(DeleteAnalyticsAccountLinkRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - deleteAnalyticsAccountLink(AnalyticsAccountLinkName name) - deleteAnalyticsAccountLink(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. - deleteAnalyticsAccountLinkCallable() |
| SetPropertyServiceLevel | Updates the service level for an Analytics property. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - setPropertyServiceLevel(SetPropertyServiceLevelRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - setPropertyServiceLevel(String analyticsAccountLink) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - setPropertyServiceLevelCallable() |
| ReportPropertyUsage | Get the usage and billing data for properties within the organization for the specified month. Per direct client org, user needs to be OrgAdmin/BillingAdmin on the organization in order to view the billing and usage data. Per sales partner client org, user needs to be OrgAdmin/BillingAdmin on the sales partner org in order to view the billing and usage data, or OrgAdmin/BillingAdmin on the sales partner client org in order to view the usage data only. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - reportPropertyUsage(ReportPropertyUsageRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - reportPropertyUsage(String organization) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - reportPropertyUsageCallable() |
[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
MarketingplatformAdminServiceSettings 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
     MarketingplatformAdminServiceSettings marketingplatformAdminServiceSettings =
         MarketingplatformAdminServiceSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
             .build();
     MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
         MarketingplatformAdminServiceClient.create(marketingplatformAdminServiceSettings);
     
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
     MarketingplatformAdminServiceSettings marketingplatformAdminServiceSettings =
         MarketingplatformAdminServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
     MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
         MarketingplatformAdminServiceClient.create(marketingplatformAdminServiceSettings);
     
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
     MarketingplatformAdminServiceSettings marketingplatformAdminServiceSettings =
         MarketingplatformAdminServiceSettings.newHttpJsonBuilder().build();
     MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
         MarketingplatformAdminServiceClient.create(marketingplatformAdminServiceSettings);
     
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) \> MarketingplatformAdminServiceClient

## Static Methods

### create()

    public static final MarketingplatformAdminServiceClient create()

Constructs an instance of MarketingplatformAdminServiceClient with default settings.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient` |   |

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

### create(MarketingplatformAdminServiceSettings settings)

    public static final MarketingplatformAdminServiceClient create(MarketingplatformAdminServiceSettings settings)

Constructs an instance of MarketingplatformAdminServiceClient, 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/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceSettings` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient` |   |

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

### create(MarketingplatformAdminServiceStub stub)

    public static final MarketingplatformAdminServiceClient create(MarketingplatformAdminServiceStub stub)

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `stub` | `https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.stub.MarketingplatformAdminServiceStub` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient` |   |

## Constructors

### MarketingplatformAdminServiceClient(MarketingplatformAdminServiceSettings settings)

    protected MarketingplatformAdminServiceClient(MarketingplatformAdminServiceSettings settings)

Constructs an instance of MarketingplatformAdminServiceClient, 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/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceSettings` |

### MarketingplatformAdminServiceClient(MarketingplatformAdminServiceStub stub)

    protected MarketingplatformAdminServiceClient(MarketingplatformAdminServiceStub stub)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `stub` | `https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.stub.MarketingplatformAdminServiceStub` |

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

### createAnalyticsAccountLink(@Nullable OrganizationName parent, AnalyticsAccountLink analyticsAccountLink)

    public final AnalyticsAccountLink createAnalyticsAccountLink(@Nullable OrganizationName parent, AnalyticsAccountLink analyticsAccountLink)

Creates the link between the Analytics account and the Google Marketing Platform organization.

User needs to be an org user, and admin on the Analytics account to create the link. If the
account is already linked to an organization, user needs to unlink the account from the current
organization, then try link again.

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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
         MarketingplatformAdminServiceClient.create()) {
       OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
       AnalyticsAccountLink analyticsAccountLink = AnalyticsAccountLink.newBuilder().build();
       AnalyticsAccountLink response =
           marketingplatformAdminServiceClient.createAnalyticsAccountLink(
               parent, analyticsAccountLink);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `@org.jspecify.annotations.Nullable com.google.ads.marketingplatform.admin.v1alpha.OrganizationName` Required. The parent resource where this Analytics account link will be created. Format: organizations/{org_id} |
| `analyticsAccountLink` | `https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.AnalyticsAccountLink` Required. The Analytics account link to create. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.AnalyticsAccountLink` |   |

### createAnalyticsAccountLink(CreateAnalyticsAccountLinkRequest request)

    public final AnalyticsAccountLink createAnalyticsAccountLink(CreateAnalyticsAccountLinkRequest request)

Creates the link between the Analytics account and the Google Marketing Platform organization.

User needs to be an org user, and admin on the Analytics account to create the link. If the
account is already linked to an organization, user needs to unlink the account from the current
organization, then try link again.

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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
         MarketingplatformAdminServiceClient.create()) {
       CreateAnalyticsAccountLinkRequest request =
           CreateAnalyticsAccountLinkRequest.newBuilder()
               .setParent(OrganizationName.of("[ORGANIZATION]").toString())
               .setAnalyticsAccountLink(AnalyticsAccountLink.newBuilder().build())
               .build();
       AnalyticsAccountLink response =
           marketingplatformAdminServiceClient.createAnalyticsAccountLink(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.AnalyticsAccountLink` |   |

### createAnalyticsAccountLink(String parent, AnalyticsAccountLink analyticsAccountLink)

    public final AnalyticsAccountLink createAnalyticsAccountLink(String parent, AnalyticsAccountLink analyticsAccountLink)

Creates the link between the Analytics account and the Google Marketing Platform organization.

User needs to be an org user, and admin on the Analytics account to create the link. If the
account is already linked to an organization, user needs to unlink the account from the current
organization, then try link again.

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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
         MarketingplatformAdminServiceClient.create()) {
       String parent = OrganizationName.of("[ORGANIZATION]").toString();
       AnalyticsAccountLink analyticsAccountLink = AnalyticsAccountLink.newBuilder().build();
       AnalyticsAccountLink response =
           marketingplatformAdminServiceClient.createAnalyticsAccountLink(
               parent, analyticsAccountLink);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The parent resource where this Analytics account link will be created. Format: organizations/{org_id} |
| `analyticsAccountLink` | `https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.AnalyticsAccountLink` Required. The Analytics account link to create. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.AnalyticsAccountLink` |   |

### createAnalyticsAccountLinkCallable()

    public final UnaryCallable<CreateAnalyticsAccountLinkRequest,AnalyticsAccountLink> createAnalyticsAccountLinkCallable()

Creates the link between the Analytics account and the Google Marketing Platform organization.

User needs to be an org user, and admin on the Analytics account to create the link. If the
account is already linked to an organization, user needs to unlink the account from the current
organization, then try link again.

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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
         MarketingplatformAdminServiceClient.create()) {
       CreateAnalyticsAccountLinkRequest request =
           CreateAnalyticsAccountLinkRequest.newBuilder()
               .setParent(OrganizationName.of("[ORGANIZATION]").toString())
               .setAnalyticsAccountLink(AnalyticsAccountLink.newBuilder().build())
               .build();
       ApiFuture<AnalyticsAccountLink> future =
           marketingplatformAdminServiceClient
               .createAnalyticsAccountLinkCallable()
               .futureCall(request);
       // Do something.
       AnalyticsAccountLink 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/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest,https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.AnalyticsAccountLink>` |   |

### deleteAnalyticsAccountLink(@Nullable AnalyticsAccountLinkName name)

    public final void deleteAnalyticsAccountLink(@Nullable AnalyticsAccountLinkName name)

Deletes the AnalyticsAccountLink, which detaches the Analytics account from the Google
Marketing Platform organization.

User needs to be an org user, and admin on the Analytics account in order to delete the
link.

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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
         MarketingplatformAdminServiceClient.create()) {
       AnalyticsAccountLinkName name =
           AnalyticsAccountLinkName.of("[ORGANIZATION]", "[ANALYTICS_ACCOUNT_LINK]");
       marketingplatformAdminServiceClient.deleteAnalyticsAccountLink(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `@org.jspecify.annotations.Nullable com.google.ads.marketingplatform.admin.v1alpha.AnalyticsAccountLinkName` Required. The name of the Analytics account link to delete. Format: organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} |

### deleteAnalyticsAccountLink(DeleteAnalyticsAccountLinkRequest request)

    public final void deleteAnalyticsAccountLink(DeleteAnalyticsAccountLinkRequest request)

Deletes the AnalyticsAccountLink, which detaches the Analytics account from the Google
Marketing Platform organization.

User needs to be an org user, and admin on the Analytics account in order to delete the
link.

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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
         MarketingplatformAdminServiceClient.create()) {
       DeleteAnalyticsAccountLinkRequest request =
           DeleteAnalyticsAccountLinkRequest.newBuilder()
               .setName(
                   AnalyticsAccountLinkName.of("[ORGANIZATION]", "[ANALYTICS_ACCOUNT_LINK]")
                       .toString())
               .build();
       marketingplatformAdminServiceClient.deleteAnalyticsAccountLink(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest` The request object containing all of the parameters for the API call. |

### deleteAnalyticsAccountLink(String name)

    public final void deleteAnalyticsAccountLink(String name)

Deletes the AnalyticsAccountLink, which detaches the Analytics account from the Google
Marketing Platform organization.

User needs to be an org user, and admin on the Analytics account in order to delete the
link.

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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
         MarketingplatformAdminServiceClient.create()) {
       String name =
           AnalyticsAccountLinkName.of("[ORGANIZATION]", "[ANALYTICS_ACCOUNT_LINK]").toString();
       marketingplatformAdminServiceClient.deleteAnalyticsAccountLink(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The name of the Analytics account link to delete. Format: organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} |

### deleteAnalyticsAccountLinkCallable()

    public final UnaryCallable<DeleteAnalyticsAccountLinkRequest,Empty> deleteAnalyticsAccountLinkCallable()

Deletes the AnalyticsAccountLink, which detaches the Analytics account from the Google
Marketing Platform organization.

User needs to be an org user, and admin on the Analytics account in order to delete the
link.

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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
         MarketingplatformAdminServiceClient.create()) {
       DeleteAnalyticsAccountLinkRequest request =
           DeleteAnalyticsAccountLinkRequest.newBuilder()
               .setName(
                   AnalyticsAccountLinkName.of("[ORGANIZATION]", "[ANALYTICS_ACCOUNT_LINK]")
                       .toString())
               .build();
       ApiFuture<Empty> future =
           marketingplatformAdminServiceClient
               .deleteAnalyticsAccountLinkCallable()
               .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/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest,https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html>` |   |

### findSalesPartnerManagedClients(FindSalesPartnerManagedClientsRequest request)

    public final FindSalesPartnerManagedClientsResponse findSalesPartnerManagedClients(FindSalesPartnerManagedClientsRequest request)

Returns a list of clients managed by the sales partner organization.

User needs to be an OrgAdmin/BillingAdmin on the sales partner organization in order to view
the end clients.

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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
         MarketingplatformAdminServiceClient.create()) {
       FindSalesPartnerManagedClientsRequest request =
           FindSalesPartnerManagedClientsRequest.newBuilder()
               .setOrganization(OrganizationName.of("[ORGANIZATION]").toString())
               .setIsActive(true)
               .build();
       FindSalesPartnerManagedClientsResponse response =
           marketingplatformAdminServiceClient.findSalesPartnerManagedClients(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.FindSalesPartnerManagedClientsRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.FindSalesPartnerManagedClientsResponse` |   |

### findSalesPartnerManagedClientsCallable()

    public final UnaryCallable<FindSalesPartnerManagedClientsRequest,FindSalesPartnerManagedClientsResponse> findSalesPartnerManagedClientsCallable()

Returns a list of clients managed by the sales partner organization.

User needs to be an OrgAdmin/BillingAdmin on the sales partner organization in order to view
the end clients.

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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
         MarketingplatformAdminServiceClient.create()) {
       FindSalesPartnerManagedClientsRequest request =
           FindSalesPartnerManagedClientsRequest.newBuilder()
               .setOrganization(OrganizationName.of("[ORGANIZATION]").toString())
               .setIsActive(true)
               .build();
       ApiFuture<FindSalesPartnerManagedClientsResponse> future =
           marketingplatformAdminServiceClient
               .findSalesPartnerManagedClientsCallable()
               .futureCall(request);
       // Do something.
       FindSalesPartnerManagedClientsResponse 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/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.FindSalesPartnerManagedClientsRequest,https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.FindSalesPartnerManagedClientsResponse>` |   |

### getOrganization(@Nullable OrganizationName name)

    public final Organization getOrganization(@Nullable OrganizationName name)

Lookup for a single organization.

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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
         MarketingplatformAdminServiceClient.create()) {
       OrganizationName name = OrganizationName.of("[ORGANIZATION]");
       Organization response = marketingplatformAdminServiceClient.getOrganization(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `@org.jspecify.annotations.Nullable com.google.ads.marketingplatform.admin.v1alpha.OrganizationName` Required. The name of the Organization to retrieve. Format: organizations/{org_id} |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.Organization` |   |

### getOrganization(GetOrganizationRequest request)

    public final Organization getOrganization(GetOrganizationRequest request)

Lookup for a single organization.

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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
         MarketingplatformAdminServiceClient.create()) {
       GetOrganizationRequest request =
           GetOrganizationRequest.newBuilder()
               .setName(OrganizationName.of("[ORGANIZATION]").toString())
               .build();
       Organization response = marketingplatformAdminServiceClient.getOrganization(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.GetOrganizationRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.Organization` |   |

### getOrganization(String name)

    public final Organization getOrganization(String name)

Lookup for a single organization.

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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
         MarketingplatformAdminServiceClient.create()) {
       String name = OrganizationName.of("[ORGANIZATION]").toString();
       Organization response = marketingplatformAdminServiceClient.getOrganization(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The name of the Organization to retrieve. Format: organizations/{org_id} |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.Organization` |   |

### getOrganizationCallable()

    public final UnaryCallable<GetOrganizationRequest,Organization> getOrganizationCallable()

Lookup for a single organization.

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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
         MarketingplatformAdminServiceClient.create()) {
       GetOrganizationRequest request =
           GetOrganizationRequest.newBuilder()
               .setName(OrganizationName.of("[ORGANIZATION]").toString())
               .build();
       ApiFuture<Organization> future =
           marketingplatformAdminServiceClient.getOrganizationCallable().futureCall(request);
       // Do something.
       Organization 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/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.GetOrganizationRequest,https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.Organization>` |   |

### getSettings()

    public final @Nullable MarketingplatformAdminServiceSettings getSettings()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `@org.jspecify.annotations.Nullable com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceSettings` |   |

### getStub()

    public MarketingplatformAdminServiceStub getStub()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.stub.MarketingplatformAdminServiceStub` |   |

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

### listAnalyticsAccountLinks(@Nullable OrganizationName parent)

    public final MarketingplatformAdminServiceClient.ListAnalyticsAccountLinksPagedResponse listAnalyticsAccountLinks(@Nullable OrganizationName parent)

Lists the Google Analytics accounts link to the specified Google Marketing Platform
organization.

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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
         MarketingplatformAdminServiceClient.create()) {
       OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
       for (AnalyticsAccountLink element :
           marketingplatformAdminServiceClient.listAnalyticsAccountLinks(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `@org.jspecify.annotations.Nullable com.google.ads.marketingplatform.admin.v1alpha.OrganizationName` Required. The parent organization, which owns this collection of Analytics account links. Format: organizations/{org_id} |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListAnalyticsAccountLinksPagedResponse` |   |

### listAnalyticsAccountLinks(ListAnalyticsAccountLinksRequest request)

    public final MarketingplatformAdminServiceClient.ListAnalyticsAccountLinksPagedResponse listAnalyticsAccountLinks(ListAnalyticsAccountLinksRequest request)

Lists the Google Analytics accounts link to the specified Google Marketing Platform
organization.

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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
         MarketingplatformAdminServiceClient.create()) {
       ListAnalyticsAccountLinksRequest request =
           ListAnalyticsAccountLinksRequest.newBuilder()
               .setParent(OrganizationName.of("[ORGANIZATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       for (AnalyticsAccountLink element :
           marketingplatformAdminServiceClient.listAnalyticsAccountLinks(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListAnalyticsAccountLinksPagedResponse` |   |

### listAnalyticsAccountLinks(String parent)

    public final MarketingplatformAdminServiceClient.ListAnalyticsAccountLinksPagedResponse listAnalyticsAccountLinks(String parent)

Lists the Google Analytics accounts link to the specified Google Marketing Platform
organization.

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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
         MarketingplatformAdminServiceClient.create()) {
       String parent = OrganizationName.of("[ORGANIZATION]").toString();
       for (AnalyticsAccountLink element :
           marketingplatformAdminServiceClient.listAnalyticsAccountLinks(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The parent organization, which owns this collection of Analytics account links. Format: organizations/{org_id} |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListAnalyticsAccountLinksPagedResponse` |   |

### listAnalyticsAccountLinksCallable()

    public final UnaryCallable<ListAnalyticsAccountLinksRequest,ListAnalyticsAccountLinksResponse> listAnalyticsAccountLinksCallable()

Lists the Google Analytics accounts link to the specified Google Marketing Platform
organization.

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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
         MarketingplatformAdminServiceClient.create()) {
       ListAnalyticsAccountLinksRequest request =
           ListAnalyticsAccountLinksRequest.newBuilder()
               .setParent(OrganizationName.of("[ORGANIZATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       while (true) {
         ListAnalyticsAccountLinksResponse response =
             marketingplatformAdminServiceClient.listAnalyticsAccountLinksCallable().call(request);
         for (AnalyticsAccountLink element : response.getAnalyticsAccountLinksList()) {
           // 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/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest,https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse>` |   |

### listAnalyticsAccountLinksPagedCallable()

    public final UnaryCallable<ListAnalyticsAccountLinksRequest,MarketingplatformAdminServiceClient.ListAnalyticsAccountLinksPagedResponse> listAnalyticsAccountLinksPagedCallable()

Lists the Google Analytics accounts link to the specified Google Marketing Platform
organization.

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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
         MarketingplatformAdminServiceClient.create()) {
       ListAnalyticsAccountLinksRequest request =
           ListAnalyticsAccountLinksRequest.newBuilder()
               .setParent(OrganizationName.of("[ORGANIZATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       ApiFuture<AnalyticsAccountLink> future =
           marketingplatformAdminServiceClient
               .listAnalyticsAccountLinksPagedCallable()
               .futureCall(request);
       // Do something.
       for (AnalyticsAccountLink 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/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest,https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListAnalyticsAccountLinksPagedResponse>` |   |

### listOrganizations(ListOrganizationsRequest request)

    public final MarketingplatformAdminServiceClient.ListOrganizationsPagedResponse listOrganizations(ListOrganizationsRequest request)

Returns a list of organizations that the user has access to.

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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
         MarketingplatformAdminServiceClient.create()) {
       ListOrganizationsRequest request =
           ListOrganizationsRequest.newBuilder()
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       for (Organization element :
           marketingplatformAdminServiceClient.listOrganizations(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.ListOrganizationsRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListOrganizationsPagedResponse` |   |

### listOrganizationsCallable()

    public final UnaryCallable<ListOrganizationsRequest,ListOrganizationsResponse> listOrganizationsCallable()

Returns a list of organizations that the user has access to.

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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
         MarketingplatformAdminServiceClient.create()) {
       ListOrganizationsRequest request =
           ListOrganizationsRequest.newBuilder()
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       while (true) {
         ListOrganizationsResponse response =
             marketingplatformAdminServiceClient.listOrganizationsCallable().call(request);
         for (Organization element : response.getOrganizationsList()) {
           // 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/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.ListOrganizationsRequest,https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.ListOrganizationsResponse>` |   |

### listOrganizationsPagedCallable()

    public final UnaryCallable<ListOrganizationsRequest,MarketingplatformAdminServiceClient.ListOrganizationsPagedResponse> listOrganizationsPagedCallable()

Returns a list of organizations that the user has access to.

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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
         MarketingplatformAdminServiceClient.create()) {
       ListOrganizationsRequest request =
           ListOrganizationsRequest.newBuilder()
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       ApiFuture<Organization> future =
           marketingplatformAdminServiceClient.listOrganizationsPagedCallable().futureCall(request);
       // Do something.
       for (Organization 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/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.ListOrganizationsRequest,https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient.ListOrganizationsPagedResponse>` |   |

### reportPropertyUsage(ReportPropertyUsageRequest request)

    public final ReportPropertyUsageResponse reportPropertyUsage(ReportPropertyUsageRequest request)

Get the usage and billing data for properties within the organization for the specified month.

Per direct client org, user needs to be OrgAdmin/BillingAdmin on the organization in order
to view the billing and usage data.

Per sales partner client org, user needs to be OrgAdmin/BillingAdmin on the sales partner
org in order to view the billing and usage data, or OrgAdmin/BillingAdmin on the sales partner
client org in order to view the usage data only.

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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
         MarketingplatformAdminServiceClient.create()) {
       ReportPropertyUsageRequest request =
           ReportPropertyUsageRequest.newBuilder()
               .setOrganization("organization1178922291")
               .setMonth("month104080000")
               .build();
       ReportPropertyUsageResponse response =
           marketingplatformAdminServiceClient.reportPropertyUsage(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.ReportPropertyUsageRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.ReportPropertyUsageResponse` |   |

### reportPropertyUsage(String organization)

    public final ReportPropertyUsageResponse reportPropertyUsage(String organization)

Get the usage and billing data for properties within the organization for the specified month.

Per direct client org, user needs to be OrgAdmin/BillingAdmin on the organization in order
to view the billing and usage data.

Per sales partner client org, user needs to be OrgAdmin/BillingAdmin on the sales partner
org in order to view the billing and usage data, or OrgAdmin/BillingAdmin on the sales partner
client org in order to view the usage data only.

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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
         MarketingplatformAdminServiceClient.create()) {
       String organization = "organization1178922291";
       ReportPropertyUsageResponse response =
           marketingplatformAdminServiceClient.reportPropertyUsage(organization);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `organization` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Specifies the organization whose property usage will be listed. Format: organizations/{org_id} |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.ReportPropertyUsageResponse` |   |

### reportPropertyUsageCallable()

    public final UnaryCallable<ReportPropertyUsageRequest,ReportPropertyUsageResponse> reportPropertyUsageCallable()

Get the usage and billing data for properties within the organization for the specified month.

Per direct client org, user needs to be OrgAdmin/BillingAdmin on the organization in order
to view the billing and usage data.

Per sales partner client org, user needs to be OrgAdmin/BillingAdmin on the sales partner
org in order to view the billing and usage data, or OrgAdmin/BillingAdmin on the sales partner
client org in order to view the usage data only.

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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
         MarketingplatformAdminServiceClient.create()) {
       ReportPropertyUsageRequest request =
           ReportPropertyUsageRequest.newBuilder()
               .setOrganization("organization1178922291")
               .setMonth("month104080000")
               .build();
       ApiFuture<ReportPropertyUsageResponse> future =
           marketingplatformAdminServiceClient.reportPropertyUsageCallable().futureCall(request);
       // Do something.
       ReportPropertyUsageResponse 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/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.ReportPropertyUsageRequest,https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.ReportPropertyUsageResponse>` |   |

### setPropertyServiceLevel(SetPropertyServiceLevelRequest request)

    public final SetPropertyServiceLevelResponse setPropertyServiceLevel(SetPropertyServiceLevelRequest request)

Updates the service level for an Analytics property.

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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
         MarketingplatformAdminServiceClient.create()) {
       SetPropertyServiceLevelRequest request =
           SetPropertyServiceLevelRequest.newBuilder()
               .setAnalyticsAccountLink("analyticsAccountLink-397570975")
               .setAnalyticsProperty(PropertyName.of("[PROPERTY]").toString())
               .setServiceLevel(AnalyticsServiceLevel.forNumber(0))
               .build();
       SetPropertyServiceLevelResponse response =
           marketingplatformAdminServiceClient.setPropertyServiceLevel(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse` |   |

### setPropertyServiceLevel(String analyticsAccountLink)

    public final SetPropertyServiceLevelResponse setPropertyServiceLevel(String analyticsAccountLink)

Updates the service level for an Analytics property.

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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
         MarketingplatformAdminServiceClient.create()) {
       String analyticsAccountLink = "analyticsAccountLink-397570975";
       SetPropertyServiceLevelResponse response =
           marketingplatformAdminServiceClient.setPropertyServiceLevel(analyticsAccountLink);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `analyticsAccountLink` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The parent AnalyticsAccountLink scope where this property is in. Format: organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse` |   |

### setPropertyServiceLevelCallable()

    public final UnaryCallable<SetPropertyServiceLevelRequest,SetPropertyServiceLevelResponse> setPropertyServiceLevelCallable()

Updates the service level for an Analytics property.

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 (MarketingplatformAdminServiceClient marketingplatformAdminServiceClient =
         MarketingplatformAdminServiceClient.create()) {
       SetPropertyServiceLevelRequest request =
           SetPropertyServiceLevelRequest.newBuilder()
               .setAnalyticsAccountLink("analyticsAccountLink-397570975")
               .setAnalyticsProperty(PropertyName.of("[PROPERTY]").toString())
               .setServiceLevel(AnalyticsServiceLevel.forNumber(0))
               .build();
       ApiFuture<SetPropertyServiceLevelResponse> future =
           marketingplatformAdminServiceClient.setPropertyServiceLevelCallable().futureCall(request);
       // Do something.
       SetPropertyServiceLevelResponse 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/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest,https://docs.cloud.google.com/java/docs/reference/admin/latest/com.google.ads.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse>` |   |

### shutdown()

    public void shutdown()

### shutdownNow()

    public void shutdownNow()