| GitHub Repository | Product 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().
| Method | Description | Method Variants |
|---|---|---|
GetApplication |
API to retrieve a |
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.
|
ListApplications |
API to retrieve a list of |
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 |
API to create a |
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.
|
BatchCreateApplications |
API to batch create |
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.
|
UpdateApplication |
API to update a |
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.
|
BatchUpdateApplications |
API to batch update |
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.
|
BatchArchiveApplications |
/ API to batch archive |
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.
|
BatchUnarchiveApplications |
/ API to batch unarchive |
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.
|
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.
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 |
BatchArchiveApplicationsRequestThe 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 |
NetworkNameRequired. The parent resource shared by all |
names |
List<String>Required. The |
| 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 |
StringRequired. The parent resource shared by all |
names |
List<String>Required. The |
| 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 |
BatchCreateApplicationsRequestThe 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 |
NetworkNameRequired. The parent resource where |
requests |
List<CreateApplicationRequest>Required. The |
| 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 |
StringRequired. The parent resource where |
requests |
List<CreateApplicationRequest>Required. The |
| 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 |
BatchUnarchiveApplicationsRequestThe 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 |
NetworkNameRequired. The parent resource shared by all |
names |
List<String>Required. The |
| 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 |
StringRequired. The parent resource shared by all |
names |
List<String>Required. The |
| 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 |
BatchUpdateApplicationsRequestThe 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 |
NetworkNameRequired. The parent resource where |
requests |
List<UpdateApplicationRequest>Required. The |
| 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 |
StringRequired. The parent resource where |
requests |
List<UpdateApplicationRequest>Required. The |
| 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 |
CreateApplicationRequestThe 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 |
NetworkNameRequired. The parent resource where this |
application |
ApplicationRequired. The |
| 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 |
StringRequired. The parent resource where this |
application |
ApplicationRequired. The |
| 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 |
ApplicationNameRequired. The resource name of the Application. Format:
|
| 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 |
GetApplicationRequestThe 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 |
StringRequired. The resource name of the Application. Format:
|
| 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 |
ListApplicationsRequestThe 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 |
NetworkNameRequired. The parent, which owns this collection of Applications. Format:
|
| 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 |
StringRequired. The parent, which owns this collection of Applications. Format:
|
| 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 |
ApplicationRequired. The The |
updateMask |
FieldMaskOptional. 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 |
UpdateApplicationRequestThe 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> |
|