Class ApplicationServiceClient (0.52.0)

GitHub RepositoryProduct Reference

Service Description: Provides methods for handling Application objects.

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
   ApplicationName name = ApplicationName.of("[NETWORK_CODE]", "[APPLICATION]");
   Application response = applicationServiceClient.getApplication(name);
 }
 

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

Methods
Method Description Method Variants

GetApplication

API to retrieve a Application object.

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

  • getApplication(GetApplicationRequest request)

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

  • getApplication(ApplicationName name)

  • getApplication(String name)

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

  • getApplicationCallable()

ListApplications

API to retrieve a list of Application objects.

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

  • listApplications(ListApplicationsRequest request)

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

  • listApplications(NetworkName parent)

  • listApplications(String parent)

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

  • listApplicationsPagedCallable()

  • listApplicationsCallable()

CreateApplication

API to create a Application object.

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

  • createApplication(CreateApplicationRequest request)

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

  • createApplication(NetworkName parent, Application application)

  • createApplication(String parent, Application application)

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

  • createApplicationCallable()

BatchCreateApplications

API to batch create Application objects.

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

  • batchCreateApplications(NetworkName parent, List<CreateApplicationRequest> requests)

  • batchCreateApplications(String parent, List<CreateApplicationRequest> requests)

  • batchCreateApplications(BatchCreateApplicationsRequest request)

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

  • batchCreateApplicationsCallable()

UpdateApplication

API to update a Application object.

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

  • updateApplication(UpdateApplicationRequest request)

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

  • updateApplication(Application application, FieldMask updateMask)

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

  • updateApplicationCallable()

BatchUpdateApplications

API to batch update Application objects.

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

  • batchUpdateApplications(NetworkName parent, List<UpdateApplicationRequest> requests)

  • batchUpdateApplications(String parent, List<UpdateApplicationRequest> requests)

  • batchUpdateApplications(BatchUpdateApplicationsRequest request)

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

  • batchUpdateApplicationsCallable()

BatchArchiveApplications

/ API to batch archive Application objects.

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

  • batchArchiveApplications(BatchArchiveApplicationsRequest request)

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

  • batchArchiveApplications(NetworkName parent, List<String> names)

  • batchArchiveApplications(String parent, List<String> names)

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

  • batchArchiveApplicationsCallable()

BatchUnarchiveApplications

/ API to batch unarchive Application objects.

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

  • batchUnarchiveApplications(BatchUnarchiveApplicationsRequest request)

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

  • batchUnarchiveApplications(NetworkName parent, List<String> names)

  • batchUnarchiveApplications(String parent, List<String> names)

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

  • batchUnarchiveApplicationsCallable()

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 ApplicationServiceSettings 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
 ApplicationServiceSettings applicationServiceSettings =
     ApplicationServiceSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 ApplicationServiceClient applicationServiceClient =
     ApplicationServiceClient.create(applicationServiceSettings);
 

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
 ApplicationServiceSettings applicationServiceSettings =
     ApplicationServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
 ApplicationServiceClient applicationServiceClient =
     ApplicationServiceClient.create(applicationServiceSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

Inheritance

java.lang.Object > ApplicationServiceClient

Static Methods

create()

public static final ApplicationServiceClient create()

Constructs an instance of ApplicationServiceClient with default settings.

Returns
Type Description
ApplicationServiceClient
Exceptions
Type Description
IOException

create(ApplicationServiceSettings settings)

public static final ApplicationServiceClient create(ApplicationServiceSettings settings)

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

Parameter
Name Description
settings ApplicationServiceSettings
Returns
Type Description
ApplicationServiceClient
Exceptions
Type Description
IOException

create(ApplicationServiceStub stub)

public static final ApplicationServiceClient create(ApplicationServiceStub stub)

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

Parameter
Name Description
stub ApplicationServiceStub
Returns
Type Description
ApplicationServiceClient

Constructors

ApplicationServiceClient(ApplicationServiceSettings settings)

protected ApplicationServiceClient(ApplicationServiceSettings settings)

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

Parameter
Name Description
settings ApplicationServiceSettings

ApplicationServiceClient(ApplicationServiceStub stub)

protected ApplicationServiceClient(ApplicationServiceStub stub)
Parameter
Name Description
stub ApplicationServiceStub

Methods

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
Name Description
duration long
unit TimeUnit
Returns
Type Description
boolean
Exceptions
Type Description
InterruptedException

batchArchiveApplications(BatchArchiveApplicationsRequest request)

public final BatchArchiveApplicationsResponse batchArchiveApplications(BatchArchiveApplicationsRequest request)

/ API to batch archive Application objects.

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
   BatchArchiveApplicationsRequest request =
       BatchArchiveApplicationsRequest.newBuilder()
           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
           .addAllNames(new ArrayList<String>())
           .build();
   BatchArchiveApplicationsResponse response =
       applicationServiceClient.batchArchiveApplications(request);
 }
 
