Skip to content

Commit

Permalink
feat: [java-enterpriseknowledgegraph] publish Google Cloud's Cloud Kn…
Browse files Browse the repository at this point in the history
…owledge Graph (CKG) API (#8758)

* feat: publish Google Cloud's Cloud Knowledge Graph (CKG) API

CKG lookup and search APIs enable customers to search, link and federate their own knowledge with Google’s.

PiperOrigin-RevId: 487280461

Source-Link: googleapis/googleapis@f19c628

Source-Link: https://github.com/googleapis/googleapis-gen/commit/03934bf2f9ab806e73c8c7595cac9fe0597ba996
Copy-Tag: eyJwIjoiamF2YS1lbnRlcnByaXNla25vd2xlZGdlZ3JhcGgvLk93bEJvdC55YW1sIiwiaCI6IjAzOTM0YmYyZjlhYjgwNmU3M2M4Yzc1OTVjYWM5ZmUwNTk3YmE5OTYifQ==

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Nov 10, 2022
1 parent 800cb54 commit 9e4ace2
Show file tree
Hide file tree
Showing 31 changed files with 15,363 additions and 128 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,28 @@ public class EnterpriseKnowledgeGraphServiceSettings
.deleteEntityReconciliationJobSettings();
}

/** Returns the object with the settings used for calls to lookup. */
public UnaryCallSettings<LookupRequest, LookupResponse> lookupSettings() {
return ((EnterpriseKnowledgeGraphServiceStubSettings) getStubSettings()).lookupSettings();
}

/** Returns the object with the settings used for calls to search. */
public UnaryCallSettings<SearchRequest, SearchResponse> searchSettings() {
return ((EnterpriseKnowledgeGraphServiceStubSettings) getStubSettings()).searchSettings();
}

/** Returns the object with the settings used for calls to lookupPublicKg. */
public UnaryCallSettings<LookupPublicKgRequest, LookupPublicKgResponse> lookupPublicKgSettings() {
return ((EnterpriseKnowledgeGraphServiceStubSettings) getStubSettings())
.lookupPublicKgSettings();
}

/** Returns the object with the settings used for calls to searchPublicKg. */
public UnaryCallSettings<SearchPublicKgRequest, SearchPublicKgResponse> searchPublicKgSettings() {
return ((EnterpriseKnowledgeGraphServiceStubSettings) getStubSettings())
.searchPublicKgSettings();
}

