Class ApiHubDependenciesClient
- All Implemented Interfaces:
BackgroundResource,AutoCloseable
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
Dependency dependency = Dependency.newBuilder().build();
String dependencyId = "dependencyId503788998";
Dependency response =
apiHubDependenciesClient.createDependency(parent, dependency, dependencyId);
}
Note: close() needs to be called on the ApiHubDependenciesClient 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 |
|---|---|---|
CreateDependency |
Create a dependency between two entities in the API hub. |
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.
|
GetDependency |
Get details about a dependency resource in the API hub. |
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.
|
UpdateDependency |
Update a dependency based on the [update_mask][google.cloud.apihub.v1.UpdateDependencyRequest.update_mask] provided in the request. The following fields in the [dependency][google.cloud.apihub.v1.Dependency] can be updated:
|
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.
|
DeleteDependency |
Delete the dependency resource. |
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.
|
ListDependencies |
List dependencies based on the provided filter and pagination parameters. |
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.
|
ListLocations |
Lists information about the supported locations for this service. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetLocation |
Gets information about a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of ApiHubDependenciesSettings 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
ApiHubDependenciesSettings apiHubDependenciesSettings =
ApiHubDependenciesSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
ApiHubDependenciesClient apiHubDependenciesClient =
ApiHubDependenciesClient.create(apiHubDependenciesSettings);
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
ApiHubDependenciesSettings apiHubDependenciesSettings =
ApiHubDependenciesSettings.newBuilder().setEndpoint(myEndpoint).build();
ApiHubDependenciesClient apiHubDependenciesClient =
ApiHubDependenciesClient.create(apiHubDependenciesSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructs an instance of ApiHubDependenciesClient, using the given settings.protected -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long duration, TimeUnit unit) final voidclose()static final ApiHubDependenciesClientcreate()Constructs an instance of ApiHubDependenciesClient with default settings.static final ApiHubDependenciesClientcreate(ApiHubDependenciesSettings settings) Constructs an instance of ApiHubDependenciesClient, using the given settings.static final ApiHubDependenciesClientcreate(ApiHubDependenciesStub stub) Constructs an instance of ApiHubDependenciesClient, using the given stub for making calls.final DependencycreateDependency(CreateDependencyRequest request) Create a dependency between two entities in the API hub.final DependencycreateDependency(LocationName parent, Dependency dependency, String dependencyId) Create a dependency between two entities in the API hub.final DependencycreateDependency(String parent, Dependency dependency, String dependencyId) Create a dependency between two entities in the API hub.Create a dependency between two entities in the API hub.final voiddeleteDependency(DeleteDependencyRequest request) Delete the dependency resource.final voidDelete the dependency resource.final voiddeleteDependency(String name) Delete the dependency resource.final UnaryCallable<DeleteDependencyRequest,com.google.protobuf.Empty> Delete the dependency resource.final DependencygetDependency(DependencyName name) Get details about a dependency resource in the API hub.final DependencygetDependency(GetDependencyRequest request) Get details about a dependency resource in the API hub.final DependencygetDependency(String name) Get details about a dependency resource in the API hub.Get details about a dependency resource in the API hub.final LocationgetLocation(GetLocationRequest request) Gets information about a location.Gets information about a location.getStub()booleanbooleanlistDependencies(ListDependenciesRequest request) List dependencies based on the provided filter and pagination parameters.listDependencies(LocationName parent) List dependencies based on the provided filter and pagination parameters.listDependencies(String parent) List dependencies based on the provided filter and pagination parameters.List dependencies based on the provided filter and pagination parameters.List dependencies based on the provided filter and pagination parameters.listLocations(ListLocationsRequest request) Lists information about the supported locations for this service.Lists information about the supported locations for this service.Lists information about the supported locations for this service.voidshutdown()voidfinal DependencyupdateDependency(Dependency dependency, com.google.protobuf.FieldMask updateMask) Update a dependency based on the [update_mask][google.cloud.apihub.v1.UpdateDependencyRequest.update_mask] provided in the request.final DependencyupdateDependency(UpdateDependencyRequest request) Update a dependency based on the [update_mask][google.cloud.apihub.v1.UpdateDependencyRequest.update_mask] provided in the request.Update a dependency based on the [update_mask][google.cloud.apihub.v1.UpdateDependencyRequest.update_mask] provided in the request.
-
Constructor Details
-
ApiHubDependenciesClient
Constructs an instance of ApiHubDependenciesClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.- Throws:
IOException
-
ApiHubDependenciesClient
-
-
Method Details
-
create
Constructs an instance of ApiHubDependenciesClient with default settings.- Throws:
IOException
-
create
public static final ApiHubDependenciesClient create(ApiHubDependenciesSettings settings) throws IOException Constructs an instance of ApiHubDependenciesClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.- Throws:
IOException
-
create
Constructs an instance of ApiHubDependenciesClient, using the given stub for making calls. This is for advanced usage - prefer using create(ApiHubDependenciesSettings). -
getSettings
-
getStub
-
createDependency
public final Dependency createDependency(LocationName parent, Dependency dependency, String dependencyId) Create a dependency between two entities in the API hub.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 (ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); Dependency dependency = Dependency.newBuilder().build(); String dependencyId = "dependencyId503788998"; Dependency response = apiHubDependenciesClient.createDependency(parent, dependency, dependencyId); }- Parameters:
parent- Required. The parent resource for the dependency resource. Format: `projects/{project}/locations/{location}`dependency- Required. The dependency resource to create.dependencyId- Optional. The ID to use for the dependency resource, which will become the final component of the dependency's resource name. This field is optional.- If provided, the same will be used. The service will throw an error if duplicate id is provided by the client.
- If not provided, a system generated id will be used.
This value should be 4-500 characters, and valid characters are `[a-z][A-Z][0-9]-_`.
- Throws:
ApiException- if the remote call fails
-
createDependency
Create a dependency between two entities in the API hub.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 (ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); Dependency dependency = Dependency.newBuilder().build(); String dependencyId = "dependencyId503788998"; Dependency response = apiHubDependenciesClient.createDependency(parent, dependency, dependencyId); }- Parameters:
parent- Required. The parent resource for the dependency resource. Format: `projects/{project}/locations/{location}`dependency- Required. The dependency resource to create.dependencyId- Optional. The ID to use for the dependency resource, which will become the final component of the dependency's resource name. This field is optional.- If provided, the same will be used. The service will throw an error if duplicate id is provided by the client.
- If not provided, a system generated id will be used.
This value should be 4-500 characters, and valid characters are `[a-z][A-Z][0-9]-_`.
- Throws:
ApiException- if the remote call fails
-
createDependency
Create a dependency between two entities in the API hub.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 (ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.create()) { CreateDependencyRequest request = CreateDependencyRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setDependencyId("dependencyId503788998") .setDependency(Dependency.newBuilder().build()) .build(); Dependency response = apiHubDependenciesClient.createDependency(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createDependencyCallable
Create a dependency between two entities in the API hub.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 (ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.create()) { CreateDependencyRequest request = CreateDependencyRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setDependencyId("dependencyId503788998") .setDependency(Dependency.newBuilder().build()) .build(); ApiFuture<Dependency> future = apiHubDependenciesClient.createDependencyCallable().futureCall(request); // Do something. Dependency response = future.get(); } -
getDependency
Get details about a dependency resource in the API hub.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 (ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.create()) { DependencyName name = DependencyName.of("[PROJECT]", "[LOCATION]", "[DEPENDENCY]"); Dependency response = apiHubDependenciesClient.getDependency(name); }- Parameters:
name- Required. The name of the dependency resource to retrieve. Format: `projects/{project}/locations/{location}/dependencies/{dependency}`- Throws:
ApiException- if the remote call fails
-
getDependency
Get details about a dependency resource in the API hub.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 (ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.create()) { String name = DependencyName.of("[PROJECT]", "[LOCATION]", "[DEPENDENCY]").toString(); Dependency response = apiHubDependenciesClient.getDependency(name); }- Parameters:
name- Required. The name of the dependency resource to retrieve. Format: `projects/{project}/locations/{location}/dependencies/{dependency}`- Throws:
ApiException- if the remote call fails
-
getDependency
Get details about a dependency resource in the API hub.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 (ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.create()) { GetDependencyRequest request = GetDependencyRequest.newBuilder() .setName(DependencyName.of("[PROJECT]", "[LOCATION]", "[DEPENDENCY]").toString()) .build(); Dependency response = apiHubDependenciesClient.getDependency(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getDependencyCallable
Get details about a dependency resource in the API hub.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 (ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.create()) { GetDependencyRequest request = GetDependencyRequest.newBuilder() .setName(DependencyName.of("[PROJECT]", "[LOCATION]", "[DEPENDENCY]").toString()) .build(); ApiFuture<Dependency> future = apiHubDependenciesClient.getDependencyCallable().futureCall(request); // Do something. Dependency response = future.get(); } -
updateDependency
public final Dependency updateDependency(Dependency dependency, com.google.protobuf.FieldMask updateMask) Update a dependency based on the [update_mask][google.cloud.apihub.v1.UpdateDependencyRequest.update_mask] provided in the request.The following fields in the [dependency][google.cloud.apihub.v1.Dependency] can be updated:
- [description][google.cloud.apihub.v1.Dependency.description]
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 (ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.create()) { Dependency dependency = Dependency.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); Dependency response = apiHubDependenciesClient.updateDependency(dependency, updateMask); }- Parameters:
dependency- Required. The dependency resource to update.The dependency's `name` field is used to identify the dependency to update. Format: `projects/{project}/locations/{location}/dependencies/{dependency}`
updateMask- Required. The list of fields to update.- Throws:
ApiException- if the remote call fails
-
updateDependency
Update a dependency based on the [update_mask][google.cloud.apihub.v1.UpdateDependencyRequest.update_mask] provided in the request.The following fields in the [dependency][google.cloud.apihub.v1.Dependency] can be updated:
- [description][google.cloud.apihub.v1.Dependency.description]
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 (ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.create()) { UpdateDependencyRequest request = UpdateDependencyRequest.newBuilder() .setDependency(Dependency.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); Dependency response = apiHubDependenciesClient.updateDependency(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateDependencyCallable
Update a dependency based on the [update_mask][google.cloud.apihub.v1.UpdateDependencyRequest.update_mask] provided in the request.The following fields in the [dependency][google.cloud.apihub.v1.Dependency] can be updated:
- [description][google.cloud.apihub.v1.Dependency.description]
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 (ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.create()) { UpdateDependencyRequest request = UpdateDependencyRequest.newBuilder() .setDependency(Dependency.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ApiFuture<Dependency> future = apiHubDependenciesClient.updateDependencyCallable().futureCall(request); // Do something. Dependency response = future.get(); } -
deleteDependency
Delete the dependency resource.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 (ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.create()) { DependencyName name = DependencyName.of("[PROJECT]", "[LOCATION]", "[DEPENDENCY]"); apiHubDependenciesClient.deleteDependency(name); }- Parameters:
name- Required. The name of the dependency resource to delete. Format: `projects/{project}/locations/{location}/dependencies/{dependency}`- Throws:
ApiException- if the remote call fails
-
deleteDependency
Delete the dependency resource.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 (ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.create()) { String name = DependencyName.of("[PROJECT]", "[LOCATION]", "[DEPENDENCY]").toString(); apiHubDependenciesClient.deleteDependency(name); }- Parameters:
name- Required. The name of the dependency resource to delete. Format: `projects/{project}/locations/{location}/dependencies/{dependency}`- Throws:
ApiException- if the remote call fails
-
deleteDependency
Delete the dependency resource.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 (ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.create()) { DeleteDependencyRequest request = DeleteDependencyRequest.newBuilder() .setName(DependencyName.of("[PROJECT]", "[LOCATION]", "[DEPENDENCY]").toString()) .build(); apiHubDependenciesClient.deleteDependency(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteDependencyCallable
public final UnaryCallable<DeleteDependencyRequest,com.google.protobuf.Empty> deleteDependencyCallable()Delete the dependency resource.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 (ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.create()) { DeleteDependencyRequest request = DeleteDependencyRequest.newBuilder() .setName(DependencyName.of("[PROJECT]", "[LOCATION]", "[DEPENDENCY]").toString()) .build(); ApiFuture<Empty> future = apiHubDependenciesClient.deleteDependencyCallable().futureCall(request); // Do something. future.get(); } -
listDependencies
public final ApiHubDependenciesClient.ListDependenciesPagedResponse listDependencies(LocationName parent) List dependencies based on the provided filter and pagination parameters.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 (ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (Dependency element : apiHubDependenciesClient.listDependencies(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent which owns this collection of dependency resources. Format: `projects/{project}/locations/{location}`- Throws:
ApiException- if the remote call fails
-
listDependencies
List dependencies based on the provided filter and pagination parameters.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 (ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (Dependency element : apiHubDependenciesClient.listDependencies(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent which owns this collection of dependency resources. Format: `projects/{project}/locations/{location}`- Throws:
ApiException- if the remote call fails
-
listDependencies
public final ApiHubDependenciesClient.ListDependenciesPagedResponse listDependencies(ListDependenciesRequest request) List dependencies based on the provided filter and pagination parameters.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 (ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.create()) { ListDependenciesRequest request = ListDependenciesRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (Dependency element : apiHubDependenciesClient.listDependencies(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listDependenciesPagedCallable
public final UnaryCallable<ListDependenciesRequest,ApiHubDependenciesClient.ListDependenciesPagedResponse> listDependenciesPagedCallable()List dependencies based on the provided filter and pagination parameters.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 (ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.create()) { ListDependenciesRequest request = ListDependenciesRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<Dependency> future = apiHubDependenciesClient.listDependenciesPagedCallable().futureCall(request); // Do something. for (Dependency element : future.get().iterateAll()) { // doThingsWith(element); } } -
listDependenciesCallable
public final UnaryCallable<ListDependenciesRequest,ListDependenciesResponse> listDependenciesCallable()List dependencies based on the provided filter and pagination parameters.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 (ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.create()) { ListDependenciesRequest request = ListDependenciesRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListDependenciesResponse response = apiHubDependenciesClient.listDependenciesCallable().call(request); for (Dependency element : response.getDependenciesList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
listLocations
public final ApiHubDependenciesClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request) Lists information about the supported locations for this service.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (Location element : apiHubDependenciesClient.listLocations(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listLocationsPagedCallable
public final UnaryCallable<ListLocationsRequest,ApiHubDependenciesClient.ListLocationsPagedResponse> listLocationsPagedCallable()Lists information about the supported locations for this service.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<Location> future = apiHubDependenciesClient.listLocationsPagedCallable().futureCall(request); // Do something. for (Location element : future.get().iterateAll()) { // doThingsWith(element); } } -
listLocationsCallable
Lists information about the supported locations for this service.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListLocationsResponse response = apiHubDependenciesClient.listLocationsCallable().call(request); for (Location element : response.getLocationsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getLocation
Gets information about a location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); Location response = apiHubDependenciesClient.getLocation(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getLocationCallable
Gets information about a location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); ApiFuture<Location> future = apiHubDependenciesClient.getLocationCallable().futureCall(request); // Do something. Location response = future.get(); } -
close
public final void close()- Specified by:
closein interfaceAutoCloseable
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceBackgroundResource
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdownin interfaceBackgroundResource
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminatedin interfaceBackgroundResource
-
shutdownNow
public void shutdownNow()- Specified by:
shutdownNowin interfaceBackgroundResource
-
awaitTermination
- Specified by:
awaitTerminationin interfaceBackgroundResource- Throws:
InterruptedException
-