Parameter
Name Description
request BatchArchiveApplicationsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
BatchArchiveApplicationsResponse

batchArchiveApplications(NetworkName parent, List<String> names)

public final BatchArchiveApplicationsResponse batchArchiveApplications(NetworkName parent, List<String> names)

/ API to batch archive Application objects.

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
   NetworkName parent = NetworkName.of("[NETWORK_CODE]");
   List<String> names = new ArrayList<>();
   BatchArchiveApplicationsResponse response =
       applicationServiceClient.batchArchiveApplications(parent, names);
 }
 
Parameters
Name Description
parent NetworkName

Required. The parent resource shared by all Applications to archive. Format: networks/{network_code}

names List<String>

Required. The Application objects to archive.

Returns
Type Description
BatchArchiveApplicationsResponse

batchArchiveApplications(String parent, List<String> names)

public final BatchArchiveApplicationsResponse batchArchiveApplications(String parent, List<String> names)

/ API to batch archive Application objects.

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
   String parent = NetworkName.of("[NETWORK_CODE]").toString();
   List<String> names = new ArrayList<>();
   BatchArchiveApplicationsResponse response =
       applicationServiceClient.batchArchiveApplications(parent, names);
 }
 
Parameters
Name Description
parent String

Required. The parent resource shared by all Applications to archive. Format: networks/{network_code}

names List<String>

Required. The Application objects to archive.

Returns
Type Description
BatchArchiveApplicationsResponse

batchArchiveApplicationsCallable()

public final UnaryCallable<BatchArchiveApplicationsRequest,BatchArchiveApplicationsResponse> batchArchiveApplicationsCallable()

/ API to batch archive Application objects.

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
   BatchArchiveApplicationsRequest request =
       BatchArchiveApplicationsRequest.newBuilder()
           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
           .addAllNames(new ArrayList<String>())
           .build();
   ApiFuture<BatchArchiveApplicationsResponse> future =
       applicationServiceClient.batchArchiveApplicationsCallable().futureCall(request);
   // Do something.
   BatchArchiveApplicationsResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<BatchArchiveApplicationsRequest,BatchArchiveApplicationsResponse>

batchCreateApplications(BatchCreateApplicationsRequest request)

public final BatchCreateApplicationsResponse batchCreateApplications(BatchCreateApplicationsRequest request)

API to batch create Application objects.

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
   BatchCreateApplicationsRequest request =
       BatchCreateApplicationsRequest.newBuilder()
           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
           .addAllRequests(new ArrayList<CreateApplicationRequest>())
           .build();
   BatchCreateApplicationsResponse response =
       applicationServiceClient.batchCreateApplications(request);
 }
 
Parameter
Name Description
request BatchCreateApplicationsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
BatchCreateApplicationsResponse

batchCreateApplications(NetworkName parent, List<CreateApplicationRequest> requests)

public final BatchCreateApplicationsResponse batchCreateApplications(NetworkName parent, List<CreateApplicationRequest> requests)

API to batch create Application objects.

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
   NetworkName parent = NetworkName.of("[NETWORK_CODE]");
   List<CreateApplicationRequest> requests = new ArrayList<>();
   BatchCreateApplicationsResponse response =
       applicationServiceClient.batchCreateApplications(parent, requests);
 }
 
Parameters
Name Description
parent NetworkName

Required. The parent resource where Applications will be created. Format: networks/{network_code} The parent field in the CreateApplicationRequest must match this field.

requests List<CreateApplicationRequest>

Required. The Application objects to create.

Returns
Type Description
BatchCreateApplicationsResponse

batchCreateApplications(String parent, List<CreateApplicationRequest> requests)

public final BatchCreateApplicationsResponse batchCreateApplications(String parent, List<CreateApplicationRequest> requests)

API to batch create Application objects.

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
   String parent = NetworkName.of("[NETWORK_CODE]").toString();
   List<CreateApplicationRequest> requests = new ArrayList<>();
   BatchCreateApplicationsResponse response =
       applicationServiceClient.batchCreateApplications(parent, requests);
 }
 
Parameters
Name Description
parent String

Required. The parent resource where Applications will be created. Format: networks/{network_code} The parent field in the CreateApplicationRequest must match this field.

requests List<CreateApplicationRequest>

Required. The Application objects to create.

Returns
Type Description
BatchCreateApplicationsResponse

batchCreateApplicationsCallable()

public final UnaryCallable<BatchCreateApplicationsRequest,BatchCreateApplicationsResponse> batchCreateApplicationsCallable()

API to batch create Application objects.

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
   BatchCreateApplicationsRequest request =
       BatchCreateApplicationsRequest.newBuilder()
           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
           .addAllRequests(new ArrayList<CreateApplicationRequest>())
           .build();
   ApiFuture<BatchCreateApplicationsResponse> future =
       applicationServiceClient.batchCreateApplicationsCallable().futureCall(request);
   // Do something.
   BatchCreateApplicationsResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<BatchCreateApplicationsRequest,BatchCreateApplicationsResponse>

batchUnarchiveApplications(BatchUnarchiveApplicationsRequest request)

public final BatchUnarchiveApplicationsResponse batchUnarchiveApplications(BatchUnarchiveApplicationsRequest request)

/ API to batch unarchive Application objects.

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
   BatchUnarchiveApplicationsRequest request =
       BatchUnarchiveApplicationsRequest.newBuilder()
           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
           .addAllNames(new ArrayList<String>())
           .build();
   BatchUnarchiveApplicationsResponse response =
       applicationServiceClient.batchUnarchiveApplications(request);
 }
 
Parameter
Name Description
request BatchUnarchiveApplicationsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
BatchUnarchiveApplicationsResponse

batchUnarchiveApplications(NetworkName parent, List<String> names)

public final BatchUnarchiveApplicationsResponse batchUnarchiveApplications(NetworkName parent, List<String> names)

/ API to batch unarchive Application objects.

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
   NetworkName parent = NetworkName.of("[NETWORK_CODE]");
   List<String> names = new ArrayList<>();
   BatchUnarchiveApplicationsResponse response =
       applicationServiceClient.batchUnarchiveApplications(parent, names);
 }
 
Parameters
Name Description
parent NetworkName

Required. The parent resource shared by all Applications to Unarchive. Format: networks/{network_code}

names List<String>

Required. The Application objects to unarchive.

Returns
Type Description
BatchUnarchiveApplicationsResponse

batchUnarchiveApplications(String parent, List<String> names)

public final BatchUnarchiveApplicationsResponse batchUnarchiveApplications(String parent, List<String> names)

/ API to batch unarchive Application objects.

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
   String parent = NetworkName.of("[NETWORK_CODE]").toString();
   List<String> names = new ArrayList<>();
   BatchUnarchiveApplicationsResponse response =
       applicationServiceClient.batchUnarchiveApplications(parent, names);
 }
 
Parameters
Name Description
parent String

Required. The parent resource shared by all Applications to Unarchive. Format: networks/{network_code}

names List<String>

Required. The Application objects to unarchive.

Returns
Type Description
BatchUnarchiveApplicationsResponse

batchUnarchiveApplicationsCallable()

public final UnaryCallable<BatchUnarchiveApplicationsRequest,BatchUnarchiveApplicationsResponse> batchUnarchiveApplicationsCallable()

/ API to batch unarchive Application objects.

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
   BatchUnarchiveApplicationsRequest request =
       BatchUnarchiveApplicationsRequest.newBuilder()
           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
           .addAllNames(new ArrayList<String>())
           .build();
   ApiFuture<BatchUnarchiveApplicationsResponse> future =
       applicationServiceClient.batchUnarchiveApplicationsCallable().futureCall(request);
   // Do something.
   BatchUnarchiveApplicationsResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<BatchUnarchiveApplicationsRequest,BatchUnarchiveApplicationsResponse>

batchUpdateApplications(BatchUpdateApplicationsRequest request)

public final BatchUpdateApplicationsResponse batchUpdateApplications(BatchUpdateApplicationsRequest request)

API to batch update Application objects.

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
   BatchUpdateApplicationsRequest request =
       BatchUpdateApplicationsRequest.newBuilder()
           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
           .addAllRequests(new ArrayList<UpdateApplicationRequest>())
           .build();
   BatchUpdateApplicationsResponse response =
       applicationServiceClient.batchUpdateApplications(request);
 }
 
Parameter
Name Description
request BatchUpdateApplicationsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
BatchUpdateApplicationsResponse

batchUpdateApplications(NetworkName parent, List<UpdateApplicationRequest> requests)

public final BatchUpdateApplicationsResponse batchUpdateApplications(NetworkName parent, List<UpdateApplicationRequest> requests)

API to batch update Application objects.

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
   NetworkName parent = NetworkName.of("[NETWORK_CODE]");
   List<UpdateApplicationRequest> requests = new ArrayList<>();
   BatchUpdateApplicationsResponse response =
       applicationServiceClient.batchUpdateApplications(parent, requests);
 }
 
Parameters
Name Description
parent NetworkName

Required. The parent resource where Applications will be updated. Format: networks/{network_code} The parent field in the UpdateApplicationRequest must match this field.

requests List<UpdateApplicationRequest>

Required. The Application objects to update.

Returns
Type Description
BatchUpdateApplicationsResponse

batchUpdateApplications(String parent, List<UpdateApplicationRequest> requests)

public final BatchUpdateApplicationsResponse batchUpdateApplications(String parent, List<UpdateApplicationRequest> requests)

API to batch update Application objects.

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
   String parent = NetworkName.of("[NETWORK_CODE]").toString();
   List<UpdateApplicationRequest> requests = new ArrayList<>();
   BatchUpdateApplicationsResponse response =
       applicationServiceClient.batchUpdateApplications(parent, requests);
 }
 
Parameters
Name Description
parent String

Required. The parent resource where Applications will be updated. Format: networks/{network_code} The parent field in the UpdateApplicationRequest must match this field.

requests List<UpdateApplicationRequest>

Required. The Application objects to update.

Returns
Type Description
BatchUpdateApplicationsResponse

batchUpdateApplicationsCallable()

public final UnaryCallable<BatchUpdateApplicationsRequest,BatchUpdateApplicationsResponse> batchUpdateApplicationsCallable()

API to batch update Application objects.

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
   BatchUpdateApplicationsRequest request =
       BatchUpdateApplicationsRequest.newBuilder()
           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
           .addAllRequests(new ArrayList<UpdateApplicationRequest>())
           .build();
   ApiFuture<BatchUpdateApplicationsResponse> future =
       applicationServiceClient.batchUpdateApplicationsCallable().futureCall(request);
   // Do something.
   BatchUpdateApplicationsResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<BatchUpdateApplicationsRequest,BatchUpdateApplicationsResponse>

close()

public final void close()

createApplication(CreateApplicationRequest request)

public final Application createApplication(CreateApplicationRequest request)

API to create a Application object.

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
   CreateApplicationRequest request =
       CreateApplicationRequest.newBuilder()
           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
           .setApplication(Application.newBuilder().build())
           .build();
   Application response = applicationServiceClient.createApplication(request);
 }
 
Parameter
Name Description
request CreateApplicationRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Application

createApplication(NetworkName parent, Application application)

public final Application createApplication(NetworkName parent, Application application)

API to create a Application object.

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
   NetworkName parent = NetworkName.of("[NETWORK_CODE]");
   Application application = Application.newBuilder().build();
   Application response = applicationServiceClient.createApplication(parent, application);
 }
 
Parameters
Name Description
parent NetworkName

Required. The parent resource where this Application will be created. Format: networks/{network_code}

application Application

Required. The Application to create.

Returns
Type Description
Application

createApplication(String parent, Application application)

public final Application createApplication(String parent, Application application)

API to create a Application object.

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
   String parent = NetworkName.of("[NETWORK_CODE]").toString();
   Application application = Application.newBuilder().build();
   Application response = applicationServiceClient.createApplication(parent, application);
 }
 
Parameters
Name Description
parent String

Required. The parent resource where this Application will be created. Format: networks/{network_code}

application Application

Required. The Application to create.

Returns
Type Description
Application

createApplicationCallable()

public final UnaryCallable<CreateApplicationRequest,Application> createApplicationCallable()

API to create a Application object.

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
   CreateApplicationRequest request =
       CreateApplicationRequest.newBuilder()
           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
           .setApplication(Application.newBuilder().build())
           .build();
   ApiFuture<Application> future =
       applicationServiceClient.createApplicationCallable().futureCall(request);
   // Do something.
   Application response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateApplicationRequest,Application>

getApplication(ApplicationName name)

public final Application getApplication(ApplicationName name)

API to retrieve a Application object.

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
   ApplicationName name = ApplicationName.of("[NETWORK_CODE]", "[APPLICATION]");
   Application response = applicationServiceClient.getApplication(name);
 }
 
Parameter
Name Description
name ApplicationName

Required. The resource name of the Application. Format: networks/{network_code}/applications/{application_id}

Returns
Type Description
Application

getApplication(GetApplicationRequest request)

public final Application getApplication(GetApplicationRequest request)

API to retrieve a Application object.

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
   GetApplicationRequest request =
       GetApplicationRequest.newBuilder()
           .setName(ApplicationName.of("[NETWORK_CODE]", "[APPLICATION]").toString())
           .build();
   Application response = applicationServiceClient.getApplication(request);
 }
 
Parameter
Name Description
request GetApplicationRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Application

getApplication(String name)

public final Application getApplication(String name)

API to retrieve a Application object.

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
   String name = ApplicationName.of("[NETWORK_CODE]", "[APPLICATION]").toString();
   Application response = applicationServiceClient.getApplication(name);
 }
 
Parameter
Name Description
name String

Required. The resource name of the Application. Format: networks/{network_code}/applications/{application_id}

Returns
Type Description
Application

getApplicationCallable()

public final UnaryCallable<GetApplicationRequest,Application> getApplicationCallable()

API to retrieve a Application object.

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
   GetApplicationRequest request =
       GetApplicationRequest.newBuilder()
           .setName(ApplicationName.of("[NETWORK_CODE]", "[APPLICATION]").toString())
           .build();
   ApiFuture<Application> future =
       applicationServiceClient.getApplicationCallable().futureCall(request);
   // Do something.
   Application response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetApplicationRequest,Application>

getSettings()

public final ApplicationServiceSettings getSettings()
Returns
Type Description
ApplicationServiceSettings

getStub()

public ApplicationServiceStub getStub()
Returns
Type Description
ApplicationServiceStub

isShutdown()

public boolean isShutdown()
Returns
Type Description
boolean

isTerminated()

public boolean isTerminated()
Returns
Type Description
boolean

listApplications(ListApplicationsRequest request)

public final ApplicationServiceClient.ListApplicationsPagedResponse listApplications(ListApplicationsRequest request)

API to retrieve a list of Application objects.

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
   ListApplicationsRequest request =
       ListApplicationsRequest.newBuilder()
           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .setSkip(3532159)
           .build();
   for (Application element : applicationServiceClient.listApplications(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListApplicationsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
ApplicationServiceClient.ListApplicationsPagedResponse

listApplications(NetworkName parent)

public final ApplicationServiceClient.ListApplicationsPagedResponse listApplications(NetworkName parent)

API to retrieve a list of Application objects.

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
   NetworkName parent = NetworkName.of("[NETWORK_CODE]");
   for (Application element : applicationServiceClient.listApplications(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent NetworkName

Required. The parent, which owns this collection of Applications. Format: networks/{network_code}

Returns
Type Description
ApplicationServiceClient.ListApplicationsPagedResponse

listApplications(String parent)

public final ApplicationServiceClient.ListApplicationsPagedResponse listApplications(String parent)

API to retrieve a list of Application objects.

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
   String parent = NetworkName.of("[NETWORK_CODE]").toString();
   for (Application element : applicationServiceClient.listApplications(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent, which owns this collection of Applications. Format: networks/{network_code}

Returns
Type Description
ApplicationServiceClient.ListApplicationsPagedResponse

listApplicationsCallable()

public final UnaryCallable<ListApplicationsRequest,ListApplicationsResponse> listApplicationsCallable()

API to retrieve a list of Application objects.

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
   ListApplicationsRequest request =
       ListApplicationsRequest.newBuilder()
           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .setSkip(3532159)
           .build();
   while (true) {
     ListApplicationsResponse response =
         applicationServiceClient.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;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListApplicationsRequest,ListApplicationsResponse>

listApplicationsPagedCallable()

public final UnaryCallable<ListApplicationsRequest,ApplicationServiceClient.ListApplicationsPagedResponse> listApplicationsPagedCallable()

API to retrieve a list of Application objects.

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
   ListApplicationsRequest request =
       ListApplicationsRequest.newBuilder()
           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .setSkip(3532159)
           .build();
   ApiFuture<Application> future =
       applicationServiceClient.listApplicationsPagedCallable().futureCall(request);
   // Do something.
   for (Application element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListApplicationsRequest,ListApplicationsPagedResponse>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

updateApplication(Application application, FieldMask updateMask)

public final Application updateApplication(Application application, FieldMask updateMask)

API to update a Application object.

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
   Application application = Application.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   Application response = applicationServiceClient.updateApplication(application, updateMask);
 }
 
Parameters
Name Description
application Application

Required. The Application to update.

The Application's name is used to identify the Application to update.

updateMask FieldMask

Optional. The list of fields to update.

Returns
Type Description
Application

updateApplication(UpdateApplicationRequest request)

public final Application updateApplication(UpdateApplicationRequest request)

API to update a Application object.

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
   UpdateApplicationRequest request =
       UpdateApplicationRequest.newBuilder()
           .setApplication(Application.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   Application response = applicationServiceClient.updateApplication(request);
 }
 
Parameter
Name Description
request UpdateApplicationRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Application

updateApplicationCallable()

public final UnaryCallable<UpdateApplicationRequest,Application> updateApplicationCallable()

API to update a Application object.

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 (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
   UpdateApplicationRequest request =
       UpdateApplicationRequest.newBuilder()
           .setApplication(Application.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<Application> future =
       applicationServiceClient.updateApplicationCallable().futureCall(request);
   // Do something.
   Application response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateApplicationRequest,Application>