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(). + * + *
Method | + *Description | + *Method 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. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
DeleteApplication |
+ * Deletes a single Application. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
DeployApplication |
+ * Deploys a single Application. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
UndeployApplication |
+ * Undeploys a single Application. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
DeleteDraft |
+ * Deletes a single Draft. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
DeleteProcessor |
+ * Deletes a single Processor. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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+ */ + public final UnaryCallablefuture = + * appPlatformClient.listApplicationsPagedCallable().futureCall(request); + * // Do something. + * for (Application element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
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
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+ */ + public final UnaryCallablefuture = + * appPlatformClient.getApplicationCallable().futureCall(request); + * // Do something. + * Application response = future.get(); + * } + * }
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
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
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
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+ */ + public final OperationCallablefuture = + * appPlatformClient.createApplicationOperationCallable().futureCall(request); + * // Do something. + * Application response = future.get(); + * } + * }
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+ */ + public final UnaryCallablefuture = + * appPlatformClient.createApplicationCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
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
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
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+ */ + public final OperationCallablefuture = + * appPlatformClient.updateApplicationOperationCallable().futureCall(request); + * // Do something. + * Application response = future.get(); + * } + * }
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+ */ + public final UnaryCallablefuture = + * appPlatformClient.updateApplicationCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
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
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
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
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+ */ + public final OperationCallablefuture = + * appPlatformClient.deleteApplicationOperationCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
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+ */ + public final UnaryCallablefuture = + * appPlatformClient.deleteApplicationCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
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
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
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
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+ */ + public final OperationCallable< + DeployApplicationRequest, DeployApplicationResponse, OperationMetadata> + deployApplicationOperationCallable() { + return stub.deployApplicationOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deploys a single Application. + * + *future = + * appPlatformClient.deployApplicationOperationCallable().futureCall(request); + * // Do something. + * DeployApplicationResponse response = future.get(); + * } + * }
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+ */ + public final UnaryCallablefuture = + * appPlatformClient.deployApplicationCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
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
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
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
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+ */ + public final OperationCallable< + UndeployApplicationRequest, UndeployApplicationResponse, OperationMetadata> + undeployApplicationOperationCallable() { + return stub.undeployApplicationOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Undeploys a single Application. + * + *future = + * appPlatformClient.undeployApplicationOperationCallable().futureCall(request); + * // Do something. + * UndeployApplicationResponse response = future.get(); + * } + * }
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+ */ + public final UnaryCallablefuture = + * appPlatformClient.undeployApplicationCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
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
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
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+ * + * @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()) + * .setRequestId("requestId693933066") + * .build(); + * AddApplicationStreamInputResponse response = + * appPlatformClient.addApplicationStreamInputAsync(request).get(); + * } + * }
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+ */ + 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. + * + *()) + * .setRequestId("requestId693933066") + * .build(); + * OperationFuture future = + * appPlatformClient.addApplicationStreamInputOperationCallable().futureCall(request); + * // Do something. + * AddApplicationStreamInputResponse response = future.get(); + * } + * }
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+ */ + public final UnaryCallable()) + * .setRequestId("requestId693933066") + * .build(); + * ApiFuture future = + * appPlatformClient.addApplicationStreamInputCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
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
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
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+ * + * @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()) + * .setRequestId("requestId693933066") + * .build(); + * RemoveApplicationStreamInputResponse response = + * appPlatformClient.removeApplicationStreamInputAsync(request).get(); + * } + * }
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+ */ + 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. + * + *()) + * .setRequestId("requestId693933066") + * .build(); + * OperationFuture future = + * appPlatformClient.removeApplicationStreamInputOperationCallable().futureCall(request); + * // Do something. + * RemoveApplicationStreamInputResponse response = future.get(); + * } + * }
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+ */ + public final UnaryCallable()) + * .setRequestId("requestId693933066") + * .build(); + * ApiFuture future = + * appPlatformClient.removeApplicationStreamInputCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
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
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
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+ * + * @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()) + * .setRequestId("requestId693933066") + * .setAllowMissing(true) + * .build(); + * UpdateApplicationStreamInputResponse response = + * appPlatformClient.updateApplicationStreamInputAsync(request).get(); + * } + * }
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+ */ + 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. + * + *()) + * .setRequestId("requestId693933066") + * .setAllowMissing(true) + * .build(); + * OperationFuture future = + * appPlatformClient.updateApplicationStreamInputOperationCallable().futureCall(request); + * // Do something. + * UpdateApplicationStreamInputResponse response = future.get(); + * } + * }
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+ */ + public final UnaryCallable()) + * .setRequestId("requestId693933066") + * .setAllowMissing(true) + * .build(); + * ApiFuture future = + * appPlatformClient.updateApplicationStreamInputCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
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+ */ + public final UnaryCallablefuture = + * appPlatformClient.listInstancesPagedCallable().futureCall(request); + * // Do something. + * for (Instance element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
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
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+ */ + public final UnaryCallablefuture = appPlatformClient.getInstanceCallable().futureCall(request); + * // Do something. + * Instance response = future.get(); + * } + * }
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
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
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+ * + * @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()) + * .setRequestId("requestId693933066") + * .build(); + * CreateApplicationInstancesResponse response = + * appPlatformClient.createApplicationInstancesAsync(request).get(); + * } + * }
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+ */ + 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. + * + *()) + * .setRequestId("requestId693933066") + * .build(); + * OperationFuture future = + * appPlatformClient.createApplicationInstancesOperationCallable().futureCall(request); + * // Do something. + * CreateApplicationInstancesResponse response = future.get(); + * } + * }
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+ */ + public final UnaryCallable()) + * .setRequestId("requestId693933066") + * .build(); + * ApiFuture future = + * appPlatformClient.createApplicationInstancesCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
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
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
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+ * + * @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()) + * .setRequestId("requestId693933066") + * .build(); + * Instance response = appPlatformClient.deleteApplicationInstancesAsync(request).get(); + * } + * }
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+ */ + public final OperationCallable()) + * .setRequestId("requestId693933066") + * .build(); + * OperationFuture future = + * appPlatformClient.deleteApplicationInstancesOperationCallable().futureCall(request); + * // Do something. + * Instance response = future.get(); + * } + * }
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+ */ + public final UnaryCallable()) + * .setRequestId("requestId693933066") + * .build(); + * ApiFuture future = + * appPlatformClient.deleteApplicationInstancesCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
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+ * + * @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 OperationFutureapplicationInstances = + * new ArrayList<>(); + * UpdateApplicationInstancesResponse response = + * appPlatformClient.updateApplicationInstancesAsync(name, applicationInstances).get(); + * } + * }
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+ * + * @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 OperationFutureapplicationInstances = + * new ArrayList<>(); + * UpdateApplicationInstancesResponse response = + * appPlatformClient.updateApplicationInstancesAsync(name, applicationInstances).get(); + * } + * }
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+ * + * @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()) + * .setRequestId("requestId693933066") + * .setAllowMissing(true) + * .build(); + * UpdateApplicationInstancesResponse response = + * appPlatformClient.updateApplicationInstancesAsync(request).get(); + * } + * }
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+ */ + 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. + * + *()) + * .setRequestId("requestId693933066") + * .setAllowMissing(true) + * .build(); + * OperationFuture future = + * appPlatformClient.updateApplicationInstancesOperationCallable().futureCall(request); + * // Do something. + * UpdateApplicationInstancesResponse response = future.get(); + * } + * }
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+ */ + public final UnaryCallable()) + * .setRequestId("requestId693933066") + * .setAllowMissing(true) + * .build(); + * ApiFuture future = + * appPlatformClient.updateApplicationInstancesCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
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+ */ + public final UnaryCallablefuture = appPlatformClient.listDraftsPagedCallable().futureCall(request); + * // Do something. + * for (Draft element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
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
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+ */ + public final UnaryCallablefuture = appPlatformClient.getDraftCallable().futureCall(request); + * // Do something. + * Draft response = future.get(); + * } + * }
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
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
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
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+ */ + public final OperationCallablefuture = + * appPlatformClient.createDraftOperationCallable().futureCall(request); + * // Do something. + * Draft response = future.get(); + * } + * }
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+ */ + public final UnaryCallablefuture = appPlatformClient.createDraftCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
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
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
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+ */ + public final OperationCallablefuture = + * appPlatformClient.updateDraftOperationCallable().futureCall(request); + * // Do something. + * Draft response = future.get(); + * } + * }
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+ */ + public final UnaryCallablefuture = appPlatformClient.updateDraftCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
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
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
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
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+ */ + public final OperationCallablefuture = + * appPlatformClient.deleteDraftOperationCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
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+ */ + public final UnaryCallablefuture = appPlatformClient.deleteDraftCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
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+ */ + public final UnaryCallablefuture = + * appPlatformClient.listProcessorsPagedCallable().futureCall(request); + * // Do something. + * for (Processor element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
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
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+ */ + public final UnaryCallablefuture = + * appPlatformClient.listPrebuiltProcessorsCallable().futureCall(request); + * // Do something. + * ListPrebuiltProcessorsResponse response = future.get(); + * } + * }
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+ */ + public final UnaryCallablefuture = appPlatformClient.getProcessorCallable().futureCall(request); + * // Do something. + * Processor response = future.get(); + * } + * }
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
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
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
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+ */ + public final OperationCallablefuture = + * appPlatformClient.createProcessorOperationCallable().futureCall(request); + * // Do something. + * Processor response = future.get(); + * } + * }
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+ */ + public final UnaryCallablefuture = appPlatformClient.createProcessorCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
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
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
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+ */ + public final OperationCallablefuture = + * appPlatformClient.updateProcessorOperationCallable().futureCall(request); + * // Do something. + * Processor response = future.get(); + * } + * }
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+ */ + public final UnaryCallablefuture = appPlatformClient.updateProcessorCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
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
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
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
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+ */ + public final OperationCallablefuture = + * appPlatformClient.deleteProcessorOperationCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
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+ */ + public final UnaryCallablefuture = appPlatformClient.deleteProcessorCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
The default instance has everything set to sensible defaults: + * + *
The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *
For example, to set the total timeout of getApplication to 30 seconds: + * + *
{@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.Builder appPlatformSettingsBuilder = AppPlatformSettings.newBuilder(); + * appPlatformSettingsBuilder + * .getApplicationSettings() + * .setRetrySettings( + * appPlatformSettingsBuilder + * .getApplicationSettings() + * .getRetrySettings() + * .toBuilder() + * .setTotalTimeout(Duration.ofSeconds(30)) + * .build()); + * AppPlatformSettings appPlatformSettings = appPlatformSettingsBuilder.build(); + * }+ */ +@Generated("by gapic-generator-java") +public class AppPlatformSettings extends ClientSettings
Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction 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:
+ *
+ * Note: close() needs to be called on the HealthCheckServiceClient object to clean up resources
+ * such as threads. In the example above, try-with-resources is used, which automatically calls
+ * close().
+ *
+ * HealthCheck HealthCheck method checks the health status of the cluster. Request object method variants only take one parameter, a request object, which must be constructed before the call. healthCheck(HealthCheckRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. healthCheckCallable()
+ * 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 HealthCheckServiceSettings to
+ * create(). For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@Generated("by gapic-generator-java")
+public class HealthCheckServiceClient implements BackgroundResource {
+ private final HealthCheckServiceSettings settings;
+ private final HealthCheckServiceStub stub;
+
+ /** Constructs an instance of HealthCheckServiceClient with default settings. */
+ public static final HealthCheckServiceClient create() throws IOException {
+ return create(HealthCheckServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of HealthCheckServiceClient, 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 HealthCheckServiceClient create(HealthCheckServiceSettings settings)
+ throws IOException {
+ return new HealthCheckServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of HealthCheckServiceClient, using the given stub for making calls. This
+ * is for advanced usage - prefer using create(HealthCheckServiceSettings).
+ */
+ public static final HealthCheckServiceClient create(HealthCheckServiceStub stub) {
+ return new HealthCheckServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of HealthCheckServiceClient, 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 HealthCheckServiceClient(HealthCheckServiceSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((HealthCheckServiceStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ protected HealthCheckServiceClient(HealthCheckServiceStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final HealthCheckServiceSettings getSettings() {
+ return settings;
+ }
+
+ public HealthCheckServiceStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * HealthCheck method checks the health status of the cluster.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the total timeout of healthCheck to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction 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:
+ *
+ * Note: close() needs to be called on the LiveVideoAnalyticsClient object to clean up resources
+ * such as threads. In the example above, try-with-resources is used, which automatically calls
+ * close().
+ *
+ * ListPublicOperators ListPublicOperators returns all the operators in public registry. Request object method variants only take one parameter, a request object, which must be constructed before the call. listPublicOperators(ListPublicOperatorsRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. listPublicOperators(LocationName parent)
+ * listPublicOperators(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. listPublicOperatorsPagedCallable()
+ * listPublicOperatorsCallable()
+ * ResolveOperatorInfo ResolveOperatorInfo returns the operator information based on the request. Request object method variants only take one parameter, a request object, which must be constructed before the call. resolveOperatorInfo(ResolveOperatorInfoRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. resolveOperatorInfo(LocationName parent, List<OperatorQuery> queries)
+ * resolveOperatorInfo(String parent, List<OperatorQuery> queries)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. resolveOperatorInfoCallable()
+ * ListOperators Lists Operators in a given project and location. Request object method variants only take one parameter, a request object, which must be constructed before the call. listOperators(ListOperatorsRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. listOperators(LocationName parent)
+ * listOperators(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. listOperatorsPagedCallable()
+ * listOperatorsCallable()
+ * GetOperator Gets details of a single Operator. Request object method variants only take one parameter, a request object, which must be constructed before the call. getOperator(GetOperatorRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. getOperator(OperatorName name)
+ * getOperator(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. getOperatorCallable()
+ * CreateOperator Creates a new Operator in a given project and location. Request object method variants only take one parameter, a request object, which must be constructed before the call. createOperatorAsync(CreateOperatorRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. createOperatorAsync(LocationName parent, Operator operator, String operatorId)
+ * createOperatorAsync(String parent, Operator operator, String operatorId)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. createOperatorOperationCallable()
+ * createOperatorCallable()
+ * UpdateOperator Updates the parameters of a single Operator. Request object method variants only take one parameter, a request object, which must be constructed before the call. updateOperatorAsync(UpdateOperatorRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. updateOperatorAsync(Operator operator, 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. updateOperatorOperationCallable()
+ * updateOperatorCallable()
+ * DeleteOperator Deletes a single Operator. Request object method variants only take one parameter, a request object, which must be constructed before the call. deleteOperatorAsync(DeleteOperatorRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. deleteOperatorAsync(OperatorName name)
+ * deleteOperatorAsync(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. deleteOperatorOperationCallable()
+ * deleteOperatorCallable()
+ * ListAnalyses Lists Analyses in a given project and location. Request object method variants only take one parameter, a request object, which must be constructed before the call. listAnalyses(ListAnalysesRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. listAnalyses(ClusterName parent)
+ * listAnalyses(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. listAnalysesPagedCallable()
+ * listAnalysesCallable()
+ * GetAnalysis Gets details of a single Analysis. Request object method variants only take one parameter, a request object, which must be constructed before the call. getAnalysis(GetAnalysisRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. getAnalysis(AnalysisName name)
+ * getAnalysis(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. getAnalysisCallable()
+ * CreateAnalysis Creates a new Analysis in a given project and location. Request object method variants only take one parameter, a request object, which must be constructed before the call. createAnalysisAsync(CreateAnalysisRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. createAnalysisAsync(ClusterName parent, Analysis analysis, String analysisId)
+ * createAnalysisAsync(String parent, Analysis analysis, String analysisId)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. createAnalysisOperationCallable()
+ * createAnalysisCallable()
+ * UpdateAnalysis Updates the parameters of a single Analysis. Request object method variants only take one parameter, a request object, which must be constructed before the call. updateAnalysisAsync(UpdateAnalysisRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. updateAnalysisAsync(Analysis analysis, 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. updateAnalysisOperationCallable()
+ * updateAnalysisCallable()
+ * DeleteAnalysis Deletes a single Analysis. Request object method variants only take one parameter, a request object, which must be constructed before the call. deleteAnalysisAsync(DeleteAnalysisRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. deleteAnalysisAsync(AnalysisName name)
+ * deleteAnalysisAsync(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. deleteAnalysisOperationCallable()
+ * deleteAnalysisCallable()
+ * ListProcesses Lists Processes in a given project and location. Request object method variants only take one parameter, a request object, which must be constructed before the call. listProcesses(ListProcessesRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. listProcesses(ClusterName parent)
+ * listProcesses(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. listProcessesPagedCallable()
+ * listProcessesCallable()
+ * GetProcess Gets details of a single Process. Request object method variants only take one parameter, a request object, which must be constructed before the call. getProcess(GetProcessRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. getProcess(ProcessName name)
+ * getProcess(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. getProcessCallable()
+ * CreateProcess Creates a new Process in a given project and location. Request object method variants only take one parameter, a request object, which must be constructed before the call. createProcessAsync(CreateProcessRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. createProcessAsync(ClusterName parent, Process process, String processId)
+ * createProcessAsync(String parent, Process process, String processId)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. createProcessOperationCallable()
+ * createProcessCallable()
+ * UpdateProcess Updates the parameters of a single Process. Request object method variants only take one parameter, a request object, which must be constructed before the call. updateProcessAsync(UpdateProcessRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. updateProcessAsync(Process process, 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. updateProcessOperationCallable()
+ * updateProcessCallable()
+ * DeleteProcess Deletes a single Process. Request object method variants only take one parameter, a request object, which must be constructed before the call. deleteProcessAsync(DeleteProcessRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. deleteProcessAsync(ProcessName name)
+ * deleteProcessAsync(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. deleteProcessOperationCallable()
+ * deleteProcessCallable()
+ * BatchRunProcess Run all of the processes to "completion". Max time for each process is the LRO time limit. Request object method variants only take one parameter, a request object, which must be constructed before the call. batchRunProcessAsync(ClusterName parent, List<CreateProcessRequest> requests)
+ * batchRunProcessAsync(String parent, List<CreateProcessRequest> requests)
+ * batchRunProcessAsync(BatchRunProcessRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. batchRunProcessOperationCallable()
+ * batchRunProcessCallable()
+ * 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 LiveVideoAnalyticsSettings to
+ * create(). For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@Generated("by gapic-generator-java")
+public class LiveVideoAnalyticsClient implements BackgroundResource {
+ private final LiveVideoAnalyticsSettings settings;
+ private final LiveVideoAnalyticsStub stub;
+ private final OperationsClient httpJsonOperationsClient;
+ private final com.google.longrunning.OperationsClient operationsClient;
+
+ /** Constructs an instance of LiveVideoAnalyticsClient with default settings. */
+ public static final LiveVideoAnalyticsClient create() throws IOException {
+ return create(LiveVideoAnalyticsSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of LiveVideoAnalyticsClient, 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 LiveVideoAnalyticsClient create(LiveVideoAnalyticsSettings settings)
+ throws IOException {
+ return new LiveVideoAnalyticsClient(settings);
+ }
+
+ /**
+ * Constructs an instance of LiveVideoAnalyticsClient, using the given stub for making calls. This
+ * is for advanced usage - prefer using create(LiveVideoAnalyticsSettings).
+ */
+ public static final LiveVideoAnalyticsClient create(LiveVideoAnalyticsStub stub) {
+ return new LiveVideoAnalyticsClient(stub);
+ }
+
+ /**
+ * Constructs an instance of LiveVideoAnalyticsClient, 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 LiveVideoAnalyticsClient(LiveVideoAnalyticsSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((LiveVideoAnalyticsStubSettings) settings.getStubSettings()).createStub();
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
+ }
+
+ protected LiveVideoAnalyticsClient(LiveVideoAnalyticsStub 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 LiveVideoAnalyticsSettings getSettings() {
+ return settings;
+ }
+
+ public LiveVideoAnalyticsStub 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.
+ /**
+ * ListPublicOperators returns all the operators in public registry.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * 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 (HealthCheckServiceClient healthCheckServiceClient = HealthCheckServiceClient.create()) {
+ * HealthCheckRequest request =
+ * HealthCheckRequest.newBuilder()
+ * .setCluster(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+ * .build();
+ * HealthCheckResponse response = healthCheckServiceClient.healthCheck(request);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ * Method
+ * Description
+ * Method Variants
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * {@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
+ * HealthCheckServiceSettings healthCheckServiceSettings =
+ * HealthCheckServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * HealthCheckServiceClient healthCheckServiceClient =
+ * HealthCheckServiceClient.create(healthCheckServiceSettings);
+ * }
+ *
+ * {@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
+ * HealthCheckServiceSettings healthCheckServiceSettings =
+ * HealthCheckServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * HealthCheckServiceClient healthCheckServiceClient =
+ * HealthCheckServiceClient.create(healthCheckServiceSettings);
+ * }
+ *
+ * {@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
+ * HealthCheckServiceSettings healthCheckServiceSettings =
+ * HealthCheckServiceSettings.newHttpJsonBuilder().build();
+ * HealthCheckServiceClient healthCheckServiceClient =
+ * HealthCheckServiceClient.create(healthCheckServiceSettings);
+ * }
+ *
+ * {@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 (HealthCheckServiceClient healthCheckServiceClient = HealthCheckServiceClient.create()) {
+ * HealthCheckRequest request =
+ * HealthCheckRequest.newBuilder()
+ * .setCluster(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+ * .build();
+ * HealthCheckResponse response = healthCheckServiceClient.healthCheck(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 HealthCheckResponse healthCheck(HealthCheckRequest request) {
+ return healthCheckCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * HealthCheck method checks the health status of the cluster.
+ *
+ * {@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 (HealthCheckServiceClient healthCheckServiceClient = HealthCheckServiceClient.create()) {
+ * HealthCheckRequest request =
+ * HealthCheckRequest.newBuilder()
+ * .setCluster(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@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
+ * HealthCheckServiceSettings.Builder healthCheckServiceSettingsBuilder =
+ * HealthCheckServiceSettings.newBuilder();
+ * healthCheckServiceSettingsBuilder
+ * .healthCheckSettings()
+ * .setRetrySettings(
+ * healthCheckServiceSettingsBuilder
+ * .healthCheckSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * HealthCheckServiceSettings healthCheckServiceSettings =
+ * healthCheckServiceSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class HealthCheckServiceSettings extends ClientSettings{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * List
+ *
+ *
+ *
+ *
+ *
+ *
+ * Method
+ * Description
+ * Method Variants
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * {@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
+ * LiveVideoAnalyticsSettings liveVideoAnalyticsSettings =
+ * LiveVideoAnalyticsSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * LiveVideoAnalyticsClient liveVideoAnalyticsClient =
+ * LiveVideoAnalyticsClient.create(liveVideoAnalyticsSettings);
+ * }
+ *
+ * {@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
+ * LiveVideoAnalyticsSettings liveVideoAnalyticsSettings =
+ * LiveVideoAnalyticsSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * LiveVideoAnalyticsClient liveVideoAnalyticsClient =
+ * LiveVideoAnalyticsClient.create(liveVideoAnalyticsSettings);
+ * }
+ *
+ * {@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
+ * LiveVideoAnalyticsSettings liveVideoAnalyticsSettings =
+ * LiveVideoAnalyticsSettings.newHttpJsonBuilder().build();
+ * LiveVideoAnalyticsClient liveVideoAnalyticsClient =
+ * LiveVideoAnalyticsClient.create(liveVideoAnalyticsSettings);
+ * }
+ *
+ * {@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Operator element : liveVideoAnalyticsClient.listPublicOperators(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for ListPublicOperatorsRequest.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListPublicOperatorsPagedResponse listPublicOperators(LocationName parent) {
+ ListPublicOperatorsRequest request =
+ ListPublicOperatorsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listPublicOperators(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * ListPublicOperators returns all the operators in public registry.
+ *
+ * {@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Operator element : liveVideoAnalyticsClient.listPublicOperators(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for ListPublicOperatorsRequest.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListPublicOperatorsPagedResponse listPublicOperators(String parent) {
+ ListPublicOperatorsRequest request =
+ ListPublicOperatorsRequest.newBuilder().setParent(parent).build();
+ return listPublicOperators(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * ListPublicOperators returns all the operators in public registry.
+ *
+ * {@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * ListPublicOperatorsRequest request =
+ * ListPublicOperatorsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Operator element : liveVideoAnalyticsClient.listPublicOperators(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 ListPublicOperatorsPagedResponse listPublicOperators(
+ ListPublicOperatorsRequest request) {
+ return listPublicOperatorsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * ListPublicOperators returns all the operators in public registry.
+ *
+ * {@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * ListPublicOperatorsRequest request =
+ * ListPublicOperatorsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * ListPublicOperatorsRequest request =
+ * ListPublicOperatorsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListPublicOperatorsResponse response =
+ * liveVideoAnalyticsClient.listPublicOperatorsCallable().call(request);
+ * for (Operator element : response.getOperatorsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * List
+ *
+ * @param parent Required. Parent value for ResolveOperatorInfoRequest.
+ * @param queries Required. The operator queries.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ResolveOperatorInfoResponse resolveOperatorInfo(
+ LocationName parent, List{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * List
+ *
+ * @param parent Required. Parent value for ResolveOperatorInfoRequest.
+ * @param queries Required. The operator queries.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ResolveOperatorInfoResponse resolveOperatorInfo(
+ String parent, List{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * ResolveOperatorInfoRequest request =
+ * ResolveOperatorInfoRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .addAllQueries(new ArrayList
+ *
+ * @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 ResolveOperatorInfoResponse resolveOperatorInfo(ResolveOperatorInfoRequest request) {
+ return resolveOperatorInfoCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * ResolveOperatorInfo returns the operator information based on the request.
+ *
+ * {@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * ResolveOperatorInfoRequest request =
+ * ResolveOperatorInfoRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .addAllQueries(new ArrayList
+ */
+ public final UnaryCallable{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Operator element : liveVideoAnalyticsClient.listOperators(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for ListOperatorsRequest.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListOperatorsPagedResponse listOperators(LocationName parent) {
+ ListOperatorsRequest request =
+ ListOperatorsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listOperators(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Operators in a given project and location.
+ *
+ * {@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Operator element : liveVideoAnalyticsClient.listOperators(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for ListOperatorsRequest.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListOperatorsPagedResponse listOperators(String parent) {
+ ListOperatorsRequest request = ListOperatorsRequest.newBuilder().setParent(parent).build();
+ return listOperators(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Operators in a given project and location.
+ *
+ * {@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * ListOperatorsRequest request =
+ * ListOperatorsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Operator element : liveVideoAnalyticsClient.listOperators(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 ListOperatorsPagedResponse listOperators(ListOperatorsRequest request) {
+ return listOperatorsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Operators in a given project and location.
+ *
+ * {@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * ListOperatorsRequest request =
+ * ListOperatorsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * ListOperatorsRequest request =
+ * ListOperatorsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListOperatorsResponse response =
+ * liveVideoAnalyticsClient.listOperatorsCallable().call(request);
+ * for (Operator element : response.getOperatorsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * OperatorName name = OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]");
+ * Operator response = liveVideoAnalyticsClient.getOperator(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operator getOperator(OperatorName name) {
+ GetOperatorRequest request =
+ GetOperatorRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getOperator(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Operator.
+ *
+ * {@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * String name = OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]").toString();
+ * Operator response = liveVideoAnalyticsClient.getOperator(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Operator getOperator(String name) {
+ GetOperatorRequest request = GetOperatorRequest.newBuilder().setName(name).build();
+ return getOperator(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Operator.
+ *
+ * {@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * GetOperatorRequest request =
+ * GetOperatorRequest.newBuilder()
+ * .setName(OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]").toString())
+ * .build();
+ * Operator response = liveVideoAnalyticsClient.getOperator(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 Operator getOperator(GetOperatorRequest request) {
+ return getOperatorCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Operator.
+ *
+ * {@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * GetOperatorRequest request =
+ * GetOperatorRequest.newBuilder()
+ * .setName(OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * Operator operator = Operator.newBuilder().build();
+ * String operatorId = "operatorId4364511";
+ * Operator response =
+ * liveVideoAnalyticsClient.createOperatorAsync(parent, operator, operatorId).get();
+ * }
+ * }
+ *
+ * @param parent Required. Value for parent.
+ * @param operator Required. The resource being created.
+ * @param operatorId Required. Id of the requesting object.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * Operator operator = Operator.newBuilder().build();
+ * String operatorId = "operatorId4364511";
+ * Operator response =
+ * liveVideoAnalyticsClient.createOperatorAsync(parent, operator, operatorId).get();
+ * }
+ * }
+ *
+ * @param parent Required. Value for parent.
+ * @param operator Required. The resource being created.
+ * @param operatorId Required. Id of the requesting object.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * CreateOperatorRequest request =
+ * CreateOperatorRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setOperatorId("operatorId4364511")
+ * .setOperator(Operator.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Operator response = liveVideoAnalyticsClient.createOperatorAsync(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{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * CreateOperatorRequest request =
+ * CreateOperatorRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setOperatorId("operatorId4364511")
+ * .setOperator(Operator.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * CreateOperatorRequest request =
+ * CreateOperatorRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setOperatorId("operatorId4364511")
+ * .setOperator(Operator.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * Operator operator = Operator.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Operator response = liveVideoAnalyticsClient.updateOperatorAsync(operator, updateMask).get();
+ * }
+ * }
+ *
+ * @param operator Required. The resource being updated
+ * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the
+ * Operator 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{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * UpdateOperatorRequest request =
+ * UpdateOperatorRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setOperator(Operator.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Operator response = liveVideoAnalyticsClient.updateOperatorAsync(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{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * UpdateOperatorRequest request =
+ * UpdateOperatorRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setOperator(Operator.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * UpdateOperatorRequest request =
+ * UpdateOperatorRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setOperator(Operator.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * OperatorName name = OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]");
+ * liveVideoAnalyticsClient.deleteOperatorAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * String name = OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]").toString();
+ * liveVideoAnalyticsClient.deleteOperatorAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * DeleteOperatorRequest request =
+ * DeleteOperatorRequest.newBuilder()
+ * .setName(OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * liveVideoAnalyticsClient.deleteOperatorAsync(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{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * DeleteOperatorRequest request =
+ * DeleteOperatorRequest.newBuilder()
+ * .setName(OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * DeleteOperatorRequest request =
+ * DeleteOperatorRequest.newBuilder()
+ * .setName(OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
+ * for (Analysis element : liveVideoAnalyticsClient.listAnalyses(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for ListAnalysesRequest
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListAnalysesPagedResponse listAnalyses(ClusterName parent) {
+ ListAnalysesRequest request =
+ ListAnalysesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listAnalyses(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Analyses in a given project and location.
+ *
+ * {@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * String parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
+ * for (Analysis element : liveVideoAnalyticsClient.listAnalyses(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for ListAnalysesRequest
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListAnalysesPagedResponse listAnalyses(String parent) {
+ ListAnalysesRequest request = ListAnalysesRequest.newBuilder().setParent(parent).build();
+ return listAnalyses(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Analyses in a given project and location.
+ *
+ * {@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * ListAnalysesRequest request =
+ * ListAnalysesRequest.newBuilder()
+ * .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Analysis element : liveVideoAnalyticsClient.listAnalyses(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 ListAnalysesPagedResponse listAnalyses(ListAnalysesRequest request) {
+ return listAnalysesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Analyses in a given project and location.
+ *
+ * {@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * ListAnalysesRequest request =
+ * ListAnalysesRequest.newBuilder()
+ * .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * ListAnalysesRequest request =
+ * ListAnalysesRequest.newBuilder()
+ * .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListAnalysesResponse response =
+ * liveVideoAnalyticsClient.listAnalysesCallable().call(request);
+ * for (Analysis element : response.getAnalysesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * AnalysisName name = AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]");
+ * Analysis response = liveVideoAnalyticsClient.getAnalysis(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Analysis getAnalysis(AnalysisName name) {
+ GetAnalysisRequest request =
+ GetAnalysisRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getAnalysis(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Analysis.
+ *
+ * {@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * String name =
+ * AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString();
+ * Analysis response = liveVideoAnalyticsClient.getAnalysis(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Analysis getAnalysis(String name) {
+ GetAnalysisRequest request = GetAnalysisRequest.newBuilder().setName(name).build();
+ return getAnalysis(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Analysis.
+ *
+ * {@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * GetAnalysisRequest request =
+ * GetAnalysisRequest.newBuilder()
+ * .setName(
+ * AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString())
+ * .build();
+ * Analysis response = liveVideoAnalyticsClient.getAnalysis(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 Analysis getAnalysis(GetAnalysisRequest request) {
+ return getAnalysisCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Analysis.
+ *
+ * {@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * GetAnalysisRequest request =
+ * GetAnalysisRequest.newBuilder()
+ * .setName(
+ * AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
+ * Analysis analysis = Analysis.newBuilder().build();
+ * String analysisId = "analysisId-944835305";
+ * Analysis response =
+ * liveVideoAnalyticsClient.createAnalysisAsync(parent, analysis, analysisId).get();
+ * }
+ * }
+ *
+ * @param parent Required. Value for parent.
+ * @param analysis Required. The resource being created.
+ * @param analysisId Required. Id of the requesting object.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * String parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
+ * Analysis analysis = Analysis.newBuilder().build();
+ * String analysisId = "analysisId-944835305";
+ * Analysis response =
+ * liveVideoAnalyticsClient.createAnalysisAsync(parent, analysis, analysisId).get();
+ * }
+ * }
+ *
+ * @param parent Required. Value for parent.
+ * @param analysis Required. The resource being created.
+ * @param analysisId Required. Id of the requesting object.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * CreateAnalysisRequest request =
+ * CreateAnalysisRequest.newBuilder()
+ * .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+ * .setAnalysisId("analysisId-944835305")
+ * .setAnalysis(Analysis.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Analysis response = liveVideoAnalyticsClient.createAnalysisAsync(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{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * CreateAnalysisRequest request =
+ * CreateAnalysisRequest.newBuilder()
+ * .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+ * .setAnalysisId("analysisId-944835305")
+ * .setAnalysis(Analysis.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * CreateAnalysisRequest request =
+ * CreateAnalysisRequest.newBuilder()
+ * .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+ * .setAnalysisId("analysisId-944835305")
+ * .setAnalysis(Analysis.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * Analysis analysis = Analysis.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Analysis response = liveVideoAnalyticsClient.updateAnalysisAsync(analysis, updateMask).get();
+ * }
+ * }
+ *
+ * @param analysis Required. The resource being updated.
+ * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the
+ * Analysis 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{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * UpdateAnalysisRequest request =
+ * UpdateAnalysisRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setAnalysis(Analysis.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Analysis response = liveVideoAnalyticsClient.updateAnalysisAsync(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{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * UpdateAnalysisRequest request =
+ * UpdateAnalysisRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setAnalysis(Analysis.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * UpdateAnalysisRequest request =
+ * UpdateAnalysisRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setAnalysis(Analysis.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * AnalysisName name = AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]");
+ * liveVideoAnalyticsClient.deleteAnalysisAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * String name =
+ * AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString();
+ * liveVideoAnalyticsClient.deleteAnalysisAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * DeleteAnalysisRequest request =
+ * DeleteAnalysisRequest.newBuilder()
+ * .setName(
+ * AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * liveVideoAnalyticsClient.deleteAnalysisAsync(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{@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 (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ * DeleteAnalysisRequest request =
+ * DeleteAnalysisRequest.newBuilder()
+ * .setName(
+ * AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture