GitHub Repository | Product Reference |
Service Description: This service exposes methods used to manage DiscoveredApiObservations and DiscoveredApiOperations.
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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
DiscoveredApiObservationName name =
DiscoveredApiObservationName.of(
"[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]");
DiscoveredApiObservation response = apiHubDiscoveryClient.getDiscoveredApiObservation(name);
}
Note: close() needs to be called on the ApiHubDiscoveryClient 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 |
---|---|---|
ListDiscoveredApiObservations |
Lists all the DiscoveredAPIObservations in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetDiscoveredApiObservation |
Gets a DiscoveredAPIObservation in a given project, location and ApiObservation. |
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.
|
ListDiscoveredApiOperations |
Lists all the DiscoveredAPIOperations in a given project, location and ApiObservation. |
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.
|
GetDiscoveredApiOperation |
Gets a DiscoveredAPIOperation in a given project, location, ApiObservation and ApiOperation. |
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 ApiHubDiscoverySettings 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
ApiHubDiscoverySettings apiHubDiscoverySettings =
ApiHubDiscoverySettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
ApiHubDiscoveryClient apiHubDiscoveryClient =
ApiHubDiscoveryClient.create(apiHubDiscoverySettings);
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
ApiHubDiscoverySettings apiHubDiscoverySettings =
ApiHubDiscoverySettings.newBuilder().setEndpoint(myEndpoint).build();
ApiHubDiscoveryClient apiHubDiscoveryClient =
ApiHubDiscoveryClient.create(apiHubDiscoverySettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
public static final ApiHubDiscoveryClient create()
Constructs an instance of ApiHubDiscoveryClient with default settings.
Returns | |
---|---|
Type | Description |
ApiHubDiscoveryClient |
Exceptions | |
---|---|
Type | Description |
IOException |
create(ApiHubDiscoverySettings settings)
public static final ApiHubDiscoveryClient create(ApiHubDiscoverySettings settings)
Constructs an instance of ApiHubDiscoveryClient, 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 |
ApiHubDiscoverySettings |
Returns | |
---|---|
Type | Description |
ApiHubDiscoveryClient |
Exceptions | |
---|---|
Type | Description |
IOException |
create(ApiHubDiscoveryStub stub)
public static final ApiHubDiscoveryClient create(ApiHubDiscoveryStub stub)
Constructs an instance of ApiHubDiscoveryClient, using the given stub for making calls. This is for advanced usage - prefer using create(ApiHubDiscoverySettings).
Parameter | |
---|---|
Name | Description |
stub |
ApiHubDiscoveryStub |
Returns | |
---|---|
Type | Description |
ApiHubDiscoveryClient |
Constructors
ApiHubDiscoveryClient(ApiHubDiscoverySettings settings)
protected ApiHubDiscoveryClient(ApiHubDiscoverySettings settings)
Constructs an instance of ApiHubDiscoveryClient, 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 |
ApiHubDiscoverySettings |
ApiHubDiscoveryClient(ApiHubDiscoveryStub stub)
protected ApiHubDiscoveryClient(ApiHubDiscoveryStub stub)
Parameter | |
---|---|
Name | Description |
stub |
ApiHubDiscoveryStub |
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()
getDiscoveredApiObservation(DiscoveredApiObservationName name)
public final DiscoveredApiObservation getDiscoveredApiObservation(DiscoveredApiObservationName name)
Gets a DiscoveredAPIObservation in a given project, location and ApiObservation.
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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
DiscoveredApiObservationName name =
DiscoveredApiObservationName.of(
"[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]");
DiscoveredApiObservation response = apiHubDiscoveryClient.getDiscoveredApiObservation(name);
}
Parameter | |
---|---|
Name | Description |
name |
DiscoveredApiObservationName Required. The name of the DiscoveredApiObservation to retrieve. Format: projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation} |
Returns | |
---|---|
Type | Description |
DiscoveredApiObservation |
getDiscoveredApiObservation(GetDiscoveredApiObservationRequest request)
public final DiscoveredApiObservation getDiscoveredApiObservation(GetDiscoveredApiObservationRequest request)
Gets a DiscoveredAPIObservation in a given project, location and ApiObservation.
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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
GetDiscoveredApiObservationRequest request =
GetDiscoveredApiObservationRequest.newBuilder()
.setName(
DiscoveredApiObservationName.of(
"[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]")
.toString())
.build();
DiscoveredApiObservation response =
apiHubDiscoveryClient.getDiscoveredApiObservation(request);
}
Parameter | |
---|---|
Name | Description |
request |
GetDiscoveredApiObservationRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
DiscoveredApiObservation |
getDiscoveredApiObservation(String name)
public final DiscoveredApiObservation getDiscoveredApiObservation(String name)
Gets a DiscoveredAPIObservation in a given project, location and ApiObservation.
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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
String name =
DiscoveredApiObservationName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]")
.toString();
DiscoveredApiObservation response = apiHubDiscoveryClient.getDiscoveredApiObservation(name);
}
Parameter | |
---|---|
Name | Description |
name |
String Required. The name of the DiscoveredApiObservation to retrieve. Format: projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation} |
Returns | |
---|---|
Type | Description |
DiscoveredApiObservation |
getDiscoveredApiObservationCallable()
public final UnaryCallable<GetDiscoveredApiObservationRequest,DiscoveredApiObservation> getDiscoveredApiObservationCallable()
Gets a DiscoveredAPIObservation in a given project, location and ApiObservation.
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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
GetDiscoveredApiObservationRequest request =
GetDiscoveredApiObservationRequest.newBuilder()
.setName(
DiscoveredApiObservationName.of(
"[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]")
.toString())
.build();
ApiFuture<DiscoveredApiObservation> future =
apiHubDiscoveryClient.getDiscoveredApiObservationCallable().futureCall(request);
// Do something.
DiscoveredApiObservation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GetDiscoveredApiObservationRequest,DiscoveredApiObservation> |
getDiscoveredApiOperation(DiscoveredApiOperationName name)
public final DiscoveredApiOperation getDiscoveredApiOperation(DiscoveredApiOperationName name)
Gets a DiscoveredAPIOperation in a given project, location, ApiObservation and ApiOperation.
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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
DiscoveredApiOperationName name =
DiscoveredApiOperationName.of(
"[PROJECT]",
"[LOCATION]",
"[DISCOVERED_API_OBSERVATION]",
"[DISCOVERED_API_OPERATION]");
DiscoveredApiOperation response = apiHubDiscoveryClient.getDiscoveredApiOperation(name);
}
Parameter | |
---|---|
Name | Description |
name |
DiscoveredApiOperationName Required. The name of the DiscoveredApiOperation to retrieve. Format: projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation}/discoveredApiOperations/{discovered_api_operation} |
Returns | |
---|---|
Type | Description |
DiscoveredApiOperation |
getDiscoveredApiOperation(GetDiscoveredApiOperationRequest request)
public final DiscoveredApiOperation getDiscoveredApiOperation(GetDiscoveredApiOperationRequest request)
Gets a DiscoveredAPIOperation in a given project, location, ApiObservation and ApiOperation.
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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
GetDiscoveredApiOperationRequest request =
GetDiscoveredApiOperationRequest.newBuilder()
.setName(
DiscoveredApiOperationName.of(
"[PROJECT]",
"[LOCATION]",
"[DISCOVERED_API_OBSERVATION]",
"[DISCOVERED_API_OPERATION]")
.toString())
.build();
DiscoveredApiOperation response = apiHubDiscoveryClient.getDiscoveredApiOperation(request);
}
Parameter | |
---|---|
Name | Description |
request |
GetDiscoveredApiOperationRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
DiscoveredApiOperation |
getDiscoveredApiOperation(String name)
public final DiscoveredApiOperation getDiscoveredApiOperation(String name)
Gets a DiscoveredAPIOperation in a given project, location, ApiObservation and ApiOperation.
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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
String name =
DiscoveredApiOperationName.of(
"[PROJECT]",
"[LOCATION]",
"[DISCOVERED_API_OBSERVATION]",
"[DISCOVERED_API_OPERATION]")
.toString();
DiscoveredApiOperation response = apiHubDiscoveryClient.getDiscoveredApiOperation(name);
}
Parameter | |
---|---|
Name | Description |
name |
String Required. The name of the DiscoveredApiOperation to retrieve. Format: projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation}/discoveredApiOperations/{discovered_api_operation} |
Returns | |
---|---|
Type | Description |
DiscoveredApiOperation |
getDiscoveredApiOperationCallable()
public final UnaryCallable<GetDiscoveredApiOperationRequest,DiscoveredApiOperation> getDiscoveredApiOperationCallable()
Gets a DiscoveredAPIOperation in a given project, location, ApiObservation and ApiOperation.
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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
GetDiscoveredApiOperationRequest request =
GetDiscoveredApiOperationRequest.newBuilder()
.setName(
DiscoveredApiOperationName.of(
"[PROJECT]",
"[LOCATION]",
"[DISCOVERED_API_OBSERVATION]",
"[DISCOVERED_API_OPERATION]")
.toString())
.build();
ApiFuture<DiscoveredApiOperation> future =
apiHubDiscoveryClient.getDiscoveredApiOperationCallable().futureCall(request);
// Do something.
DiscoveredApiOperation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GetDiscoveredApiOperationRequest,DiscoveredApiOperation> |
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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
Location response = apiHubDiscoveryClient.getLocation(request);
}
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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
ApiFuture<Location> future = apiHubDiscoveryClient.getLocationCallable().futureCall(request);
// Do something.
Location response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> |
getSettings()
public final ApiHubDiscoverySettings getSettings()
Returns | |
---|---|
Type | Description |
ApiHubDiscoverySettings |
getStub()
public ApiHubDiscoveryStub getStub()
Returns | |
---|---|
Type | Description |
ApiHubDiscoveryStub |
isShutdown()
public boolean isShutdown()
Returns | |
---|---|
Type | Description |
boolean |
isTerminated()
public boolean isTerminated()
Returns | |
---|---|
Type | Description |
boolean |
listDiscoveredApiObservations(ListDiscoveredApiObservationsRequest request)
public final ApiHubDiscoveryClient.ListDiscoveredApiObservationsPagedResponse listDiscoveredApiObservations(ListDiscoveredApiObservationsRequest request)
Lists all the DiscoveredAPIObservations in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
ListDiscoveredApiObservationsRequest request =
ListDiscoveredApiObservationsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (DiscoveredApiObservation element :
apiHubDiscoveryClient.listDiscoveredApiObservations(request).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
request |
ListDiscoveredApiObservationsRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
ApiHubDiscoveryClient.ListDiscoveredApiObservationsPagedResponse |
listDiscoveredApiObservations(LocationName parent)
public final ApiHubDiscoveryClient.ListDiscoveredApiObservationsPagedResponse listDiscoveredApiObservations(LocationName parent)
Lists all the DiscoveredAPIObservations in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (DiscoveredApiObservation element :
apiHubDiscoveryClient.listDiscoveredApiObservations(parent).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
parent |
LocationName Required. The parent, which owns this collection of ApiObservations. Format: projects/{project}/locations/{location} |
Returns | |
---|---|
Type | Description |
ApiHubDiscoveryClient.ListDiscoveredApiObservationsPagedResponse |
listDiscoveredApiObservations(String parent)
public final ApiHubDiscoveryClient.ListDiscoveredApiObservationsPagedResponse listDiscoveredApiObservations(String parent)
Lists all the DiscoveredAPIObservations in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (DiscoveredApiObservation element :
apiHubDiscoveryClient.listDiscoveredApiObservations(parent).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
parent |
String Required. The parent, which owns this collection of ApiObservations. Format: projects/{project}/locations/{location} |
Returns | |
---|---|
Type | Description |
ApiHubDiscoveryClient.ListDiscoveredApiObservationsPagedResponse |
listDiscoveredApiObservationsCallable()
public final UnaryCallable<ListDiscoveredApiObservationsRequest,ListDiscoveredApiObservationsResponse> listDiscoveredApiObservationsCallable()
Lists all the DiscoveredAPIObservations in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
ListDiscoveredApiObservationsRequest request =
ListDiscoveredApiObservationsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListDiscoveredApiObservationsResponse response =
apiHubDiscoveryClient.listDiscoveredApiObservationsCallable().call(request);
for (DiscoveredApiObservation element : response.getDiscoveredApiObservationsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListDiscoveredApiObservationsRequest,ListDiscoveredApiObservationsResponse> |
listDiscoveredApiObservationsPagedCallable()
public final UnaryCallable<ListDiscoveredApiObservationsRequest,ApiHubDiscoveryClient.ListDiscoveredApiObservationsPagedResponse> listDiscoveredApiObservationsPagedCallable()
Lists all the DiscoveredAPIObservations in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
ListDiscoveredApiObservationsRequest request =
ListDiscoveredApiObservationsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<DiscoveredApiObservation> future =
apiHubDiscoveryClient.listDiscoveredApiObservationsPagedCallable().futureCall(request);
// Do something.
for (DiscoveredApiObservation element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListDiscoveredApiObservationsRequest,ListDiscoveredApiObservationsPagedResponse> |
listDiscoveredApiOperations(DiscoveredApiObservationName parent)
public final ApiHubDiscoveryClient.ListDiscoveredApiOperationsPagedResponse listDiscoveredApiOperations(DiscoveredApiObservationName parent)
Lists all the DiscoveredAPIOperations in a given project, location and ApiObservation.
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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
DiscoveredApiObservationName parent =
DiscoveredApiObservationName.of(
"[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]");
for (DiscoveredApiOperation element :
apiHubDiscoveryClient.listDiscoveredApiOperations(parent).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
parent |
DiscoveredApiObservationName Required. The parent, which owns this collection of DiscoveredApiOperations. Format: projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation} |
Returns | |
---|---|
Type | Description |
ApiHubDiscoveryClient.ListDiscoveredApiOperationsPagedResponse |
listDiscoveredApiOperations(ListDiscoveredApiOperationsRequest request)
public final ApiHubDiscoveryClient.ListDiscoveredApiOperationsPagedResponse listDiscoveredApiOperations(ListDiscoveredApiOperationsRequest request)
Lists all the DiscoveredAPIOperations in a given project, location and ApiObservation.
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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
ListDiscoveredApiOperationsRequest request =
ListDiscoveredApiOperationsRequest.newBuilder()
.setParent(
DiscoveredApiObservationName.of(
"[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (DiscoveredApiOperation element :
apiHubDiscoveryClient.listDiscoveredApiOperations(request).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
request |
ListDiscoveredApiOperationsRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
ApiHubDiscoveryClient.ListDiscoveredApiOperationsPagedResponse |
listDiscoveredApiOperations(String parent)
public final ApiHubDiscoveryClient.ListDiscoveredApiOperationsPagedResponse listDiscoveredApiOperations(String parent)
Lists all the DiscoveredAPIOperations in a given project, location and ApiObservation.
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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
String parent =
DiscoveredApiObservationName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]")
.toString();
for (DiscoveredApiOperation element :
apiHubDiscoveryClient.listDiscoveredApiOperations(parent).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
parent |
String Required. The parent, which owns this collection of DiscoveredApiOperations. Format: projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation} |
Returns | |
---|---|
Type | Description |
ApiHubDiscoveryClient.ListDiscoveredApiOperationsPagedResponse |
listDiscoveredApiOperationsCallable()
public final UnaryCallable<ListDiscoveredApiOperationsRequest,ListDiscoveredApiOperationsResponse> listDiscoveredApiOperationsCallable()
Lists all the DiscoveredAPIOperations in a given project, location and ApiObservation.
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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
ListDiscoveredApiOperationsRequest request =
ListDiscoveredApiOperationsRequest.newBuilder()
.setParent(
DiscoveredApiObservationName.of(
"[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListDiscoveredApiOperationsResponse response =
apiHubDiscoveryClient.listDiscoveredApiOperationsCallable().call(request);
for (DiscoveredApiOperation element : response.getDiscoveredApiOperationsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListDiscoveredApiOperationsRequest,ListDiscoveredApiOperationsResponse> |
listDiscoveredApiOperationsPagedCallable()
public final UnaryCallable<ListDiscoveredApiOperationsRequest,ApiHubDiscoveryClient.ListDiscoveredApiOperationsPagedResponse> listDiscoveredApiOperationsPagedCallable()
Lists all the DiscoveredAPIOperations in a given project, location and ApiObservation.
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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
ListDiscoveredApiOperationsRequest request =
ListDiscoveredApiOperationsRequest.newBuilder()
.setParent(
DiscoveredApiObservationName.of(
"[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<DiscoveredApiOperation> future =
apiHubDiscoveryClient.listDiscoveredApiOperationsPagedCallable().futureCall(request);
// Do something.
for (DiscoveredApiOperation element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListDiscoveredApiOperationsRequest,ListDiscoveredApiOperationsPagedResponse> |
listLocations(ListLocationsRequest request)
public final ApiHubDiscoveryClient.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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Location element : apiHubDiscoveryClient.listLocations(request).iterateAll()) {
// doThingsWith(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 |
ApiHubDiscoveryClient.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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListLocationsResponse response =
apiHubDiscoveryClient.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,ApiHubDiscoveryClient.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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Location> future =
apiHubDiscoveryClient.listLocationsPagedCallable().futureCall(request);
// Do something.
for (Location element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<com.google.cloud.location.ListLocationsRequest,ListLocationsPagedResponse> |
shutdown()
public void shutdown()
shutdownNow()
public void shutdownNow()