# Class AccountServicesServiceClient (1.21.0)

1.21.0 (latest) 1.19.0 1.16.0 1.15.0 1.13.0 1.11.0 1.10.0 1.8.0 1.6.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0 0.26.0 0.24.0 0.23.0 0.20.0 0.19.0 0.18.0 0.16.0 0.15.0 0.14.0 0.13.0 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.7.0 0.5.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-shopping-merchant-accounts/google-shopping-merchant-accounts/src/main/java/com/google/shopping/merchant/accounts/v1/AccountServicesServiceClient.java) | [Product Reference](https://developers.google.com/merchant/api) |

Service Description: Service to support AccountService 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 (AccountServicesServiceClient accountServicesServiceClient =
         AccountServicesServiceClient.create()) {
       AccountServiceName name = AccountServiceName.of("[ACCOUNT]", "[SERVICE]");
       AccountService response = accountServicesServiceClient.getAccountService(name);
     }
     
Note: close() needs to be called on the AccountServicesServiceClient 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 |
|---|---|---|
| GetAccountService | Retrieve an account service. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - getAccountService(GetAccountServiceRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - getAccountService(AccountServiceName name) - getAccountService(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. - getAccountServiceCallable() |
| ListAccountServices | List account services for the specified accounts. Supports filtering. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - listAccountServices(ListAccountServicesRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - listAccountServices(AccountName parent) - listAccountServices(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. - listAccountServicesPagedCallable() - listAccountServicesCallable() |
| ProposeAccountService | Propose an account service. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - proposeAccountService(ProposeAccountServiceRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - proposeAccountService(AccountName parent, String provider, AccountService accountService) - proposeAccountService(String parent, String provider, AccountService accountService) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - proposeAccountServiceCallable() |
| ApproveAccountService | Approve an account service proposal. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - approveAccountService(ApproveAccountServiceRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - approveAccountService(AccountServiceName name) - approveAccountService(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. - approveAccountServiceCallable() |
| RejectAccountService | Reject an account service (both proposed and approve services can be rejected). | Request object method variants only take one parameter, a request object, which must be constructed before the call. - rejectAccountService(RejectAccountServiceRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - rejectAccountService(AccountServiceName name) - rejectAccountService(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. - rejectAccountServiceCallable() |
[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 AccountServicesServiceSettings
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
     AccountServicesServiceSettings accountServicesServiceSettings =
         AccountServicesServiceSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
             .build();
     AccountServicesServiceClient accountServicesServiceClient =
         AccountServicesServiceClient.create(accountServicesServiceSettings);
     
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
     AccountServicesServiceSettings accountServicesServiceSettings =
         AccountServicesServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
     AccountServicesServiceClient accountServicesServiceClient =
         AccountServicesServiceClient.create(accountServicesServiceSettings);
     
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
     AccountServicesServiceSettings accountServicesServiceSettings =
         AccountServicesServiceSettings.newHttpJsonBuilder().build();
     AccountServicesServiceClient accountServicesServiceClient =
         AccountServicesServiceClient.create(accountServicesServiceSettings);
     
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) \> AccountServicesServiceClient

## Static Methods

### create()

    public static final AccountServicesServiceClient create()

Constructs an instance of AccountServicesServiceClient with default settings.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.AccountServicesServiceClient` |   |

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

### create(AccountServicesServiceSettings settings)

    public static final AccountServicesServiceClient create(AccountServicesServiceSettings settings)

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `settings` | `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.AccountServicesServiceSettings` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.AccountServicesServiceClient` |   |

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

### create(AccountServicesServiceStub stub)

    public static final AccountServicesServiceClient create(AccountServicesServiceStub stub)

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `stub` | `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.stub.AccountServicesServiceStub` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.AccountServicesServiceClient` |   |

## Constructors

### AccountServicesServiceClient(AccountServicesServiceSettings settings)

    protected AccountServicesServiceClient(AccountServicesServiceSettings settings)

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `settings` | `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.AccountServicesServiceSettings` |

### AccountServicesServiceClient(AccountServicesServiceStub stub)

    protected AccountServicesServiceClient(AccountServicesServiceStub stub)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `stub` | `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.stub.AccountServicesServiceStub` |

## Methods

### approveAccountService(AccountServiceName name)

    public final AccountService approveAccountService(AccountServiceName name)

Approve an account service proposal.

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 (AccountServicesServiceClient accountServicesServiceClient =
         AccountServicesServiceClient.create()) {
       AccountServiceName name = AccountServiceName.of("[ACCOUNT]", "[SERVICE]");
       AccountService response = accountServicesServiceClient.approveAccountService(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.AccountServiceName` Required. The resource name of the account service to approve. Format: `accounts/{account}/services/{service}` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.AccountService` |   |

### approveAccountService(ApproveAccountServiceRequest request)

    public final AccountService approveAccountService(ApproveAccountServiceRequest request)

Approve an account service proposal.

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 (AccountServicesServiceClient accountServicesServiceClient =
         AccountServicesServiceClient.create()) {
       ApproveAccountServiceRequest request =
           ApproveAccountServiceRequest.newBuilder()
               .setName(AccountServiceName.of("[ACCOUNT]", "[SERVICE]").toString())
               .build();
       AccountService response = accountServicesServiceClient.approveAccountService(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.ApproveAccountServiceRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.AccountService` |   |

### approveAccountService(String name)

    public final AccountService approveAccountService(String name)

Approve an account service proposal.

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 (AccountServicesServiceClient accountServicesServiceClient =
         AccountServicesServiceClient.create()) {
       String name = AccountServiceName.of("[ACCOUNT]", "[SERVICE]").toString();
       AccountService response = accountServicesServiceClient.approveAccountService(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The resource name of the account service to approve. Format: `accounts/{account}/services/{service}` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.AccountService` |   |

### approveAccountServiceCallable()

    public final UnaryCallable<ApproveAccountServiceRequest,AccountService> approveAccountServiceCallable()

Approve an account service proposal.

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 (AccountServicesServiceClient accountServicesServiceClient =
         AccountServicesServiceClient.create()) {
       ApproveAccountServiceRequest request =
           ApproveAccountServiceRequest.newBuilder()
               .setName(AccountServiceName.of("[ACCOUNT]", "[SERVICE]").toString())
               .build();
       ApiFuture<AccountService> future =
           accountServicesServiceClient.approveAccountServiceCallable().futureCall(request);
       // Do something.
       AccountService response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.ApproveAccountServiceRequest,https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.AccountService>` |   |

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

### getAccountService(AccountServiceName name)

    public final AccountService getAccountService(AccountServiceName name)

Retrieve an account service.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (AccountServicesServiceClient accountServicesServiceClient =
         AccountServicesServiceClient.create()) {
       AccountServiceName name = AccountServiceName.of("[ACCOUNT]", "[SERVICE]");
       AccountService response = accountServicesServiceClient.getAccountService(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.AccountServiceName` Required. The resource name of the account service to get. Format: `accounts/{account}/services/{service}` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.AccountService` |   |

### getAccountService(GetAccountServiceRequest request)

    public final AccountService getAccountService(GetAccountServiceRequest request)

Retrieve an account service.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (AccountServicesServiceClient accountServicesServiceClient =
         AccountServicesServiceClient.create()) {
       GetAccountServiceRequest request =
           GetAccountServiceRequest.newBuilder()
               .setName(AccountServiceName.of("[ACCOUNT]", "[SERVICE]").toString())
               .build();
       AccountService response = accountServicesServiceClient.getAccountService(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.GetAccountServiceRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.AccountService` |   |

### getAccountService(String name)

    public final AccountService getAccountService(String name)

Retrieve an account service.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (AccountServicesServiceClient accountServicesServiceClient =
         AccountServicesServiceClient.create()) {
       String name = AccountServiceName.of("[ACCOUNT]", "[SERVICE]").toString();
       AccountService response = accountServicesServiceClient.getAccountService(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The resource name of the account service to get. Format: `accounts/{account}/services/{service}` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.AccountService` |   |

### getAccountServiceCallable()

    public final UnaryCallable<GetAccountServiceRequest,AccountService> getAccountServiceCallable()

Retrieve an account service.

Sample code:


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

### getSettings()

    public final AccountServicesServiceSettings getSettings()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.AccountServicesServiceSettings` |   |

### getStub()

    public AccountServicesServiceStub getStub()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.stub.AccountServicesServiceStub` |   |

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

### listAccountServices(AccountName parent)

    public final AccountServicesServiceClient.ListAccountServicesPagedResponse listAccountServices(AccountName parent)

List account services for the specified accounts. Supports filtering.

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 (AccountServicesServiceClient accountServicesServiceClient =
         AccountServicesServiceClient.create()) {
       AccountName parent = AccountName.of("[ACCOUNT]");
       for (AccountService element :
           accountServicesServiceClient.listAccountServices(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.AccountName` Required. The parent account of the account service to filter by. Format: `accounts/{account}` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.AccountServicesServiceClient.ListAccountServicesPagedResponse` |   |

### listAccountServices(ListAccountServicesRequest request)

    public final AccountServicesServiceClient.ListAccountServicesPagedResponse listAccountServices(ListAccountServicesRequest request)

List account services for the specified accounts. Supports filtering.

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 (AccountServicesServiceClient accountServicesServiceClient =
         AccountServicesServiceClient.create()) {
       ListAccountServicesRequest request =
           ListAccountServicesRequest.newBuilder()
               .setParent(AccountName.of("[ACCOUNT]").toString())
               .setPageToken("pageToken873572522")
               .setPageSize(883849137)
               .build();
       for (AccountService element :
           accountServicesServiceClient.listAccountServices(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.ListAccountServicesRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.AccountServicesServiceClient.ListAccountServicesPagedResponse` |   |

### listAccountServices(String parent)

    public final AccountServicesServiceClient.ListAccountServicesPagedResponse listAccountServices(String parent)

List account services for the specified accounts. Supports filtering.

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 (AccountServicesServiceClient accountServicesServiceClient =
         AccountServicesServiceClient.create()) {
       String parent = AccountName.of("[ACCOUNT]").toString();
       for (AccountService element :
           accountServicesServiceClient.listAccountServices(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The parent account of the account service to filter by. Format: `accounts/{account}` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.AccountServicesServiceClient.ListAccountServicesPagedResponse` |   |

### listAccountServicesCallable()

    public final UnaryCallable<ListAccountServicesRequest,ListAccountServicesResponse> listAccountServicesCallable()

List account services for the specified accounts. Supports filtering.

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 (AccountServicesServiceClient accountServicesServiceClient =
         AccountServicesServiceClient.create()) {
       ListAccountServicesRequest request =
           ListAccountServicesRequest.newBuilder()
               .setParent(AccountName.of("[ACCOUNT]").toString())
               .setPageToken("pageToken873572522")
               .setPageSize(883849137)
               .build();
       while (true) {
         ListAccountServicesResponse response =
             accountServicesServiceClient.listAccountServicesCallable().call(request);
         for (AccountService element : response.getAccountServicesList()) {
           // doThingsWith(element);
         }
         String nextPageToken = response.getNextPageToken();
         if (!Strings.isNullOrEmpty(nextPageToken)) {
           request = request.toBuilder().setPageToken(nextPageToken).build();
         } else {
           break;
         }
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.ListAccountServicesRequest,https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.ListAccountServicesResponse>` |   |

### listAccountServicesPagedCallable()

    public final UnaryCallable<ListAccountServicesRequest,AccountServicesServiceClient.ListAccountServicesPagedResponse> listAccountServicesPagedCallable()

List account services for the specified accounts. Supports filtering.

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 (AccountServicesServiceClient accountServicesServiceClient =
         AccountServicesServiceClient.create()) {
       ListAccountServicesRequest request =
           ListAccountServicesRequest.newBuilder()
               .setParent(AccountName.of("[ACCOUNT]").toString())
               .setPageToken("pageToken873572522")
               .setPageSize(883849137)
               .build();
       ApiFuture<AccountService> future =
           accountServicesServiceClient.listAccountServicesPagedCallable().futureCall(request);
       // Do something.
       for (AccountService element : future.get().iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.ListAccountServicesRequest,https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.AccountServicesServiceClient.ListAccountServicesPagedResponse>` |   |

### proposeAccountService(AccountName parent, String provider, AccountService accountService)

    public final AccountService proposeAccountService(AccountName parent, String provider, AccountService accountService)

Propose an account service.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (AccountServicesServiceClient accountServicesServiceClient =
         AccountServicesServiceClient.create()) {
       AccountName parent = AccountName.of("[ACCOUNT]");
       String provider = "provider-987494927";
       AccountService accountService = AccountService.newBuilder().build();
       AccountService response =
           accountServicesServiceClient.proposeAccountService(parent, provider, accountService);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.AccountName` Required. The resource name of the parent account for the service. Format: `accounts/{account}` |
| `provider` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The provider of the service. Either the reference to an account such as `providers/123` or a well-known service provider (one of `providers/GOOGLE_ADS` or `providers/GOOGLE_BUSINESS_PROFILE`). |
| `accountService` | `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.AccountService` Required. The account service to propose. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.AccountService` |   |

### proposeAccountService(ProposeAccountServiceRequest request)

    public final AccountService proposeAccountService(ProposeAccountServiceRequest request)

Propose an account service.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (AccountServicesServiceClient accountServicesServiceClient =
         AccountServicesServiceClient.create()) {
       ProposeAccountServiceRequest request =
           ProposeAccountServiceRequest.newBuilder()
               .setParent(AccountName.of("[ACCOUNT]").toString())
               .setProvider("provider-987494927")
               .setAccountService(AccountService.newBuilder().build())
               .build();
       AccountService response = accountServicesServiceClient.proposeAccountService(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.ProposeAccountServiceRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.AccountService` |   |

### proposeAccountService(String parent, String provider, AccountService accountService)

    public final AccountService proposeAccountService(String parent, String provider, AccountService accountService)

Propose an account service.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (AccountServicesServiceClient accountServicesServiceClient =
         AccountServicesServiceClient.create()) {
       String parent = AccountName.of("[ACCOUNT]").toString();
       String provider = "provider-987494927";
       AccountService accountService = AccountService.newBuilder().build();
       AccountService response =
           accountServicesServiceClient.proposeAccountService(parent, provider, accountService);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The resource name of the parent account for the service. Format: `accounts/{account}` |
| `provider` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The provider of the service. Either the reference to an account such as `providers/123` or a well-known service provider (one of `providers/GOOGLE_ADS` or `providers/GOOGLE_BUSINESS_PROFILE`). |
| `accountService` | `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.AccountService` Required. The account service to propose. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.AccountService` |   |

### proposeAccountServiceCallable()

    public final UnaryCallable<ProposeAccountServiceRequest,AccountService> proposeAccountServiceCallable()

Propose an account service.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (AccountServicesServiceClient accountServicesServiceClient =
         AccountServicesServiceClient.create()) {
       ProposeAccountServiceRequest request =
           ProposeAccountServiceRequest.newBuilder()
               .setParent(AccountName.of("[ACCOUNT]").toString())
               .setProvider("provider-987494927")
               .setAccountService(AccountService.newBuilder().build())
               .build();
       ApiFuture<AccountService> future =
           accountServicesServiceClient.proposeAccountServiceCallable().futureCall(request);
       // Do something.
       AccountService response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.ProposeAccountServiceRequest,https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.AccountService>` |   |

### rejectAccountService(AccountServiceName name)

    public final void rejectAccountService(AccountServiceName name)

Reject an account service (both proposed and approve services can be rejected).

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 (AccountServicesServiceClient accountServicesServiceClient =
         AccountServicesServiceClient.create()) {
       AccountServiceName name = AccountServiceName.of("[ACCOUNT]", "[SERVICE]");
       accountServicesServiceClient.rejectAccountService(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.AccountServiceName` Required. The resource name of the account service to reject. Format: `accounts/{account}/services/{service}` |

### rejectAccountService(RejectAccountServiceRequest request)

    public final void rejectAccountService(RejectAccountServiceRequest request)

Reject an account service (both proposed and approve services can be rejected).

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 (AccountServicesServiceClient accountServicesServiceClient =
         AccountServicesServiceClient.create()) {
       RejectAccountServiceRequest request =
           RejectAccountServiceRequest.newBuilder()
               .setName(AccountServiceName.of("[ACCOUNT]", "[SERVICE]").toString())
               .build();
       accountServicesServiceClient.rejectAccountService(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.RejectAccountServiceRequest` The request object containing all of the parameters for the API call. |

### rejectAccountService(String name)

    public final void rejectAccountService(String name)

Reject an account service (both proposed and approve services can be rejected).

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 (AccountServicesServiceClient accountServicesServiceClient =
         AccountServicesServiceClient.create()) {
       String name = AccountServiceName.of("[ACCOUNT]", "[SERVICE]").toString();
       accountServicesServiceClient.rejectAccountService(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The resource name of the account service to reject. Format: `accounts/{account}/services/{service}` |

### rejectAccountServiceCallable()

    public final UnaryCallable<RejectAccountServiceRequest,Empty> rejectAccountServiceCallable()

Reject an account service (both proposed and approve services can be rejected).

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 (AccountServicesServiceClient accountServicesServiceClient =
         AccountServicesServiceClient.create()) {
       RejectAccountServiceRequest request =
           RejectAccountServiceRequest.newBuilder()
               .setName(AccountServiceName.of("[ACCOUNT]", "[SERVICE]").toString())
               .build();
       ApiFuture<Empty> future =
           accountServicesServiceClient.rejectAccountServiceCallable().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/google-shopping-merchant-accounts/latest/com.google.shopping.merchant.accounts.v1.RejectAccountServiceRequest,https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html>` |   |

### shutdown()

    public void shutdown()

### shutdownNow()

    public void shutdownNow()