Class ApiHubCurateClient (0.28.0)

GitHub RepositoryProduct Reference

Service Description: This service is used for managing curations for processing API data consumed from collect layer.

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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   Curation curation = Curation.newBuilder().build();
   String curationId = "curationId1428017328";
   Curation response = apiHubCurateClient.createCuration(parent, curation, curationId);
 }
 

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

Methods
Method Description Method Variants

CreateCuration

Create a curation resource in the API hub. Once a curation resource is created, plugin instances can start using it.

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

  • createCuration(CreateCurationRequest request)

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

  • createCuration(LocationName parent, Curation curation, String curationId)

  • createCuration(String parent, Curation curation, String curationId)

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

  • createCurationCallable()

GetCuration

Get curation resource details.

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

  • getCuration(GetCurationRequest request)

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

  • getCuration(CurationName name)

  • getCuration(String name)

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

  • getCurationCallable()

ListCurations

List curation resources in the API hub.

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

  • listCurations(ListCurationsRequest request)

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

  • listCurations(LocationName parent)

  • listCurations(String parent)

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

  • listCurationsPagedCallable()

  • listCurationsCallable()

UpdateCuration

Update a curation resource in the API hub. The following fields in the curation can be updated:

  • display_name
  • description

The update_mask should be used to specify the fields being updated.

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

  • updateCuration(UpdateCurationRequest request)

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

  • updateCuration(Curation curation, FieldMask updateMask)

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

  • updateCurationCallable()

DeleteCuration

Delete a curation resource in the API hub. A curation can only be deleted if it's not being used by any plugin instance.

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

  • deleteCuration(DeleteCurationRequest request)

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

  • deleteCuration(CurationName name)

  • deleteCuration(String name)

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

  • deleteCurationCallable()

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.

  • listLocations(ListLocationsRequest request)

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

  • listLocationsPagedCallable()

  • listLocationsCallable()

GetLocation

Gets information about a location.

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

  • getLocation(GetLocationRequest request)

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

  • getLocationCallable()

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 ApiHubCurateSettings 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
 ApiHubCurateSettings apiHubCurateSettings =
     ApiHubCurateSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create(apiHubCurateSettings);
 

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
 ApiHubCurateSettings apiHubCurateSettings =
     ApiHubCurateSettings.newBuilder().setEndpoint(myEndpoint).build();
 ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create(apiHubCurateSettings);
 

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

Inheritance

java.lang.Object > ApiHubCurateClient

Static Methods

create()

public static final ApiHubCurateClient create()

Constructs an instance of ApiHubCurateClient with default settings.

Returns
Type Description
ApiHubCurateClient
Exceptions
Type Description
IOException

create(ApiHubCurateSettings settings)

public static final ApiHubCurateClient create(ApiHubCurateSettings settings)

Constructs an instance of ApiHubCurateClient, 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 ApiHubCurateSettings
Returns
Type Description
ApiHubCurateClient
Exceptions
Type Description
IOException

create(ApiHubCurateStub stub)

public static final ApiHubCurateClient create(ApiHubCurateStub stub)

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

Parameter
Name Description
stub ApiHubCurateStub
Returns
Type Description
ApiHubCurateClient

Constructors

ApiHubCurateClient(ApiHubCurateSettings settings)

protected ApiHubCurateClient(ApiHubCurateSettings settings)

Constructs an instance of ApiHubCurateClient, 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 ApiHubCurateSettings

ApiHubCurateClient(ApiHubCurateStub stub)

protected ApiHubCurateClient(ApiHubCurateStub stub)
Parameter
Name Description
stub ApiHubCurateStub

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()

createCuration(CreateCurationRequest request)

public final Curation createCuration(CreateCurationRequest request)

Create a curation resource in the API hub. Once a curation resource is created, plugin instances can start using it.

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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
   CreateCurationRequest request =
       CreateCurationRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setCurationId("curationId1428017328")
           .setCuration(Curation.newBuilder().build())
           .build();
   Curation response = apiHubCurateClient.createCuration(request);
 }
 
Parameter
Name Description
request CreateCurationRequest

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

Returns
Type Description
Curation

createCuration(LocationName parent, Curation curation, String curationId)

public final Curation createCuration(LocationName parent, Curation curation, String curationId)

Create a curation resource in the API hub. Once a curation resource is created, plugin instances can start using it.

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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   Curation curation = Curation.newBuilder().build();
   String curationId = "curationId1428017328";
   Curation response = apiHubCurateClient.createCuration(parent, curation, curationId);
 }
 
Parameters
Name Description
parent LocationName

Required. The parent resource for the curation resource. Format: projects/{project}/locations/{location}

curation Curation

Required. The curation resource to create.

curationId String

Optional. The ID to use for the curation resource, which will become the final component of the curations's resource name. This field is optional.

  • If provided, the same will be used. The service will throw an error if the specified ID is already used by another curation resource in the API hub.
  • If not provided, a system generated ID will be used.

This value should be 4-500 characters, and valid characters are /a-z[0-9]-_/.

Returns
Type Description
Curation

createCuration(String parent, Curation curation, String curationId)

public final Curation createCuration(String parent, Curation curation, String curationId)

Create a curation resource in the API hub. Once a curation resource is created, plugin instances can start using it.

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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   Curation curation = Curation.newBuilder().build();
   String curationId = "curationId1428017328";
   Curation response = apiHubCurateClient.createCuration(parent, curation, curationId);
 }
 
Parameters
Name Description
parent String

Required. The parent resource for the curation resource. Format: projects/{project}/locations/{location}

curation Curation

Required. The curation resource to create.

curationId String

Optional. The ID to use for the curation resource, which will become the final component of the curations's resource name. This field is optional.

  • If provided, the same will be used. The service will throw an error if the specified ID is already used by another curation resource in the API hub.
  • If not provided, a system generated ID will be used.

This value should be 4-500 characters, and valid characters are /a-z[0-9]-_/.

Returns
Type Description
Curation

createCurationCallable()

public final UnaryCallable<CreateCurationRequest,Curation> createCurationCallable()

Create a curation resource in the API hub. Once a curation resource is created, plugin instances can start using it.

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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
   CreateCurationRequest request =
       CreateCurationRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setCurationId("curationId1428017328")
           .setCuration(Curation.newBuilder().build())
           .build();
   ApiFuture<Curation> future = apiHubCurateClient.createCurationCallable().futureCall(request);
   // Do something.
   Curation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateCurationRequest,Curation>

deleteCuration(CurationName name)

public final void deleteCuration(CurationName name)

Delete a curation resource in the API hub. A curation can only be deleted if it's not being used by any plugin instance.

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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
   CurationName name = CurationName.of("[PROJECT]", "[LOCATION]", "[CURATION]");
   apiHubCurateClient.deleteCuration(name);
 }
 
Parameter
Name Description
name CurationName

Required. The name of the curation resource to delete. Format: projects/{project}/locations/{location}/curations/{curation}

deleteCuration(DeleteCurationRequest request)

public final void deleteCuration(DeleteCurationRequest request)

Delete a curation resource in the API hub. A curation can only be deleted if it's not being used by any plugin instance.

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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
   DeleteCurationRequest request =
       DeleteCurationRequest.newBuilder()
           .setName(CurationName.of("[PROJECT]", "[LOCATION]", "[CURATION]").toString())
           .build();
   apiHubCurateClient.deleteCuration(request);
 }
 
Parameter
Name Description
request DeleteCurationRequest

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

deleteCuration(String name)

public final void deleteCuration(String name)

Delete a curation resource in the API hub. A curation can only be deleted if it's not being used by any plugin instance.

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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
   String name = CurationName.of("[PROJECT]", "[LOCATION]", "[CURATION]").toString();
   apiHubCurateClient.deleteCuration(name);
 }
 
Parameter
Name Description
name String

Required. The name of the curation resource to delete. Format: projects/{project}/locations/{location}/curations/{curation}

deleteCurationCallable()

public final UnaryCallable<DeleteCurationRequest,Empty> deleteCurationCallable()

Delete a curation resource in the API hub. A curation can only be deleted if it's not being used by any plugin instance.

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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
   DeleteCurationRequest request =
       DeleteCurationRequest.newBuilder()
           .setName(CurationName.of("[PROJECT]", "[LOCATION]", "[CURATION]").toString())
           .build();
   ApiFuture<Empty> future = apiHubCurateClient.deleteCurationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteCurationRequest,Empty>

getCuration(CurationName name)

public final Curation getCuration(CurationName name)

Get curation resource details.

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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
   CurationName name = CurationName.of("[PROJECT]", "[LOCATION]", "[CURATION]");
   Curation response = apiHubCurateClient.getCuration(name);
 }
 
Parameter
Name Description
name CurationName

Required. The name of the curation resource to retrieve. Format: projects/{project}/locations/{location}/curations/{curation}

Returns
Type Description
Curation

getCuration(GetCurationRequest request)

public final Curation getCuration(GetCurationRequest request)

Get curation resource details.

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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
   GetCurationRequest request =
       GetCurationRequest.newBuilder()
           .setName(CurationName.of("[PROJECT]", "[LOCATION]", "[CURATION]").toString())
           .build();
   Curation response = apiHubCurateClient.getCuration(request);
 }
 
Parameter
Name Description
request GetCurationRequest

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

Returns
Type Description
Curation

getCuration(String name)

public final Curation getCuration(String name)

Get curation resource details.

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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
   String name = CurationName.of("[PROJECT]", "[LOCATION]", "[CURATION]").toString();
   Curation response = apiHubCurateClient.getCuration(name);
 }
 
Parameter
Name Description
name String

Required. The name of the curation resource to retrieve. Format: projects/{project}/locations/{location}/curations/{curation}

Returns
Type Description
Curation

getCurationCallable()

public final UnaryCallable<GetCurationRequest,Curation> getCurationCallable()

