Class EnterpriseKnowledgeGraphServiceClient
- java.lang.Object
-
- com.google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphServiceClient
-
- All Implemented Interfaces:
com.google.api.gax.core.BackgroundResource
,AutoCloseable
@Generated("by gapic-generator-java") public class EnterpriseKnowledgeGraphServiceClient extends Object implements com.google.api.gax.core.BackgroundResource
Service Description: APIs for enterprise knowledge graph product.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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); EntityReconciliationJob entityReconciliationJob = EntityReconciliationJob.newBuilder().build(); EntityReconciliationJob response = enterpriseKnowledgeGraphServiceClient.createEntityReconciliationJob( parent, entityReconciliationJob); }
Note: close() needs to be called on the EnterpriseKnowledgeGraphServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
The surface of this class includes several types of Java methods for each of the API's methods:
- A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
- A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
- A "callable" method. This type of method takes no parameters and returns 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 EnterpriseKnowledgeGraphServiceSettings 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 EnterpriseKnowledgeGraphServiceSettings enterpriseKnowledgeGraphServiceSettings = EnterpriseKnowledgeGraphServiceSettings.newBuilder() .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) .build(); EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create(enterpriseKnowledgeGraphServiceSettings);
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 EnterpriseKnowledgeGraphServiceSettings enterpriseKnowledgeGraphServiceSettings = EnterpriseKnowledgeGraphServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create(enterpriseKnowledgeGraphServiceSettings);
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:
// 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 EnterpriseKnowledgeGraphServiceSettings enterpriseKnowledgeGraphServiceSettings = EnterpriseKnowledgeGraphServiceSettings.newHttpJsonBuilder().build(); EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create(enterpriseKnowledgeGraphServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EnterpriseKnowledgeGraphServiceClient.ListEntityReconciliationJobsFixedSizeCollection
static class
EnterpriseKnowledgeGraphServiceClient.ListEntityReconciliationJobsPage
static class
EnterpriseKnowledgeGraphServiceClient.ListEntityReconciliationJobsPagedResponse
-
Constructor Summary
Constructors Modifier Constructor Description protected
EnterpriseKnowledgeGraphServiceClient(EnterpriseKnowledgeGraphServiceSettings settings)
Constructs an instance of EnterpriseKnowledgeGraphServiceClient, using the given settings.protected
EnterpriseKnowledgeGraphServiceClient(EnterpriseKnowledgeGraphServiceStub stub)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
awaitTermination(long duration, TimeUnit unit)
void
cancelEntityReconciliationJob(CancelEntityReconciliationJobRequest request)
Cancels a EntityReconciliationJob.void
cancelEntityReconciliationJob(EntityReconciliationJobName name)
Cancels a EntityReconciliationJob.void
cancelEntityReconciliationJob(String name)
Cancels a EntityReconciliationJob.com.google.api.gax.rpc.UnaryCallable<CancelEntityReconciliationJobRequest,com.google.protobuf.Empty>
cancelEntityReconciliationJobCallable()
Cancels a EntityReconciliationJob.void
close()
static EnterpriseKnowledgeGraphServiceClient
create()
Constructs an instance of EnterpriseKnowledgeGraphServiceClient with default settings.static EnterpriseKnowledgeGraphServiceClient
create(EnterpriseKnowledgeGraphServiceSettings settings)
Constructs an instance of EnterpriseKnowledgeGraphServiceClient, using the given settings.static EnterpriseKnowledgeGraphServiceClient
create(EnterpriseKnowledgeGraphServiceStub stub)
Constructs an instance of EnterpriseKnowledgeGraphServiceClient, using the given stub for making calls.EntityReconciliationJob
createEntityReconciliationJob(CreateEntityReconciliationJobRequest request)
Creates a EntityReconciliationJob.EntityReconciliationJob
createEntityReconciliationJob(LocationName parent, EntityReconciliationJob entityReconciliationJob)
Creates a EntityReconciliationJob.EntityReconciliationJob
createEntityReconciliationJob(String parent, EntityReconciliationJob entityReconciliationJob)
Creates a EntityReconciliationJob.com.google.api.gax.rpc.UnaryCallable<CreateEntityReconciliationJobRequest,EntityReconciliationJob>
createEntityReconciliationJobCallable()
Creates a EntityReconciliationJob.void
deleteEntityReconciliationJob(DeleteEntityReconciliationJobRequest request)
Deletes a EntityReconciliationJob.void
deleteEntityReconciliationJob(EntityReconciliationJobName name)
Deletes a EntityReconciliationJob.void
deleteEntityReconciliationJob(String name)
Deletes a EntityReconciliationJob.com.google.api.gax.rpc.UnaryCallable<DeleteEntityReconciliationJobRequest,com.google.protobuf.Empty>
deleteEntityReconciliationJobCallable()
Deletes a EntityReconciliationJob.EntityReconciliationJob
getEntityReconciliationJob(EntityReconciliationJobName name)
Gets a EntityReconciliationJob.EntityReconciliationJob
getEntityReconciliationJob(GetEntityReconciliationJobRequest request)
Gets a EntityReconciliationJob.EntityReconciliationJob
getEntityReconciliationJob(String name)
Gets a EntityReconciliationJob.com.google.api.gax.rpc.UnaryCallable<GetEntityReconciliationJobRequest,EntityReconciliationJob>
getEntityReconciliationJobCallable()
Gets a EntityReconciliationJob.EnterpriseKnowledgeGraphServiceSettings
getSettings()
EnterpriseKnowledgeGraphServiceStub
getStub()
boolean
isShutdown()
boolean
isTerminated()
EnterpriseKnowledgeGraphServiceClient.ListEntityReconciliationJobsPagedResponse
listEntityReconciliationJobs(ListEntityReconciliationJobsRequest request)
Lists Entity Reconciliation Jobs.EnterpriseKnowledgeGraphServiceClient.ListEntityReconciliationJobsPagedResponse
listEntityReconciliationJobs(LocationName parent)
Lists Entity Reconciliation Jobs.EnterpriseKnowledgeGraphServiceClient.ListEntityReconciliationJobsPagedResponse
listEntityReconciliationJobs(String parent)
Lists Entity Reconciliation Jobs.com.google.api.gax.rpc.UnaryCallable<ListEntityReconciliationJobsRequest,ListEntityReconciliationJobsResponse>
listEntityReconciliationJobsCallable()
Lists Entity Reconciliation Jobs.com.google.api.gax.rpc.UnaryCallable<ListEntityReconciliationJobsRequest,EnterpriseKnowledgeGraphServiceClient.ListEntityReconciliationJobsPagedResponse>
listEntityReconciliationJobsPagedCallable()
Lists Entity Reconciliation Jobs.LookupResponse
lookup(LocationName parent, List<String> ids)
Finds the Cloud KG entities with CKG ID(s).LookupResponse
lookup(LookupRequest request)
Finds the Cloud KG entities with CKG ID(s).LookupResponse
lookup(String parent, List<String> ids)
Finds the Cloud KG entities with CKG ID(s).com.google.api.gax.rpc.UnaryCallable<LookupRequest,LookupResponse>
lookupCallable()
Finds the Cloud KG entities with CKG ID(s).LookupPublicKgResponse
lookupPublicKg(LocationName parent, List<String> ids)
Finds the public KG entities with public KG ID(s).LookupPublicKgResponse
lookupPublicKg(LookupPublicKgRequest request)
Finds the public KG entities with public KG ID(s).LookupPublicKgResponse
lookupPublicKg(String parent, List<String> ids)
Finds the public KG entities with public KG ID(s).com.google.api.gax.rpc.UnaryCallable<LookupPublicKgRequest,LookupPublicKgResponse>
lookupPublicKgCallable()
Finds the public KG entities with public KG ID(s).SearchResponse
search(LocationName parent, String query)
Searches the Cloud KG entities with entity name.SearchResponse
search(SearchRequest request)
Searches the Cloud KG entities with entity name.SearchResponse
search(String parent, String query)
Searches the Cloud KG entities with entity name.com.google.api.gax.rpc.UnaryCallable<SearchRequest,SearchResponse>
searchCallable()
Searches the Cloud KG entities with entity name.SearchPublicKgResponse
searchPublicKg(LocationName parent, String query)
Searches the public KG entities with entity name.SearchPublicKgResponse
searchPublicKg(SearchPublicKgRequest request)
Searches the public KG entities with entity name.SearchPublicKgResponse
searchPublicKg(String parent, String query)
Searches the public KG entities with entity name.com.google.api.gax.rpc.UnaryCallable<SearchPublicKgRequest,SearchPublicKgResponse>
searchPublicKgCallable()
Searches the public KG entities with entity name.void
shutdown()
void
shutdownNow()
-
-
-
Constructor Detail
-
EnterpriseKnowledgeGraphServiceClient
protected EnterpriseKnowledgeGraphServiceClient(EnterpriseKnowledgeGraphServiceSettings settings) throws IOException
Constructs an instance of EnterpriseKnowledgeGraphServiceClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.- Throws:
IOException
-
EnterpriseKnowledgeGraphServiceClient
protected EnterpriseKnowledgeGraphServiceClient(EnterpriseKnowledgeGraphServiceStub stub)
-
-
Method Detail
-
create
public static final EnterpriseKnowledgeGraphServiceClient create() throws IOException
Constructs an instance of EnterpriseKnowledgeGraphServiceClient with default settings.- Throws:
IOException
-
create
public static final EnterpriseKnowledgeGraphServiceClient create(EnterpriseKnowledgeGraphServiceSettings settings) throws IOException
Constructs an instance of EnterpriseKnowledgeGraphServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.- Throws:
IOException
-
create
public static final EnterpriseKnowledgeGraphServiceClient create(EnterpriseKnowledgeGraphServiceStub stub)
Constructs an instance of EnterpriseKnowledgeGraphServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(EnterpriseKnowledgeGraphServiceSettings).
-
getSettings
public final EnterpriseKnowledgeGraphServiceSettings getSettings()
-
getStub
public EnterpriseKnowledgeGraphServiceStub getStub()
-
createEntityReconciliationJob
public final EntityReconciliationJob createEntityReconciliationJob(LocationName parent, EntityReconciliationJob entityReconciliationJob)
Creates a EntityReconciliationJob. A EntityReconciliationJob once created will right away be attempted to start.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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); EntityReconciliationJob entityReconciliationJob = EntityReconciliationJob.newBuilder().build(); EntityReconciliationJob response = enterpriseKnowledgeGraphServiceClient.createEntityReconciliationJob( parent, entityReconciliationJob); }
- Parameters:
parent
- Required. The resource name of the Location to create the EntityReconciliationJob in. Format: `projects/{project}/locations/{location}`entityReconciliationJob
- Required. The EntityReconciliationJob to create.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createEntityReconciliationJob
public final EntityReconciliationJob createEntityReconciliationJob(String parent, EntityReconciliationJob entityReconciliationJob)
Creates a EntityReconciliationJob. A EntityReconciliationJob once created will right away be attempted to start.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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); EntityReconciliationJob entityReconciliationJob = EntityReconciliationJob.newBuilder().build(); EntityReconciliationJob response = enterpriseKnowledgeGraphServiceClient.createEntityReconciliationJob( parent, entityReconciliationJob); }
- Parameters:
parent
- Required. The resource name of the Location to create the EntityReconciliationJob in. Format: `projects/{project}/locations/{location}`entityReconciliationJob
- Required. The EntityReconciliationJob to create.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createEntityReconciliationJob
public final EntityReconciliationJob createEntityReconciliationJob(CreateEntityReconciliationJobRequest request)
Creates a EntityReconciliationJob. A EntityReconciliationJob once created will right away be attempted to start.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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { CreateEntityReconciliationJobRequest request = CreateEntityReconciliationJobRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setEntityReconciliationJob(EntityReconciliationJob.newBuilder().build()) .build(); EntityReconciliationJob response = enterpriseKnowledgeGraphServiceClient.createEntityReconciliationJob(request); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createEntityReconciliationJobCallable
public final com.google.api.gax.rpc.UnaryCallable<CreateEntityReconciliationJobRequest,EntityReconciliationJob> createEntityReconciliationJobCallable()
Creates a EntityReconciliationJob. A EntityReconciliationJob once created will right away be attempted to start.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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { CreateEntityReconciliationJobRequest request = CreateEntityReconciliationJobRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setEntityReconciliationJob(EntityReconciliationJob.newBuilder().build()) .build(); ApiFuture<EntityReconciliationJob> future = enterpriseKnowledgeGraphServiceClient .createEntityReconciliationJobCallable() .futureCall(request); // Do something. EntityReconciliationJob response = future.get(); }
-
getEntityReconciliationJob
public final EntityReconciliationJob getEntityReconciliationJob(EntityReconciliationJobName name)
Gets a EntityReconciliationJob.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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { EntityReconciliationJobName name = EntityReconciliationJobName.of("[PROJECT]", "[LOCATION]", "[ENTITY_RECONCILIATION_JOB]"); EntityReconciliationJob response = enterpriseKnowledgeGraphServiceClient.getEntityReconciliationJob(name); }
- Parameters:
name
- Required. The name of the EntityReconciliationJob resource. Format: `projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}`- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getEntityReconciliationJob
public final EntityReconciliationJob getEntityReconciliationJob(String name)
Gets a EntityReconciliationJob.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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { String name = EntityReconciliationJobName.of("[PROJECT]", "[LOCATION]", "[ENTITY_RECONCILIATION_JOB]") .toString(); EntityReconciliationJob response = enterpriseKnowledgeGraphServiceClient.getEntityReconciliationJob(name); }
- Parameters:
name
- Required. The name of the EntityReconciliationJob resource. Format: `projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}`- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getEntityReconciliationJob
public final EntityReconciliationJob getEntityReconciliationJob(GetEntityReconciliationJobRequest request)
Gets a EntityReconciliationJob.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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { GetEntityReconciliationJobRequest request = GetEntityReconciliationJobRequest.newBuilder() .setName( EntityReconciliationJobName.of( "[PROJECT]", "[LOCATION]", "[ENTITY_RECONCILIATION_JOB]") .toString()) .build(); EntityReconciliationJob response = enterpriseKnowledgeGraphServiceClient.getEntityReconciliationJob(request); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getEntityReconciliationJobCallable
public final com.google.api.gax.rpc.UnaryCallable<GetEntityReconciliationJobRequest,EntityReconciliationJob> getEntityReconciliationJobCallable()
Gets a EntityReconciliationJob.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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { GetEntityReconciliationJobRequest request = GetEntityReconciliationJobRequest.newBuilder() .setName( EntityReconciliationJobName.of( "[PROJECT]", "[LOCATION]", "[ENTITY_RECONCILIATION_JOB]") .toString()) .build(); ApiFuture<EntityReconciliationJob> future = enterpriseKnowledgeGraphServiceClient .getEntityReconciliationJobCallable() .futureCall(request); // Do something. EntityReconciliationJob response = future.get(); }
-
listEntityReconciliationJobs
public final EnterpriseKnowledgeGraphServiceClient.ListEntityReconciliationJobsPagedResponse listEntityReconciliationJobs(LocationName parent)
Lists Entity Reconciliation Jobs.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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (EntityReconciliationJob element : enterpriseKnowledgeGraphServiceClient.listEntityReconciliationJobs(parent).iterateAll()) { // doThingsWith(element); } }
- Parameters:
parent
- Required. The name of the EntityReconciliationJob's parent resource. Format: `projects/{project}/locations/{location}`- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listEntityReconciliationJobs
public final EnterpriseKnowledgeGraphServiceClient.ListEntityReconciliationJobsPagedResponse listEntityReconciliationJobs(String parent)
Lists Entity Reconciliation Jobs.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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (EntityReconciliationJob element : enterpriseKnowledgeGraphServiceClient.listEntityReconciliationJobs(parent).iterateAll()) { // doThingsWith(element); } }
- Parameters:
parent
- Required. The name of the EntityReconciliationJob's parent resource. Format: `projects/{project}/locations/{location}`- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listEntityReconciliationJobs
public final EnterpriseKnowledgeGraphServiceClient.ListEntityReconciliationJobsPagedResponse listEntityReconciliationJobs(ListEntityReconciliationJobsRequest request)
Lists Entity Reconciliation Jobs.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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { ListEntityReconciliationJobsRequest request = ListEntityReconciliationJobsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (EntityReconciliationJob element : enterpriseKnowledgeGraphServiceClient .listEntityReconciliationJobs(request) .iterateAll()) { // doThingsWith(element); } }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listEntityReconciliationJobsPagedCallable
public final com.google.api.gax.rpc.UnaryCallable<ListEntityReconciliationJobsRequest,EnterpriseKnowledgeGraphServiceClient.ListEntityReconciliationJobsPagedResponse> listEntityReconciliationJobsPagedCallable()
Lists Entity Reconciliation Jobs.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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { ListEntityReconciliationJobsRequest request = ListEntityReconciliationJobsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<EntityReconciliationJob> future = enterpriseKnowledgeGraphServiceClient .listEntityReconciliationJobsPagedCallable() .futureCall(request); // Do something. for (EntityReconciliationJob element : future.get().iterateAll()) { // doThingsWith(element); } }
-
listEntityReconciliationJobsCallable
public final com.google.api.gax.rpc.UnaryCallable<ListEntityReconciliationJobsRequest,ListEntityReconciliationJobsResponse> listEntityReconciliationJobsCallable()
Lists Entity Reconciliation Jobs.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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { ListEntityReconciliationJobsRequest request = ListEntityReconciliationJobsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListEntityReconciliationJobsResponse response = enterpriseKnowledgeGraphServiceClient .listEntityReconciliationJobsCallable() .call(request); for (EntityReconciliationJob element : response.getEntityReconciliationJobsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } }
-
cancelEntityReconciliationJob
public final void cancelEntityReconciliationJob(EntityReconciliationJobName name)
Cancels a EntityReconciliationJob. Success of cancellation is not guaranteed.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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { EntityReconciliationJobName name = EntityReconciliationJobName.of("[PROJECT]", "[LOCATION]", "[ENTITY_RECONCILIATION_JOB]"); enterpriseKnowledgeGraphServiceClient.cancelEntityReconciliationJob(name); }
- Parameters:
name
- Required. The name of the EntityReconciliationJob resource. Format: `projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}`- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
cancelEntityReconciliationJob
public final void cancelEntityReconciliationJob(String name)
Cancels a EntityReconciliationJob. Success of cancellation is not guaranteed.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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { String name = EntityReconciliationJobName.of("[PROJECT]", "[LOCATION]", "[ENTITY_RECONCILIATION_JOB]") .toString(); enterpriseKnowledgeGraphServiceClient.cancelEntityReconciliationJob(name); }
- Parameters:
name
- Required. The name of the EntityReconciliationJob resource. Format: `projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}`- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
cancelEntityReconciliationJob
public final void cancelEntityReconciliationJob(CancelEntityReconciliationJobRequest request)
Cancels a EntityReconciliationJob. Success of cancellation is not guaranteed.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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { CancelEntityReconciliationJobRequest request = CancelEntityReconciliationJobRequest.newBuilder() .setName( EntityReconciliationJobName.of( "[PROJECT]", "[LOCATION]", "[ENTITY_RECONCILIATION_JOB]") .toString()) .build(); enterpriseKnowledgeGraphServiceClient.cancelEntityReconciliationJob(request); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
cancelEntityReconciliationJobCallable
public final com.google.api.gax.rpc.UnaryCallable<CancelEntityReconciliationJobRequest,com.google.protobuf.Empty> cancelEntityReconciliationJobCallable()
Cancels a EntityReconciliationJob. Success of cancellation is not guaranteed.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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { CancelEntityReconciliationJobRequest request = CancelEntityReconciliationJobRequest.newBuilder() .setName( EntityReconciliationJobName.of( "[PROJECT]", "[LOCATION]", "[ENTITY_RECONCILIATION_JOB]") .toString()) .build(); ApiFuture<Empty> future = enterpriseKnowledgeGraphServiceClient .cancelEntityReconciliationJobCallable() .futureCall(request); // Do something. future.get(); }
-
deleteEntityReconciliationJob
public final void deleteEntityReconciliationJob(EntityReconciliationJobName name)
Deletes a EntityReconciliationJob. It only deletes the job when the job state is in FAILED, SUCCEEDED, and CANCELLED.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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { EntityReconciliationJobName name = EntityReconciliationJobName.of("[PROJECT]", "[LOCATION]", "[ENTITY_RECONCILIATION_JOB]"); enterpriseKnowledgeGraphServiceClient.deleteEntityReconciliationJob(name); }
- Parameters:
name
- Required. The name of the EntityReconciliationJob resource. Format: `projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}`- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteEntityReconciliationJob
public final void deleteEntityReconciliationJob(String name)
Deletes a EntityReconciliationJob. It only deletes the job when the job state is in FAILED, SUCCEEDED, and CANCELLED.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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { String name = EntityReconciliationJobName.of("[PROJECT]", "[LOCATION]", "[ENTITY_RECONCILIATION_JOB]") .toString(); enterpriseKnowledgeGraphServiceClient.deleteEntityReconciliationJob(name); }
- Parameters:
name
- Required. The name of the EntityReconciliationJob resource. Format: `projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}`- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteEntityReconciliationJob
public final void deleteEntityReconciliationJob(DeleteEntityReconciliationJobRequest request)
Deletes a EntityReconciliationJob. It only deletes the job when the job state is in FAILED, SUCCEEDED, and CANCELLED.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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { DeleteEntityReconciliationJobRequest request = DeleteEntityReconciliationJobRequest.newBuilder() .setName( EntityReconciliationJobName.of( "[PROJECT]", "[LOCATION]", "[ENTITY_RECONCILIATION_JOB]") .toString()) .build(); enterpriseKnowledgeGraphServiceClient.deleteEntityReconciliationJob(request); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteEntityReconciliationJobCallable
public final com.google.api.gax.rpc.UnaryCallable<DeleteEntityReconciliationJobRequest,com.google.protobuf.Empty> deleteEntityReconciliationJobCallable()
Deletes a EntityReconciliationJob. It only deletes the job when the job state is in FAILED, SUCCEEDED, and CANCELLED.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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { DeleteEntityReconciliationJobRequest request = DeleteEntityReconciliationJobRequest.newBuilder() .setName( EntityReconciliationJobName.of( "[PROJECT]", "[LOCATION]", "[ENTITY_RECONCILIATION_JOB]") .toString()) .build(); ApiFuture<Empty> future = enterpriseKnowledgeGraphServiceClient .deleteEntityReconciliationJobCallable() .futureCall(request); // Do something. future.get(); }
-
lookup
public final LookupResponse lookup(LocationName parent, List<String> ids)
Finds the Cloud KG entities with CKG ID(s).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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); List<String> ids = new ArrayList<>(); LookupResponse response = enterpriseKnowledgeGraphServiceClient.lookup(parent, ids); }
- Parameters:
parent
- Required. The name of the Entity's parent resource. Format: `projects/{project}/locations/{location}`ids
- Required. The list of entity ids to be used for lookup.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
lookup
public final LookupResponse lookup(String parent, List<String> ids)
Finds the Cloud KG entities with CKG ID(s).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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); List<String> ids = new ArrayList<>(); LookupResponse response = enterpriseKnowledgeGraphServiceClient.lookup(parent, ids); }
- Parameters:
parent
- Required. The name of the Entity's parent resource. Format: `projects/{project}/locations/{location}`ids
- Required. The list of entity ids to be used for lookup.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
lookup
public final LookupResponse lookup(LookupRequest request)
Finds the Cloud KG entities with CKG ID(s).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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { LookupRequest request = LookupRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .addAllIds(new ArrayList<String>()) .addAllLanguages(new ArrayList<String>()) .build(); LookupResponse response = enterpriseKnowledgeGraphServiceClient.lookup(request); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
lookupCallable
public final com.google.api.gax.rpc.UnaryCallable<LookupRequest,LookupResponse> lookupCallable()
Finds the Cloud KG entities with CKG ID(s).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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { LookupRequest request = LookupRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .addAllIds(new ArrayList<String>()) .addAllLanguages(new ArrayList<String>()) .build(); ApiFuture<LookupResponse> future = enterpriseKnowledgeGraphServiceClient.lookupCallable().futureCall(request); // Do something. LookupResponse response = future.get(); }
-
search
public final SearchResponse search(LocationName parent, String query)
Searches the Cloud KG entities with entity name.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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); String query = "query107944136"; SearchResponse response = enterpriseKnowledgeGraphServiceClient.search(parent, query); }
- Parameters:
parent
- Required. The name of the Entity's parent resource. Format: `projects/{project}/locations/{location}`query
- Required. The literal query string for search.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
search
public final SearchResponse search(String parent, String query)
Searches the Cloud KG entities with entity name.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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); String query = "query107944136"; SearchResponse response = enterpriseKnowledgeGraphServiceClient.search(parent, query); }
- Parameters:
parent
- Required. The name of the Entity's parent resource. Format: `projects/{project}/locations/{location}`query
- Required. The literal query string for search.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
search
public final SearchResponse search(SearchRequest request)
Searches the Cloud KG entities with entity name.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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { SearchRequest request = SearchRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setQuery("query107944136") .addAllLanguages(new ArrayList<String>()) .addAllTypes(new ArrayList<String>()) .setLimit(Int32Value.newBuilder().build()) .build(); SearchResponse response = enterpriseKnowledgeGraphServiceClient.search(request); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
searchCallable
public final com.google.api.gax.rpc.UnaryCallable<SearchRequest,SearchResponse> searchCallable()
Searches the Cloud KG entities with entity name.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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { SearchRequest request = SearchRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setQuery("query107944136") .addAllLanguages(new ArrayList<String>()) .addAllTypes(new ArrayList<String>()) .setLimit(Int32Value.newBuilder().build()) .build(); ApiFuture<SearchResponse> future = enterpriseKnowledgeGraphServiceClient.searchCallable().futureCall(request); // Do something. SearchResponse response = future.get(); }
-
lookupPublicKg
public final LookupPublicKgResponse lookupPublicKg(LocationName parent, List<String> ids)
Finds the public KG entities with public KG ID(s).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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); List<String> ids = new ArrayList<>(); LookupPublicKgResponse response = enterpriseKnowledgeGraphServiceClient.lookupPublicKg(parent, ids); }
- Parameters:
parent
- Required. The name of the Entity's parent resource. Format: `projects/{project}/locations/{location}`ids
- Required. The list of entity ids to be used for lookup.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
lookupPublicKg
public final LookupPublicKgResponse lookupPublicKg(String parent, List<String> ids)
Finds the public KG entities with public KG ID(s).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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); List<String> ids = new ArrayList<>(); LookupPublicKgResponse response = enterpriseKnowledgeGraphServiceClient.lookupPublicKg(parent, ids); }
- Parameters:
parent
- Required. The name of the Entity's parent resource. Format: `projects/{project}/locations/{location}`ids
- Required. The list of entity ids to be used for lookup.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
lookupPublicKg
public final LookupPublicKgResponse lookupPublicKg(LookupPublicKgRequest request)
Finds the public KG entities with public KG ID(s).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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { LookupPublicKgRequest request = LookupPublicKgRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .addAllIds(new ArrayList<String>()) .addAllLanguages(new ArrayList<String>()) .build(); LookupPublicKgResponse response = enterpriseKnowledgeGraphServiceClient.lookupPublicKg(request); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
lookupPublicKgCallable
public final com.google.api.gax.rpc.UnaryCallable<LookupPublicKgRequest,LookupPublicKgResponse> lookupPublicKgCallable()
Finds the public KG entities with public KG ID(s).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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { LookupPublicKgRequest request = LookupPublicKgRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .addAllIds(new ArrayList<String>()) .addAllLanguages(new ArrayList<String>()) .build(); ApiFuture<LookupPublicKgResponse> future = enterpriseKnowledgeGraphServiceClient.lookupPublicKgCallable().futureCall(request); // Do something. LookupPublicKgResponse response = future.get(); }
-
searchPublicKg
public final SearchPublicKgResponse searchPublicKg(LocationName parent, String query)
Searches the public KG entities with entity name.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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); String query = "query107944136"; SearchPublicKgResponse response = enterpriseKnowledgeGraphServiceClient.searchPublicKg(parent, query); }
- Parameters:
parent
- Required. The name of the Entity's parent resource. Format: `projects/{project}/locations/{location}`query
- Required. The literal query string for search.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
searchPublicKg
public final SearchPublicKgResponse searchPublicKg(String parent, String query)
Searches the public KG entities with entity name.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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); String query = "query107944136"; SearchPublicKgResponse response = enterpriseKnowledgeGraphServiceClient.searchPublicKg(parent, query); }
- Parameters:
parent
- Required. The name of the Entity's parent resource. Format: `projects/{project}/locations/{location}`query
- Required. The literal query string for search.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
searchPublicKg
public final SearchPublicKgResponse searchPublicKg(SearchPublicKgRequest request)
Searches the public KG entities with entity name.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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { SearchPublicKgRequest request = SearchPublicKgRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setQuery("query107944136") .addAllLanguages(new ArrayList<String>()) .addAllTypes(new ArrayList<String>()) .setLimit(Int32Value.newBuilder().build()) .build(); SearchPublicKgResponse response = enterpriseKnowledgeGraphServiceClient.searchPublicKg(request); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
searchPublicKgCallable
public final com.google.api.gax.rpc.UnaryCallable<SearchPublicKgRequest,SearchPublicKgResponse> searchPublicKgCallable()
Searches the public KG entities with entity name.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 (EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient = EnterpriseKnowledgeGraphServiceClient.create()) { SearchPublicKgRequest request = SearchPublicKgRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setQuery("query107944136") .addAllLanguages(new ArrayList<String>()) .addAllTypes(new ArrayList<String>()) .setLimit(Int32Value.newBuilder().build()) .build(); ApiFuture<SearchPublicKgResponse> future = enterpriseKnowledgeGraphServiceClient.searchPublicKgCallable().futureCall(request); // Do something. SearchPublicKgResponse response = future.get(); }
-
close
public final void close()
- Specified by:
close
in interfaceAutoCloseable
-
shutdown
public void shutdown()
- Specified by:
shutdown
in interfacecom.google.api.gax.core.BackgroundResource
-
isShutdown
public boolean isShutdown()
- Specified by:
isShutdown
in interfacecom.google.api.gax.core.BackgroundResource
-
isTerminated
public boolean isTerminated()
- Specified by:
isTerminated
in interfacecom.google.api.gax.core.BackgroundResource
-
shutdownNow
public void shutdownNow()
- Specified by:
shutdownNow
in interfacecom.google.api.gax.core.BackgroundResource
-
awaitTermination
public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException
- Specified by:
awaitTermination
in interfacecom.google.api.gax.core.BackgroundResource
- Throws:
InterruptedException
-
-