GitHub Repository | Product Reference |
Service Description: This service provides methods for various operations related to a Dependency in the API hub.
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, d
ependency, 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 provided in the request. The following fields in the 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.
Static Methods
create()
public static final ApiHubDependenciesClient create()
Constructs an instance of ApiHubDependenciesClient with default settings.
Returns | |
---|---|
Type | Description |
ApiHubDependenciesClient |
Exceptions | |
---|---|
Type | Description |
IOException |
create(ApiHubDependenciesSettings settings)
public static final ApiHubDependenciesClient create(ApiHubDependenciesSettings settings)
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.
Parameter | |
---|---|
Name | Description |
settings |
ApiHubDependenciesSettings |
Returns | |
---|---|
Type | Description |
ApiHubDependenciesClient |
Exceptions | |
---|---|
Type | Description |
IOException |
create(ApiHubDependenciesStub stub)
public static final ApiHubDependenciesClient create(ApiHubDependenciesStub stub)
Constructs an instance of ApiHubDependenciesClient, using the given stub for making calls. This is for advanced usage - prefer using create(ApiHubDependenciesSettings).
Parameter | |
---|---|
Name | Description |
stub |
ApiHubDependenciesStub |
Returns | |
---|---|
Type | Description |
ApiHubDependenciesClient |
Constructors
ApiHubDependenciesClient(ApiHubDependenciesSettings settings)
protected ApiHubDependenciesClient(ApiHubDependenciesSettings settings)
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.
Parameter | |
---|---|
Name | Description |
settings |
ApiHubDependenciesSettings |
ApiHubDependenciesClient(ApiHubDependenciesStub stub)
protected ApiHubDependenciesClient(ApiHubDependenciesStub stub)
Parameter | |
---|---|
Name | Description |
stub |
ApiHubDependenciesStub |
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 |
close()
public final void close()
createDependency(CreateDependencyRequest request)
public final Dependency createDependency(CreateDependencyRequest request)
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.c
reateDependency(request);
}
Parameter | |
---|---|
Name | Description |
request |
CreateDependencyRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
Dependency |
createDependency(LocationName parent, Dependency dependency, String dependencyId)
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, d
ependency, dependencyId);
}
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The parent resource for the dependency resource. Format:
|
dependency |
Dependency Required. The dependency resource to create. |
dependencyId |
String 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.
This value should be 4-500 characters, and valid characters are |
Returns | |
---|---|
Type | Description |
Dependency |
createDependency(String parent, Dependency dependency, String dependencyId)
public final Dependency createDependency(String 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()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
Dependency dependency = Dependency.newBuilder().build();
String dependencyId = "dependencyId503788998";
Dependency response =
apiHubDependenciesClient.createDependency(parent, d
ependency, dependencyId);
}
Parameters | |
---|---|
Name | Description |
parent |
String Required. The parent resource for the dependency resource. Format:
|
dependency |
Dependency Required. The dependency resource to create. |
dependencyId |
String 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.
This value should be 4-500 characters, and valid characters are |
Returns | |
---|---|
Type | Description |
Dependency |
createDependencyCallable()
public final UnaryCallable<CreateDependencyRequest,Dependency> 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())
< .b>uild();
ApiFutureDependency future =
apiHubDependenciesClient.createDependencyCallable().futureCall(request);
// Do something.
Dependency
response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateDependencyRequest,Dependency> |
deleteDependency(DeleteDependencyRequest request)
public final void deleteDependency(DeleteDependencyRequest request)
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.d
eleteDependency(request);
}
Parameter | |
---|---|
Name | Description |
request |
DeleteDependencyRequest The request object containing all of the parameters for the API call. |
deleteDependency(DependencyName name)
public final void deleteDependency(DependencyName name)
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]");
apiHubDependenciesClien
t.deleteDependency(name);
}
Parameter | |
---|---|
Name | Description |
name |
DependencyName Required. The name of the dependency resource to delete. Format:
|
deleteDependency(String name)
public final void deleteDependency(String name)
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();
apiHubDependenciesClien
t.deleteDependency(name);
}
Parameter | |
---|---|
Name | Description |
name |
String Required. The name of the dependency resource to delete. Format:
|
deleteDependencyCallable()
public final UnaryCallable<DeleteDependencyRequest,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();
ApiFutureEmpty future =
apiHubDependenciesClient.deleteDependencyCallable().futureCall(request);
// Do so
mething.
future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeleteDependencyRequest,Empty> |
getDependency(DependencyName name)
public final Dependency getDependency(DependencyName name)
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 = apiHubDependenciesCl
ient.getDependency(name);
}
Parameter | |
---|---|
Name | Description |
name |
DependencyName Required. The name of the dependency resource to retrieve. Format:
|
Returns | |
---|---|
Type | Description |
Dependency |
getDependency(GetDependencyRequest request)
public final Dependency getDependency(GetDependencyRequest request)
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 = apiHubDependenciesClien
t.getDependency(request);
}
Parameter | |
---|---|
Name | Description |
request |
GetDependencyRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
Dependency |
getDependency(String name)
public final Dependency getDependency(String name)
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 = apiHubDependenciesCl
ient.getDependency(name);
}
Parameter | |
---|---|
Name | Description |
name |
String Required. The name of the dependency resource to retrieve. Format:
|
Returns | |
---|---|
Type | Description |
Dependency |
getDependencyCallable()
public final UnaryCallable<GetDependencyRequest,Dependency> 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())
< .b>uild();
ApiFutureDependency future =
apiHubDependenciesClient.getDependencyCallable().futureCall(request);
// Do something.
Dependency
response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GetDependencyRequest,Dependency> |
getLocation(GetLocationRequest request)
public final Location getLocation(GetLocationRequest request)
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(requ
est);
}
Parameter | |
---|---|
Name | Description |
request |
com.google.cloud.location.GetLocationRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
com.google.cloud.location.Location |
getLocationCallable()
public final UnaryCallable<GetLocationRequest,Location> 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();
< ApiFutu>reLocation future =
apiHubDependenciesClient.getLocationCallable().futureCall(request);
// Do something.
Location response = future.g
et();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> |
getSettings()
public final ApiHubDependenciesSettings getSettings()
Returns | |
---|---|
Type | Description |
ApiHubDependenciesSettings |
getStub()
public ApiHubDependenciesStub getStub()
Returns | |
---|---|
Type | Description |
ApiHubDependenciesStub |
isShutdown()
public boolean isShutdown()
Returns | |
---|---|
Type | Description |
boolean |
isTerminated()
public boolean isTerminated()
Returns | |
---|---|
Type | Description |
boolean |
listDependencies(ListDependenciesRequest request)
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);
}
}
Parameter | |
---|---|
Name | Description |
request |
ListDependenciesRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
ApiHubDependenciesClient.ListDependenciesPagedResponse |
listDependencies(LocationName parent)
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);
}
}
Parameter | |
---|---|
Name | Description |
parent |
LocationName Required. The parent which owns this collection of dependency resources. Format:
|
Returns | |
---|---|
Type | Description |
ApiHubDependenciesClient.ListDependenciesPagedResponse |
listDependencies(String parent)
public final ApiHubDependenciesClient.ListDependenciesPagedResponse listDependencies(String 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()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (Dependency element : apiHubDependenciesClient.listDependencies(parent).iterateAll()) {
// doThingsWith
(element);
}
}
Parameter | |
---|---|
Name | Description |
parent |
String Required. The parent which owns this collection of dependency resources. Format:
|
Returns | |
---|---|
Type | Description |
ApiHubDependenciesClient.ListDependenciesPagedResponse |
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;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListDependenciesRequest,ListDependenciesResponse> |
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&<quot;)
> .build();
ApiFutureDependency future =
apiHubDependenciesClient.listDependenciesPagedCallable().futureCall(request);
// Do something.
for (Dependency element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListDependenciesRequest,ListDependenciesPagedResponse> |
listLocations(ListLocationsRequest request)
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()) {
// do
ThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
request |
com.google.cloud.location.ListLocationsRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
ApiHubDependenciesClient.ListLocationsPagedResponse |
listLocationsCallable()
public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> 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;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse> |
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();
ApiFutureLocation future =
apiHubDependenciesClient.listLocationsPagedCallable().futureCall(request);
// Do something.
for (Location element : future.get().iterateAll()) {
// do
ThingsWith(element);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<com.google.cloud.location.ListLocationsRequest,ListLocationsPagedResponse> |
shutdown()
public void shutdown()
shutdownNow()
public void shutdownNow()
updateDependency(Dependency dependency, FieldMask updateMask)
public final Dependency updateDependency(Dependency dependency, FieldMask updateMask)
Update a dependency based on the update_mask provided in the request.
The following fields in the dependency can be updated:
- 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 | |
---|---|
Name | Description |
dependency |
Dependency Required. The dependency resource to update. The dependency's |
updateMask |
FieldMask Required. The list of fields to update. |
Returns | |
---|---|
Type | Description |
Dependency |
updateDependency(UpdateDependencyRequest request)
public final Dependency updateDependency(UpdateDependencyRequest request)
Update a dependency based on the update_mask provided in the request.
The following fields in the dependency can be updated:
- 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);
}
Parameter | |
---|---|
Name | Description |
request |
UpdateDependencyRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
Dependency |
updateDependencyCallable()
public final UnaryCallable<UpdateDependencyRequest,Dependency> updateDependencyCallable()
Update a dependency based on the update_mask provided in the request.
The following fields in the dependency can be updated:
- 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();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<UpdateDependencyRequest,Dependency> |