Get curation resource details.

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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
   GetCurationRequest request =
       GetCurationRequest.newBuilder()
           .setName(CurationName.of("[PROJECT]", "[LOCATION]", "[CURATION]").toString())
           .build();
   ApiFuture<Curation> future = apiHubCurateClient.getCurationCallable().futureCall(request);
   // Do something.
   Curation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetCurationRequest,Curation>

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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
   Location response = apiHubCurateClient.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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
   ApiFuture<Location> future = apiHubCurateClient.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 ApiHubCurateSettings getSettings()
Returns
Type Description
ApiHubCurateSettings

getStub()

public ApiHubCurateStub getStub()
Returns
Type Description
ApiHubCurateStub

isShutdown()

public boolean isShutdown()
Returns
Type Description
boolean

isTerminated()

public boolean isTerminated()
Returns
Type Description
boolean

listCurations(ListCurationsRequest request)

public final ApiHubCurateClient.ListCurationsPagedResponse listCurations(ListCurationsRequest request)

List curation resources 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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
   ListCurationsRequest request =
       ListCurationsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (Curation element : apiHubCurateClient.listCurations(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListCurationsRequest

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

Returns
Type Description
ApiHubCurateClient.ListCurationsPagedResponse

listCurations(LocationName parent)

public final ApiHubCurateClient.ListCurationsPagedResponse listCurations(LocationName parent)

List curation resources 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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (Curation element : apiHubCurateClient.listCurations(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent LocationName

Required. The parent, which owns this collection of curation resources. Format: projects/{project}/locations/{location}

Returns
Type Description
ApiHubCurateClient.ListCurationsPagedResponse

listCurations(String parent)

public final ApiHubCurateClient.ListCurationsPagedResponse listCurations(String parent)

List curation resources 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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (Curation element : apiHubCurateClient.listCurations(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent, which owns this collection of curation resources. Format: projects/{project}/locations/{location}

Returns
Type Description
ApiHubCurateClient.ListCurationsPagedResponse

listCurationsCallable()

public final UnaryCallable<ListCurationsRequest,ListCurationsResponse> listCurationsCallable()

List curation resources 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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
   ListCurationsRequest request =
       ListCurationsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListCurationsResponse response = apiHubCurateClient.listCurationsCallable().call(request);
     for (Curation element : response.getCurationsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListCurationsRequest,ListCurationsResponse>

listCurationsPagedCallable()

public final UnaryCallable<ListCurationsRequest,ApiHubCurateClient.ListCurationsPagedResponse> listCurationsPagedCallable()

List curation resources 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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
   ListCurationsRequest request =
       ListCurationsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<Curation> future =
       apiHubCurateClient.listCurationsPagedCallable().futureCall(request);
   // Do something.
   for (Curation element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListCurationsRequest,ListCurationsPagedResponse>

listLocations(ListLocationsRequest request)

public final ApiHubCurateClient.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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
   ListLocationsRequest request =
       ListLocationsRequest.newBuilder()
           .setName("name3373707")
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (Location element : apiHubCurateClient.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
ApiHubCurateClient.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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
   ListLocationsRequest request =
       ListLocationsRequest.newBuilder()
           .setName("name3373707")
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListLocationsResponse response = apiHubCurateClient.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,ApiHubCurateClient.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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
   ListLocationsRequest request =
       ListLocationsRequest.newBuilder()
           .setName("name3373707")
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<Location> future =
       apiHubCurateClient.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()

updateCuration(Curation curation, FieldMask updateMask)

public final Curation updateCuration(Curation curation, FieldMask updateMask)

Update a curation resource in the API hub. The following fields in the curation can be updated:

  • display_name
  • description

The update_mask should be used to specify the fields being updated.

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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
   Curation curation = Curation.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   Curation response = apiHubCurateClient.updateCuration(curation, updateMask);
 }
 
Parameters
Name Description
curation Curation

Required. The curation resource to update.

The curation resource's name field is used to identify the curation resource to update. Format: projects/{project}/locations/{location}/curations/{curation}

updateMask FieldMask

Optional. The list of fields to update.

Returns
Type Description
Curation

updateCuration(UpdateCurationRequest request)

public final Curation updateCuration(UpdateCurationRequest request)

Update a curation resource in the API hub. The following fields in the curation can be updated:

  • display_name
  • description

The update_mask should be used to specify the fields being updated.

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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
   UpdateCurationRequest request =
       UpdateCurationRequest.newBuilder()
           .setCuration(Curation.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   Curation response = apiHubCurateClient.updateCuration(request);
 }
 
Parameter
Name Description
request UpdateCurationRequest

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

Returns
Type Description
Curation

updateCurationCallable()

public final UnaryCallable<UpdateCurationRequest,Curation> updateCurationCallable()

Update a curation resource in the API hub. The following fields in the curation can be updated:

  • display_name
  • description

The update_mask should be used to specify the fields being updated.

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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
   UpdateCurationRequest request =
       UpdateCurationRequest.newBuilder()
           .setCuration(Curation.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<Curation> future = apiHubCurateClient.updateCurationCallable().futureCall(request);
   // Do something.
   Curation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateCurationRequest,Curation>