All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.visionai.v1.AppPlatformClient Maven / Gradle / Ivy

/*
 * Copyright 2024 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.cloud.visionai.v1;

import com.google.api.core.ApiFuture;
import com.google.api.core.ApiFutures;
import com.google.api.core.BetaApi;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.httpjson.longrunning.OperationsClient;
import com.google.api.gax.longrunning.OperationFuture;
import com.google.api.gax.paging.AbstractFixedSizeCollection;
import com.google.api.gax.paging.AbstractPage;
import com.google.api.gax.paging.AbstractPagedListResponse;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.PageContext;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.visionai.v1.stub.AppPlatformStub;
import com.google.cloud.visionai.v1.stub.AppPlatformStubSettings;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.longrunning.Operation;
import com.google.protobuf.Empty;
import com.google.protobuf.FieldMask;
import java.io.IOException;
import java.util.List;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;

// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
 * Service Description: Service describing handlers for resources
 *
 * 

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: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
 *   ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]");
 *   Application response = appPlatformClient.getApplication(name);
 * }
 * }
* *

Note: close() needs to be called on the AppPlatformClient object to clean up resources such as * threads. In the example above, try-with-resources is used, which automatically calls close(). * *

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Methods
MethodDescriptionMethod Variants

ListApplications

Lists Applications in a given project and location.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • listApplications(ListApplicationsRequest request) *

*

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

*
    *
  • listApplications(LocationName parent) *

  • listApplications(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.

*
    *
  • listApplicationsPagedCallable() *

  • listApplicationsCallable() *

*

GetApplication

Gets details of a single Application.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • getApplication(GetApplicationRequest request) *

*

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

*
    *
  • getApplication(ApplicationName name) *

  • getApplication(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.

*
    *
  • getApplicationCallable() *

*

CreateApplication

Creates a new Application in a given project and location.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • createApplicationAsync(CreateApplicationRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • createApplicationAsync(LocationName parent, Application application) *

  • createApplicationAsync(String parent, Application application) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • createApplicationOperationCallable() *

  • createApplicationCallable() *

*

UpdateApplication

Updates the parameters of a single Application.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • updateApplicationAsync(UpdateApplicationRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • updateApplicationAsync(Application application, FieldMask updateMask) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • updateApplicationOperationCallable() *

  • updateApplicationCallable() *

*

DeleteApplication

Deletes a single Application.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • deleteApplicationAsync(DeleteApplicationRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • deleteApplicationAsync(ApplicationName name) *

  • deleteApplicationAsync(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.

*
    *
  • deleteApplicationOperationCallable() *

  • deleteApplicationCallable() *

*

DeployApplication

Deploys a single Application.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • deployApplicationAsync(DeployApplicationRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • deployApplicationAsync(ApplicationName name) *

  • deployApplicationAsync(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.

*
    *
  • deployApplicationOperationCallable() *

  • deployApplicationCallable() *

*

UndeployApplication

Undeploys a single Application.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • undeployApplicationAsync(UndeployApplicationRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • undeployApplicationAsync(ApplicationName name) *

  • undeployApplicationAsync(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.

*
    *
  • undeployApplicationOperationCallable() *

  • undeployApplicationCallable() *

*

AddApplicationStreamInput

Adds target stream input to the Application. If the Application is deployed, the corresponding new Application instance will be created. If the stream has already been in the Application, the RPC will fail.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • addApplicationStreamInputAsync(AddApplicationStreamInputRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • addApplicationStreamInputAsync(ApplicationName name) *

  • addApplicationStreamInputAsync(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.

*
    *
  • addApplicationStreamInputOperationCallable() *

  • addApplicationStreamInputCallable() *

*

RemoveApplicationStreamInput

Remove target stream input to the Application, if the Application is deployed, the corresponding instance based will be deleted. If the stream is not in the Application, the RPC will fail.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • removeApplicationStreamInputAsync(RemoveApplicationStreamInputRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • removeApplicationStreamInputAsync(ApplicationName name) *

  • removeApplicationStreamInputAsync(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.

*
    *
  • removeApplicationStreamInputOperationCallable() *

  • removeApplicationStreamInputCallable() *

*

UpdateApplicationStreamInput

Update target stream input to the Application, if the Application is deployed, the corresponding instance based will be deployed. For CreateOrUpdate behavior, set allow_missing to true.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • updateApplicationStreamInputAsync(UpdateApplicationStreamInputRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • updateApplicationStreamInputAsync(ApplicationName name) *

  • updateApplicationStreamInputAsync(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.

*
    *
  • updateApplicationStreamInputOperationCallable() *

  • updateApplicationStreamInputCallable() *

*

ListInstances

Lists Instances in a given project and location.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • listInstances(ListInstancesRequest request) *

*

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

*
    *
  • listInstances(ApplicationName parent) *

  • listInstances(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.

*
    *
  • listInstancesPagedCallable() *

  • listInstancesCallable() *

*

GetInstance

Gets details of a single Instance.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • getInstance(GetInstanceRequest request) *

*

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

*
    *
  • getInstance(InstanceName name) *

  • getInstance(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.

*
    *
  • getInstanceCallable() *

*

CreateApplicationInstances

Adds target stream input to the Application. If the Application is deployed, the corresponding new Application instance will be created. If the stream has already been in the Application, the RPC will fail.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • createApplicationInstancesAsync(CreateApplicationInstancesRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • createApplicationInstancesAsync(ApplicationName name) *

  • createApplicationInstancesAsync(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.

*
    *
  • createApplicationInstancesOperationCallable() *

  • createApplicationInstancesCallable() *

*

DeleteApplicationInstances

Remove target stream input to the Application, if the Application is deployed, the corresponding instance based will be deleted. If the stream is not in the Application, the RPC will fail.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • deleteApplicationInstancesAsync(DeleteApplicationInstancesRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • deleteApplicationInstancesAsync(ApplicationName name) *

  • deleteApplicationInstancesAsync(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.

*
    *
  • deleteApplicationInstancesOperationCallable() *

  • deleteApplicationInstancesCallable() *

*

UpdateApplicationInstances

Adds target stream input to the Application. If the Application is deployed, the corresponding new Application instance will be created. If the stream has already been in the Application, the RPC will fail.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • updateApplicationInstancesAsync(UpdateApplicationInstancesRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • updateApplicationInstancesAsync(ApplicationName name, List<UpdateApplicationInstancesRequest.UpdateApplicationInstance> applicationInstances) *

  • updateApplicationInstancesAsync(String name, List<UpdateApplicationInstancesRequest.UpdateApplicationInstance> applicationInstances) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • updateApplicationInstancesOperationCallable() *

  • updateApplicationInstancesCallable() *

*

ListDrafts

Lists Drafts in a given project and location.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • listDrafts(ListDraftsRequest request) *

*

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

*
    *
  • listDrafts(ApplicationName parent) *

  • listDrafts(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.

*
    *
  • listDraftsPagedCallable() *

  • listDraftsCallable() *

*

GetDraft

Gets details of a single Draft.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • getDraft(GetDraftRequest request) *

*

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

*
    *
  • getDraft(DraftName name) *

  • getDraft(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.

*
    *
  • getDraftCallable() *

*

CreateDraft

Creates a new Draft in a given project and location.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • createDraftAsync(CreateDraftRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • createDraftAsync(ApplicationName parent, Draft draft, String draftId) *

  • createDraftAsync(String parent, Draft draft, String draftId) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • createDraftOperationCallable() *

  • createDraftCallable() *

*

UpdateDraft

Updates the parameters of a single Draft.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • updateDraftAsync(UpdateDraftRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • updateDraftAsync(Draft draft, FieldMask updateMask) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • updateDraftOperationCallable() *

  • updateDraftCallable() *

*

DeleteDraft

Deletes a single Draft.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • deleteDraftAsync(DeleteDraftRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • deleteDraftAsync(DraftName name) *

  • deleteDraftAsync(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.

*
    *
  • deleteDraftOperationCallable() *

  • deleteDraftCallable() *

*

ListProcessors

Lists Processors in a given project and location.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • listProcessors(ListProcessorsRequest request) *

*

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

*
    *
  • listProcessors(LocationName parent) *

  • listProcessors(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.

*
    *
  • listProcessorsPagedCallable() *

  • listProcessorsCallable() *

*

ListPrebuiltProcessors

ListPrebuiltProcessors is a custom pass-through verb that Lists Prebuilt Processors.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • listPrebuiltProcessors(ListPrebuiltProcessorsRequest request) *

*

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

*
    *
  • listPrebuiltProcessors(LocationName parent) *

  • listPrebuiltProcessors(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.

*
    *
  • listPrebuiltProcessorsCallable() *

*

GetProcessor

Gets details of a single Processor.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • getProcessor(GetProcessorRequest request) *

*

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

*
    *
  • getProcessor(ProcessorName name) *

  • getProcessor(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.

*
    *
  • getProcessorCallable() *

*

CreateProcessor

Creates a new Processor in a given project and location.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • createProcessorAsync(CreateProcessorRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • createProcessorAsync(LocationName parent, Processor processor, String processorId) *

  • createProcessorAsync(String parent, Processor processor, String processorId) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • createProcessorOperationCallable() *

  • createProcessorCallable() *

*

UpdateProcessor

Updates the parameters of a single Processor.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • updateProcessorAsync(UpdateProcessorRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • updateProcessorAsync(Processor processor, FieldMask updateMask) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • updateProcessorOperationCallable() *

  • updateProcessorCallable() *

*

DeleteProcessor

Deletes a single Processor.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • deleteProcessorAsync(DeleteProcessorRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • deleteProcessorAsync(ProcessorName name) *

  • deleteProcessorAsync(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.

*
    *
  • deleteProcessorOperationCallable() *

  • deleteProcessorCallable() *

*
* *

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 AppPlatformSettings to * create(). For example: * *

To customize credentials: * *

{@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
 * AppPlatformSettings appPlatformSettings =
 *     AppPlatformSettings.newBuilder()
 *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
 *         .build();
 * AppPlatformClient appPlatformClient = AppPlatformClient.create(appPlatformSettings);
 * }
* *

To customize the endpoint: * *

{@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
 * AppPlatformSettings appPlatformSettings =
 *     AppPlatformSettings.newBuilder().setEndpoint(myEndpoint).build();
 * AppPlatformClient appPlatformClient = AppPlatformClient.create(appPlatformSettings);
 * }
* *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over * the wire: * *

{@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
 * AppPlatformSettings appPlatformSettings = AppPlatformSettings.newHttpJsonBuilder().build();
 * AppPlatformClient appPlatformClient = AppPlatformClient.create(appPlatformSettings);
 * }
* *

Please refer to the GitHub repository's samples for more quickstart code snippets. */ @Generated("by gapic-generator-java") public class AppPlatformClient implements BackgroundResource { private final AppPlatformSettings settings; private final AppPlatformStub stub; private final OperationsClient httpJsonOperationsClient; private final com.google.longrunning.OperationsClient operationsClient; /** Constructs an instance of AppPlatformClient with default settings. */ public static final AppPlatformClient create() throws IOException { return create(AppPlatformSettings.newBuilder().build()); } /** * Constructs an instance of AppPlatformClient, using the given settings. The channels are created * based on the settings passed in, or defaults for any settings that are not set. */ public static final AppPlatformClient create(AppPlatformSettings settings) throws IOException { return new AppPlatformClient(settings); } /** * Constructs an instance of AppPlatformClient, using the given stub for making calls. This is for * advanced usage - prefer using create(AppPlatformSettings). */ public static final AppPlatformClient create(AppPlatformStub stub) { return new AppPlatformClient(stub); } /** * Constructs an instance of AppPlatformClient, 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. */ protected AppPlatformClient(AppPlatformSettings settings) throws IOException { this.settings = settings; this.stub = ((AppPlatformStubSettings) settings.getStubSettings()).createStub(); this.operationsClient = com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); } protected AppPlatformClient(AppPlatformStub stub) { this.settings = null; this.stub = stub; this.operationsClient = com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); } public final AppPlatformSettings getSettings() { return settings; } public AppPlatformStub getStub() { return stub; } /** * Returns the OperationsClient that can be used to query the status of a long-running operation * returned by another API method call. */ public final com.google.longrunning.OperationsClient getOperationsClient() { return operationsClient; } /** * Returns the OperationsClient that can be used to query the status of a long-running operation * returned by another API method call. */ @BetaApi public final OperationsClient getHttpJsonOperationsClient() { return httpJsonOperationsClient; } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Applications in a given project and location. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   *   for (Application element : appPlatformClient.listApplications(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. Parent value for ListApplicationsRequest. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListApplicationsPagedResponse listApplications(LocationName parent) { ListApplicationsRequest request = ListApplicationsRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return listApplications(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Applications in a given project and location. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   *   for (Application element : appPlatformClient.listApplications(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. Parent value for ListApplicationsRequest. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListApplicationsPagedResponse listApplications(String parent) { ListApplicationsRequest request = ListApplicationsRequest.newBuilder().setParent(parent).build(); return listApplications(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Applications in a given project and location. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   ListApplicationsRequest request =
   *       ListApplicationsRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   for (Application element : appPlatformClient.listApplications(request).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListApplicationsPagedResponse listApplications(ListApplicationsRequest request) { return listApplicationsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Applications in a given project and location. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   ListApplicationsRequest request =
   *       ListApplicationsRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   ApiFuture future =
   *       appPlatformClient.listApplicationsPagedCallable().futureCall(request);
   *   // Do something.
   *   for (Application element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable listApplicationsPagedCallable() { return stub.listApplicationsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Applications in a given project and location. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   ListApplicationsRequest request =
   *       ListApplicationsRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   while (true) {
   *     ListApplicationsResponse response =
   *         appPlatformClient.listApplicationsCallable().call(request);
   *     for (Application element : response.getApplicationsList()) {
   *       // doThingsWith(element);
   *     }
   *     String nextPageToken = response.getNextPageToken();
   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
   *       request = request.toBuilder().setPageToken(nextPageToken).build();
   *     } else {
   *       break;
   *     }
   *   }
   * }
   * }
*/ public final UnaryCallable listApplicationsCallable() { return stub.listApplicationsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single Application. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]");
   *   Application response = appPlatformClient.getApplication(name);
   * }
   * }
* * @param name Required. Name of the resource. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Application getApplication(ApplicationName name) { GetApplicationRequest request = GetApplicationRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return getApplication(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single Application. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   String name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString();
   *   Application response = appPlatformClient.getApplication(name);
   * }
   * }
* * @param name Required. Name of the resource. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Application getApplication(String name) { GetApplicationRequest request = GetApplicationRequest.newBuilder().setName(name).build(); return getApplication(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single Application. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   GetApplicationRequest request =
   *       GetApplicationRequest.newBuilder()
   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .build();
   *   Application response = appPlatformClient.getApplication(request);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Application getApplication(GetApplicationRequest request) { return getApplicationCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single Application. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   GetApplicationRequest request =
   *       GetApplicationRequest.newBuilder()
   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .build();
   *   ApiFuture future =
   *       appPlatformClient.getApplicationCallable().futureCall(request);
   *   // Do something.
   *   Application response = future.get();
   * }
   * }
*/ public final UnaryCallable getApplicationCallable() { return stub.getApplicationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Application in a given project and location. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   *   Application application = Application.newBuilder().build();
   *   Application response = appPlatformClient.createApplicationAsync(parent, application).get();
   * }
   * }
* * @param parent Required. Value for parent. * @param application Required. The resource being created. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createApplicationAsync( LocationName parent, Application application) { CreateApplicationRequest request = CreateApplicationRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setApplication(application) .build(); return createApplicationAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Application in a given project and location. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   *   Application application = Application.newBuilder().build();
   *   Application response = appPlatformClient.createApplicationAsync(parent, application).get();
   * }
   * }
* * @param parent Required. Value for parent. * @param application Required. The resource being created. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createApplicationAsync( String parent, Application application) { CreateApplicationRequest request = CreateApplicationRequest.newBuilder().setParent(parent).setApplication(application).build(); return createApplicationAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Application in a given project and location. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   CreateApplicationRequest request =
   *       CreateApplicationRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setApplicationId("applicationId-1011352949")
   *           .setApplication(Application.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   Application response = appPlatformClient.createApplicationAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createApplicationAsync( CreateApplicationRequest request) { return createApplicationOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Application in a given project and location. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   CreateApplicationRequest request =
   *       CreateApplicationRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setApplicationId("applicationId-1011352949")
   *           .setApplication(Application.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   OperationFuture future =
   *       appPlatformClient.createApplicationOperationCallable().futureCall(request);
   *   // Do something.
   *   Application response = future.get();
   * }
   * }
*/ public final OperationCallable createApplicationOperationCallable() { return stub.createApplicationOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Application in a given project and location. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   CreateApplicationRequest request =
   *       CreateApplicationRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setApplicationId("applicationId-1011352949")
   *           .setApplication(Application.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   ApiFuture future =
   *       appPlatformClient.createApplicationCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable createApplicationCallable() { return stub.createApplicationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single Application. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   Application application = Application.newBuilder().build();
   *   FieldMask updateMask = FieldMask.newBuilder().build();
   *   Application response =
   *       appPlatformClient.updateApplicationAsync(application, updateMask).get();
   * }
   * }
* * @param application Required. The resource being updated. * @param updateMask Optional. Field mask is used to specify the fields to be overwritten in the * Application resource by the update. The fields specified in the update_mask are relative to * the resource, not the full request. A field will be overwritten if it is in the mask. If * the user does not provide a mask then all fields will be overwritten. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture updateApplicationAsync( Application application, FieldMask updateMask) { UpdateApplicationRequest request = UpdateApplicationRequest.newBuilder() .setApplication(application) .setUpdateMask(updateMask) .build(); return updateApplicationAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single Application. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   UpdateApplicationRequest request =
   *       UpdateApplicationRequest.newBuilder()
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setApplication(Application.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   Application response = appPlatformClient.updateApplicationAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture updateApplicationAsync( UpdateApplicationRequest request) { return updateApplicationOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single Application. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   UpdateApplicationRequest request =
   *       UpdateApplicationRequest.newBuilder()
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setApplication(Application.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   OperationFuture future =
   *       appPlatformClient.updateApplicationOperationCallable().futureCall(request);
   *   // Do something.
   *   Application response = future.get();
   * }
   * }
*/ public final OperationCallable updateApplicationOperationCallable() { return stub.updateApplicationOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single Application. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   UpdateApplicationRequest request =
   *       UpdateApplicationRequest.newBuilder()
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setApplication(Application.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   ApiFuture future =
   *       appPlatformClient.updateApplicationCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable updateApplicationCallable() { return stub.updateApplicationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Application. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]");
   *   appPlatformClient.deleteApplicationAsync(name).get();
   * }
   * }
* * @param name Required. Name of the resource. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteApplicationAsync( ApplicationName name) { DeleteApplicationRequest request = DeleteApplicationRequest.newBuilder() .setName(name == null ? null : name.toString()) .build(); return deleteApplicationAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Application. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   String name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString();
   *   appPlatformClient.deleteApplicationAsync(name).get();
   * }
   * }
* * @param name Required. Name of the resource. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteApplicationAsync(String name) { DeleteApplicationRequest request = DeleteApplicationRequest.newBuilder().setName(name).build(); return deleteApplicationAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Application. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   DeleteApplicationRequest request =
   *       DeleteApplicationRequest.newBuilder()
   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .setRequestId("requestId693933066")
   *           .setForce(true)
   *           .build();
   *   appPlatformClient.deleteApplicationAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteApplicationAsync( DeleteApplicationRequest request) { return deleteApplicationOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Application. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   DeleteApplicationRequest request =
   *       DeleteApplicationRequest.newBuilder()
   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .setRequestId("requestId693933066")
   *           .setForce(true)
   *           .build();
   *   OperationFuture future =
   *       appPlatformClient.deleteApplicationOperationCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final OperationCallable deleteApplicationOperationCallable() { return stub.deleteApplicationOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Application. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   DeleteApplicationRequest request =
   *       DeleteApplicationRequest.newBuilder()
   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .setRequestId("requestId693933066")
   *           .setForce(true)
   *           .build();
   *   ApiFuture future =
   *       appPlatformClient.deleteApplicationCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final UnaryCallable deleteApplicationCallable() { return stub.deleteApplicationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deploys a single Application. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]");
   *   DeployApplicationResponse response = appPlatformClient.deployApplicationAsync(name).get();
   * }
   * }
* * @param name Required. the name of the application to retrieve. Format: * "projects/{project}/locations/{location}/applications/{application}" * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deployApplicationAsync( ApplicationName name) { DeployApplicationRequest request = DeployApplicationRequest.newBuilder() .setName(name == null ? null : name.toString()) .build(); return deployApplicationAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deploys a single Application. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   String name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString();
   *   DeployApplicationResponse response = appPlatformClient.deployApplicationAsync(name).get();
   * }
   * }
* * @param name Required. the name of the application to retrieve. Format: * "projects/{project}/locations/{location}/applications/{application}" * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deployApplicationAsync( String name) { DeployApplicationRequest request = DeployApplicationRequest.newBuilder().setName(name).build(); return deployApplicationAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deploys a single Application. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   DeployApplicationRequest request =
   *       DeployApplicationRequest.newBuilder()
   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .setValidateOnly(true)
   *           .setRequestId("requestId693933066")
   *           .setEnableMonitoring(true)
   *           .build();
   *   DeployApplicationResponse response = appPlatformClient.deployApplicationAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deployApplicationAsync( DeployApplicationRequest request) { return deployApplicationOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deploys a single Application. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   DeployApplicationRequest request =
   *       DeployApplicationRequest.newBuilder()
   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .setValidateOnly(true)
   *           .setRequestId("requestId693933066")
   *           .setEnableMonitoring(true)
   *           .build();
   *   OperationFuture future =
   *       appPlatformClient.deployApplicationOperationCallable().futureCall(request);
   *   // Do something.
   *   DeployApplicationResponse response = future.get();
   * }
   * }
*/ public final OperationCallable< DeployApplicationRequest, DeployApplicationResponse, OperationMetadata> deployApplicationOperationCallable() { return stub.deployApplicationOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deploys a single Application. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   DeployApplicationRequest request =
   *       DeployApplicationRequest.newBuilder()
   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .setValidateOnly(true)
   *           .setRequestId("requestId693933066")
   *           .setEnableMonitoring(true)
   *           .build();
   *   ApiFuture future =
   *       appPlatformClient.deployApplicationCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable deployApplicationCallable() { return stub.deployApplicationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Undeploys a single Application. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]");
   *   UndeployApplicationResponse response = appPlatformClient.undeployApplicationAsync(name).get();
   * }
   * }
* * @param name Required. the name of the application to retrieve. Format: * "projects/{project}/locations/{location}/applications/{application}" * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture undeployApplicationAsync(ApplicationName name) { UndeployApplicationRequest request = UndeployApplicationRequest.newBuilder() .setName(name == null ? null : name.toString()) .build(); return undeployApplicationAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Undeploys a single Application. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   String name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString();
   *   UndeployApplicationResponse response = appPlatformClient.undeployApplicationAsync(name).get();
   * }
   * }
* * @param name Required. the name of the application to retrieve. Format: * "projects/{project}/locations/{location}/applications/{application}" * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture undeployApplicationAsync(String name) { UndeployApplicationRequest request = UndeployApplicationRequest.newBuilder().setName(name).build(); return undeployApplicationAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Undeploys a single Application. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   UndeployApplicationRequest request =
   *       UndeployApplicationRequest.newBuilder()
   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   UndeployApplicationResponse response =
   *       appPlatformClient.undeployApplicationAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture undeployApplicationAsync(UndeployApplicationRequest request) { return undeployApplicationOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Undeploys a single Application. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   UndeployApplicationRequest request =
   *       UndeployApplicationRequest.newBuilder()
   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   OperationFuture future =
   *       appPlatformClient.undeployApplicationOperationCallable().futureCall(request);
   *   // Do something.
   *   UndeployApplicationResponse response = future.get();
   * }
   * }
*/ public final OperationCallable< UndeployApplicationRequest, UndeployApplicationResponse, OperationMetadata> undeployApplicationOperationCallable() { return stub.undeployApplicationOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Undeploys a single Application. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   UndeployApplicationRequest request =
   *       UndeployApplicationRequest.newBuilder()
   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   ApiFuture future =
   *       appPlatformClient.undeployApplicationCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable undeployApplicationCallable() { return stub.undeployApplicationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Adds target stream input to the Application. If the Application is deployed, the corresponding * new Application instance will be created. If the stream has already been in the Application, * the RPC will fail. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]");
   *   AddApplicationStreamInputResponse response =
   *       appPlatformClient.addApplicationStreamInputAsync(name).get();
   * }
   * }
* * @param name Required. the name of the application to retrieve. Format: * "projects/{project}/locations/{location}/applications/{application}" * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture addApplicationStreamInputAsync(ApplicationName name) { AddApplicationStreamInputRequest request = AddApplicationStreamInputRequest.newBuilder() .setName(name == null ? null : name.toString()) .build(); return addApplicationStreamInputAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Adds target stream input to the Application. If the Application is deployed, the corresponding * new Application instance will be created. If the stream has already been in the Application, * the RPC will fail. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   String name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString();
   *   AddApplicationStreamInputResponse response =
   *       appPlatformClient.addApplicationStreamInputAsync(name).get();
   * }
   * }
* * @param name Required. the name of the application to retrieve. Format: * "projects/{project}/locations/{location}/applications/{application}" * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture addApplicationStreamInputAsync(String name) { AddApplicationStreamInputRequest request = AddApplicationStreamInputRequest.newBuilder().setName(name).build(); return addApplicationStreamInputAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Adds target stream input to the Application. If the Application is deployed, the corresponding * new Application instance will be created. If the stream has already been in the Application, * the RPC will fail. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   AddApplicationStreamInputRequest request =
   *       AddApplicationStreamInputRequest.newBuilder()
   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .addAllApplicationStreamInputs(new ArrayList())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   AddApplicationStreamInputResponse response =
   *       appPlatformClient.addApplicationStreamInputAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture addApplicationStreamInputAsync(AddApplicationStreamInputRequest request) { return addApplicationStreamInputOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Adds target stream input to the Application. If the Application is deployed, the corresponding * new Application instance will be created. If the stream has already been in the Application, * the RPC will fail. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   AddApplicationStreamInputRequest request =
   *       AddApplicationStreamInputRequest.newBuilder()
   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .addAllApplicationStreamInputs(new ArrayList())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   OperationFuture future =
   *       appPlatformClient.addApplicationStreamInputOperationCallable().futureCall(request);
   *   // Do something.
   *   AddApplicationStreamInputResponse response = future.get();
   * }
   * }
*/ public final OperationCallable< AddApplicationStreamInputRequest, AddApplicationStreamInputResponse, OperationMetadata> addApplicationStreamInputOperationCallable() { return stub.addApplicationStreamInputOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Adds target stream input to the Application. If the Application is deployed, the corresponding * new Application instance will be created. If the stream has already been in the Application, * the RPC will fail. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   AddApplicationStreamInputRequest request =
   *       AddApplicationStreamInputRequest.newBuilder()
   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .addAllApplicationStreamInputs(new ArrayList())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   ApiFuture future =
   *       appPlatformClient.addApplicationStreamInputCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable addApplicationStreamInputCallable() { return stub.addApplicationStreamInputCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Remove target stream input to the Application, if the Application is deployed, the * corresponding instance based will be deleted. If the stream is not in the Application, the RPC * will fail. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]");
   *   RemoveApplicationStreamInputResponse response =
   *       appPlatformClient.removeApplicationStreamInputAsync(name).get();
   * }
   * }
* * @param name Required. the name of the application to retrieve. Format: * "projects/{project}/locations/{location}/applications/{application}" * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture removeApplicationStreamInputAsync(ApplicationName name) { RemoveApplicationStreamInputRequest request = RemoveApplicationStreamInputRequest.newBuilder() .setName(name == null ? null : name.toString()) .build(); return removeApplicationStreamInputAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Remove target stream input to the Application, if the Application is deployed, the * corresponding instance based will be deleted. If the stream is not in the Application, the RPC * will fail. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   String name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString();
   *   RemoveApplicationStreamInputResponse response =
   *       appPlatformClient.removeApplicationStreamInputAsync(name).get();
   * }
   * }
* * @param name Required. the name of the application to retrieve. Format: * "projects/{project}/locations/{location}/applications/{application}" * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture removeApplicationStreamInputAsync(String name) { RemoveApplicationStreamInputRequest request = RemoveApplicationStreamInputRequest.newBuilder().setName(name).build(); return removeApplicationStreamInputAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Remove target stream input to the Application, if the Application is deployed, the * corresponding instance based will be deleted. If the stream is not in the Application, the RPC * will fail. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   RemoveApplicationStreamInputRequest request =
   *       RemoveApplicationStreamInputRequest.newBuilder()
   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .addAllTargetStreamInputs(
   *               new ArrayList())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   RemoveApplicationStreamInputResponse response =
   *       appPlatformClient.removeApplicationStreamInputAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture removeApplicationStreamInputAsync(RemoveApplicationStreamInputRequest request) { return removeApplicationStreamInputOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Remove target stream input to the Application, if the Application is deployed, the * corresponding instance based will be deleted. If the stream is not in the Application, the RPC * will fail. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   RemoveApplicationStreamInputRequest request =
   *       RemoveApplicationStreamInputRequest.newBuilder()
   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .addAllTargetStreamInputs(
   *               new ArrayList())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   OperationFuture future =
   *       appPlatformClient.removeApplicationStreamInputOperationCallable().futureCall(request);
   *   // Do something.
   *   RemoveApplicationStreamInputResponse response = future.get();
   * }
   * }
*/ public final OperationCallable< RemoveApplicationStreamInputRequest, RemoveApplicationStreamInputResponse, OperationMetadata> removeApplicationStreamInputOperationCallable() { return stub.removeApplicationStreamInputOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Remove target stream input to the Application, if the Application is deployed, the * corresponding instance based will be deleted. If the stream is not in the Application, the RPC * will fail. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   RemoveApplicationStreamInputRequest request =
   *       RemoveApplicationStreamInputRequest.newBuilder()
   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .addAllTargetStreamInputs(
   *               new ArrayList())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   ApiFuture future =
   *       appPlatformClient.removeApplicationStreamInputCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable removeApplicationStreamInputCallable() { return stub.removeApplicationStreamInputCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Update target stream input to the Application, if the Application is deployed, the * corresponding instance based will be deployed. For CreateOrUpdate behavior, set allow_missing * to true. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]");
   *   UpdateApplicationStreamInputResponse response =
   *       appPlatformClient.updateApplicationStreamInputAsync(name).get();
   * }
   * }
* * @param name Required. the name of the application to retrieve. Format: * "projects/{project}/locations/{location}/applications/{application}" * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture updateApplicationStreamInputAsync(ApplicationName name) { UpdateApplicationStreamInputRequest request = UpdateApplicationStreamInputRequest.newBuilder() .setName(name == null ? null : name.toString()) .build(); return updateApplicationStreamInputAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Update target stream input to the Application, if the Application is deployed, the * corresponding instance based will be deployed. For CreateOrUpdate behavior, set allow_missing * to true. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   String name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString();
   *   UpdateApplicationStreamInputResponse response =
   *       appPlatformClient.updateApplicationStreamInputAsync(name).get();
   * }
   * }
* * @param name Required. the name of the application to retrieve. Format: * "projects/{project}/locations/{location}/applications/{application}" * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture updateApplicationStreamInputAsync(String name) { UpdateApplicationStreamInputRequest request = UpdateApplicationStreamInputRequest.newBuilder().setName(name).build(); return updateApplicationStreamInputAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Update target stream input to the Application, if the Application is deployed, the * corresponding instance based will be deployed. For CreateOrUpdate behavior, set allow_missing * to true. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   UpdateApplicationStreamInputRequest request =
   *       UpdateApplicationStreamInputRequest.newBuilder()
   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .addAllApplicationStreamInputs(new ArrayList())
   *           .setRequestId("requestId693933066")
   *           .setAllowMissing(true)
   *           .build();
   *   UpdateApplicationStreamInputResponse response =
   *       appPlatformClient.updateApplicationStreamInputAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture updateApplicationStreamInputAsync(UpdateApplicationStreamInputRequest request) { return updateApplicationStreamInputOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Update target stream input to the Application, if the Application is deployed, the * corresponding instance based will be deployed. For CreateOrUpdate behavior, set allow_missing * to true. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   UpdateApplicationStreamInputRequest request =
   *       UpdateApplicationStreamInputRequest.newBuilder()
   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .addAllApplicationStreamInputs(new ArrayList())
   *           .setRequestId("requestId693933066")
   *           .setAllowMissing(true)
   *           .build();
   *   OperationFuture future =
   *       appPlatformClient.updateApplicationStreamInputOperationCallable().futureCall(request);
   *   // Do something.
   *   UpdateApplicationStreamInputResponse response = future.get();
   * }
   * }
*/ public final OperationCallable< UpdateApplicationStreamInputRequest, UpdateApplicationStreamInputResponse, OperationMetadata> updateApplicationStreamInputOperationCallable() { return stub.updateApplicationStreamInputOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Update target stream input to the Application, if the Application is deployed, the * corresponding instance based will be deployed. For CreateOrUpdate behavior, set allow_missing * to true. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   UpdateApplicationStreamInputRequest request =
   *       UpdateApplicationStreamInputRequest.newBuilder()
   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .addAllApplicationStreamInputs(new ArrayList())
   *           .setRequestId("requestId693933066")
   *           .setAllowMissing(true)
   *           .build();
   *   ApiFuture future =
   *       appPlatformClient.updateApplicationStreamInputCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable updateApplicationStreamInputCallable() { return stub.updateApplicationStreamInputCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Instances in a given project and location. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   ApplicationName parent = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]");
   *   for (Instance element : appPlatformClient.listInstances(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. Parent value for ListInstancesRequest. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListInstancesPagedResponse listInstances(ApplicationName parent) { ListInstancesRequest request = ListInstancesRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return listInstances(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Instances in a given project and location. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   String parent = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString();
   *   for (Instance element : appPlatformClient.listInstances(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. Parent value for ListInstancesRequest. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListInstancesPagedResponse listInstances(String parent) { ListInstancesRequest request = ListInstancesRequest.newBuilder().setParent(parent).build(); return listInstances(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Instances in a given project and location. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   ListInstancesRequest request =
   *       ListInstancesRequest.newBuilder()
   *           .setParent(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   for (Instance element : appPlatformClient.listInstances(request).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListInstancesPagedResponse listInstances(ListInstancesRequest request) { return listInstancesPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Instances in a given project and location. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   ListInstancesRequest request =
   *       ListInstancesRequest.newBuilder()
   *           .setParent(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   ApiFuture future =
   *       appPlatformClient.listInstancesPagedCallable().futureCall(request);
   *   // Do something.
   *   for (Instance element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable listInstancesPagedCallable() { return stub.listInstancesPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Instances in a given project and location. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   ListInstancesRequest request =
   *       ListInstancesRequest.newBuilder()
   *           .setParent(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   while (true) {
   *     ListInstancesResponse response = appPlatformClient.listInstancesCallable().call(request);
   *     for (Instance element : response.getInstancesList()) {
   *       // doThingsWith(element);
   *     }
   *     String nextPageToken = response.getNextPageToken();
   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
   *       request = request.toBuilder().setPageToken(nextPageToken).build();
   *     } else {
   *       break;
   *     }
   *   }
   * }
   * }
*/ public final UnaryCallable listInstancesCallable() { return stub.listInstancesCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single Instance. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[INSTANCE]");
   *   Instance response = appPlatformClient.getInstance(name);
   * }
   * }
* * @param name Required. Name of the resource. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Instance getInstance(InstanceName name) { GetInstanceRequest request = GetInstanceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return getInstance(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single Instance. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   String name =
   *       InstanceName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[INSTANCE]").toString();
   *   Instance response = appPlatformClient.getInstance(name);
   * }
   * }
* * @param name Required. Name of the resource. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Instance getInstance(String name) { GetInstanceRequest request = GetInstanceRequest.newBuilder().setName(name).build(); return getInstance(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single Instance. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   GetInstanceRequest request =
   *       GetInstanceRequest.newBuilder()
   *           .setName(
   *               InstanceName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[INSTANCE]")
   *                   .toString())
   *           .build();
   *   Instance response = appPlatformClient.getInstance(request);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Instance getInstance(GetInstanceRequest request) { return getInstanceCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single Instance. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   GetInstanceRequest request =
   *       GetInstanceRequest.newBuilder()
   *           .setName(
   *               InstanceName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[INSTANCE]")
   *                   .toString())
   *           .build();
   *   ApiFuture future = appPlatformClient.getInstanceCallable().futureCall(request);
   *   // Do something.
   *   Instance response = future.get();
   * }
   * }
*/ public final UnaryCallable getInstanceCallable() { return stub.getInstanceCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Adds target stream input to the Application. If the Application is deployed, the corresponding * new Application instance will be created. If the stream has already been in the Application, * the RPC will fail. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]");
   *   CreateApplicationInstancesResponse response =
   *       appPlatformClient.createApplicationInstancesAsync(name).get();
   * }
   * }
* * @param name Required. the name of the application to retrieve. Format: * "projects/{project}/locations/{location}/applications/{application}" * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createApplicationInstancesAsync(ApplicationName name) { CreateApplicationInstancesRequest request = CreateApplicationInstancesRequest.newBuilder() .setName(name == null ? null : name.toString()) .build(); return createApplicationInstancesAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Adds target stream input to the Application. If the Application is deployed, the corresponding * new Application instance will be created. If the stream has already been in the Application, * the RPC will fail. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   String name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString();
   *   CreateApplicationInstancesResponse response =
   *       appPlatformClient.createApplicationInstancesAsync(name).get();
   * }
   * }
* * @param name Required. the name of the application to retrieve. Format: * "projects/{project}/locations/{location}/applications/{application}" * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createApplicationInstancesAsync(String name) { CreateApplicationInstancesRequest request = CreateApplicationInstancesRequest.newBuilder().setName(name).build(); return createApplicationInstancesAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Adds target stream input to the Application. If the Application is deployed, the corresponding * new Application instance will be created. If the stream has already been in the Application, * the RPC will fail. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   CreateApplicationInstancesRequest request =
   *       CreateApplicationInstancesRequest.newBuilder()
   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .addAllApplicationInstances(new ArrayList())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   CreateApplicationInstancesResponse response =
   *       appPlatformClient.createApplicationInstancesAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createApplicationInstancesAsync(CreateApplicationInstancesRequest request) { return createApplicationInstancesOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Adds target stream input to the Application. If the Application is deployed, the corresponding * new Application instance will be created. If the stream has already been in the Application, * the RPC will fail. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   CreateApplicationInstancesRequest request =
   *       CreateApplicationInstancesRequest.newBuilder()
   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .addAllApplicationInstances(new ArrayList())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   OperationFuture future =
   *       appPlatformClient.createApplicationInstancesOperationCallable().futureCall(request);
   *   // Do something.
   *   CreateApplicationInstancesResponse response = future.get();
   * }
   * }
*/ public final OperationCallable< CreateApplicationInstancesRequest, CreateApplicationInstancesResponse, OperationMetadata> createApplicationInstancesOperationCallable() { return stub.createApplicationInstancesOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Adds target stream input to the Application. If the Application is deployed, the corresponding * new Application instance will be created. If the stream has already been in the Application, * the RPC will fail. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   CreateApplicationInstancesRequest request =
   *       CreateApplicationInstancesRequest.newBuilder()
   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .addAllApplicationInstances(new ArrayList())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   ApiFuture future =
   *       appPlatformClient.createApplicationInstancesCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable createApplicationInstancesCallable() { return stub.createApplicationInstancesCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Remove target stream input to the Application, if the Application is deployed, the * corresponding instance based will be deleted. If the stream is not in the Application, the RPC * will fail. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]");
   *   Instance response = appPlatformClient.deleteApplicationInstancesAsync(name).get();
   * }
   * }
* * @param name Required. the name of the application to retrieve. Format: * "projects/{project}/locations/{location}/applications/{application}" * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteApplicationInstancesAsync( ApplicationName name) { DeleteApplicationInstancesRequest request = DeleteApplicationInstancesRequest.newBuilder() .setName(name == null ? null : name.toString()) .build(); return deleteApplicationInstancesAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Remove target stream input to the Application, if the Application is deployed, the * corresponding instance based will be deleted. If the stream is not in the Application, the RPC * will fail. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   String name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString();
   *   Instance response = appPlatformClient.deleteApplicationInstancesAsync(name).get();
   * }
   * }
* * @param name Required. the name of the application to retrieve. Format: * "projects/{project}/locations/{location}/applications/{application}" * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteApplicationInstancesAsync( String name) { DeleteApplicationInstancesRequest request = DeleteApplicationInstancesRequest.newBuilder().setName(name).build(); return deleteApplicationInstancesAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Remove target stream input to the Application, if the Application is deployed, the * corresponding instance based will be deleted. If the stream is not in the Application, the RPC * will fail. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   DeleteApplicationInstancesRequest request =
   *       DeleteApplicationInstancesRequest.newBuilder()
   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .addAllInstanceIds(new ArrayList())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   Instance response = appPlatformClient.deleteApplicationInstancesAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteApplicationInstancesAsync( DeleteApplicationInstancesRequest request) { return deleteApplicationInstancesOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Remove target stream input to the Application, if the Application is deployed, the * corresponding instance based will be deleted. If the stream is not in the Application, the RPC * will fail. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   DeleteApplicationInstancesRequest request =
   *       DeleteApplicationInstancesRequest.newBuilder()
   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .addAllInstanceIds(new ArrayList())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   OperationFuture future =
   *       appPlatformClient.deleteApplicationInstancesOperationCallable().futureCall(request);
   *   // Do something.
   *   Instance response = future.get();
   * }
   * }
*/ public final OperationCallable deleteApplicationInstancesOperationCallable() { return stub.deleteApplicationInstancesOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Remove target stream input to the Application, if the Application is deployed, the * corresponding instance based will be deleted. If the stream is not in the Application, the RPC * will fail. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   DeleteApplicationInstancesRequest request =
   *       DeleteApplicationInstancesRequest.newBuilder()
   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .addAllInstanceIds(new ArrayList())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   ApiFuture future =
   *       appPlatformClient.deleteApplicationInstancesCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable deleteApplicationInstancesCallable() { return stub.deleteApplicationInstancesCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Adds target stream input to the Application. If the Application is deployed, the corresponding * new Application instance will be created. If the stream has already been in the Application, * the RPC will fail. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]");
   *   List applicationInstances =
   *       new ArrayList<>();
   *   UpdateApplicationInstancesResponse response =
   *       appPlatformClient.updateApplicationInstancesAsync(name, applicationInstances).get();
   * }
   * }
* * @param name Required. the name of the application to retrieve. Format: * "projects/{project}/locations/{location}/applications/{application}" * @param applicationInstances * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture updateApplicationInstancesAsync( ApplicationName name, List applicationInstances) { UpdateApplicationInstancesRequest request = UpdateApplicationInstancesRequest.newBuilder() .setName(name == null ? null : name.toString()) .addAllApplicationInstances(applicationInstances) .build(); return updateApplicationInstancesAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Adds target stream input to the Application. If the Application is deployed, the corresponding * new Application instance will be created. If the stream has already been in the Application, * the RPC will fail. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   String name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString();
   *   List applicationInstances =
   *       new ArrayList<>();
   *   UpdateApplicationInstancesResponse response =
   *       appPlatformClient.updateApplicationInstancesAsync(name, applicationInstances).get();
   * }
   * }
* * @param name Required. the name of the application to retrieve. Format: * "projects/{project}/locations/{location}/applications/{application}" * @param applicationInstances * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture updateApplicationInstancesAsync( String name, List applicationInstances) { UpdateApplicationInstancesRequest request = UpdateApplicationInstancesRequest.newBuilder() .setName(name) .addAllApplicationInstances(applicationInstances) .build(); return updateApplicationInstancesAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Adds target stream input to the Application. If the Application is deployed, the corresponding * new Application instance will be created. If the stream has already been in the Application, * the RPC will fail. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   UpdateApplicationInstancesRequest request =
   *       UpdateApplicationInstancesRequest.newBuilder()
   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .addAllApplicationInstances(
   *               new ArrayList())
   *           .setRequestId("requestId693933066")
   *           .setAllowMissing(true)
   *           .build();
   *   UpdateApplicationInstancesResponse response =
   *       appPlatformClient.updateApplicationInstancesAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture updateApplicationInstancesAsync(UpdateApplicationInstancesRequest request) { return updateApplicationInstancesOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Adds target stream input to the Application. If the Application is deployed, the corresponding * new Application instance will be created. If the stream has already been in the Application, * the RPC will fail. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   UpdateApplicationInstancesRequest request =
   *       UpdateApplicationInstancesRequest.newBuilder()
   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .addAllApplicationInstances(
   *               new ArrayList())
   *           .setRequestId("requestId693933066")
   *           .setAllowMissing(true)
   *           .build();
   *   OperationFuture future =
   *       appPlatformClient.updateApplicationInstancesOperationCallable().futureCall(request);
   *   // Do something.
   *   UpdateApplicationInstancesResponse response = future.get();
   * }
   * }
*/ public final OperationCallable< UpdateApplicationInstancesRequest, UpdateApplicationInstancesResponse, OperationMetadata> updateApplicationInstancesOperationCallable() { return stub.updateApplicationInstancesOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Adds target stream input to the Application. If the Application is deployed, the corresponding * new Application instance will be created. If the stream has already been in the Application, * the RPC will fail. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   UpdateApplicationInstancesRequest request =
   *       UpdateApplicationInstancesRequest.newBuilder()
   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .addAllApplicationInstances(
   *               new ArrayList())
   *           .setRequestId("requestId693933066")
   *           .setAllowMissing(true)
   *           .build();
   *   ApiFuture future =
   *       appPlatformClient.updateApplicationInstancesCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable updateApplicationInstancesCallable() { return stub.updateApplicationInstancesCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Drafts in a given project and location. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   ApplicationName parent = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]");
   *   for (Draft element : appPlatformClient.listDrafts(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. Parent value for ListDraftsRequest. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListDraftsPagedResponse listDrafts(ApplicationName parent) { ListDraftsRequest request = ListDraftsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); return listDrafts(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Drafts in a given project and location. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   String parent = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString();
   *   for (Draft element : appPlatformClient.listDrafts(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. Parent value for ListDraftsRequest. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListDraftsPagedResponse listDrafts(String parent) { ListDraftsRequest request = ListDraftsRequest.newBuilder().setParent(parent).build(); return listDrafts(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Drafts in a given project and location. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   ListDraftsRequest request =
   *       ListDraftsRequest.newBuilder()
   *           .setParent(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   for (Draft element : appPlatformClient.listDrafts(request).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListDraftsPagedResponse listDrafts(ListDraftsRequest request) { return listDraftsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Drafts in a given project and location. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   ListDraftsRequest request =
   *       ListDraftsRequest.newBuilder()
   *           .setParent(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   ApiFuture future = appPlatformClient.listDraftsPagedCallable().futureCall(request);
   *   // Do something.
   *   for (Draft element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable listDraftsPagedCallable() { return stub.listDraftsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Drafts in a given project and location. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   ListDraftsRequest request =
   *       ListDraftsRequest.newBuilder()
   *           .setParent(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   while (true) {
   *     ListDraftsResponse response = appPlatformClient.listDraftsCallable().call(request);
   *     for (Draft element : response.getDraftsList()) {
   *       // doThingsWith(element);
   *     }
   *     String nextPageToken = response.getNextPageToken();
   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
   *       request = request.toBuilder().setPageToken(nextPageToken).build();
   *     } else {
   *       break;
   *     }
   *   }
   * }
   * }
*/ public final UnaryCallable listDraftsCallable() { return stub.listDraftsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single Draft. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   DraftName name = DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]");
   *   Draft response = appPlatformClient.getDraft(name);
   * }
   * }
* * @param name Required. Name of the resource. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Draft getDraft(DraftName name) { GetDraftRequest request = GetDraftRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return getDraft(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single Draft. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   String name = DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]").toString();
   *   Draft response = appPlatformClient.getDraft(name);
   * }
   * }
* * @param name Required. Name of the resource. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Draft getDraft(String name) { GetDraftRequest request = GetDraftRequest.newBuilder().setName(name).build(); return getDraft(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single Draft. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   GetDraftRequest request =
   *       GetDraftRequest.newBuilder()
   *           .setName(
   *               DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]").toString())
   *           .build();
   *   Draft response = appPlatformClient.getDraft(request);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Draft getDraft(GetDraftRequest request) { return getDraftCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single Draft. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   GetDraftRequest request =
   *       GetDraftRequest.newBuilder()
   *           .setName(
   *               DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]").toString())
   *           .build();
   *   ApiFuture future = appPlatformClient.getDraftCallable().futureCall(request);
   *   // Do something.
   *   Draft response = future.get();
   * }
   * }
*/ public final UnaryCallable getDraftCallable() { return stub.getDraftCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Draft in a given project and location. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   ApplicationName parent = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]");
   *   Draft draft = Draft.newBuilder().build();
   *   String draftId = "draftId1912512156";
   *   Draft response = appPlatformClient.createDraftAsync(parent, draft, draftId).get();
   * }
   * }
* * @param parent Required. Value for parent. * @param draft Required. The resource being created. * @param draftId Required. Id of the requesting object. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createDraftAsync( ApplicationName parent, Draft draft, String draftId) { CreateDraftRequest request = CreateDraftRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setDraft(draft) .setDraftId(draftId) .build(); return createDraftAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Draft in a given project and location. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   String parent = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString();
   *   Draft draft = Draft.newBuilder().build();
   *   String draftId = "draftId1912512156";
   *   Draft response = appPlatformClient.createDraftAsync(parent, draft, draftId).get();
   * }
   * }
* * @param parent Required. Value for parent. * @param draft Required. The resource being created. * @param draftId Required. Id of the requesting object. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createDraftAsync( String parent, Draft draft, String draftId) { CreateDraftRequest request = CreateDraftRequest.newBuilder() .setParent(parent) .setDraft(draft) .setDraftId(draftId) .build(); return createDraftAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Draft in a given project and location. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   CreateDraftRequest request =
   *       CreateDraftRequest.newBuilder()
   *           .setParent(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .setDraftId("draftId1912512156")
   *           .setDraft(Draft.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   Draft response = appPlatformClient.createDraftAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createDraftAsync( CreateDraftRequest request) { return createDraftOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Draft in a given project and location. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   CreateDraftRequest request =
   *       CreateDraftRequest.newBuilder()
   *           .setParent(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .setDraftId("draftId1912512156")
   *           .setDraft(Draft.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   OperationFuture future =
   *       appPlatformClient.createDraftOperationCallable().futureCall(request);
   *   // Do something.
   *   Draft response = future.get();
   * }
   * }
*/ public final OperationCallable createDraftOperationCallable() { return stub.createDraftOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Draft in a given project and location. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   CreateDraftRequest request =
   *       CreateDraftRequest.newBuilder()
   *           .setParent(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
   *           .setDraftId("draftId1912512156")
   *           .setDraft(Draft.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   ApiFuture future = appPlatformClient.createDraftCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable createDraftCallable() { return stub.createDraftCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single Draft. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   Draft draft = Draft.newBuilder().build();
   *   FieldMask updateMask = FieldMask.newBuilder().build();
   *   Draft response = appPlatformClient.updateDraftAsync(draft, updateMask).get();
   * }
   * }
* * @param draft Required. The resource being updated. * @param updateMask Optional. Field mask is used to specify the fields to be overwritten in the * Draft resource by the update. The fields specified in the update_mask are relative to the * resource, not the full request. A field will be overwritten if it is in the mask. If the * user does not provide a mask then all fields will be overwritten. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture updateDraftAsync( Draft draft, FieldMask updateMask) { UpdateDraftRequest request = UpdateDraftRequest.newBuilder().setDraft(draft).setUpdateMask(updateMask).build(); return updateDraftAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single Draft. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   UpdateDraftRequest request =
   *       UpdateDraftRequest.newBuilder()
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setDraft(Draft.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .setAllowMissing(true)
   *           .build();
   *   Draft response = appPlatformClient.updateDraftAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture updateDraftAsync( UpdateDraftRequest request) { return updateDraftOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single Draft. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   UpdateDraftRequest request =
   *       UpdateDraftRequest.newBuilder()
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setDraft(Draft.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .setAllowMissing(true)
   *           .build();
   *   OperationFuture future =
   *       appPlatformClient.updateDraftOperationCallable().futureCall(request);
   *   // Do something.
   *   Draft response = future.get();
   * }
   * }
*/ public final OperationCallable updateDraftOperationCallable() { return stub.updateDraftOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single Draft. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   UpdateDraftRequest request =
   *       UpdateDraftRequest.newBuilder()
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setDraft(Draft.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .setAllowMissing(true)
   *           .build();
   *   ApiFuture future = appPlatformClient.updateDraftCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable updateDraftCallable() { return stub.updateDraftCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Draft. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   DraftName name = DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]");
   *   appPlatformClient.deleteDraftAsync(name).get();
   * }
   * }
* * @param name Required. Name of the resource. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteDraftAsync(DraftName name) { DeleteDraftRequest request = DeleteDraftRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return deleteDraftAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Draft. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   String name = DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]").toString();
   *   appPlatformClient.deleteDraftAsync(name).get();
   * }
   * }
* * @param name Required. Name of the resource. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteDraftAsync(String name) { DeleteDraftRequest request = DeleteDraftRequest.newBuilder().setName(name).build(); return deleteDraftAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Draft. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   DeleteDraftRequest request =
   *       DeleteDraftRequest.newBuilder()
   *           .setName(
   *               DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]").toString())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   appPlatformClient.deleteDraftAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteDraftAsync( DeleteDraftRequest request) { return deleteDraftOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Draft. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   DeleteDraftRequest request =
   *       DeleteDraftRequest.newBuilder()
   *           .setName(
   *               DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]").toString())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   OperationFuture future =
   *       appPlatformClient.deleteDraftOperationCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final OperationCallable deleteDraftOperationCallable() { return stub.deleteDraftOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Draft. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   DeleteDraftRequest request =
   *       DeleteDraftRequest.newBuilder()
   *           .setName(
   *               DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]").toString())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   ApiFuture future = appPlatformClient.deleteDraftCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final UnaryCallable deleteDraftCallable() { return stub.deleteDraftCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Processors in a given project and location. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   *   for (Processor element : appPlatformClient.listProcessors(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. Parent value for ListProcessorsRequest. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListProcessorsPagedResponse listProcessors(LocationName parent) { ListProcessorsRequest request = ListProcessorsRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return listProcessors(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Processors in a given project and location. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   *   for (Processor element : appPlatformClient.listProcessors(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. Parent value for ListProcessorsRequest. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListProcessorsPagedResponse listProcessors(String parent) { ListProcessorsRequest request = ListProcessorsRequest.newBuilder().setParent(parent).build(); return listProcessors(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Processors in a given project and location. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   ListProcessorsRequest request =
   *       ListProcessorsRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   for (Processor element : appPlatformClient.listProcessors(request).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListProcessorsPagedResponse listProcessors(ListProcessorsRequest request) { return listProcessorsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Processors in a given project and location. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   ListProcessorsRequest request =
   *       ListProcessorsRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   ApiFuture future =
   *       appPlatformClient.listProcessorsPagedCallable().futureCall(request);
   *   // Do something.
   *   for (Processor element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable listProcessorsPagedCallable() { return stub.listProcessorsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Processors in a given project and location. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   ListProcessorsRequest request =
   *       ListProcessorsRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   while (true) {
   *     ListProcessorsResponse response = appPlatformClient.listProcessorsCallable().call(request);
   *     for (Processor element : response.getProcessorsList()) {
   *       // doThingsWith(element);
   *     }
   *     String nextPageToken = response.getNextPageToken();
   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
   *       request = request.toBuilder().setPageToken(nextPageToken).build();
   *     } else {
   *       break;
   *     }
   *   }
   * }
   * }
*/ public final UnaryCallable listProcessorsCallable() { return stub.listProcessorsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * ListPrebuiltProcessors is a custom pass-through verb that Lists Prebuilt Processors. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   *   ListPrebuiltProcessorsResponse response = appPlatformClient.listPrebuiltProcessors(parent);
   * }
   * }
* * @param parent Required. Parent path. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListPrebuiltProcessorsResponse listPrebuiltProcessors(LocationName parent) { ListPrebuiltProcessorsRequest request = ListPrebuiltProcessorsRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return listPrebuiltProcessors(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * ListPrebuiltProcessors is a custom pass-through verb that Lists Prebuilt Processors. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   *   ListPrebuiltProcessorsResponse response = appPlatformClient.listPrebuiltProcessors(parent);
   * }
   * }
* * @param parent Required. Parent path. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListPrebuiltProcessorsResponse listPrebuiltProcessors(String parent) { ListPrebuiltProcessorsRequest request = ListPrebuiltProcessorsRequest.newBuilder().setParent(parent).build(); return listPrebuiltProcessors(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * ListPrebuiltProcessors is a custom pass-through verb that Lists Prebuilt Processors. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   ListPrebuiltProcessorsRequest request =
   *       ListPrebuiltProcessorsRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .build();
   *   ListPrebuiltProcessorsResponse response = appPlatformClient.listPrebuiltProcessors(request);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListPrebuiltProcessorsResponse listPrebuiltProcessors( ListPrebuiltProcessorsRequest request) { return listPrebuiltProcessorsCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * ListPrebuiltProcessors is a custom pass-through verb that Lists Prebuilt Processors. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   ListPrebuiltProcessorsRequest request =
   *       ListPrebuiltProcessorsRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .build();
   *   ApiFuture future =
   *       appPlatformClient.listPrebuiltProcessorsCallable().futureCall(request);
   *   // Do something.
   *   ListPrebuiltProcessorsResponse response = future.get();
   * }
   * }
*/ public final UnaryCallable listPrebuiltProcessorsCallable() { return stub.listPrebuiltProcessorsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single Processor. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
   *   Processor response = appPlatformClient.getProcessor(name);
   * }
   * }
* * @param name Required. Name of the resource. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Processor getProcessor(ProcessorName name) { GetProcessorRequest request = GetProcessorRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return getProcessor(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single Processor. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   String name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString();
   *   Processor response = appPlatformClient.getProcessor(name);
   * }
   * }
* * @param name Required. Name of the resource. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Processor getProcessor(String name) { GetProcessorRequest request = GetProcessorRequest.newBuilder().setName(name).build(); return getProcessor(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single Processor. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   GetProcessorRequest request =
   *       GetProcessorRequest.newBuilder()
   *           .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
   *           .build();
   *   Processor response = appPlatformClient.getProcessor(request);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Processor getProcessor(GetProcessorRequest request) { return getProcessorCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single Processor. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   GetProcessorRequest request =
   *       GetProcessorRequest.newBuilder()
   *           .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
   *           .build();
   *   ApiFuture future = appPlatformClient.getProcessorCallable().futureCall(request);
   *   // Do something.
   *   Processor response = future.get();
   * }
   * }
*/ public final UnaryCallable getProcessorCallable() { return stub.getProcessorCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Processor in a given project and location. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   *   Processor processor = Processor.newBuilder().build();
   *   String processorId = "processorId203323725";
   *   Processor response =
   *       appPlatformClient.createProcessorAsync(parent, processor, processorId).get();
   * }
   * }
* * @param parent Required. Value for parent. * @param processor Required. The resource being created. * @param processorId Required. Id of the requesting object. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createProcessorAsync( LocationName parent, Processor processor, String processorId) { CreateProcessorRequest request = CreateProcessorRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setProcessor(processor) .setProcessorId(processorId) .build(); return createProcessorAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Processor in a given project and location. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   *   Processor processor = Processor.newBuilder().build();
   *   String processorId = "processorId203323725";
   *   Processor response =
   *       appPlatformClient.createProcessorAsync(parent, processor, processorId).get();
   * }
   * }
* * @param parent Required. Value for parent. * @param processor Required. The resource being created. * @param processorId Required. Id of the requesting object. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createProcessorAsync( String parent, Processor processor, String processorId) { CreateProcessorRequest request = CreateProcessorRequest.newBuilder() .setParent(parent) .setProcessor(processor) .setProcessorId(processorId) .build(); return createProcessorAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Processor in a given project and location. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   CreateProcessorRequest request =
   *       CreateProcessorRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setProcessorId("processorId203323725")
   *           .setProcessor(Processor.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   Processor response = appPlatformClient.createProcessorAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createProcessorAsync( CreateProcessorRequest request) { return createProcessorOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Processor in a given project and location. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   CreateProcessorRequest request =
   *       CreateProcessorRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setProcessorId("processorId203323725")
   *           .setProcessor(Processor.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   OperationFuture future =
   *       appPlatformClient.createProcessorOperationCallable().futureCall(request);
   *   // Do something.
   *   Processor response = future.get();
   * }
   * }
*/ public final OperationCallable createProcessorOperationCallable() { return stub.createProcessorOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Processor in a given project and location. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   CreateProcessorRequest request =
   *       CreateProcessorRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setProcessorId("processorId203323725")
   *           .setProcessor(Processor.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   ApiFuture future = appPlatformClient.createProcessorCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable createProcessorCallable() { return stub.createProcessorCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single Processor. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   Processor processor = Processor.newBuilder().build();
   *   FieldMask updateMask = FieldMask.newBuilder().build();
   *   Processor response = appPlatformClient.updateProcessorAsync(processor, updateMask).get();
   * }
   * }
* * @param processor Required. The resource being updated. * @param updateMask Optional. Field mask is used to specify the fields to be overwritten in the * Processor resource by the update. The fields specified in the update_mask are relative to * the resource, not the full request. A field will be overwritten if it is in the mask. If * the user does not provide a mask then all fields will be overwritten. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture updateProcessorAsync( Processor processor, FieldMask updateMask) { UpdateProcessorRequest request = UpdateProcessorRequest.newBuilder() .setProcessor(processor) .setUpdateMask(updateMask) .build(); return updateProcessorAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single Processor. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   UpdateProcessorRequest request =
   *       UpdateProcessorRequest.newBuilder()
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setProcessor(Processor.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   Processor response = appPlatformClient.updateProcessorAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture updateProcessorAsync( UpdateProcessorRequest request) { return updateProcessorOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single Processor. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   UpdateProcessorRequest request =
   *       UpdateProcessorRequest.newBuilder()
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setProcessor(Processor.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   OperationFuture future =
   *       appPlatformClient.updateProcessorOperationCallable().futureCall(request);
   *   // Do something.
   *   Processor response = future.get();
   * }
   * }
*/ public final OperationCallable updateProcessorOperationCallable() { return stub.updateProcessorOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single Processor. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   UpdateProcessorRequest request =
   *       UpdateProcessorRequest.newBuilder()
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setProcessor(Processor.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   ApiFuture future = appPlatformClient.updateProcessorCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable updateProcessorCallable() { return stub.updateProcessorCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Processor. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
   *   appPlatformClient.deleteProcessorAsync(name).get();
   * }
   * }
* * @param name Required. Name of the resource * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteProcessorAsync(ProcessorName name) { DeleteProcessorRequest request = DeleteProcessorRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return deleteProcessorAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Processor. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   String name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString();
   *   appPlatformClient.deleteProcessorAsync(name).get();
   * }
   * }
* * @param name Required. Name of the resource * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteProcessorAsync(String name) { DeleteProcessorRequest request = DeleteProcessorRequest.newBuilder().setName(name).build(); return deleteProcessorAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Processor. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   DeleteProcessorRequest request =
   *       DeleteProcessorRequest.newBuilder()
   *           .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   appPlatformClient.deleteProcessorAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteProcessorAsync( DeleteProcessorRequest request) { return deleteProcessorOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Processor. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   DeleteProcessorRequest request =
   *       DeleteProcessorRequest.newBuilder()
   *           .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   OperationFuture future =
   *       appPlatformClient.deleteProcessorOperationCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final OperationCallable deleteProcessorOperationCallable() { return stub.deleteProcessorOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Processor. * *

Sample code: * *

{@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 (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
   *   DeleteProcessorRequest request =
   *       DeleteProcessorRequest.newBuilder()
   *           .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   ApiFuture future = appPlatformClient.deleteProcessorCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final UnaryCallable deleteProcessorCallable() { return stub.deleteProcessorCallable(); } @Override public final void close() { stub.close(); } @Override public void shutdown() { stub.shutdown(); } @Override public boolean isShutdown() { return stub.isShutdown(); } @Override public boolean isTerminated() { return stub.isTerminated(); } @Override public void shutdownNow() { stub.shutdownNow(); } @Override public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { return stub.awaitTermination(duration, unit); } public static class ListApplicationsPagedResponse extends AbstractPagedListResponse< ListApplicationsRequest, ListApplicationsResponse, Application, ListApplicationsPage, ListApplicationsFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = ListApplicationsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ListApplicationsPagedResponse(input), MoreExecutors.directExecutor()); } private ListApplicationsPagedResponse(ListApplicationsPage page) { super(page, ListApplicationsFixedSizeCollection.createEmptyCollection()); } } public static class ListApplicationsPage extends AbstractPage< ListApplicationsRequest, ListApplicationsResponse, Application, ListApplicationsPage> { private ListApplicationsPage( PageContext context, ListApplicationsResponse response) { super(context, response); } private static ListApplicationsPage createEmptyPage() { return new ListApplicationsPage(null, null); } @Override protected ListApplicationsPage createPage( PageContext context, ListApplicationsResponse response) { return new ListApplicationsPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ListApplicationsFixedSizeCollection extends AbstractFixedSizeCollection< ListApplicationsRequest, ListApplicationsResponse, Application, ListApplicationsPage, ListApplicationsFixedSizeCollection> { private ListApplicationsFixedSizeCollection( List pages, int collectionSize) { super(pages, collectionSize); } private static ListApplicationsFixedSizeCollection createEmptyCollection() { return new ListApplicationsFixedSizeCollection(null, 0); } @Override protected ListApplicationsFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListApplicationsFixedSizeCollection(pages, collectionSize); } } public static class ListInstancesPagedResponse extends AbstractPagedListResponse< ListInstancesRequest, ListInstancesResponse, Instance, ListInstancesPage, ListInstancesFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = ListInstancesPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ListInstancesPagedResponse(input), MoreExecutors.directExecutor()); } private ListInstancesPagedResponse(ListInstancesPage page) { super(page, ListInstancesFixedSizeCollection.createEmptyCollection()); } } public static class ListInstancesPage extends AbstractPage< ListInstancesRequest, ListInstancesResponse, Instance, ListInstancesPage> { private ListInstancesPage( PageContext context, ListInstancesResponse response) { super(context, response); } private static ListInstancesPage createEmptyPage() { return new ListInstancesPage(null, null); } @Override protected ListInstancesPage createPage( PageContext context, ListInstancesResponse response) { return new ListInstancesPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ListInstancesFixedSizeCollection extends AbstractFixedSizeCollection< ListInstancesRequest, ListInstancesResponse, Instance, ListInstancesPage, ListInstancesFixedSizeCollection> { private ListInstancesFixedSizeCollection(List pages, int collectionSize) { super(pages, collectionSize); } private static ListInstancesFixedSizeCollection createEmptyCollection() { return new ListInstancesFixedSizeCollection(null, 0); } @Override protected ListInstancesFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListInstancesFixedSizeCollection(pages, collectionSize); } } public static class ListDraftsPagedResponse extends AbstractPagedListResponse< ListDraftsRequest, ListDraftsResponse, Draft, ListDraftsPage, ListDraftsFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = ListDraftsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ListDraftsPagedResponse(input), MoreExecutors.directExecutor()); } private ListDraftsPagedResponse(ListDraftsPage page) { super(page, ListDraftsFixedSizeCollection.createEmptyCollection()); } } public static class ListDraftsPage extends AbstractPage { private ListDraftsPage( PageContext context, ListDraftsResponse response) { super(context, response); } private static ListDraftsPage createEmptyPage() { return new ListDraftsPage(null, null); } @Override protected ListDraftsPage createPage( PageContext context, ListDraftsResponse response) { return new ListDraftsPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ListDraftsFixedSizeCollection extends AbstractFixedSizeCollection< ListDraftsRequest, ListDraftsResponse, Draft, ListDraftsPage, ListDraftsFixedSizeCollection> { private ListDraftsFixedSizeCollection(List pages, int collectionSize) { super(pages, collectionSize); } private static ListDraftsFixedSizeCollection createEmptyCollection() { return new ListDraftsFixedSizeCollection(null, 0); } @Override protected ListDraftsFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListDraftsFixedSizeCollection(pages, collectionSize); } } public static class ListProcessorsPagedResponse extends AbstractPagedListResponse< ListProcessorsRequest, ListProcessorsResponse, Processor, ListProcessorsPage, ListProcessorsFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = ListProcessorsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ListProcessorsPagedResponse(input), MoreExecutors.directExecutor()); } private ListProcessorsPagedResponse(ListProcessorsPage page) { super(page, ListProcessorsFixedSizeCollection.createEmptyCollection()); } } public static class ListProcessorsPage extends AbstractPage< ListProcessorsRequest, ListProcessorsResponse, Processor, ListProcessorsPage> { private ListProcessorsPage( PageContext context, ListProcessorsResponse response) { super(context, response); } private static ListProcessorsPage createEmptyPage() { return new ListProcessorsPage(null, null); } @Override protected ListProcessorsPage createPage( PageContext context, ListProcessorsResponse response) { return new ListProcessorsPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ListProcessorsFixedSizeCollection extends AbstractFixedSizeCollection< ListProcessorsRequest, ListProcessorsResponse, Processor, ListProcessorsPage, ListProcessorsFixedSizeCollection> { private ListProcessorsFixedSizeCollection(List pages, int collectionSize) { super(pages, collectionSize); } private static ListProcessorsFixedSizeCollection createEmptyCollection() { return new ListProcessorsFixedSizeCollection(null, 0); } @Override protected ListProcessorsFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListProcessorsFixedSizeCollection(pages, collectionSize); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy