Class AppPlatformClient
- All Implemented Interfaces:
BackgroundResource,AutoCloseable
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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.
|
ListLocations |
Lists information about the supported locations for this service. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetLocation |
Gets information about a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require 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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require 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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require 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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAppPlatformClient(AppPlatformSettings settings) Constructs an instance of AppPlatformClient, using the given settings.protected -
Method Summary
Modifier and TypeMethodDescriptionAdds target stream input to the Application.Adds target stream input to the Application.Adds target stream input to the Application.Adds target stream input to the Application.final OperationCallable<AddApplicationStreamInputRequest,AddApplicationStreamInputResponse, OperationMetadata> Adds target stream input to the Application.booleanawaitTermination(long duration, TimeUnit unit) final voidclose()static final AppPlatformClientcreate()Constructs an instance of AppPlatformClient with default settings.static final AppPlatformClientcreate(AppPlatformSettings settings) Constructs an instance of AppPlatformClient, using the given settings.static final AppPlatformClientcreate(AppPlatformStub stub) Constructs an instance of AppPlatformClient, using the given stub for making calls.Creates a new Application in a given project and location.createApplicationAsync(LocationName parent, Application application) Creates a new Application in a given project and location.createApplicationAsync(String parent, Application application) Creates a new Application in a given project and location.Creates a new Application in a given project and location.Adds target stream input to the Application.Adds target stream input to the Application.Adds target stream input to the Application.Adds target stream input to the Application.final OperationCallable<CreateApplicationInstancesRequest,CreateApplicationInstancesResponse, OperationMetadata> Adds target stream input to the Application.Creates a new Application in a given project and location.createDraftAsync(ApplicationName parent, Draft draft, String draftId) Creates a new Draft in a given project and location.createDraftAsync(CreateDraftRequest request) Creates a new Draft in a given project and location.createDraftAsync(String parent, Draft draft, String draftId) Creates a new Draft in a given project and location.Creates a new Draft in a given project and location.Creates a new Draft in a given project and location.Creates a new Processor in a given project and location.createProcessorAsync(LocationName parent, Processor processor, String processorId) Creates a new Processor in a given project and location.createProcessorAsync(String parent, Processor processor, String processorId) Creates a new Processor in a given project and location.Creates a new Processor in a given project and location.Creates a new Processor in a given project and location.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single Application.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single Application.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteApplicationAsync(String name) Deletes a single Application.Deletes a single Application.Remove target stream input to the Application, if the Application is deployed, the corresponding instance based will be deleted.Remove target stream input to the Application, if the Application is deployed, the corresponding instance based will be deleted.Remove target stream input to the Application, if the Application is deployed, the corresponding instance based will be deleted.Remove target stream input to the Application, if the Application is deployed, the corresponding instance based will be deleted.Remove target stream input to the Application, if the Application is deployed, the corresponding instance based will be deleted.final OperationCallable<DeleteApplicationRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a single Application.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteDraftAsync(DeleteDraftRequest request) Deletes a single Draft.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteDraftAsync(DraftName name) Deletes a single Draft.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteDraftAsync(String name) Deletes a single Draft.Deletes a single Draft.final OperationCallable<DeleteDraftRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a single Draft.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single Processor.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single Processor.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteProcessorAsync(String name) Deletes a single Processor.Deletes a single Processor.final OperationCallable<DeleteProcessorRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a single Processor.Deploys a single Application.Deploys a single Application.deployApplicationAsync(String name) Deploys a single Application.Deploys a single Application.Deploys a single Application.final ApplicationGets details of a single Application.final ApplicationgetApplication(GetApplicationRequest request) Gets details of a single Application.final ApplicationgetApplication(String name) Gets details of a single Application.Gets details of a single Application.final DraftGets details of a single Draft.final DraftgetDraft(GetDraftRequest request) Gets details of a single Draft.final DraftGets details of a single Draft.final UnaryCallable<GetDraftRequest,Draft> Gets details of a single Draft.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final InstancegetInstance(GetInstanceRequest request) Gets details of a single Instance.final InstancegetInstance(InstanceName name) Gets details of a single Instance.final InstancegetInstance(String name) Gets details of a single Instance.Gets details of a single Instance.final LocationgetLocation(GetLocationRequest request) Gets information about a location.Gets information about a location.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final ProcessorgetProcessor(GetProcessorRequest request) Gets details of a single Processor.final ProcessorgetProcessor(ProcessorName name) Gets details of a single Processor.final ProcessorgetProcessor(String name) Gets details of a single Processor.Gets details of a single Processor.final AppPlatformSettingsgetStub()booleanbooleanlistApplications(ListApplicationsRequest request) Lists Applications in a given project and location.listApplications(LocationName parent) Lists Applications in a given project and location.listApplications(String parent) Lists Applications in a given project and location.Lists Applications in a given project and location.Lists Applications in a given project and location.listDrafts(ApplicationName parent) Lists Drafts in a given project and location.listDrafts(ListDraftsRequest request) Lists Drafts in a given project and location.listDrafts(String parent) Lists Drafts in a given project and location.Lists Drafts in a given project and location.Lists Drafts in a given project and location.listInstances(ApplicationName parent) Lists Instances in a given project and location.listInstances(ListInstancesRequest request) Lists Instances in a given project and location.listInstances(String parent) Lists Instances in a given project and location.Lists Instances in a given project and location.Lists Instances in a given project and location.listLocations(ListLocationsRequest request) Lists information about the supported locations for this service.Lists information about the supported locations for this service.Lists information about the supported locations for this service.ListPrebuiltProcessors is a custom pass-through verb that Lists Prebuilt Processors.listPrebuiltProcessors(LocationName parent) ListPrebuiltProcessors is a custom pass-through verb that Lists Prebuilt Processors.listPrebuiltProcessors(String parent) ListPrebuiltProcessors is a custom pass-through verb that Lists Prebuilt Processors.ListPrebuiltProcessors is a custom pass-through verb that Lists Prebuilt Processors.listProcessors(ListProcessorsRequest request) Lists Processors in a given project and location.listProcessors(LocationName parent) Lists Processors in a given project and location.listProcessors(String parent) Lists Processors in a given project and location.Lists Processors in a given project and location.Lists Processors in a given project and location.Remove target stream input to the Application, if the Application is deployed, the corresponding instance based will be deleted.Remove target stream input to the Application, if the Application is deployed, the corresponding instance based will be deleted.Remove target stream input to the Application, if the Application is deployed, the corresponding instance based will be deleted.Remove target stream input to the Application, if the Application is deployed, the corresponding instance based will be deleted.final OperationCallable<RemoveApplicationStreamInputRequest,RemoveApplicationStreamInputResponse, OperationMetadata> Remove target stream input to the Application, if the Application is deployed, the corresponding instance based will be deleted.voidshutdown()voidUndeploys a single Application.Undeploys a single Application.Undeploys a single Application.Undeploys a single Application.Undeploys a single Application.updateApplicationAsync(Application application, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single Application.Updates the parameters of a single Application.Updates the parameters of a single Application.updateApplicationInstancesAsync(ApplicationName name, List<UpdateApplicationInstancesRequest.UpdateApplicationInstance> applicationInstances) Adds target stream input to the Application.Adds target stream input to the Application.updateApplicationInstancesAsync(String name, List<UpdateApplicationInstancesRequest.UpdateApplicationInstance> applicationInstances) Adds target stream input to the Application.Adds target stream input to the Application.final OperationCallable<UpdateApplicationInstancesRequest,UpdateApplicationInstancesResponse, OperationMetadata> Adds target stream input to the Application.Updates the parameters of a single Application.Update target stream input to the Application, if the Application is deployed, the corresponding instance based will be deployed.Update target stream input to the Application, if the Application is deployed, the corresponding instance based will be deployed.Update target stream input to the Application, if the Application is deployed, the corresponding instance based will be deployed.Update target stream input to the Application, if the Application is deployed, the corresponding instance based will be deployed.final OperationCallable<UpdateApplicationStreamInputRequest,UpdateApplicationStreamInputResponse, OperationMetadata> Update target stream input to the Application, if the Application is deployed, the corresponding instance based will be deployed.updateDraftAsync(Draft draft, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single Draft.updateDraftAsync(UpdateDraftRequest request) Updates the parameters of a single Draft.Updates the parameters of a single Draft.Updates the parameters of a single Draft.updateProcessorAsync(Processor processor, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single Processor.Updates the parameters of a single Processor.Updates the parameters of a single Processor.Updates the parameters of a single Processor.
-
Constructor Details
-
AppPlatformClient
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.- Throws:
IOException
-
AppPlatformClient
-
-
Method Details
-
create
Constructs an instance of AppPlatformClient with default settings.- Throws:
IOException
-
create
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.- Throws:
IOException
-
create
Constructs an instance of AppPlatformClient, using the given stub for making calls. This is for advanced usage - prefer using create(AppPlatformSettings). -
getSettings
-
getStub
-
getOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
getHttpJsonOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
listApplications
Lists Applications in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (Application element : appPlatformClient.listApplications(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListApplicationsRequest.- Throws:
ApiException- if the remote call fails
-
listApplications
Lists Applications in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (Application element : appPlatformClient.listApplications(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListApplicationsRequest.- Throws:
ApiException- if the remote call fails
-
listApplications
public final AppPlatformClient.ListApplicationsPagedResponse listApplications(ListApplicationsRequest request) Lists Applications in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listApplicationsPagedCallable
public final UnaryCallable<ListApplicationsRequest,AppPlatformClient.ListApplicationsPagedResponse> listApplicationsPagedCallable()Lists Applications in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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<Application> future = appPlatformClient.listApplicationsPagedCallable().futureCall(request); // Do something. for (Application element : future.get().iterateAll()) { // doThingsWith(element); } } -
listApplicationsCallable
public final UnaryCallable<ListApplicationsRequest,ListApplicationsResponse> listApplicationsCallable()Lists Applications in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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; } } } -
getApplication
Gets details of a single Application.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); Application response = appPlatformClient.getApplication(name); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
getApplication
Gets details of a single Application.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { String name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString(); Application response = appPlatformClient.getApplication(name); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
getApplication
Gets details of a single Application.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { GetApplicationRequest request = GetApplicationRequest.newBuilder() .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString()) .build(); Application response = appPlatformClient.getApplication(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getApplicationCallable
Gets details of a single Application.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { GetApplicationRequest request = GetApplicationRequest.newBuilder() .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString()) .build(); ApiFuture<Application> future = appPlatformClient.getApplicationCallable().futureCall(request); // Do something. Application response = future.get(); } -
createApplicationAsync
public final OperationFuture<Application,OperationMetadata> createApplicationAsync(LocationName parent, Application application) Creates a new Application in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); Application application = Application.newBuilder().build(); Application response = appPlatformClient.createApplicationAsync(parent, application).get(); }- Parameters:
parent- Required. Value for parent.application- Required. The resource being created.- Throws:
ApiException- if the remote call fails
-
createApplicationAsync
public final OperationFuture<Application,OperationMetadata> createApplicationAsync(String parent, Application application) Creates a new Application in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); Application application = Application.newBuilder().build(); Application response = appPlatformClient.createApplicationAsync(parent, application).get(); }- Parameters:
parent- Required. Value for parent.application- Required. The resource being created.- Throws:
ApiException- if the remote call fails
-
createApplicationAsync
public final OperationFuture<Application,OperationMetadata> createApplicationAsync(CreateApplicationRequest request) Creates a new Application in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createApplicationOperationCallable
public final OperationCallable<CreateApplicationRequest,Application, createApplicationOperationCallable()OperationMetadata> Creates a new Application in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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<Application, OperationMetadata> future = appPlatformClient.createApplicationOperationCallable().futureCall(request); // Do something. Application response = future.get(); } -
createApplicationCallable
Creates a new Application in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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<Operation> future = appPlatformClient.createApplicationCallable().futureCall(request); // Do something. Operation response = future.get(); } -
updateApplicationAsync
public final OperationFuture<Application,OperationMetadata> updateApplicationAsync(Application application, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single Application.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { Application application = Application.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); Application response = appPlatformClient.updateApplicationAsync(application, updateMask).get(); }- Parameters:
application- Required. The resource being updated.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:
ApiException- if the remote call fails
-
updateApplicationAsync
public final OperationFuture<Application,OperationMetadata> updateApplicationAsync(UpdateApplicationRequest request) Updates the parameters of a single Application.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateApplicationOperationCallable
public final OperationCallable<UpdateApplicationRequest,Application, updateApplicationOperationCallable()OperationMetadata> Updates the parameters of a single Application.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { UpdateApplicationRequest request = UpdateApplicationRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setApplication(Application.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<Application, OperationMetadata> future = appPlatformClient.updateApplicationOperationCallable().futureCall(request); // Do something. Application response = future.get(); } -
updateApplicationCallable
Updates the parameters of a single Application.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { UpdateApplicationRequest request = UpdateApplicationRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setApplication(Application.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = appPlatformClient.updateApplicationCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteApplicationAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteApplicationAsync(ApplicationName name) Deletes a single Application.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); appPlatformClient.deleteApplicationAsync(name).get(); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
deleteApplicationAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteApplicationAsync(String name) Deletes a single Application.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { String name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString(); appPlatformClient.deleteApplicationAsync(name).get(); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
deleteApplicationAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteApplicationAsync(DeleteApplicationRequest request) Deletes a single Application.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { DeleteApplicationRequest request = DeleteApplicationRequest.newBuilder() .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString()) .setRequestId("requestId693933066") .setForce(true) .build(); appPlatformClient.deleteApplicationAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteApplicationOperationCallable
public final OperationCallable<DeleteApplicationRequest,com.google.protobuf.Empty, deleteApplicationOperationCallable()OperationMetadata> Deletes a single Application.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { DeleteApplicationRequest request = DeleteApplicationRequest.newBuilder() .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString()) .setRequestId("requestId693933066") .setForce(true) .build(); OperationFuture<Empty, OperationMetadata> future = appPlatformClient.deleteApplicationOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteApplicationCallable
Deletes a single Application.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { DeleteApplicationRequest request = DeleteApplicationRequest.newBuilder() .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString()) .setRequestId("requestId693933066") .setForce(true) .build(); ApiFuture<Operation> future = appPlatformClient.deleteApplicationCallable().futureCall(request); // Do something. future.get(); } -
deployApplicationAsync
public final OperationFuture<DeployApplicationResponse,OperationMetadata> deployApplicationAsync(ApplicationName name) Deploys a single Application.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); DeployApplicationResponse response = appPlatformClient.deployApplicationAsync(name).get(); }- Parameters:
name- Required. the name of the application to retrieve. Format: "projects/{project}/locations/{location}/applications/{application}"- Throws:
ApiException- if the remote call fails
-
deployApplicationAsync
public final OperationFuture<DeployApplicationResponse,OperationMetadata> deployApplicationAsync(String name) Deploys a single Application.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { String name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString(); DeployApplicationResponse response = appPlatformClient.deployApplicationAsync(name).get(); }- Parameters:
name- Required. the name of the application to retrieve. Format: "projects/{project}/locations/{location}/applications/{application}"- Throws:
ApiException- if the remote call fails
-
deployApplicationAsync
public final OperationFuture<DeployApplicationResponse,OperationMetadata> deployApplicationAsync(DeployApplicationRequest request) Deploys a single Application.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deployApplicationOperationCallable
public final OperationCallable<DeployApplicationRequest,DeployApplicationResponse, deployApplicationOperationCallable()OperationMetadata> Deploys a single Application.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { DeployApplicationRequest request = DeployApplicationRequest.newBuilder() .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString()) .setValidateOnly(true) .setRequestId("requestId693933066") .setEnableMonitoring(true) .build(); OperationFuture<DeployApplicationResponse, OperationMetadata> future = appPlatformClient.deployApplicationOperationCallable().futureCall(request); // Do something. DeployApplicationResponse response = future.get(); } -
deployApplicationCallable
Deploys a single Application.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { DeployApplicationRequest request = DeployApplicationRequest.newBuilder() .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString()) .setValidateOnly(true) .setRequestId("requestId693933066") .setEnableMonitoring(true) .build(); ApiFuture<Operation> future = appPlatformClient.deployApplicationCallable().futureCall(request); // Do something. Operation response = future.get(); } -
undeployApplicationAsync
public final OperationFuture<UndeployApplicationResponse,OperationMetadata> undeployApplicationAsync(ApplicationName name) Undeploys a single Application.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); UndeployApplicationResponse response = appPlatformClient.undeployApplicationAsync(name).get(); }- Parameters:
name- Required. the name of the application to retrieve. Format: "projects/{project}/locations/{location}/applications/{application}"- Throws:
ApiException- if the remote call fails
-
undeployApplicationAsync
public final OperationFuture<UndeployApplicationResponse,OperationMetadata> undeployApplicationAsync(String name) Undeploys a single Application.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { String name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString(); UndeployApplicationResponse response = appPlatformClient.undeployApplicationAsync(name).get(); }- Parameters:
name- Required. the name of the application to retrieve. Format: "projects/{project}/locations/{location}/applications/{application}"- Throws:
ApiException- if the remote call fails
-
undeployApplicationAsync
public final OperationFuture<UndeployApplicationResponse,OperationMetadata> undeployApplicationAsync(UndeployApplicationRequest request) Undeploys a single Application.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { UndeployApplicationRequest request = UndeployApplicationRequest.newBuilder() .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString()) .setRequestId("requestId693933066") .build(); UndeployApplicationResponse response = appPlatformClient.undeployApplicationAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
undeployApplicationOperationCallable
public final OperationCallable<UndeployApplicationRequest,UndeployApplicationResponse, undeployApplicationOperationCallable()OperationMetadata> Undeploys a single Application.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { UndeployApplicationRequest request = UndeployApplicationRequest.newBuilder() .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString()) .setRequestId("requestId693933066") .build(); OperationFuture<UndeployApplicationResponse, OperationMetadata> future = appPlatformClient.undeployApplicationOperationCallable().futureCall(request); // Do something. UndeployApplicationResponse response = future.get(); } -
undeployApplicationCallable
Undeploys a single Application.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { UndeployApplicationRequest request = UndeployApplicationRequest.newBuilder() .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = appPlatformClient.undeployApplicationCallable().futureCall(request); // Do something. Operation response = future.get(); } -
addApplicationStreamInputAsync
public final OperationFuture<AddApplicationStreamInputResponse,OperationMetadata> addApplicationStreamInputAsync(ApplicationName name) Adds target stream input to the Application. If the Application is deployed, the corresponding new Application instance will be created. If the stream has already been in the Application, the RPC will fail.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
name- Required. the name of the application to retrieve. Format: "projects/{project}/locations/{location}/applications/{application}"- Throws:
ApiException- if the remote call fails
-
addApplicationStreamInputAsync
public final OperationFuture<AddApplicationStreamInputResponse,OperationMetadata> addApplicationStreamInputAsync(String name) Adds target stream input to the Application. If the Application is deployed, the corresponding new Application instance will be created. If the stream has already been in the Application, the RPC will fail.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
name- Required. the name of the application to retrieve. Format: "projects/{project}/locations/{location}/applications/{application}"- Throws:
ApiException- if the remote call fails
-
addApplicationStreamInputAsync
public final OperationFuture<AddApplicationStreamInputResponse,OperationMetadata> addApplicationStreamInputAsync(AddApplicationStreamInputRequest request) Adds target stream input to the Application. If the Application is deployed, the corresponding new Application instance will be created. If the stream has already been in the Application, the RPC will fail.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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<ApplicationStreamInput>()) .setRequestId("requestId693933066") .build(); AddApplicationStreamInputResponse response = appPlatformClient.addApplicationStreamInputAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
addApplicationStreamInputOperationCallable
public final OperationCallable<AddApplicationStreamInputRequest,AddApplicationStreamInputResponse, addApplicationStreamInputOperationCallable()OperationMetadata> Adds target stream input to the Application. If the Application is deployed, the corresponding new Application instance will be created. If the stream has already been in the Application, the RPC will fail.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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<ApplicationStreamInput>()) .setRequestId("requestId693933066") .build(); OperationFuture<AddApplicationStreamInputResponse, OperationMetadata> future = appPlatformClient.addApplicationStreamInputOperationCallable().futureCall(request); // Do something. AddApplicationStreamInputResponse response = future.get(); } -
addApplicationStreamInputCallable
public final UnaryCallable<AddApplicationStreamInputRequest,Operation> addApplicationStreamInputCallable()Adds target stream input to the Application. If the Application is deployed, the corresponding new Application instance will be created. If the stream has already been in the Application, the RPC will fail.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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<ApplicationStreamInput>()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = appPlatformClient.addApplicationStreamInputCallable().futureCall(request); // Do something. Operation response = future.get(); } -
removeApplicationStreamInputAsync
public final OperationFuture<RemoveApplicationStreamInputResponse,OperationMetadata> removeApplicationStreamInputAsync(ApplicationName name) Remove target stream input to the Application, if the Application is deployed, the corresponding instance based will be deleted. If the stream is not in the Application, the RPC will fail.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
name- Required. the name of the application to retrieve. Format: "projects/{project}/locations/{location}/applications/{application}"- Throws:
ApiException- if the remote call fails
-
removeApplicationStreamInputAsync
public final OperationFuture<RemoveApplicationStreamInputResponse,OperationMetadata> removeApplicationStreamInputAsync(String name) Remove target stream input to the Application, if the Application is deployed, the corresponding instance based will be deleted. If the stream is not in the Application, the RPC will fail.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
name- Required. the name of the application to retrieve. Format: "projects/{project}/locations/{location}/applications/{application}"- Throws:
ApiException- if the remote call fails
-
removeApplicationStreamInputAsync
public final OperationFuture<RemoveApplicationStreamInputResponse,OperationMetadata> removeApplicationStreamInputAsync(RemoveApplicationStreamInputRequest request) Remove target stream input to the Application, if the Application is deployed, the corresponding instance based will be deleted. If the stream is not in the Application, the RPC will fail.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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<RemoveApplicationStreamInputRequest.TargetStreamInput>()) .setRequestId("requestId693933066") .build(); RemoveApplicationStreamInputResponse response = appPlatformClient.removeApplicationStreamInputAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
removeApplicationStreamInputOperationCallable
public final OperationCallable<RemoveApplicationStreamInputRequest,RemoveApplicationStreamInputResponse, removeApplicationStreamInputOperationCallable()OperationMetadata> Remove target stream input to the Application, if the Application is deployed, the corresponding instance based will be deleted. If the stream is not in the Application, the RPC will fail.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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<RemoveApplicationStreamInputRequest.TargetStreamInput>()) .setRequestId("requestId693933066") .build(); OperationFuture<RemoveApplicationStreamInputResponse, OperationMetadata> future = appPlatformClient.removeApplicationStreamInputOperationCallable().futureCall(request); // Do something. RemoveApplicationStreamInputResponse response = future.get(); } -
removeApplicationStreamInputCallable
public final UnaryCallable<RemoveApplicationStreamInputRequest,Operation> removeApplicationStreamInputCallable()Remove target stream input to the Application, if the Application is deployed, the corresponding instance based will be deleted. If the stream is not in the Application, the RPC will fail.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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<RemoveApplicationStreamInputRequest.TargetStreamInput>()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = appPlatformClient.removeApplicationStreamInputCallable().futureCall(request); // Do something. Operation response = future.get(); } -
updateApplicationStreamInputAsync
public final OperationFuture<UpdateApplicationStreamInputResponse,OperationMetadata> updateApplicationStreamInputAsync(ApplicationName name) Update target stream input to the Application, if the Application is deployed, the corresponding instance based will be deployed. For CreateOrUpdate behavior, set allow_missing to true.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
name- Required. the name of the application to retrieve. Format: "projects/{project}/locations/{location}/applications/{application}"- Throws:
ApiException- if the remote call fails
-
updateApplicationStreamInputAsync
public final OperationFuture<UpdateApplicationStreamInputResponse,OperationMetadata> updateApplicationStreamInputAsync(String name) Update target stream input to the Application, if the Application is deployed, the corresponding instance based will be deployed. For CreateOrUpdate behavior, set allow_missing to true.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
name- Required. the name of the application to retrieve. Format: "projects/{project}/locations/{location}/applications/{application}"- Throws:
ApiException- if the remote call fails
-
updateApplicationStreamInputAsync
public final OperationFuture<UpdateApplicationStreamInputResponse,OperationMetadata> updateApplicationStreamInputAsync(UpdateApplicationStreamInputRequest request) Update target stream input to the Application, if the Application is deployed, the corresponding instance based will be deployed. For CreateOrUpdate behavior, set allow_missing to true.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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<ApplicationStreamInput>()) .setRequestId("requestId693933066") .setAllowMissing(true) .build(); UpdateApplicationStreamInputResponse response = appPlatformClient.updateApplicationStreamInputAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateApplicationStreamInputOperationCallable
public final OperationCallable<UpdateApplicationStreamInputRequest,UpdateApplicationStreamInputResponse, updateApplicationStreamInputOperationCallable()OperationMetadata> Update target stream input to the Application, if the Application is deployed, the corresponding instance based will be deployed. For CreateOrUpdate behavior, set allow_missing to true.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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<ApplicationStreamInput>()) .setRequestId("requestId693933066") .setAllowMissing(true) .build(); OperationFuture<UpdateApplicationStreamInputResponse, OperationMetadata> future = appPlatformClient.updateApplicationStreamInputOperationCallable().futureCall(request); // Do something. UpdateApplicationStreamInputResponse response = future.get(); } -
updateApplicationStreamInputCallable
public final UnaryCallable<UpdateApplicationStreamInputRequest,Operation> updateApplicationStreamInputCallable()Update target stream input to the Application, if the Application is deployed, the corresponding instance based will be deployed. For CreateOrUpdate behavior, set allow_missing to true.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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<ApplicationStreamInput>()) .setRequestId("requestId693933066") .setAllowMissing(true) .build(); ApiFuture<Operation> future = appPlatformClient.updateApplicationStreamInputCallable().futureCall(request); // Do something. Operation response = future.get(); } -
listInstances
Lists Instances in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { ApplicationName parent = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); for (Instance element : appPlatformClient.listInstances(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListInstancesRequest.- Throws:
ApiException- if the remote call fails
-
listInstances
Lists Instances in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { String parent = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString(); for (Instance element : appPlatformClient.listInstances(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListInstancesRequest.- Throws:
ApiException- if the remote call fails
-
listInstances
public final AppPlatformClient.ListInstancesPagedResponse listInstances(ListInstancesRequest request) Lists Instances in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listInstancesPagedCallable
public final UnaryCallable<ListInstancesRequest,AppPlatformClient.ListInstancesPagedResponse> listInstancesPagedCallable()Lists Instances in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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<Instance> future = appPlatformClient.listInstancesPagedCallable().futureCall(request); // Do something. for (Instance element : future.get().iterateAll()) { // doThingsWith(element); } } -
listInstancesCallable
Lists Instances in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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; } } } -
getInstance
Gets details of a single Instance.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[INSTANCE]"); Instance response = appPlatformClient.getInstance(name); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
getInstance
Gets details of a single Instance.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[INSTANCE]").toString(); Instance response = appPlatformClient.getInstance(name); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
getInstance
Gets details of a single Instance.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { GetInstanceRequest request = GetInstanceRequest.newBuilder() .setName( InstanceName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[INSTANCE]") .toString()) .build(); Instance response = appPlatformClient.getInstance(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getInstanceCallable
Gets details of a single Instance.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { GetInstanceRequest request = GetInstanceRequest.newBuilder() .setName( InstanceName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[INSTANCE]") .toString()) .build(); ApiFuture<Instance> future = appPlatformClient.getInstanceCallable().futureCall(request); // Do something. Instance response = future.get(); } -
createApplicationInstancesAsync
public final OperationFuture<CreateApplicationInstancesResponse,OperationMetadata> createApplicationInstancesAsync(ApplicationName name) Adds target stream input to the Application. If the Application is deployed, the corresponding new Application instance will be created. If the stream has already been in the Application, the RPC will fail.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
name- Required. the name of the application to retrieve. Format: "projects/{project}/locations/{location}/applications/{application}"- Throws:
ApiException- if the remote call fails
-
createApplicationInstancesAsync
public final OperationFuture<CreateApplicationInstancesResponse,OperationMetadata> createApplicationInstancesAsync(String name) Adds target stream input to the Application. If the Application is deployed, the corresponding new Application instance will be created. If the stream has already been in the Application, the RPC will fail.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
name- Required. the name of the application to retrieve. Format: "projects/{project}/locations/{location}/applications/{application}"- Throws:
ApiException- if the remote call fails
-
createApplicationInstancesAsync
public final OperationFuture<CreateApplicationInstancesResponse,OperationMetadata> createApplicationInstancesAsync(CreateApplicationInstancesRequest request) Adds target stream input to the Application. If the Application is deployed, the corresponding new Application instance will be created. If the stream has already been in the Application, the RPC will fail.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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<ApplicationInstance>()) .setRequestId("requestId693933066") .build(); CreateApplicationInstancesResponse response = appPlatformClient.createApplicationInstancesAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createApplicationInstancesOperationCallable
public final OperationCallable<CreateApplicationInstancesRequest,CreateApplicationInstancesResponse, createApplicationInstancesOperationCallable()OperationMetadata> Adds target stream input to the Application. If the Application is deployed, the corresponding new Application instance will be created. If the stream has already been in the Application, the RPC will fail.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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<ApplicationInstance>()) .setRequestId("requestId693933066") .build(); OperationFuture<CreateApplicationInstancesResponse, OperationMetadata> future = appPlatformClient.createApplicationInstancesOperationCallable().futureCall(request); // Do something. CreateApplicationInstancesResponse response = future.get(); } -
createApplicationInstancesCallable
public final UnaryCallable<CreateApplicationInstancesRequest,Operation> createApplicationInstancesCallable()Adds target stream input to the Application. If the Application is deployed, the corresponding new Application instance will be created. If the stream has already been in the Application, the RPC will fail.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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<ApplicationInstance>()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = appPlatformClient.createApplicationInstancesCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteApplicationInstancesAsync
public final OperationFuture<Instance,OperationMetadata> deleteApplicationInstancesAsync(ApplicationName name) Remove target stream input to the Application, if the Application is deployed, the corresponding instance based will be deleted. If the stream is not in the Application, the RPC will fail.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
name- Required. the name of the application to retrieve. Format: "projects/{project}/locations/{location}/applications/{application}"- Throws:
ApiException- if the remote call fails
-
deleteApplicationInstancesAsync
public final OperationFuture<Instance,OperationMetadata> deleteApplicationInstancesAsync(String name) Remove target stream input to the Application, if the Application is deployed, the corresponding instance based will be deleted. If the stream is not in the Application, the RPC will fail.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
name- Required. the name of the application to retrieve. Format: "projects/{project}/locations/{location}/applications/{application}"- Throws:
ApiException- if the remote call fails
-
deleteApplicationInstancesAsync
public final OperationFuture<Instance,OperationMetadata> deleteApplicationInstancesAsync(DeleteApplicationInstancesRequest request) Remove target stream input to the Application, if the Application is deployed, the corresponding instance based will be deleted. If the stream is not in the Application, the RPC will fail.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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<String>()) .setRequestId("requestId693933066") .build(); Instance response = appPlatformClient.deleteApplicationInstancesAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteApplicationInstancesOperationCallable
public final OperationCallable<DeleteApplicationInstancesRequest,Instance, deleteApplicationInstancesOperationCallable()OperationMetadata> Remove target stream input to the Application, if the Application is deployed, the corresponding instance based will be deleted. If the stream is not in the Application, the RPC will fail.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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<String>()) .setRequestId("requestId693933066") .build(); OperationFuture<Instance, OperationMetadata> future = appPlatformClient.deleteApplicationInstancesOperationCallable().futureCall(request); // Do something. Instance response = future.get(); } -
deleteApplicationInstancesCallable
public final UnaryCallable<DeleteApplicationInstancesRequest,Operation> deleteApplicationInstancesCallable()Remove target stream input to the Application, if the Application is deployed, the corresponding instance based will be deleted. If the stream is not in the Application, the RPC will fail.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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<String>()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = appPlatformClient.deleteApplicationInstancesCallable().futureCall(request); // Do something. Operation response = future.get(); } -
updateApplicationInstancesAsync
public final OperationFuture<UpdateApplicationInstancesResponse,OperationMetadata> updateApplicationInstancesAsync(ApplicationName name, List<UpdateApplicationInstancesRequest.UpdateApplicationInstance> applicationInstances) Adds target stream input to the Application. If the Application is deployed, the corresponding new Application instance will be created. If the stream has already been in the Application, the RPC will fail.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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<UpdateApplicationInstancesRequest.UpdateApplicationInstance> applicationInstances = new ArrayList<>(); UpdateApplicationInstancesResponse response = appPlatformClient.updateApplicationInstancesAsync(name, applicationInstances).get(); }- Parameters:
name- Required. the name of the application to retrieve. Format: "projects/{project}/locations/{location}/applications/{application}"applicationInstances-- Throws:
ApiException- if the remote call fails
-
updateApplicationInstancesAsync
public final OperationFuture<UpdateApplicationInstancesResponse,OperationMetadata> updateApplicationInstancesAsync(String name, List<UpdateApplicationInstancesRequest.UpdateApplicationInstance> applicationInstances) Adds target stream input to the Application. If the Application is deployed, the corresponding new Application instance will be created. If the stream has already been in the Application, the RPC will fail.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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<UpdateApplicationInstancesRequest.UpdateApplicationInstance> applicationInstances = new ArrayList<>(); UpdateApplicationInstancesResponse response = appPlatformClient.updateApplicationInstancesAsync(name, applicationInstances).get(); }- Parameters:
name- Required. the name of the application to retrieve. Format: "projects/{project}/locations/{location}/applications/{application}"applicationInstances-- Throws:
ApiException- if the remote call fails
-
updateApplicationInstancesAsync
public final OperationFuture<UpdateApplicationInstancesResponse,OperationMetadata> updateApplicationInstancesAsync(UpdateApplicationInstancesRequest request) Adds target stream input to the Application. If the Application is deployed, the corresponding new Application instance will be created. If the stream has already been in the Application, the RPC will fail.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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<UpdateApplicationInstancesRequest.UpdateApplicationInstance>()) .setRequestId("requestId693933066") .setAllowMissing(true) .build(); UpdateApplicationInstancesResponse response = appPlatformClient.updateApplicationInstancesAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateApplicationInstancesOperationCallable
public final OperationCallable<UpdateApplicationInstancesRequest,UpdateApplicationInstancesResponse, updateApplicationInstancesOperationCallable()OperationMetadata> Adds target stream input to the Application. If the Application is deployed, the corresponding new Application instance will be created. If the stream has already been in the Application, the RPC will fail.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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<UpdateApplicationInstancesRequest.UpdateApplicationInstance>()) .setRequestId("requestId693933066") .setAllowMissing(true) .build(); OperationFuture<UpdateApplicationInstancesResponse, OperationMetadata> future = appPlatformClient.updateApplicationInstancesOperationCallable().futureCall(request); // Do something. UpdateApplicationInstancesResponse response = future.get(); } -
updateApplicationInstancesCallable
public final UnaryCallable<UpdateApplicationInstancesRequest,Operation> updateApplicationInstancesCallable()Adds target stream input to the Application. If the Application is deployed, the corresponding new Application instance will be created. If the stream has already been in the Application, the RPC will fail.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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<UpdateApplicationInstancesRequest.UpdateApplicationInstance>()) .setRequestId("requestId693933066") .setAllowMissing(true) .build(); ApiFuture<Operation> future = appPlatformClient.updateApplicationInstancesCallable().futureCall(request); // Do something. Operation response = future.get(); } -
listDrafts
Lists Drafts in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { ApplicationName parent = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); for (Draft element : appPlatformClient.listDrafts(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListDraftsRequest.- Throws:
ApiException- if the remote call fails
-
listDrafts
Lists Drafts in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { String parent = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString(); for (Draft element : appPlatformClient.listDrafts(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListDraftsRequest.- Throws:
ApiException- if the remote call fails
-
listDrafts
Lists Drafts in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listDraftsPagedCallable
public final UnaryCallable<ListDraftsRequest,AppPlatformClient.ListDraftsPagedResponse> listDraftsPagedCallable()Lists Drafts in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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<Draft> future = appPlatformClient.listDraftsPagedCallable().futureCall(request); // Do something. for (Draft element : future.get().iterateAll()) { // doThingsWith(element); } } -
listDraftsCallable
Lists Drafts in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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; } } } -
getDraft
Gets details of a single Draft.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { DraftName name = DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]"); Draft response = appPlatformClient.getDraft(name); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
getDraft
Gets details of a single Draft.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { String name = DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]").toString(); Draft response = appPlatformClient.getDraft(name); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
getDraft
Gets details of a single Draft.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { GetDraftRequest request = GetDraftRequest.newBuilder() .setName( DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]").toString()) .build(); Draft response = appPlatformClient.getDraft(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getDraftCallable
Gets details of a single Draft.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { GetDraftRequest request = GetDraftRequest.newBuilder() .setName( DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]").toString()) .build(); ApiFuture<Draft> future = appPlatformClient.getDraftCallable().futureCall(request); // Do something. Draft response = future.get(); } -
createDraftAsync
public final OperationFuture<Draft,OperationMetadata> createDraftAsync(ApplicationName parent, Draft draft, String draftId) Creates a new Draft in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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(); }- Parameters:
parent- Required. Value for parent.draft- Required. The resource being created.draftId- Required. Id of the requesting object.- Throws:
ApiException- if the remote call fails
-
createDraftAsync
public final OperationFuture<Draft,OperationMetadata> createDraftAsync(String parent, Draft draft, String draftId) Creates a new Draft in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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(); }- Parameters:
parent- Required. Value for parent.draft- Required. The resource being created.draftId- Required. Id of the requesting object.- Throws:
ApiException- if the remote call fails
-
createDraftAsync
Creates a new Draft in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createDraftOperationCallable
public final OperationCallable<CreateDraftRequest,Draft, createDraftOperationCallable()OperationMetadata> Creates a new Draft in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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<Draft, OperationMetadata> future = appPlatformClient.createDraftOperationCallable().futureCall(request); // Do something. Draft response = future.get(); } -
createDraftCallable
Creates a new Draft in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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<Operation> future = appPlatformClient.createDraftCallable().futureCall(request); // Do something. Operation response = future.get(); } -
updateDraftAsync
public final OperationFuture<Draft,OperationMetadata> updateDraftAsync(Draft draft, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single Draft.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { Draft draft = Draft.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); Draft response = appPlatformClient.updateDraftAsync(draft, updateMask).get(); }- Parameters:
draft- Required. The resource being updated.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:
ApiException- if the remote call fails
-
updateDraftAsync
Updates the parameters of a single Draft.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateDraftOperationCallable
public final OperationCallable<UpdateDraftRequest,Draft, updateDraftOperationCallable()OperationMetadata> Updates the parameters of a single Draft.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { UpdateDraftRequest request = UpdateDraftRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setDraft(Draft.newBuilder().build()) .setRequestId("requestId693933066") .setAllowMissing(true) .build(); OperationFuture<Draft, OperationMetadata> future = appPlatformClient.updateDraftOperationCallable().futureCall(request); // Do something. Draft response = future.get(); } -
updateDraftCallable
Updates the parameters of a single Draft.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { UpdateDraftRequest request = UpdateDraftRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setDraft(Draft.newBuilder().build()) .setRequestId("requestId693933066") .setAllowMissing(true) .build(); ApiFuture<Operation> future = appPlatformClient.updateDraftCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteDraftAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteDraftAsync(DraftName name) Deletes a single Draft.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { DraftName name = DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]"); appPlatformClient.deleteDraftAsync(name).get(); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
deleteDraftAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteDraftAsync(String name) Deletes a single Draft.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { String name = DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]").toString(); appPlatformClient.deleteDraftAsync(name).get(); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
deleteDraftAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteDraftAsync(DeleteDraftRequest request) Deletes a single Draft.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { DeleteDraftRequest request = DeleteDraftRequest.newBuilder() .setName( DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]").toString()) .setRequestId("requestId693933066") .build(); appPlatformClient.deleteDraftAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteDraftOperationCallable
public final OperationCallable<DeleteDraftRequest,com.google.protobuf.Empty, deleteDraftOperationCallable()OperationMetadata> Deletes a single Draft.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { DeleteDraftRequest request = DeleteDraftRequest.newBuilder() .setName( DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]").toString()) .setRequestId("requestId693933066") .build(); OperationFuture<Empty, OperationMetadata> future = appPlatformClient.deleteDraftOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteDraftCallable
Deletes a single Draft.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { DeleteDraftRequest request = DeleteDraftRequest.newBuilder() .setName( DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]").toString()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = appPlatformClient.deleteDraftCallable().futureCall(request); // Do something. future.get(); } -
listProcessors
Lists Processors in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (Processor element : appPlatformClient.listProcessors(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListProcessorsRequest.- Throws:
ApiException- if the remote call fails
-
listProcessors
Lists Processors in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (Processor element : appPlatformClient.listProcessors(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListProcessorsRequest.- Throws:
ApiException- if the remote call fails
-
listProcessors
public final AppPlatformClient.ListProcessorsPagedResponse listProcessors(ListProcessorsRequest request) Lists Processors in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listProcessorsPagedCallable
public final UnaryCallable<ListProcessorsRequest,AppPlatformClient.ListProcessorsPagedResponse> listProcessorsPagedCallable()Lists Processors in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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<Processor> future = appPlatformClient.listProcessorsPagedCallable().futureCall(request); // Do something. for (Processor element : future.get().iterateAll()) { // doThingsWith(element); } } -
listProcessorsCallable
Lists Processors in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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; } } } -
listPrebuiltProcessors
ListPrebuiltProcessors is a custom pass-through verb that Lists Prebuilt Processors.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); ListPrebuiltProcessorsResponse response = appPlatformClient.listPrebuiltProcessors(parent); }- Parameters:
parent- Required. Parent path.- Throws:
ApiException- if the remote call fails
-
listPrebuiltProcessors
ListPrebuiltProcessors is a custom pass-through verb that Lists Prebuilt Processors.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); ListPrebuiltProcessorsResponse response = appPlatformClient.listPrebuiltProcessors(parent); }- Parameters:
parent- Required. Parent path.- Throws:
ApiException- if the remote call fails
-
listPrebuiltProcessors
public final ListPrebuiltProcessorsResponse listPrebuiltProcessors(ListPrebuiltProcessorsRequest request) ListPrebuiltProcessors is a custom pass-through verb that Lists Prebuilt Processors.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { ListPrebuiltProcessorsRequest request = ListPrebuiltProcessorsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .build(); ListPrebuiltProcessorsResponse response = appPlatformClient.listPrebuiltProcessors(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listPrebuiltProcessorsCallable
public final UnaryCallable<ListPrebuiltProcessorsRequest,ListPrebuiltProcessorsResponse> listPrebuiltProcessorsCallable()ListPrebuiltProcessors is a custom pass-through verb that Lists Prebuilt Processors.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { ListPrebuiltProcessorsRequest request = ListPrebuiltProcessorsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .build(); ApiFuture<ListPrebuiltProcessorsResponse> future = appPlatformClient.listPrebuiltProcessorsCallable().futureCall(request); // Do something. ListPrebuiltProcessorsResponse response = future.get(); } -
getProcessor
Gets details of a single Processor.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]"); Processor response = appPlatformClient.getProcessor(name); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
getProcessor
Gets details of a single Processor.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { String name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString(); Processor response = appPlatformClient.getProcessor(name); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
getProcessor
Gets details of a single Processor.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { GetProcessorRequest request = GetProcessorRequest.newBuilder() .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) .build(); Processor response = appPlatformClient.getProcessor(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getProcessorCallable
Gets details of a single Processor.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { GetProcessorRequest request = GetProcessorRequest.newBuilder() .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) .build(); ApiFuture<Processor> future = appPlatformClient.getProcessorCallable().futureCall(request); // Do something. Processor response = future.get(); } -
createProcessorAsync
public final OperationFuture<Processor,OperationMetadata> createProcessorAsync(LocationName parent, Processor processor, String processorId) Creates a new Processor in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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(); }- Parameters:
parent- Required. Value for parent.processor- Required. The resource being created.processorId- Required. Id of the requesting object.- Throws:
ApiException- if the remote call fails
-
createProcessorAsync
public final OperationFuture<Processor,OperationMetadata> createProcessorAsync(String parent, Processor processor, String processorId) Creates a new Processor in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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(); }- Parameters:
parent- Required. Value for parent.processor- Required. The resource being created.processorId- Required. Id of the requesting object.- Throws:
ApiException- if the remote call fails
-
createProcessorAsync
public final OperationFuture<Processor,OperationMetadata> createProcessorAsync(CreateProcessorRequest request) Creates a new Processor in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createProcessorOperationCallable
public final OperationCallable<CreateProcessorRequest,Processor, createProcessorOperationCallable()OperationMetadata> Creates a new Processor in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { CreateProcessorRequest request = CreateProcessorRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setProcessorId("processorId203323725") .setProcessor(Processor.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<Processor, OperationMetadata> future = appPlatformClient.createProcessorOperationCallable().futureCall(request); // Do something. Processor response = future.get(); } -
createProcessorCallable
Creates a new Processor in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { CreateProcessorRequest request = CreateProcessorRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setProcessorId("processorId203323725") .setProcessor(Processor.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = appPlatformClient.createProcessorCallable().futureCall(request); // Do something. Operation response = future.get(); } -
updateProcessorAsync
public final OperationFuture<Processor,OperationMetadata> updateProcessorAsync(Processor processor, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single Processor.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { Processor processor = Processor.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); Processor response = appPlatformClient.updateProcessorAsync(processor, updateMask).get(); }- Parameters:
processor- Required. The resource being updated.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:
ApiException- if the remote call fails
-
updateProcessorAsync
public final OperationFuture<Processor,OperationMetadata> updateProcessorAsync(UpdateProcessorRequest request) Updates the parameters of a single Processor.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateProcessorOperationCallable
public final OperationCallable<UpdateProcessorRequest,Processor, updateProcessorOperationCallable()OperationMetadata> Updates the parameters of a single Processor.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { UpdateProcessorRequest request = UpdateProcessorRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setProcessor(Processor.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<Processor, OperationMetadata> future = appPlatformClient.updateProcessorOperationCallable().futureCall(request); // Do something. Processor response = future.get(); } -
updateProcessorCallable
Updates the parameters of a single Processor.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { UpdateProcessorRequest request = UpdateProcessorRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setProcessor(Processor.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = appPlatformClient.updateProcessorCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteProcessorAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteProcessorAsync(ProcessorName name) Deletes a single Processor.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]"); appPlatformClient.deleteProcessorAsync(name).get(); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
deleteProcessorAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteProcessorAsync(String name) Deletes a single Processor.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { String name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString(); appPlatformClient.deleteProcessorAsync(name).get(); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
deleteProcessorAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteProcessorAsync(DeleteProcessorRequest request) Deletes a single Processor.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { DeleteProcessorRequest request = DeleteProcessorRequest.newBuilder() .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) .setRequestId("requestId693933066") .build(); appPlatformClient.deleteProcessorAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteProcessorOperationCallable
public final OperationCallable<DeleteProcessorRequest,com.google.protobuf.Empty, deleteProcessorOperationCallable()OperationMetadata> Deletes a single Processor.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { DeleteProcessorRequest request = DeleteProcessorRequest.newBuilder() .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) .setRequestId("requestId693933066") .build(); OperationFuture<Empty, OperationMetadata> future = appPlatformClient.deleteProcessorOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteProcessorCallable
Deletes a single Processor.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { DeleteProcessorRequest request = DeleteProcessorRequest.newBuilder() .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = appPlatformClient.deleteProcessorCallable().futureCall(request); // Do something. future.get(); } -
listLocations
public final AppPlatformClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request) Lists information about the supported locations for this service.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (Location element : appPlatformClient.listLocations(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listLocationsPagedCallable
public final UnaryCallable<ListLocationsRequest,AppPlatformClient.ListLocationsPagedResponse> listLocationsPagedCallable()Lists information about the supported locations for this service.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<Location> future = appPlatformClient.listLocationsPagedCallable().futureCall(request); // Do something. for (Location element : future.get().iterateAll()) { // doThingsWith(element); } } -
listLocationsCallable
Lists information about the supported locations for this service.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListLocationsResponse response = appPlatformClient.listLocationsCallable().call(request); for (Location element : response.getLocationsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getLocation
Gets information about a location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); Location response = appPlatformClient.getLocation(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getLocationCallable
Gets information about a location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); ApiFuture<Location> future = appPlatformClient.getLocationCallable().futureCall(request); // Do something. Location response = future.get(); } -
close
public final void close()- Specified by:
closein interfaceAutoCloseable
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceBackgroundResource
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdownin interfaceBackgroundResource
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminatedin interfaceBackgroundResource
-
shutdownNow
public void shutdownNow()- Specified by:
shutdownNowin interfaceBackgroundResource
-
awaitTermination
- Specified by:
awaitTerminationin interfaceBackgroundResource- Throws:
InterruptedException
-