public static final EnterpriseKnowledgeGraphServiceSettings create(
EnterpriseKnowledgeGraphServiceStubSettings stub) throws IOException {
return new EnterpriseKnowledgeGraphServiceSettings.Builder(stub.toBuilder()).build();
Expand Down Expand Up @@ -266,6 +288,28 @@ public Builder applyToAllUnaryMethods(
return getStubSettingsBuilder().deleteEntityReconciliationJobSettings();
}

/** Returns the builder for the settings used for calls to lookup. */
public UnaryCallSettings.Builder<LookupRequest, LookupResponse> lookupSettings() {
return getStubSettingsBuilder().lookupSettings();
}

/** Returns the builder for the settings used for calls to search. */
public UnaryCallSettings.Builder<SearchRequest, SearchResponse> searchSettings() {
return getStubSettingsBuilder().searchSettings();
}

/** Returns the builder for the settings used for calls to lookupPublicKg. */
public UnaryCallSettings.Builder<LookupPublicKgRequest, LookupPublicKgResponse>
lookupPublicKgSettings() {
return getStubSettingsBuilder().lookupPublicKgSettings();
}

/** Returns the builder for the settings used for calls to searchPublicKg. */
public UnaryCallSettings.Builder<SearchPublicKgRequest, SearchPublicKgResponse>
searchPublicKgSettings() {
return getStubSettingsBuilder().searchPublicKgSettings();
}

@Override
public EnterpriseKnowledgeGraphServiceSettings build() throws IOException {
return new EnterpriseKnowledgeGraphServiceSettings(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@
},
"ListEntityReconciliationJobs": {
"methods": ["listEntityReconciliationJobs", "listEntityReconciliationJobs", "listEntityReconciliationJobs", "listEntityReconciliationJobsPagedCallable", "listEntityReconciliationJobsCallable"]
},
"Lookup": {
"methods": ["lookup", "lookup", "lookup", "lookupCallable"]
},
"LookupPublicKg": {
"methods": ["lookupPublicKg", "lookupPublicKg", "lookupPublicKg", "lookupPublicKgCallable"]
},
"Search": {
"methods": ["search", "search", "search", "searchCallable"]
},
"SearchPublicKg": {
"methods": ["searchPublicKg", "searchPublicKg", "searchPublicKg", "searchPublicKgCallable"]
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@
import com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest;
import com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest;
import com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse;
import com.google.cloud.enterpriseknowledgegraph.v1.LookupPublicKgRequest;
import com.google.cloud.enterpriseknowledgegraph.v1.LookupPublicKgResponse;
import com.google.cloud.enterpriseknowledgegraph.v1.LookupRequest;
import com.google.cloud.enterpriseknowledgegraph.v1.LookupResponse;
import com.google.cloud.enterpriseknowledgegraph.v1.SearchPublicKgRequest;
import com.google.cloud.enterpriseknowledgegraph.v1.SearchPublicKgResponse;
import com.google.cloud.enterpriseknowledgegraph.v1.SearchRequest;
import com.google.cloud.enterpriseknowledgegraph.v1.SearchResponse;
import com.google.protobuf.Empty;
import javax.annotation.Generated;

Expand Down Expand Up @@ -76,6 +84,22 @@ public abstract class EnterpriseKnowledgeGraphServiceStub implements BackgroundR
"Not implemented: deleteEntityReconciliationJobCallable()");
}

public UnaryCallable<LookupRequest, LookupResponse> lookupCallable() {
throw new UnsupportedOperationException("Not implemented: lookupCallable()");
}

public UnaryCallable<SearchRequest, SearchResponse> searchCallable() {
throw new UnsupportedOperationException("Not implemented: searchCallable()");
}

public UnaryCallable<LookupPublicKgRequest, LookupPublicKgResponse> lookupPublicKgCallable() {
throw new UnsupportedOperationException("Not implemented: lookupPublicKgCallable()");
}

public UnaryCallable<SearchPublicKgRequest, SearchPublicKgResponse> searchPublicKgCallable() {
throw new UnsupportedOperationException("Not implemented: searchPublicKgCallable()");
}

@Override
public abstract void close();
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@
import com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest;
import com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest;
import com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse;
import com.google.cloud.enterpriseknowledgegraph.v1.LookupPublicKgRequest;
import com.google.cloud.enterpriseknowledgegraph.v1.LookupPublicKgResponse;
import com.google.cloud.enterpriseknowledgegraph.v1.LookupRequest;
import com.google.cloud.enterpriseknowledgegraph.v1.LookupResponse;
import com.google.cloud.enterpriseknowledgegraph.v1.SearchPublicKgRequest;
import com.google.cloud.enterpriseknowledgegraph.v1.SearchPublicKgResponse;
import com.google.cloud.enterpriseknowledgegraph.v1.SearchRequest;
import com.google.cloud.enterpriseknowledgegraph.v1.SearchResponse;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
Expand Down Expand Up @@ -120,6 +128,12 @@ public class EnterpriseKnowledgeGraphServiceStubSettings
cancelEntityReconciliationJobSettings;
private final UnaryCallSettings<DeleteEntityReconciliationJobRequest, Empty>
deleteEntityReconciliationJobSettings;
private final UnaryCallSettings<LookupRequest, LookupResponse> lookupSettings;
private final UnaryCallSettings<SearchRequest, SearchResponse> searchSettings;
private final UnaryCallSettings<LookupPublicKgRequest, LookupPublicKgResponse>
lookupPublicKgSettings;
private final UnaryCallSettings<SearchPublicKgRequest, SearchPublicKgResponse>
searchPublicKgSettings;

private static final PagedListDescriptor<
ListEntityReconciliationJobsRequest,
Expand Down Expand Up @@ -235,6 +249,26 @@ public ApiFuture<ListEntityReconciliationJobsPagedResponse> getFuturePagedRespon
return deleteEntityReconciliationJobSettings;
}

/** Returns the object with the settings used for calls to lookup. */
public UnaryCallSettings<LookupRequest, LookupResponse> lookupSettings() {
return lookupSettings;
}

/** Returns the object with the settings used for calls to search. */
public UnaryCallSettings<SearchRequest, SearchResponse> searchSettings() {
return searchSettings;
}

/** Returns the object with the settings used for calls to lookupPublicKg. */
public UnaryCallSettings<LookupPublicKgRequest, LookupPublicKgResponse> lookupPublicKgSettings() {
return lookupPublicKgSettings;
}

/** Returns the object with the settings used for calls to searchPublicKg. */
public UnaryCallSettings<SearchPublicKgRequest, SearchPublicKgResponse> searchPublicKgSettings() {
return searchPublicKgSettings;
}

public EnterpriseKnowledgeGraphServiceStub createStub() throws IOException {
if (getTransportChannelProvider()
.getTransportName()
Expand Down Expand Up @@ -354,6 +388,10 @@ protected EnterpriseKnowledgeGraphServiceStubSettings(Builder settingsBuilder)
settingsBuilder.cancelEntityReconciliationJobSettings().build();
deleteEntityReconciliationJobSettings =
settingsBuilder.deleteEntityReconciliationJobSettings().build();
lookupSettings = settingsBuilder.lookupSettings().build();
searchSettings = settingsBuilder.searchSettings().build();
lookupPublicKgSettings = settingsBuilder.lookupPublicKgSettings().build();
searchPublicKgSettings = settingsBuilder.searchPublicKgSettings().build();
}

/** Builder for EnterpriseKnowledgeGraphServiceStubSettings. */
Expand All @@ -375,6 +413,12 @@ public static class Builder
cancelEntityReconciliationJobSettings;
private final UnaryCallSettings.Builder<DeleteEntityReconciliationJobRequest, Empty>
deleteEntityReconciliationJobSettings;
private final UnaryCallSettings.Builder<LookupRequest, LookupResponse> lookupSettings;
private final UnaryCallSettings.Builder<SearchRequest, SearchResponse> searchSettings;
private final UnaryCallSettings.Builder<LookupPublicKgRequest, LookupPublicKgResponse>
lookupPublicKgSettings;
private final UnaryCallSettings.Builder<SearchPublicKgRequest, SearchPublicKgResponse>
searchPublicKgSettings;
private static final ImmutableMap<String, ImmutableSet<StatusCode.Code>>
RETRYABLE_CODE_DEFINITIONS;

Expand All @@ -386,6 +430,7 @@ public static class Builder
definitions.put(
"retry_policy_0_codes",
ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList(StatusCode.Code.UNAVAILABLE)));
definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList()));
RETRYABLE_CODE_DEFINITIONS = definitions.build();
}

Expand Down Expand Up @@ -413,6 +458,8 @@ public static class Builder
.setTotalTimeout(Duration.ofMillis(60000L))
.build();
definitions.put("retry_policy_0_params", settings);
settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build();
definitions.put("no_retry_params", settings);
RETRY_PARAM_DEFINITIONS = definitions.build();
}

Expand All @@ -429,14 +476,22 @@ protected Builder(ClientContext clientContext) {
PagedCallSettings.newBuilder(LIST_ENTITY_RECONCILIATION_JOBS_PAGE_STR_FACT);
cancelEntityReconciliationJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
deleteEntityReconciliationJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
lookupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
searchSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
lookupPublicKgSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
searchPublicKgSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();

unaryMethodSettingsBuilders =
ImmutableList.<UnaryCallSettings.Builder<?, ?>>of(
createEntityReconciliationJobSettings,
getEntityReconciliationJobSettings,
listEntityReconciliationJobsSettings,
cancelEntityReconciliationJobSettings,
deleteEntityReconciliationJobSettings);
deleteEntityReconciliationJobSettings,
lookupSettings,
searchSettings,
lookupPublicKgSettings,
searchPublicKgSettings);
initDefaults(this);
}

Expand All @@ -452,14 +507,22 @@ protected Builder(EnterpriseKnowledgeGraphServiceStubSettings settings) {
settings.cancelEntityReconciliationJobSettings.toBuilder();
deleteEntityReconciliationJobSettings =
settings.deleteEntityReconciliationJobSettings.toBuilder();
lookupSettings = settings.lookupSettings.toBuilder();
searchSettings = settings.searchSettings.toBuilder();
lookupPublicKgSettings = settings.lookupPublicKgSettings.toBuilder();
searchPublicKgSettings = settings.searchPublicKgSettings.toBuilder();

unaryMethodSettingsBuilders =
ImmutableList.<UnaryCallSettings.Builder<?, ?>>of(
createEntityReconciliationJobSettings,
getEntityReconciliationJobSettings,
listEntityReconciliationJobsSettings,
cancelEntityReconciliationJobSettings,
deleteEntityReconciliationJobSettings);
deleteEntityReconciliationJobSettings,
lookupSettings,
searchSettings,
lookupPublicKgSettings,
searchPublicKgSettings);
}

private static Builder createDefault() {
Expand Down Expand Up @@ -514,6 +577,26 @@ private static Builder initDefaults(Builder builder) {
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));

builder
.lookupSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));

builder
.searchSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));

builder
.lookupPublicKgSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));

builder
.searchPublicKgSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));

return builder;
}

Expand Down Expand Up @@ -565,6 +648,28 @@ public Builder applyToAllUnaryMethods(
return deleteEntityReconciliationJobSettings;
}

/** Returns the builder for the settings used for calls to lookup. */
public UnaryCallSettings.Builder<LookupRequest, LookupResponse> lookupSettings() {
return lookupSettings;
}

/** Returns the builder for the settings used for calls to search. */
public UnaryCallSettings.Builder<SearchRequest, SearchResponse> searchSettings() {
return searchSettings;
}

/** Returns the builder for the settings used for calls to lookupPublicKg. */
public UnaryCallSettings.Builder<LookupPublicKgRequest, LookupPublicKgResponse>
lookupPublicKgSettings() {
return lookupPublicKgSettings;
}

/** Returns the builder for the settings used for calls to searchPublicKg. */
public UnaryCallSettings.Builder<SearchPublicKgRequest, SearchPublicKgResponse>
searchPublicKgSettings() {
return searchPublicKgSettings;
}

@Override
public EnterpriseKnowledgeGraphServiceStubSettings build() throws IOException {
return new EnterpriseKnowledgeGraphServiceStubSettings(this);
Expand Down
Loading

0 comments on commit 9e4ace2

Please sign in to comment.