From 28231220a144bda43313204916a0ba268d51de37 Mon Sep 17 00:00:00 2001 From: Mike Eltsufin Date: Fri, 21 Oct 2022 20:11:54 +0000 Subject: [PATCH 1/2] feat: [enterpriseknowledgegraph] new module for enterpriseknowledgegraph --- .release-please-manifest.json | 1 + java-enterpriseknowledgegraph/.OwlBot.yaml | 33 + .../.repo-metadata.json | 16 + java-enterpriseknowledgegraph/README.md | 201 ++ .../pom.xml | 44 + .../pom.xml | 113 + ...EnterpriseKnowledgeGraphServiceClient.java | 1052 ++++++ ...terpriseKnowledgeGraphServiceSettings.java | 274 ++ .../v1/gapic_metadata.json | 33 + .../v1/package-info.java | 48 + .../EnterpriseKnowledgeGraphServiceStub.java | 81 + ...riseKnowledgeGraphServiceStubSettings.java | 573 +++ ...eKnowledgeGraphServiceCallableFactory.java | 113 + ...pcEnterpriseKnowledgeGraphServiceStub.java | 347 ++ ...eKnowledgeGraphServiceCallableFactory.java | 105 + ...onEnterpriseKnowledgeGraphServiceStub.java | 465 +++ ...owledgeGraphServiceClientHttpJsonTest.java | 584 +++ ...rpriseKnowledgeGraphServiceClientTest.java | 534 +++ .../MockEnterpriseKnowledgeGraphService.java | 59 + ...ckEnterpriseKnowledgeGraphServiceImpl.java | 170 + .../pom.xml | 45 + .../EnterpriseKnowledgeGraphServiceGrpc.java | 941 +++++ java-enterpriseknowledgegraph/owlbot.py | 35 + java-enterpriseknowledgegraph/pom.xml | 53 + .../clirr-ignored-differences.xml | 19 + .../pom.xml | 37 + .../v1/AffinityClusteringConfig.java | 538 +++ .../v1/AffinityClusteringConfigOrBuilder.java | 38 + .../v1/BigQueryInputConfig.java | 814 +++++ .../v1/BigQueryInputConfigOrBuilder.java | 79 + .../CancelEntityReconciliationJobRequest.java | 677 ++++ ...tityReconciliationJobRequestOrBuilder.java | 58 + .../v1/CommonOperationMetadata.java | 1387 +++++++ .../v1/CommonOperationMetadataOrBuilder.java | 120 + .../v1/ConnectedComponentsConfig.java | 540 +++ .../ConnectedComponentsConfigOrBuilder.java | 38 + .../CreateEntityReconciliationJobRequest.java | 984 +++++ ...tityReconciliationJobRequestOrBuilder.java | 100 + .../DeleteEntityReconciliationJobRequest.java | 677 ++++ ...tityReconciliationJobRequestOrBuilder.java | 58 + .../v1/DeleteOperationMetadata.java | 737 ++++ .../v1/DeleteOperationMetadataOrBuilder.java | 64 + .../v1/EntityReconciliationJob.java | 2826 +++++++++++++++ .../v1/EntityReconciliationJobName.java | 240 ++ .../v1/EntityReconciliationJobOrBuilder.java | 363 ++ .../v1/GetEntityReconciliationJobRequest.java | 671 ++++ ...tityReconciliationJobRequestOrBuilder.java | 58 + .../v1/InputConfig.java | 1653 +++++++++ .../v1/InputConfigOrBuilder.java | 149 + .../enterpriseknowledgegraph/v1/JobState.java | 332 ++ .../v1/JobStateProto.java | 60 + .../ListEntityReconciliationJobsRequest.java | 1126 ++++++ ...ityReconciliationJobsRequestOrBuilder.java | 121 + .../ListEntityReconciliationJobsResponse.java | 1250 +++++++ ...tyReconciliationJobsResponseOrBuilder.java | 121 + .../v1/LocationName.java | 192 + .../v1/OperationMetadataProto.java | 79 + .../v1/OutputConfig.java | 616 ++++ .../v1/OutputConfigOrBuilder.java | 50 + .../v1/ReconConfig.java | 3214 +++++++++++++++++ .../v1/ReconConfigOrBuilder.java | 188 + .../v1/ServiceProto.java | 419 +++ .../v1/job_state.proto | 55 + .../v1/operation_metadata.proto | 60 + .../enterpriseknowledgegraph/v1/service.proto | 358 ++ java-enterpriseknowledgegraph/versions.txt | 6 + pom.xml | 1 + release-please-config.json | 3 + 68 files changed, 27096 insertions(+) create mode 100644 java-enterpriseknowledgegraph/.OwlBot.yaml create mode 100644 java-enterpriseknowledgegraph/.repo-metadata.json create mode 100644 java-enterpriseknowledgegraph/README.md create mode 100644 java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph-bom/pom.xml create mode 100644 java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/pom.xml create mode 100644 java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/EnterpriseKnowledgeGraphServiceClient.java create mode 100644 java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/EnterpriseKnowledgeGraphServiceSettings.java create mode 100644 java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/gapic_metadata.json create mode 100644 java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/package-info.java create mode 100644 java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/stub/EnterpriseKnowledgeGraphServiceStub.java create mode 100644 java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/stub/EnterpriseKnowledgeGraphServiceStubSettings.java create mode 100644 java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/stub/GrpcEnterpriseKnowledgeGraphServiceCallableFactory.java create mode 100644 java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/stub/GrpcEnterpriseKnowledgeGraphServiceStub.java create mode 100644 java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/stub/HttpJsonEnterpriseKnowledgeGraphServiceCallableFactory.java create mode 100644 java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/stub/HttpJsonEnterpriseKnowledgeGraphServiceStub.java create mode 100644 java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/test/java/com/google/cloud/enterpriseknowledgegraph/v1/EnterpriseKnowledgeGraphServiceClientHttpJsonTest.java create mode 100644 java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/test/java/com/google/cloud/enterpriseknowledgegraph/v1/EnterpriseKnowledgeGraphServiceClientTest.java create mode 100644 java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/test/java/com/google/cloud/enterpriseknowledgegraph/v1/MockEnterpriseKnowledgeGraphService.java create mode 100644 java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/test/java/com/google/cloud/enterpriseknowledgegraph/v1/MockEnterpriseKnowledgeGraphServiceImpl.java create mode 100644 java-enterpriseknowledgegraph/grpc-google-cloud-enterpriseknowledgegraph-v1/pom.xml create mode 100644 java-enterpriseknowledgegraph/grpc-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/EnterpriseKnowledgeGraphServiceGrpc.java create mode 100644 java-enterpriseknowledgegraph/owlbot.py create mode 100644 java-enterpriseknowledgegraph/pom.xml create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/clirr-ignored-differences.xml create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/pom.xml create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/AffinityClusteringConfig.java create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/AffinityClusteringConfigOrBuilder.java create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/BigQueryInputConfig.java create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/BigQueryInputConfigOrBuilder.java create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/CancelEntityReconciliationJobRequest.java create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/CancelEntityReconciliationJobRequestOrBuilder.java create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/CommonOperationMetadata.java create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/CommonOperationMetadataOrBuilder.java create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/ConnectedComponentsConfig.java create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/ConnectedComponentsConfigOrBuilder.java create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/CreateEntityReconciliationJobRequest.java create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/CreateEntityReconciliationJobRequestOrBuilder.java create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/DeleteEntityReconciliationJobRequest.java create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/DeleteEntityReconciliationJobRequestOrBuilder.java create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/DeleteOperationMetadata.java create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/DeleteOperationMetadataOrBuilder.java create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/EntityReconciliationJob.java create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/EntityReconciliationJobName.java create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/EntityReconciliationJobOrBuilder.java create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/GetEntityReconciliationJobRequest.java create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/GetEntityReconciliationJobRequestOrBuilder.java create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/InputConfig.java create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/InputConfigOrBuilder.java create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/JobState.java create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/JobStateProto.java create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/ListEntityReconciliationJobsRequest.java create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/ListEntityReconciliationJobsRequestOrBuilder.java create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/ListEntityReconciliationJobsResponse.java create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/ListEntityReconciliationJobsResponseOrBuilder.java create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/LocationName.java create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/OperationMetadataProto.java create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/OutputConfig.java create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/OutputConfigOrBuilder.java create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/ReconConfig.java create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/ReconConfigOrBuilder.java create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/ServiceProto.java create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/proto/google/cloud/enterpriseknowledgegraph/v1/job_state.proto create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/proto/google/cloud/enterpriseknowledgegraph/v1/operation_metadata.proto create mode 100644 java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/proto/google/cloud/enterpriseknowledgegraph/v1/service.proto create mode 100644 java-enterpriseknowledgegraph/versions.txt diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 229143e33f8d..62050e5fc108 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -63,6 +63,7 @@ "java-dns": "2.2.1-SNAPSHOT", "java-document-ai": "2.8.1-SNAPSHOT", "java-domains": "1.1.1-SNAPSHOT", + "java-enterpriseknowledgegraph": "0.0.1-SNAPSHOT", "java-errorreporting": "0.125.1-beta-SNAPSHOT", "java-essential-contacts": "2.4.1-SNAPSHOT", "java-eventarc": "1.4.1-SNAPSHOT", diff --git a/java-enterpriseknowledgegraph/.OwlBot.yaml b/java-enterpriseknowledgegraph/.OwlBot.yaml new file mode 100644 index 000000000000..a1fbbb886bb5 --- /dev/null +++ b/java-enterpriseknowledgegraph/.OwlBot.yaml @@ -0,0 +1,33 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +deep-remove-regex: +- "/java-enterpriseknowledgegraph/grpc-google-.*/src" +- "/java-enterpriseknowledgegraph/proto-google-.*/src" +- "/java-enterpriseknowledgegraph/google-.*/src" + +deep-preserve-regex: +- "/java-enterpriseknowledgegraph/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" + +deep-copy-regex: +- source: "/google/cloud/enterpriseknowledgegraph/(v.*)/.*-java/proto-google-.*/src" + dest: "/owl-bot-staging/java-enterpriseknowledgegraph/$1/proto-google-cloud-enterpriseknowledgegraph-$1/src" +- source: "/google/cloud/enterpriseknowledgegraph/(v.*)/.*-java/grpc-google-.*/src" + dest: "/owl-bot-staging/java-enterpriseknowledgegraph/$1/grpc-google-cloud-enterpriseknowledgegraph-$1/src" +- source: "/google/cloud/enterpriseknowledgegraph/(v.*)/.*-java/gapic-google-.*/src" + dest: "/owl-bot-staging/java-enterpriseknowledgegraph/$1/google-cloud-enterpriseknowledgegraph/src" + + +api-name: java-enterpriseknowledgegraph \ No newline at end of file diff --git a/java-enterpriseknowledgegraph/.repo-metadata.json b/java-enterpriseknowledgegraph/.repo-metadata.json new file mode 100644 index 000000000000..3b010aa0bc43 --- /dev/null +++ b/java-enterpriseknowledgegraph/.repo-metadata.json @@ -0,0 +1,16 @@ +{ + "api_shortname": "enterpriseknowledgegraph", + "name_pretty": "Enterprise Knowledge Graph", + "product_documentation": "https://cloud.google.com/enterprise-knowledge-graph/docs/overview", + "api_description": "Enterprise Knowledge Graph organizes siloed information into organizational knowledge, which involves consolidating, standardizing, and reconciling data in an efficient and useful way.", + "client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-enterpriseknowledgegraph/latest/overview", + "release_level": "preview", + "transport": "grpc", + "language": "java", + "repo": "googleapis/java-enterpriseknowledgegraph", + "repo_short": "java-enterpriseknowledgegraph", + "distribution_name": "com.google.cloud:google-cloud-enterpriseknowledgegraph", + "api_id": "enterpriseknowledgegraph.googleapis.com", + "library_type": "GAPIC_AUTO", + "requires_billing": true +} \ No newline at end of file diff --git a/java-enterpriseknowledgegraph/README.md b/java-enterpriseknowledgegraph/README.md new file mode 100644 index 000000000000..bdde11e89ef2 --- /dev/null +++ b/java-enterpriseknowledgegraph/README.md @@ -0,0 +1,201 @@ +# Google Enterprise Knowledge Graph Client for Java + +Java idiomatic client for [Enterprise Knowledge Graph][product-docs]. + +[![Maven][maven-version-image]][maven-version-link] +![Stability][stability-image] + +- [Product Documentation][product-docs] +- [Client Library Documentation][javadocs] + +> Note: This client is a work-in-progress, and may occasionally +> make backwards-incompatible changes. + + +## Quickstart + + +If you are using Maven, add this to your pom.xml file: + + +```xml + + com.google.cloud + google-cloud-enterpriseknowledgegraph + 0.0.0 + +``` + +If you are using Gradle without BOM, add this to your dependencies: + +```Groovy +implementation 'com.google.cloud:google-cloud-enterpriseknowledgegraph:0.0.0' +``` + +If you are using SBT, add this to your dependencies: + +```Scala +libraryDependencies += "com.google.cloud" % "google-cloud-enterpriseknowledgegraph" % "0.0.0" +``` + +## Authentication + +See the [Authentication][authentication] section in the base directory's README. + +## Authorization + +The client application making API calls must be granted [authorization scopes][auth-scopes] required for the desired Enterprise Knowledge Graph APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the Enterprise Knowledge Graph API calls. + +## Getting Started + +### Prerequisites + +You will need a [Google Cloud Platform Console][developer-console] project with the Enterprise Knowledge Graph [API enabled][enable-api]. +You will need to [enable billing][enable-billing] to use Google Enterprise Knowledge Graph. +[Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by +[installing the Google Cloud SDK][cloud-sdk] and running the following commands in command line: +`gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`. + +### Installation and setup + +You'll need to obtain the `google-cloud-enterpriseknowledgegraph` library. See the [Quickstart](#quickstart) section +to add `google-cloud-enterpriseknowledgegraph` as a dependency in your code. + +## About Enterprise Knowledge Graph + + +[Enterprise Knowledge Graph][product-docs] Enterprise Knowledge Graph organizes siloed information into organizational knowledge, which involves consolidating, standardizing, and reconciling data in an efficient and useful way. + +See the [Enterprise Knowledge Graph client library docs][javadocs] to learn how to +use this Enterprise Knowledge Graph Client Library. + + + + + + +## Troubleshooting + +To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. + +## Transport + +Enterprise Knowledge Graph uses gRPC for the transport layer. + +## Supported Java Versions + +Java 8 or above is required for using this client. + +Google's Java client libraries, +[Google Cloud Client Libraries][cloudlibs] +and +[Google Cloud API Libraries][apilibs], +follow the +[Oracle Java SE support roadmap][oracle] +(see the Oracle Java SE Product Releases section). + +### For new development + +In general, new feature development occurs with support for the lowest Java +LTS version covered by Oracle's Premier Support (which typically lasts 5 years +from initial General Availability). If the minimum required JVM for a given +library is changed, it is accompanied by a [semver][semver] major release. + +Java 11 and (in September 2021) Java 17 are the best choices for new +development. + +### Keeping production systems current + +Google tests its client libraries with all current LTS versions covered by +Oracle's Extended Support (which typically lasts 8 years from initial +General Availability). + +#### Legacy support + +Google's client libraries support legacy versions of Java runtimes with long +term stable libraries that don't receive feature updates on a best efforts basis +as it may not be possible to backport all patches. + +Google provides updates on a best efforts basis to apps that continue to use +Java 7, though apps might need to upgrade to current versions of the library +that supports their JVM. + +#### Where to find specific information + +The latest versions and the supported Java versions are identified on +the individual GitHub repository `github.com/GoogleAPIs/java-SERVICENAME` +and on [google-cloud-java][g-c-j]. + +## Versioning + + +This library follows [Semantic Versioning](http://semver.org/). + + +It is currently in major version zero (``0.y.z``), which means that anything may change at any time +and the public API should not be considered stable. + + +## Contributing + + +Contributions to this library are always welcome and highly encouraged. + +See [CONTRIBUTING][contributing] for more information how to get started. + +Please note that this project is released with a Contributor Code of Conduct. By participating in +this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more +information. + + +## License + +Apache 2.0 - See [LICENSE][license] for more information. + +## CI Status + +Java Version | Status +------------ | ------ +Java 8 | [![Kokoro CI][kokoro-badge-image-2]][kokoro-badge-link-2] +Java 8 OSX | [![Kokoro CI][kokoro-badge-image-3]][kokoro-badge-link-3] +Java 8 Windows | [![Kokoro CI][kokoro-badge-image-4]][kokoro-badge-link-4] +Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5] + +Java is a registered trademark of Oracle and/or its affiliates. + +[product-docs]: https://cloud.google.com/enterprise-knowledge-graph/docs/overview +[javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-enterpriseknowledgegraph/latest/overview +[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-enterpriseknowledgegraph/java7.svg +[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-enterpriseknowledgegraph/java7.html +[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-enterpriseknowledgegraph/java8.svg +[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-enterpriseknowledgegraph/java8.html +[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-enterpriseknowledgegraph/java8-osx.svg +[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-enterpriseknowledgegraph/java8-osx.html +[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-enterpriseknowledgegraph/java8-win.svg +[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-enterpriseknowledgegraph/java8-win.html +[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-enterpriseknowledgegraph/java11.svg +[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-enterpriseknowledgegraph/java11.html +[stability-image]: https://img.shields.io/badge/stability-preview-yellow +[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-enterpriseknowledgegraph.svg +[maven-version-link]: https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-enterpriseknowledgegraph&core=gav +[authentication]: https://github.com/googleapis/google-cloud-java#authentication +[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes +[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles +[iam-policy]: https://cloud.google.com/iam/docs/overview#cloud-iam-policy +[developer-console]: https://console.developers.google.com/ +[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects +[cloud-sdk]: https://cloud.google.com/sdk/ +[troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/main/troubleshooting/readme.md#troubleshooting +[contributing]: https://github.com/googleapis/java-enterpriseknowledgegraph/blob/main/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/java-enterpriseknowledgegraph/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/java-enterpriseknowledgegraph/blob/main/LICENSE +[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing +[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=enterpriseknowledgegraph.googleapis.com +[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png + +[semver]: https://semver.org/ +[cloudlibs]: https://cloud.google.com/apis/docs/client-libraries-explained +[apilibs]: https://cloud.google.com/apis/docs/client-libraries-explained#google_api_client_libraries +[oracle]: https://www.oracle.com/java/technologies/java-se-support-roadmap.html +[g-c-j]: http://github.com/googleapis/google-cloud-java diff --git a/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph-bom/pom.xml b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph-bom/pom.xml new file mode 100644 index 000000000000..1085445dd6f5 --- /dev/null +++ b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph-bom/pom.xml @@ -0,0 +1,44 @@ + + + 4.0.0 + com.google.cloud + google-cloud-enterpriseknowledgegraph-bom + 0.0.1-SNAPSHOT + pom + + + com.google.cloud + google-cloud-pom-parent + 0.1.1-SNAPSHOT + ../../google-cloud-pom-parent/pom.xml + + + Google Enterprise Knowledge Graph BOM + + BOM for Enterprise Knowledge Graph + + + + true + + + + + + com.google.cloud + google-cloud-enterpriseknowledgegraph + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-enterpriseknowledgegraph-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-enterpriseknowledgegraph-v1 + 0.0.1-SNAPSHOT + + + + diff --git a/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/pom.xml b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/pom.xml new file mode 100644 index 000000000000..eb8ddba02739 --- /dev/null +++ b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/pom.xml @@ -0,0 +1,113 @@ + + + 4.0.0 + com.google.cloud + google-cloud-enterpriseknowledgegraph + 0.0.1-SNAPSHOT + jar + Google Enterprise Knowledge Graph + Enterprise Knowledge Graph Enterprise Knowledge Graph organizes siloed information into organizational knowledge, which involves consolidating, standardizing, and reconciling data in an efficient and useful way. + + com.google.cloud + google-cloud-enterpriseknowledgegraph-parent + 0.0.1-SNAPSHOT + + + google-cloud-enterpriseknowledgegraph + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.api + api-common + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + + com.google.api.grpc + proto-google-cloud-enterpriseknowledgegraph-v1 + + + com.google.guava + guava + + + com.google.api + gax + + + com.google.api + gax-grpc + + + com.google.api + gax-httpjson + + + com.google.api.grpc + grpc-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api.grpc + grpc-google-iam-v1 + + + org.threeten + threetenbp + + + + + junit + junit + test + + + + com.google.api.grpc + grpc-google-cloud-enterpriseknowledgegraph-v1 + test + + + + com.google.api + gax + testlib + test + + + com.google.api + gax-grpc + testlib + test + + + com.google.api + gax-httpjson + testlib + test + + + \ No newline at end of file diff --git a/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/EnterpriseKnowledgeGraphServiceClient.java b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/EnterpriseKnowledgeGraphServiceClient.java new file mode 100644 index 000000000000..90ee1eca143d --- /dev/null +++ b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/EnterpriseKnowledgeGraphServiceClient.java @@ -0,0 +1,1052 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.enterpriseknowledgegraph.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.enterpriseknowledgegraph.v1.stub.EnterpriseKnowledgeGraphServiceStub; +import com.google.cloud.enterpriseknowledgegraph.v1.stub.EnterpriseKnowledgeGraphServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * 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: + * + *

{@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);
+ * }
+ * }
+ * + *

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: + * + *

    + *
  1. 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. + *
  2. 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. + *
  3. 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: + * + *

{@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
+ * EnterpriseKnowledgeGraphServiceSettings enterpriseKnowledgeGraphServiceSettings =
+ *     EnterpriseKnowledgeGraphServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient =
+ *     EnterpriseKnowledgeGraphServiceClient.create(enterpriseKnowledgeGraphServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@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
+ * 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: + * + *

{@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
+ * EnterpriseKnowledgeGraphServiceSettings enterpriseKnowledgeGraphServiceSettings =
+ *     EnterpriseKnowledgeGraphServiceSettings.newBuilder()
+ *         .setTransportChannelProvider(
+ *             EnterpriseKnowledgeGraphServiceSettings.defaultHttpJsonTransportProviderBuilder()
+ *                 .build())
+ *         .build();
+ * EnterpriseKnowledgeGraphServiceClient enterpriseKnowledgeGraphServiceClient =
+ *     EnterpriseKnowledgeGraphServiceClient.create(enterpriseKnowledgeGraphServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class EnterpriseKnowledgeGraphServiceClient implements BackgroundResource { + private final EnterpriseKnowledgeGraphServiceSettings settings; + private final EnterpriseKnowledgeGraphServiceStub stub; + + /** Constructs an instance of EnterpriseKnowledgeGraphServiceClient with default settings. */ + public static final EnterpriseKnowledgeGraphServiceClient create() throws IOException { + return create(EnterpriseKnowledgeGraphServiceSettings.newBuilder().build()); + } + + /** + * 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. + */ + public static final EnterpriseKnowledgeGraphServiceClient create( + EnterpriseKnowledgeGraphServiceSettings settings) throws IOException { + return new EnterpriseKnowledgeGraphServiceClient(settings); + } + + /** + * Constructs an instance of EnterpriseKnowledgeGraphServiceClient, using the given stub for + * making calls. This is for advanced usage - prefer using + * create(EnterpriseKnowledgeGraphServiceSettings). + */ + public static final EnterpriseKnowledgeGraphServiceClient create( + EnterpriseKnowledgeGraphServiceStub stub) { + return new EnterpriseKnowledgeGraphServiceClient(stub); + } + + /** + * 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. + */ + protected EnterpriseKnowledgeGraphServiceClient(EnterpriseKnowledgeGraphServiceSettings settings) + throws IOException { + this.settings = settings; + this.stub = + ((EnterpriseKnowledgeGraphServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected EnterpriseKnowledgeGraphServiceClient(EnterpriseKnowledgeGraphServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final EnterpriseKnowledgeGraphServiceSettings getSettings() { + return settings; + } + + public EnterpriseKnowledgeGraphServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a EntityReconciliationJob. A EntityReconciliationJob once created will right away be + * attempted to start. + * + *

Sample code: + * + *

{@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);
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to create the EntityReconciliationJob + * in. Format: `projects/{project}/locations/{location}` + * @param entityReconciliationJob Required. The EntityReconciliationJob to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final EntityReconciliationJob createEntityReconciliationJob( + LocationName parent, EntityReconciliationJob entityReconciliationJob) { + CreateEntityReconciliationJobRequest request = + CreateEntityReconciliationJobRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setEntityReconciliationJob(entityReconciliationJob) + .build(); + return createEntityReconciliationJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a EntityReconciliationJob. A EntityReconciliationJob once created will right away be + * attempted to start. + * + *

Sample code: + * + *

{@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);
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to create the EntityReconciliationJob + * in. Format: `projects/{project}/locations/{location}` + * @param entityReconciliationJob Required. The EntityReconciliationJob to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final EntityReconciliationJob createEntityReconciliationJob( + String parent, EntityReconciliationJob entityReconciliationJob) { + CreateEntityReconciliationJobRequest request = + CreateEntityReconciliationJobRequest.newBuilder() + .setParent(parent) + .setEntityReconciliationJob(entityReconciliationJob) + .build(); + return createEntityReconciliationJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a EntityReconciliationJob. A EntityReconciliationJob once created will right away be + * attempted to start. + * + *

Sample code: + * + *

{@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);
+   * }
+   * }
+ * + * @param 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 + */ + public final EntityReconciliationJob createEntityReconciliationJob( + CreateEntityReconciliationJobRequest request) { + return createEntityReconciliationJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a EntityReconciliationJob. A EntityReconciliationJob once created will right away be + * attempted to start. + * + *

Sample code: + * + *

{@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 future =
+   *       enterpriseKnowledgeGraphServiceClient
+   *           .createEntityReconciliationJobCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   EntityReconciliationJob response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createEntityReconciliationJobCallable() { + return stub.createEntityReconciliationJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a EntityReconciliationJob. + * + *

Sample code: + * + *

{@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);
+   * }
+   * }
+ * + * @param 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 + */ + public final EntityReconciliationJob getEntityReconciliationJob( + EntityReconciliationJobName name) { + GetEntityReconciliationJobRequest request = + GetEntityReconciliationJobRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getEntityReconciliationJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a EntityReconciliationJob. + * + *

Sample code: + * + *

{@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);
+   * }
+   * }
+ * + * @param 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 + */ + public final EntityReconciliationJob getEntityReconciliationJob(String name) { + GetEntityReconciliationJobRequest request = + GetEntityReconciliationJobRequest.newBuilder().setName(name).build(); + return getEntityReconciliationJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a EntityReconciliationJob. + * + *

Sample code: + * + *

{@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);
+   * }
+   * }
+ * + * @param 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 + */ + public final EntityReconciliationJob getEntityReconciliationJob( + GetEntityReconciliationJobRequest request) { + return getEntityReconciliationJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a EntityReconciliationJob. + * + *

Sample code: + * + *

{@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 future =
+   *       enterpriseKnowledgeGraphServiceClient
+   *           .getEntityReconciliationJobCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   EntityReconciliationJob response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getEntityReconciliationJobCallable() { + return stub.getEntityReconciliationJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Entity Reconciliation Jobs. + * + *

Sample code: + * + *

{@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);
+   *   }
+   * }
+   * }
+ * + * @param 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 + */ + public final ListEntityReconciliationJobsPagedResponse listEntityReconciliationJobs( + LocationName parent) { + ListEntityReconciliationJobsRequest request = + ListEntityReconciliationJobsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listEntityReconciliationJobs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Entity Reconciliation Jobs. + * + *

Sample code: + * + *

{@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);
+   *   }
+   * }
+   * }
+ * + * @param 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 + */ + public final ListEntityReconciliationJobsPagedResponse listEntityReconciliationJobs( + String parent) { + ListEntityReconciliationJobsRequest request = + ListEntityReconciliationJobsRequest.newBuilder().setParent(parent).build(); + return listEntityReconciliationJobs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Entity Reconciliation Jobs. + * + *

Sample code: + * + *

{@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);
+   *   }
+   * }
+   * }
+ * + * @param 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 + */ + public final ListEntityReconciliationJobsPagedResponse listEntityReconciliationJobs( + ListEntityReconciliationJobsRequest request) { + return listEntityReconciliationJobsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Entity Reconciliation Jobs. + * + *

Sample code: + * + *

{@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 future =
+   *       enterpriseKnowledgeGraphServiceClient
+   *           .listEntityReconciliationJobsPagedCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   for (EntityReconciliationJob element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListEntityReconciliationJobsRequest, ListEntityReconciliationJobsPagedResponse> + listEntityReconciliationJobsPagedCallable() { + return stub.listEntityReconciliationJobsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Entity Reconciliation Jobs. + * + *

Sample code: + * + *

{@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;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListEntityReconciliationJobsRequest, ListEntityReconciliationJobsResponse> + listEntityReconciliationJobsCallable() { + return stub.listEntityReconciliationJobsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cancels a EntityReconciliationJob. Success of cancellation is not guaranteed. + * + *

Sample code: + * + *

{@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);
+   * }
+   * }
+ * + * @param 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 + */ + public final void cancelEntityReconciliationJob(EntityReconciliationJobName name) { + CancelEntityReconciliationJobRequest request = + CancelEntityReconciliationJobRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + cancelEntityReconciliationJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cancels a EntityReconciliationJob. Success of cancellation is not guaranteed. + * + *

Sample code: + * + *

{@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);
+   * }
+   * }
+ * + * @param 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 + */ + public final void cancelEntityReconciliationJob(String name) { + CancelEntityReconciliationJobRequest request = + CancelEntityReconciliationJobRequest.newBuilder().setName(name).build(); + cancelEntityReconciliationJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cancels a EntityReconciliationJob. Success of cancellation is not guaranteed. + * + *

Sample code: + * + *

{@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);
+   * }
+   * }
+ * + * @param 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 + */ + public final void cancelEntityReconciliationJob(CancelEntityReconciliationJobRequest request) { + cancelEntityReconciliationJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cancels a EntityReconciliationJob. Success of cancellation is not guaranteed. + * + *

Sample code: + * + *

{@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 future =
+   *       enterpriseKnowledgeGraphServiceClient
+   *           .cancelEntityReconciliationJobCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + cancelEntityReconciliationJobCallable() { + return stub.cancelEntityReconciliationJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a EntityReconciliationJob. It only deletes the job when the job state is in FAILED, + * SUCCEEDED, and CANCELLED. + * + *

Sample code: + * + *

{@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);
+   * }
+   * }
+ * + * @param 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 + */ + public final void deleteEntityReconciliationJob(EntityReconciliationJobName name) { + DeleteEntityReconciliationJobRequest request = + DeleteEntityReconciliationJobRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteEntityReconciliationJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a EntityReconciliationJob. It only deletes the job when the job state is in FAILED, + * SUCCEEDED, and CANCELLED. + * + *

Sample code: + * + *

{@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);
+   * }
+   * }
+ * + * @param 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 + */ + public final void deleteEntityReconciliationJob(String name) { + DeleteEntityReconciliationJobRequest request = + DeleteEntityReconciliationJobRequest.newBuilder().setName(name).build(); + deleteEntityReconciliationJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a EntityReconciliationJob. It only deletes the job when the job state is in FAILED, + * SUCCEEDED, and CANCELLED. + * + *

Sample code: + * + *

{@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);
+   * }
+   * }
+ * + * @param 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 + */ + public final void deleteEntityReconciliationJob(DeleteEntityReconciliationJobRequest request) { + deleteEntityReconciliationJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a EntityReconciliationJob. It only deletes the job when the job state is in FAILED, + * SUCCEEDED, and CANCELLED. + * + *

Sample code: + * + *

{@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 future =
+   *       enterpriseKnowledgeGraphServiceClient
+   *           .deleteEntityReconciliationJobCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteEntityReconciliationJobCallable() { + return stub.deleteEntityReconciliationJobCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListEntityReconciliationJobsPagedResponse + extends AbstractPagedListResponse< + ListEntityReconciliationJobsRequest, + ListEntityReconciliationJobsResponse, + EntityReconciliationJob, + ListEntityReconciliationJobsPage, + ListEntityReconciliationJobsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListEntityReconciliationJobsRequest, + ListEntityReconciliationJobsResponse, + EntityReconciliationJob> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListEntityReconciliationJobsPage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListEntityReconciliationJobsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListEntityReconciliationJobsPagedResponse(ListEntityReconciliationJobsPage page) { + super(page, ListEntityReconciliationJobsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListEntityReconciliationJobsPage + extends AbstractPage< + ListEntityReconciliationJobsRequest, + ListEntityReconciliationJobsResponse, + EntityReconciliationJob, + ListEntityReconciliationJobsPage> { + + private ListEntityReconciliationJobsPage( + PageContext< + ListEntityReconciliationJobsRequest, + ListEntityReconciliationJobsResponse, + EntityReconciliationJob> + context, + ListEntityReconciliationJobsResponse response) { + super(context, response); + } + + private static ListEntityReconciliationJobsPage createEmptyPage() { + return new ListEntityReconciliationJobsPage(null, null); + } + + @Override + protected ListEntityReconciliationJobsPage createPage( + PageContext< + ListEntityReconciliationJobsRequest, + ListEntityReconciliationJobsResponse, + EntityReconciliationJob> + context, + ListEntityReconciliationJobsResponse response) { + return new ListEntityReconciliationJobsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListEntityReconciliationJobsRequest, + ListEntityReconciliationJobsResponse, + EntityReconciliationJob> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListEntityReconciliationJobsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListEntityReconciliationJobsRequest, + ListEntityReconciliationJobsResponse, + EntityReconciliationJob, + ListEntityReconciliationJobsPage, + ListEntityReconciliationJobsFixedSizeCollection> { + + private ListEntityReconciliationJobsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListEntityReconciliationJobsFixedSizeCollection createEmptyCollection() { + return new ListEntityReconciliationJobsFixedSizeCollection(null, 0); + } + + @Override + protected ListEntityReconciliationJobsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListEntityReconciliationJobsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/EnterpriseKnowledgeGraphServiceSettings.java b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/EnterpriseKnowledgeGraphServiceSettings.java new file mode 100644 index 000000000000..4757a56cd8ba --- /dev/null +++ b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/EnterpriseKnowledgeGraphServiceSettings.java @@ -0,0 +1,274 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.enterpriseknowledgegraph.v1; + +import static com.google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphServiceClient.ListEntityReconciliationJobsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.enterpriseknowledgegraph.v1.stub.EnterpriseKnowledgeGraphServiceStubSettings; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link EnterpriseKnowledgeGraphServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (enterpriseknowledgegraph.googleapis.com) and default port + * (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of createEntityReconciliationJob to 30 seconds: + * + *

{@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
+ * EnterpriseKnowledgeGraphServiceSettings.Builder enterpriseKnowledgeGraphServiceSettingsBuilder =
+ *     EnterpriseKnowledgeGraphServiceSettings.newBuilder();
+ * enterpriseKnowledgeGraphServiceSettingsBuilder
+ *     .createEntityReconciliationJobSettings()
+ *     .setRetrySettings(
+ *         enterpriseKnowledgeGraphServiceSettingsBuilder
+ *             .createEntityReconciliationJobSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * EnterpriseKnowledgeGraphServiceSettings enterpriseKnowledgeGraphServiceSettings =
+ *     enterpriseKnowledgeGraphServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class EnterpriseKnowledgeGraphServiceSettings + extends ClientSettings { + + /** Returns the object with the settings used for calls to createEntityReconciliationJob. */ + public UnaryCallSettings + createEntityReconciliationJobSettings() { + return ((EnterpriseKnowledgeGraphServiceStubSettings) getStubSettings()) + .createEntityReconciliationJobSettings(); + } + + /** Returns the object with the settings used for calls to getEntityReconciliationJob. */ + public UnaryCallSettings + getEntityReconciliationJobSettings() { + return ((EnterpriseKnowledgeGraphServiceStubSettings) getStubSettings()) + .getEntityReconciliationJobSettings(); + } + + /** Returns the object with the settings used for calls to listEntityReconciliationJobs. */ + public PagedCallSettings< + ListEntityReconciliationJobsRequest, + ListEntityReconciliationJobsResponse, + ListEntityReconciliationJobsPagedResponse> + listEntityReconciliationJobsSettings() { + return ((EnterpriseKnowledgeGraphServiceStubSettings) getStubSettings()) + .listEntityReconciliationJobsSettings(); + } + + /** Returns the object with the settings used for calls to cancelEntityReconciliationJob. */ + public UnaryCallSettings + cancelEntityReconciliationJobSettings() { + return ((EnterpriseKnowledgeGraphServiceStubSettings) getStubSettings()) + .cancelEntityReconciliationJobSettings(); + } + + /** Returns the object with the settings used for calls to deleteEntityReconciliationJob. */ + public UnaryCallSettings + deleteEntityReconciliationJobSettings() { + return ((EnterpriseKnowledgeGraphServiceStubSettings) getStubSettings()) + .deleteEntityReconciliationJobSettings(); + } + + public static final EnterpriseKnowledgeGraphServiceSettings create( + EnterpriseKnowledgeGraphServiceStubSettings stub) throws IOException { + return new EnterpriseKnowledgeGraphServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return EnterpriseKnowledgeGraphServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return EnterpriseKnowledgeGraphServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return EnterpriseKnowledgeGraphServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return EnterpriseKnowledgeGraphServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return EnterpriseKnowledgeGraphServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return EnterpriseKnowledgeGraphServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return EnterpriseKnowledgeGraphServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return EnterpriseKnowledgeGraphServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected EnterpriseKnowledgeGraphServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for EnterpriseKnowledgeGraphServiceSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(EnterpriseKnowledgeGraphServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(EnterpriseKnowledgeGraphServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(EnterpriseKnowledgeGraphServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(EnterpriseKnowledgeGraphServiceStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(EnterpriseKnowledgeGraphServiceStubSettings.newHttpJsonBuilder()); + } + + public EnterpriseKnowledgeGraphServiceStubSettings.Builder getStubSettingsBuilder() { + return ((EnterpriseKnowledgeGraphServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createEntityReconciliationJob. */ + public UnaryCallSettings.Builder + createEntityReconciliationJobSettings() { + return getStubSettingsBuilder().createEntityReconciliationJobSettings(); + } + + /** Returns the builder for the settings used for calls to getEntityReconciliationJob. */ + public UnaryCallSettings.Builder + getEntityReconciliationJobSettings() { + return getStubSettingsBuilder().getEntityReconciliationJobSettings(); + } + + /** Returns the builder for the settings used for calls to listEntityReconciliationJobs. */ + public PagedCallSettings.Builder< + ListEntityReconciliationJobsRequest, + ListEntityReconciliationJobsResponse, + ListEntityReconciliationJobsPagedResponse> + listEntityReconciliationJobsSettings() { + return getStubSettingsBuilder().listEntityReconciliationJobsSettings(); + } + + /** Returns the builder for the settings used for calls to cancelEntityReconciliationJob. */ + public UnaryCallSettings.Builder + cancelEntityReconciliationJobSettings() { + return getStubSettingsBuilder().cancelEntityReconciliationJobSettings(); + } + + /** Returns the builder for the settings used for calls to deleteEntityReconciliationJob. */ + public UnaryCallSettings.Builder + deleteEntityReconciliationJobSettings() { + return getStubSettingsBuilder().deleteEntityReconciliationJobSettings(); + } + + @Override + public EnterpriseKnowledgeGraphServiceSettings build() throws IOException { + return new EnterpriseKnowledgeGraphServiceSettings(this); + } + } +} diff --git a/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/gapic_metadata.json b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/gapic_metadata.json new file mode 100644 index 000000000000..904cfd605df1 --- /dev/null +++ b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/gapic_metadata.json @@ -0,0 +1,33 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.enterpriseknowledgegraph.v1", + "libraryPackage": "com.google.cloud.enterpriseknowledgegraph.v1", + "services": { + "EnterpriseKnowledgeGraphService": { + "clients": { + "grpc": { + "libraryClient": "EnterpriseKnowledgeGraphServiceClient", + "rpcs": { + "CancelEntityReconciliationJob": { + "methods": ["cancelEntityReconciliationJob", "cancelEntityReconciliationJob", "cancelEntityReconciliationJob", "cancelEntityReconciliationJobCallable"] + }, + "CreateEntityReconciliationJob": { + "methods": ["createEntityReconciliationJob", "createEntityReconciliationJob", "createEntityReconciliationJob", "createEntityReconciliationJobCallable"] + }, + "DeleteEntityReconciliationJob": { + "methods": ["deleteEntityReconciliationJob", "deleteEntityReconciliationJob", "deleteEntityReconciliationJob", "deleteEntityReconciliationJobCallable"] + }, + "GetEntityReconciliationJob": { + "methods": ["getEntityReconciliationJob", "getEntityReconciliationJob", "getEntityReconciliationJob", "getEntityReconciliationJobCallable"] + }, + "ListEntityReconciliationJobs": { + "methods": ["listEntityReconciliationJobs", "listEntityReconciliationJobs", "listEntityReconciliationJobs", "listEntityReconciliationJobsPagedCallable", "listEntityReconciliationJobsCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/package-info.java b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/package-info.java new file mode 100644 index 000000000000..4261f01c6096 --- /dev/null +++ b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/package-info.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * A client to Enterprise Knowledge Graph API + * + *

The interfaces provided are listed below, along with usage samples. + * + *

======================= EnterpriseKnowledgeGraphServiceClient ======================= + * + *

Service Description: APIs for enterprise knowledge graph product. + * + *

Sample for EnterpriseKnowledgeGraphServiceClient: + * + *

{@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);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.enterpriseknowledgegraph.v1; + +import javax.annotation.Generated; diff --git a/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/stub/EnterpriseKnowledgeGraphServiceStub.java b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/stub/EnterpriseKnowledgeGraphServiceStub.java new file mode 100644 index 000000000000..64123ccd3851 --- /dev/null +++ b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/stub/EnterpriseKnowledgeGraphServiceStub.java @@ -0,0 +1,81 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.enterpriseknowledgegraph.v1.stub; + +import static com.google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphServiceClient.ListEntityReconciliationJobsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest; +import com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest; +import com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest; +import com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob; +import com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest; +import com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest; +import com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the EnterpriseKnowledgeGraphService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class EnterpriseKnowledgeGraphServiceStub implements BackgroundResource { + + public UnaryCallable + createEntityReconciliationJobCallable() { + throw new UnsupportedOperationException( + "Not implemented: createEntityReconciliationJobCallable()"); + } + + public UnaryCallable + getEntityReconciliationJobCallable() { + throw new UnsupportedOperationException( + "Not implemented: getEntityReconciliationJobCallable()"); + } + + public UnaryCallable< + ListEntityReconciliationJobsRequest, ListEntityReconciliationJobsPagedResponse> + listEntityReconciliationJobsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listEntityReconciliationJobsPagedCallable()"); + } + + public UnaryCallable + listEntityReconciliationJobsCallable() { + throw new UnsupportedOperationException( + "Not implemented: listEntityReconciliationJobsCallable()"); + } + + public UnaryCallable + cancelEntityReconciliationJobCallable() { + throw new UnsupportedOperationException( + "Not implemented: cancelEntityReconciliationJobCallable()"); + } + + public UnaryCallable + deleteEntityReconciliationJobCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteEntityReconciliationJobCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/stub/EnterpriseKnowledgeGraphServiceStubSettings.java b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/stub/EnterpriseKnowledgeGraphServiceStubSettings.java new file mode 100644 index 000000000000..b612962ae44b --- /dev/null +++ b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/stub/EnterpriseKnowledgeGraphServiceStubSettings.java @@ -0,0 +1,573 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.enterpriseknowledgegraph.v1.stub; + +import static com.google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphServiceClient.ListEntityReconciliationJobsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest; +import com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest; +import com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest; +import com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob; +import com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest; +import com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest; +import com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link EnterpriseKnowledgeGraphServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (enterpriseknowledgegraph.googleapis.com) and default port + * (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of createEntityReconciliationJob to 30 seconds: + * + *

{@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
+ * EnterpriseKnowledgeGraphServiceStubSettings.Builder
+ *     enterpriseKnowledgeGraphServiceSettingsBuilder =
+ *         EnterpriseKnowledgeGraphServiceStubSettings.newBuilder();
+ * enterpriseKnowledgeGraphServiceSettingsBuilder
+ *     .createEntityReconciliationJobSettings()
+ *     .setRetrySettings(
+ *         enterpriseKnowledgeGraphServiceSettingsBuilder
+ *             .createEntityReconciliationJobSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * EnterpriseKnowledgeGraphServiceStubSettings enterpriseKnowledgeGraphServiceSettings =
+ *     enterpriseKnowledgeGraphServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class EnterpriseKnowledgeGraphServiceStubSettings + extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings + createEntityReconciliationJobSettings; + private final UnaryCallSettings + getEntityReconciliationJobSettings; + private final PagedCallSettings< + ListEntityReconciliationJobsRequest, + ListEntityReconciliationJobsResponse, + ListEntityReconciliationJobsPagedResponse> + listEntityReconciliationJobsSettings; + private final UnaryCallSettings + cancelEntityReconciliationJobSettings; + private final UnaryCallSettings + deleteEntityReconciliationJobSettings; + + private static final PagedListDescriptor< + ListEntityReconciliationJobsRequest, + ListEntityReconciliationJobsResponse, + EntityReconciliationJob> + LIST_ENTITY_RECONCILIATION_JOBS_PAGE_STR_DESC = + new PagedListDescriptor< + ListEntityReconciliationJobsRequest, + ListEntityReconciliationJobsResponse, + EntityReconciliationJob>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListEntityReconciliationJobsRequest injectToken( + ListEntityReconciliationJobsRequest payload, String token) { + return ListEntityReconciliationJobsRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListEntityReconciliationJobsRequest injectPageSize( + ListEntityReconciliationJobsRequest payload, int pageSize) { + return ListEntityReconciliationJobsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListEntityReconciliationJobsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListEntityReconciliationJobsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListEntityReconciliationJobsResponse payload) { + return payload.getEntityReconciliationJobsList() == null + ? ImmutableList.of() + : payload.getEntityReconciliationJobsList(); + } + }; + + private static final PagedListResponseFactory< + ListEntityReconciliationJobsRequest, + ListEntityReconciliationJobsResponse, + ListEntityReconciliationJobsPagedResponse> + LIST_ENTITY_RECONCILIATION_JOBS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListEntityReconciliationJobsRequest, + ListEntityReconciliationJobsResponse, + ListEntityReconciliationJobsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable< + ListEntityReconciliationJobsRequest, ListEntityReconciliationJobsResponse> + callable, + ListEntityReconciliationJobsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListEntityReconciliationJobsRequest, + ListEntityReconciliationJobsResponse, + EntityReconciliationJob> + pageContext = + PageContext.create( + callable, + LIST_ENTITY_RECONCILIATION_JOBS_PAGE_STR_DESC, + request, + context); + return ListEntityReconciliationJobsPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createEntityReconciliationJob. */ + public UnaryCallSettings + createEntityReconciliationJobSettings() { + return createEntityReconciliationJobSettings; + } + + /** Returns the object with the settings used for calls to getEntityReconciliationJob. */ + public UnaryCallSettings + getEntityReconciliationJobSettings() { + return getEntityReconciliationJobSettings; + } + + /** Returns the object with the settings used for calls to listEntityReconciliationJobs. */ + public PagedCallSettings< + ListEntityReconciliationJobsRequest, + ListEntityReconciliationJobsResponse, + ListEntityReconciliationJobsPagedResponse> + listEntityReconciliationJobsSettings() { + return listEntityReconciliationJobsSettings; + } + + /** Returns the object with the settings used for calls to cancelEntityReconciliationJob. */ + public UnaryCallSettings + cancelEntityReconciliationJobSettings() { + return cancelEntityReconciliationJobSettings; + } + + /** Returns the object with the settings used for calls to deleteEntityReconciliationJob. */ + public UnaryCallSettings + deleteEntityReconciliationJobSettings() { + return deleteEntityReconciliationJobSettings; + } + + public EnterpriseKnowledgeGraphServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcEnterpriseKnowledgeGraphServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonEnterpriseKnowledgeGraphServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "enterpriseknowledgegraph.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "enterpriseknowledgegraph.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", + GaxProperties.getLibraryVersion(EnterpriseKnowledgeGraphServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", + GaxProperties.getLibraryVersion(EnterpriseKnowledgeGraphServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return EnterpriseKnowledgeGraphServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected EnterpriseKnowledgeGraphServiceStubSettings(Builder settingsBuilder) + throws IOException { + super(settingsBuilder); + + createEntityReconciliationJobSettings = + settingsBuilder.createEntityReconciliationJobSettings().build(); + getEntityReconciliationJobSettings = + settingsBuilder.getEntityReconciliationJobSettings().build(); + listEntityReconciliationJobsSettings = + settingsBuilder.listEntityReconciliationJobsSettings().build(); + cancelEntityReconciliationJobSettings = + settingsBuilder.cancelEntityReconciliationJobSettings().build(); + deleteEntityReconciliationJobSettings = + settingsBuilder.deleteEntityReconciliationJobSettings().build(); + } + + /** Builder for EnterpriseKnowledgeGraphServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder< + CreateEntityReconciliationJobRequest, EntityReconciliationJob> + createEntityReconciliationJobSettings; + private final UnaryCallSettings.Builder< + GetEntityReconciliationJobRequest, EntityReconciliationJob> + getEntityReconciliationJobSettings; + private final PagedCallSettings.Builder< + ListEntityReconciliationJobsRequest, + ListEntityReconciliationJobsResponse, + ListEntityReconciliationJobsPagedResponse> + listEntityReconciliationJobsSettings; + private final UnaryCallSettings.Builder + cancelEntityReconciliationJobSettings; + private final UnaryCallSettings.Builder + deleteEntityReconciliationJobSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_1_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(10000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createEntityReconciliationJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getEntityReconciliationJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listEntityReconciliationJobsSettings = + PagedCallSettings.newBuilder(LIST_ENTITY_RECONCILIATION_JOBS_PAGE_STR_FACT); + cancelEntityReconciliationJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteEntityReconciliationJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createEntityReconciliationJobSettings, + getEntityReconciliationJobSettings, + listEntityReconciliationJobsSettings, + cancelEntityReconciliationJobSettings, + deleteEntityReconciliationJobSettings); + initDefaults(this); + } + + protected Builder(EnterpriseKnowledgeGraphServiceStubSettings settings) { + super(settings); + + createEntityReconciliationJobSettings = + settings.createEntityReconciliationJobSettings.toBuilder(); + getEntityReconciliationJobSettings = settings.getEntityReconciliationJobSettings.toBuilder(); + listEntityReconciliationJobsSettings = + settings.listEntityReconciliationJobsSettings.toBuilder(); + cancelEntityReconciliationJobSettings = + settings.cancelEntityReconciliationJobSettings.toBuilder(); + deleteEntityReconciliationJobSettings = + settings.deleteEntityReconciliationJobSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createEntityReconciliationJobSettings, + getEntityReconciliationJobSettings, + listEntityReconciliationJobsSettings, + cancelEntityReconciliationJobSettings, + deleteEntityReconciliationJobSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createEntityReconciliationJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getEntityReconciliationJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listEntityReconciliationJobsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .cancelEntityReconciliationJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteEntityReconciliationJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createEntityReconciliationJob. */ + public UnaryCallSettings.Builder + createEntityReconciliationJobSettings() { + return createEntityReconciliationJobSettings; + } + + /** Returns the builder for the settings used for calls to getEntityReconciliationJob. */ + public UnaryCallSettings.Builder + getEntityReconciliationJobSettings() { + return getEntityReconciliationJobSettings; + } + + /** Returns the builder for the settings used for calls to listEntityReconciliationJobs. */ + public PagedCallSettings.Builder< + ListEntityReconciliationJobsRequest, + ListEntityReconciliationJobsResponse, + ListEntityReconciliationJobsPagedResponse> + listEntityReconciliationJobsSettings() { + return listEntityReconciliationJobsSettings; + } + + /** Returns the builder for the settings used for calls to cancelEntityReconciliationJob. */ + public UnaryCallSettings.Builder + cancelEntityReconciliationJobSettings() { + return cancelEntityReconciliationJobSettings; + } + + /** Returns the builder for the settings used for calls to deleteEntityReconciliationJob. */ + public UnaryCallSettings.Builder + deleteEntityReconciliationJobSettings() { + return deleteEntityReconciliationJobSettings; + } + + @Override + public EnterpriseKnowledgeGraphServiceStubSettings build() throws IOException { + return new EnterpriseKnowledgeGraphServiceStubSettings(this); + } + } +} diff --git a/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/stub/GrpcEnterpriseKnowledgeGraphServiceCallableFactory.java b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/stub/GrpcEnterpriseKnowledgeGraphServiceCallableFactory.java new file mode 100644 index 000000000000..92d20e4adf92 --- /dev/null +++ b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/stub/GrpcEnterpriseKnowledgeGraphServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.enterpriseknowledgegraph.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the EnterpriseKnowledgeGraphService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcEnterpriseKnowledgeGraphServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/stub/GrpcEnterpriseKnowledgeGraphServiceStub.java b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/stub/GrpcEnterpriseKnowledgeGraphServiceStub.java new file mode 100644 index 000000000000..8cc337906f36 --- /dev/null +++ b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/stub/GrpcEnterpriseKnowledgeGraphServiceStub.java @@ -0,0 +1,347 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.enterpriseknowledgegraph.v1.stub; + +import static com.google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphServiceClient.ListEntityReconciliationJobsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest; +import com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest; +import com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest; +import com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob; +import com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest; +import com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest; +import com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the EnterpriseKnowledgeGraphService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcEnterpriseKnowledgeGraphServiceStub extends EnterpriseKnowledgeGraphServiceStub { + private static final MethodDescriptor< + CreateEntityReconciliationJobRequest, EntityReconciliationJob> + createEntityReconciliationJobMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService/CreateEntityReconciliationJob") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateEntityReconciliationJobRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(EntityReconciliationJob.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getEntityReconciliationJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService/GetEntityReconciliationJob") + .setRequestMarshaller( + ProtoUtils.marshaller(GetEntityReconciliationJobRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(EntityReconciliationJob.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + ListEntityReconciliationJobsRequest, ListEntityReconciliationJobsResponse> + listEntityReconciliationJobsMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService/ListEntityReconciliationJobs") + .setRequestMarshaller( + ProtoUtils.marshaller(ListEntityReconciliationJobsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListEntityReconciliationJobsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + cancelEntityReconciliationJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService/CancelEntityReconciliationJob") + .setRequestMarshaller( + ProtoUtils.marshaller(CancelEntityReconciliationJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteEntityReconciliationJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService/DeleteEntityReconciliationJob") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteEntityReconciliationJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private final UnaryCallable + createEntityReconciliationJobCallable; + private final UnaryCallable + getEntityReconciliationJobCallable; + private final UnaryCallable< + ListEntityReconciliationJobsRequest, ListEntityReconciliationJobsResponse> + listEntityReconciliationJobsCallable; + private final UnaryCallable< + ListEntityReconciliationJobsRequest, ListEntityReconciliationJobsPagedResponse> + listEntityReconciliationJobsPagedCallable; + private final UnaryCallable + cancelEntityReconciliationJobCallable; + private final UnaryCallable + deleteEntityReconciliationJobCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcEnterpriseKnowledgeGraphServiceStub create( + EnterpriseKnowledgeGraphServiceStubSettings settings) throws IOException { + return new GrpcEnterpriseKnowledgeGraphServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcEnterpriseKnowledgeGraphServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcEnterpriseKnowledgeGraphServiceStub( + EnterpriseKnowledgeGraphServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcEnterpriseKnowledgeGraphServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcEnterpriseKnowledgeGraphServiceStub( + EnterpriseKnowledgeGraphServiceStubSettings.newBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of GrpcEnterpriseKnowledgeGraphServiceStub, 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. + */ + protected GrpcEnterpriseKnowledgeGraphServiceStub( + EnterpriseKnowledgeGraphServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcEnterpriseKnowledgeGraphServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcEnterpriseKnowledgeGraphServiceStub, 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. + */ + protected GrpcEnterpriseKnowledgeGraphServiceStub( + EnterpriseKnowledgeGraphServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + createEntityReconciliationJobTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(createEntityReconciliationJobMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + getEntityReconciliationJobTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(getEntityReconciliationJobMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listEntityReconciliationJobsTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(listEntityReconciliationJobsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + cancelEntityReconciliationJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(cancelEntityReconciliationJobMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + deleteEntityReconciliationJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteEntityReconciliationJobMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + + this.createEntityReconciliationJobCallable = + callableFactory.createUnaryCallable( + createEntityReconciliationJobTransportSettings, + settings.createEntityReconciliationJobSettings(), + clientContext); + this.getEntityReconciliationJobCallable = + callableFactory.createUnaryCallable( + getEntityReconciliationJobTransportSettings, + settings.getEntityReconciliationJobSettings(), + clientContext); + this.listEntityReconciliationJobsCallable = + callableFactory.createUnaryCallable( + listEntityReconciliationJobsTransportSettings, + settings.listEntityReconciliationJobsSettings(), + clientContext); + this.listEntityReconciliationJobsPagedCallable = + callableFactory.createPagedCallable( + listEntityReconciliationJobsTransportSettings, + settings.listEntityReconciliationJobsSettings(), + clientContext); + this.cancelEntityReconciliationJobCallable = + callableFactory.createUnaryCallable( + cancelEntityReconciliationJobTransportSettings, + settings.cancelEntityReconciliationJobSettings(), + clientContext); + this.deleteEntityReconciliationJobCallable = + callableFactory.createUnaryCallable( + deleteEntityReconciliationJobTransportSettings, + settings.deleteEntityReconciliationJobSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + createEntityReconciliationJobCallable() { + return createEntityReconciliationJobCallable; + } + + @Override + public UnaryCallable + getEntityReconciliationJobCallable() { + return getEntityReconciliationJobCallable; + } + + @Override + public UnaryCallable + listEntityReconciliationJobsCallable() { + return listEntityReconciliationJobsCallable; + } + + @Override + public UnaryCallable< + ListEntityReconciliationJobsRequest, ListEntityReconciliationJobsPagedResponse> + listEntityReconciliationJobsPagedCallable() { + return listEntityReconciliationJobsPagedCallable; + } + + @Override + public UnaryCallable + cancelEntityReconciliationJobCallable() { + return cancelEntityReconciliationJobCallable; + } + + @Override + public UnaryCallable + deleteEntityReconciliationJobCallable() { + return deleteEntityReconciliationJobCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/stub/HttpJsonEnterpriseKnowledgeGraphServiceCallableFactory.java b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/stub/HttpJsonEnterpriseKnowledgeGraphServiceCallableFactory.java new file mode 100644 index 000000000000..8c9bd086fc09 --- /dev/null +++ b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/stub/HttpJsonEnterpriseKnowledgeGraphServiceCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.enterpriseknowledgegraph.v1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the EnterpriseKnowledgeGraphService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonEnterpriseKnowledgeGraphServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/stub/HttpJsonEnterpriseKnowledgeGraphServiceStub.java b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/stub/HttpJsonEnterpriseKnowledgeGraphServiceStub.java new file mode 100644 index 000000000000..9d72346f45ba --- /dev/null +++ b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/stub/HttpJsonEnterpriseKnowledgeGraphServiceStub.java @@ -0,0 +1,465 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.enterpriseknowledgegraph.v1.stub; + +import static com.google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphServiceClient.ListEntityReconciliationJobsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest; +import com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest; +import com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest; +import com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob; +import com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest; +import com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest; +import com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the EnterpriseKnowledgeGraphService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonEnterpriseKnowledgeGraphServiceStub + extends EnterpriseKnowledgeGraphServiceStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor< + CreateEntityReconciliationJobRequest, EntityReconciliationJob> + createEntityReconciliationJobMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService/CreateEntityReconciliationJob") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/entityReconciliationJobs", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "entityReconciliationJob", + request.getEntityReconciliationJob(), + false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(EntityReconciliationJob.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + GetEntityReconciliationJobRequest, EntityReconciliationJob> + getEntityReconciliationJobMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService/GetEntityReconciliationJob") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/entityReconciliationJobs/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(EntityReconciliationJob.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListEntityReconciliationJobsRequest, ListEntityReconciliationJobsResponse> + listEntityReconciliationJobsMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() + .setFullMethodName( + "google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService/ListEntityReconciliationJobs") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/entityReconciliationJobs", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListEntityReconciliationJobsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + cancelEntityReconciliationJobMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService/CancelEntityReconciliationJob") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/entityReconciliationJobs/*}:cancel", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteEntityReconciliationJobMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService/DeleteEntityReconciliationJob") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/entityReconciliationJobs/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable + createEntityReconciliationJobCallable; + private final UnaryCallable + getEntityReconciliationJobCallable; + private final UnaryCallable< + ListEntityReconciliationJobsRequest, ListEntityReconciliationJobsResponse> + listEntityReconciliationJobsCallable; + private final UnaryCallable< + ListEntityReconciliationJobsRequest, ListEntityReconciliationJobsPagedResponse> + listEntityReconciliationJobsPagedCallable; + private final UnaryCallable + cancelEntityReconciliationJobCallable; + private final UnaryCallable + deleteEntityReconciliationJobCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonEnterpriseKnowledgeGraphServiceStub create( + EnterpriseKnowledgeGraphServiceStubSettings settings) throws IOException { + return new HttpJsonEnterpriseKnowledgeGraphServiceStub( + settings, ClientContext.create(settings)); + } + + public static final HttpJsonEnterpriseKnowledgeGraphServiceStub create( + ClientContext clientContext) throws IOException { + return new HttpJsonEnterpriseKnowledgeGraphServiceStub( + EnterpriseKnowledgeGraphServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonEnterpriseKnowledgeGraphServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonEnterpriseKnowledgeGraphServiceStub( + EnterpriseKnowledgeGraphServiceStubSettings.newHttpJsonBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of HttpJsonEnterpriseKnowledgeGraphServiceStub, 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. + */ + protected HttpJsonEnterpriseKnowledgeGraphServiceStub( + EnterpriseKnowledgeGraphServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonEnterpriseKnowledgeGraphServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonEnterpriseKnowledgeGraphServiceStub, 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. + */ + protected HttpJsonEnterpriseKnowledgeGraphServiceStub( + EnterpriseKnowledgeGraphServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings + createEntityReconciliationJobTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(createEntityReconciliationJobMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + getEntityReconciliationJobTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(getEntityReconciliationJobMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listEntityReconciliationJobsTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(listEntityReconciliationJobsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + cancelEntityReconciliationJobTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(cancelEntityReconciliationJobMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + deleteEntityReconciliationJobTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteEntityReconciliationJobMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.createEntityReconciliationJobCallable = + callableFactory.createUnaryCallable( + createEntityReconciliationJobTransportSettings, + settings.createEntityReconciliationJobSettings(), + clientContext); + this.getEntityReconciliationJobCallable = + callableFactory.createUnaryCallable( + getEntityReconciliationJobTransportSettings, + settings.getEntityReconciliationJobSettings(), + clientContext); + this.listEntityReconciliationJobsCallable = + callableFactory.createUnaryCallable( + listEntityReconciliationJobsTransportSettings, + settings.listEntityReconciliationJobsSettings(), + clientContext); + this.listEntityReconciliationJobsPagedCallable = + callableFactory.createPagedCallable( + listEntityReconciliationJobsTransportSettings, + settings.listEntityReconciliationJobsSettings(), + clientContext); + this.cancelEntityReconciliationJobCallable = + callableFactory.createUnaryCallable( + cancelEntityReconciliationJobTransportSettings, + settings.cancelEntityReconciliationJobSettings(), + clientContext); + this.deleteEntityReconciliationJobCallable = + callableFactory.createUnaryCallable( + deleteEntityReconciliationJobTransportSettings, + settings.deleteEntityReconciliationJobSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(createEntityReconciliationJobMethodDescriptor); + methodDescriptors.add(getEntityReconciliationJobMethodDescriptor); + methodDescriptors.add(listEntityReconciliationJobsMethodDescriptor); + methodDescriptors.add(cancelEntityReconciliationJobMethodDescriptor); + methodDescriptors.add(deleteEntityReconciliationJobMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable + createEntityReconciliationJobCallable() { + return createEntityReconciliationJobCallable; + } + + @Override + public UnaryCallable + getEntityReconciliationJobCallable() { + return getEntityReconciliationJobCallable; + } + + @Override + public UnaryCallable + listEntityReconciliationJobsCallable() { + return listEntityReconciliationJobsCallable; + } + + @Override + public UnaryCallable< + ListEntityReconciliationJobsRequest, ListEntityReconciliationJobsPagedResponse> + listEntityReconciliationJobsPagedCallable() { + return listEntityReconciliationJobsPagedCallable; + } + + @Override + public UnaryCallable + cancelEntityReconciliationJobCallable() { + return cancelEntityReconciliationJobCallable; + } + + @Override + public UnaryCallable + deleteEntityReconciliationJobCallable() { + return deleteEntityReconciliationJobCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/test/java/com/google/cloud/enterpriseknowledgegraph/v1/EnterpriseKnowledgeGraphServiceClientHttpJsonTest.java b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/test/java/com/google/cloud/enterpriseknowledgegraph/v1/EnterpriseKnowledgeGraphServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..a1699c3a0f3a --- /dev/null +++ b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/test/java/com/google/cloud/enterpriseknowledgegraph/v1/EnterpriseKnowledgeGraphServiceClientHttpJsonTest.java @@ -0,0 +1,584 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.enterpriseknowledgegraph.v1; + +import static com.google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphServiceClient.ListEntityReconciliationJobsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.enterpriseknowledgegraph.v1.stub.HttpJsonEnterpriseKnowledgeGraphServiceStub; +import com.google.common.collect.Lists; +import com.google.protobuf.Empty; +import com.google.protobuf.Timestamp; +import com.google.rpc.Status; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class EnterpriseKnowledgeGraphServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static EnterpriseKnowledgeGraphServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonEnterpriseKnowledgeGraphServiceStub.getMethodDescriptors(), + EnterpriseKnowledgeGraphServiceSettings.getDefaultEndpoint()); + EnterpriseKnowledgeGraphServiceSettings settings = + EnterpriseKnowledgeGraphServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + EnterpriseKnowledgeGraphServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = EnterpriseKnowledgeGraphServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void createEntityReconciliationJobTest() throws Exception { + EntityReconciliationJob expectedResponse = + EntityReconciliationJob.newBuilder() + .setName( + EntityReconciliationJobName.of( + "[PROJECT]", "[LOCATION]", "[ENTITY_RECONCILIATION_JOB]") + .toString()) + .setInputConfig(InputConfig.newBuilder().build()) + .setOutputConfig(OutputConfig.newBuilder().build()) + .setState(JobState.forNumber(0)) + .setError(Status.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setReconConfig(ReconConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + EntityReconciliationJob entityReconciliationJob = EntityReconciliationJob.newBuilder().build(); + + EntityReconciliationJob actualResponse = + client.createEntityReconciliationJob(parent, entityReconciliationJob); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createEntityReconciliationJobExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + EntityReconciliationJob entityReconciliationJob = + EntityReconciliationJob.newBuilder().build(); + client.createEntityReconciliationJob(parent, entityReconciliationJob); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createEntityReconciliationJobTest2() throws Exception { + EntityReconciliationJob expectedResponse = + EntityReconciliationJob.newBuilder() + .setName( + EntityReconciliationJobName.of( + "[PROJECT]", "[LOCATION]", "[ENTITY_RECONCILIATION_JOB]") + .toString()) + .setInputConfig(InputConfig.newBuilder().build()) + .setOutputConfig(OutputConfig.newBuilder().build()) + .setState(JobState.forNumber(0)) + .setError(Status.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setReconConfig(ReconConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + EntityReconciliationJob entityReconciliationJob = EntityReconciliationJob.newBuilder().build(); + + EntityReconciliationJob actualResponse = + client.createEntityReconciliationJob(parent, entityReconciliationJob); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createEntityReconciliationJobExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + EntityReconciliationJob entityReconciliationJob = + EntityReconciliationJob.newBuilder().build(); + client.createEntityReconciliationJob(parent, entityReconciliationJob); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getEntityReconciliationJobTest() throws Exception { + EntityReconciliationJob expectedResponse = + EntityReconciliationJob.newBuilder() + .setName( + EntityReconciliationJobName.of( + "[PROJECT]", "[LOCATION]", "[ENTITY_RECONCILIATION_JOB]") + .toString()) + .setInputConfig(InputConfig.newBuilder().build()) + .setOutputConfig(OutputConfig.newBuilder().build()) + .setState(JobState.forNumber(0)) + .setError(Status.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setReconConfig(ReconConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + EntityReconciliationJobName name = + EntityReconciliationJobName.of("[PROJECT]", "[LOCATION]", "[ENTITY_RECONCILIATION_JOB]"); + + EntityReconciliationJob actualResponse = client.getEntityReconciliationJob(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getEntityReconciliationJobExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + EntityReconciliationJobName name = + EntityReconciliationJobName.of("[PROJECT]", "[LOCATION]", "[ENTITY_RECONCILIATION_JOB]"); + client.getEntityReconciliationJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getEntityReconciliationJobTest2() throws Exception { + EntityReconciliationJob expectedResponse = + EntityReconciliationJob.newBuilder() + .setName( + EntityReconciliationJobName.of( + "[PROJECT]", "[LOCATION]", "[ENTITY_RECONCILIATION_JOB]") + .toString()) + .setInputConfig(InputConfig.newBuilder().build()) + .setOutputConfig(OutputConfig.newBuilder().build()) + .setState(JobState.forNumber(0)) + .setError(Status.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setReconConfig(ReconConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-4188/locations/location-4188/entityReconciliationJobs/entityReconciliationJob-4188"; + + EntityReconciliationJob actualResponse = client.getEntityReconciliationJob(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getEntityReconciliationJobExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-4188/locations/location-4188/entityReconciliationJobs/entityReconciliationJob-4188"; + client.getEntityReconciliationJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listEntityReconciliationJobsTest() throws Exception { + EntityReconciliationJob responsesElement = EntityReconciliationJob.newBuilder().build(); + ListEntityReconciliationJobsResponse expectedResponse = + ListEntityReconciliationJobsResponse.newBuilder() + .setNextPageToken("") + .addAllEntityReconciliationJobs(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListEntityReconciliationJobsPagedResponse pagedListResponse = + client.listEntityReconciliationJobs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getEntityReconciliationJobsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listEntityReconciliationJobsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listEntityReconciliationJobs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listEntityReconciliationJobsTest2() throws Exception { + EntityReconciliationJob responsesElement = EntityReconciliationJob.newBuilder().build(); + ListEntityReconciliationJobsResponse expectedResponse = + ListEntityReconciliationJobsResponse.newBuilder() + .setNextPageToken("") + .addAllEntityReconciliationJobs(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListEntityReconciliationJobsPagedResponse pagedListResponse = + client.listEntityReconciliationJobs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getEntityReconciliationJobsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listEntityReconciliationJobsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listEntityReconciliationJobs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void cancelEntityReconciliationJobTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + EntityReconciliationJobName name = + EntityReconciliationJobName.of("[PROJECT]", "[LOCATION]", "[ENTITY_RECONCILIATION_JOB]"); + + client.cancelEntityReconciliationJob(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void cancelEntityReconciliationJobExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + EntityReconciliationJobName name = + EntityReconciliationJobName.of("[PROJECT]", "[LOCATION]", "[ENTITY_RECONCILIATION_JOB]"); + client.cancelEntityReconciliationJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void cancelEntityReconciliationJobTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-4188/locations/location-4188/entityReconciliationJobs/entityReconciliationJob-4188"; + + client.cancelEntityReconciliationJob(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void cancelEntityReconciliationJobExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-4188/locations/location-4188/entityReconciliationJobs/entityReconciliationJob-4188"; + client.cancelEntityReconciliationJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteEntityReconciliationJobTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + EntityReconciliationJobName name = + EntityReconciliationJobName.of("[PROJECT]", "[LOCATION]", "[ENTITY_RECONCILIATION_JOB]"); + + client.deleteEntityReconciliationJob(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteEntityReconciliationJobExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + EntityReconciliationJobName name = + EntityReconciliationJobName.of("[PROJECT]", "[LOCATION]", "[ENTITY_RECONCILIATION_JOB]"); + client.deleteEntityReconciliationJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteEntityReconciliationJobTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-4188/locations/location-4188/entityReconciliationJobs/entityReconciliationJob-4188"; + + client.deleteEntityReconciliationJob(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteEntityReconciliationJobExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-4188/locations/location-4188/entityReconciliationJobs/entityReconciliationJob-4188"; + client.deleteEntityReconciliationJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/test/java/com/google/cloud/enterpriseknowledgegraph/v1/EnterpriseKnowledgeGraphServiceClientTest.java b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/test/java/com/google/cloud/enterpriseknowledgegraph/v1/EnterpriseKnowledgeGraphServiceClientTest.java new file mode 100644 index 000000000000..cac945e13df3 --- /dev/null +++ b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/test/java/com/google/cloud/enterpriseknowledgegraph/v1/EnterpriseKnowledgeGraphServiceClientTest.java @@ -0,0 +1,534 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.enterpriseknowledgegraph.v1; + +import static com.google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphServiceClient.ListEntityReconciliationJobsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.common.collect.Lists; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import com.google.protobuf.Timestamp; +import com.google.rpc.Status; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class EnterpriseKnowledgeGraphServiceClientTest { + private static MockEnterpriseKnowledgeGraphService mockEnterpriseKnowledgeGraphService; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private EnterpriseKnowledgeGraphServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockEnterpriseKnowledgeGraphService = new MockEnterpriseKnowledgeGraphService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockEnterpriseKnowledgeGraphService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + EnterpriseKnowledgeGraphServiceSettings settings = + EnterpriseKnowledgeGraphServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = EnterpriseKnowledgeGraphServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createEntityReconciliationJobTest() throws Exception { + EntityReconciliationJob expectedResponse = + EntityReconciliationJob.newBuilder() + .setName( + EntityReconciliationJobName.of( + "[PROJECT]", "[LOCATION]", "[ENTITY_RECONCILIATION_JOB]") + .toString()) + .setInputConfig(InputConfig.newBuilder().build()) + .setOutputConfig(OutputConfig.newBuilder().build()) + .setState(JobState.forNumber(0)) + .setError(Status.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setReconConfig(ReconConfig.newBuilder().build()) + .build(); + mockEnterpriseKnowledgeGraphService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + EntityReconciliationJob entityReconciliationJob = EntityReconciliationJob.newBuilder().build(); + + EntityReconciliationJob actualResponse = + client.createEntityReconciliationJob(parent, entityReconciliationJob); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEnterpriseKnowledgeGraphService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateEntityReconciliationJobRequest actualRequest = + ((CreateEntityReconciliationJobRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(entityReconciliationJob, actualRequest.getEntityReconciliationJob()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createEntityReconciliationJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEnterpriseKnowledgeGraphService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + EntityReconciliationJob entityReconciliationJob = + EntityReconciliationJob.newBuilder().build(); + client.createEntityReconciliationJob(parent, entityReconciliationJob); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createEntityReconciliationJobTest2() throws Exception { + EntityReconciliationJob expectedResponse = + EntityReconciliationJob.newBuilder() + .setName( + EntityReconciliationJobName.of( + "[PROJECT]", "[LOCATION]", "[ENTITY_RECONCILIATION_JOB]") + .toString()) + .setInputConfig(InputConfig.newBuilder().build()) + .setOutputConfig(OutputConfig.newBuilder().build()) + .setState(JobState.forNumber(0)) + .setError(Status.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setReconConfig(ReconConfig.newBuilder().build()) + .build(); + mockEnterpriseKnowledgeGraphService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + EntityReconciliationJob entityReconciliationJob = EntityReconciliationJob.newBuilder().build(); + + EntityReconciliationJob actualResponse = + client.createEntityReconciliationJob(parent, entityReconciliationJob); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEnterpriseKnowledgeGraphService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateEntityReconciliationJobRequest actualRequest = + ((CreateEntityReconciliationJobRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(entityReconciliationJob, actualRequest.getEntityReconciliationJob()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createEntityReconciliationJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEnterpriseKnowledgeGraphService.addException(exception); + + try { + String parent = "parent-995424086"; + EntityReconciliationJob entityReconciliationJob = + EntityReconciliationJob.newBuilder().build(); + client.createEntityReconciliationJob(parent, entityReconciliationJob); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getEntityReconciliationJobTest() throws Exception { + EntityReconciliationJob expectedResponse = + EntityReconciliationJob.newBuilder() + .setName( + EntityReconciliationJobName.of( + "[PROJECT]", "[LOCATION]", "[ENTITY_RECONCILIATION_JOB]") + .toString()) + .setInputConfig(InputConfig.newBuilder().build()) + .setOutputConfig(OutputConfig.newBuilder().build()) + .setState(JobState.forNumber(0)) + .setError(Status.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setReconConfig(ReconConfig.newBuilder().build()) + .build(); + mockEnterpriseKnowledgeGraphService.addResponse(expectedResponse); + + EntityReconciliationJobName name = + EntityReconciliationJobName.of("[PROJECT]", "[LOCATION]", "[ENTITY_RECONCILIATION_JOB]"); + + EntityReconciliationJob actualResponse = client.getEntityReconciliationJob(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEnterpriseKnowledgeGraphService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetEntityReconciliationJobRequest actualRequest = + ((GetEntityReconciliationJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getEntityReconciliationJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEnterpriseKnowledgeGraphService.addException(exception); + + try { + EntityReconciliationJobName name = + EntityReconciliationJobName.of("[PROJECT]", "[LOCATION]", "[ENTITY_RECONCILIATION_JOB]"); + client.getEntityReconciliationJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getEntityReconciliationJobTest2() throws Exception { + EntityReconciliationJob expectedResponse = + EntityReconciliationJob.newBuilder() + .setName( + EntityReconciliationJobName.of( + "[PROJECT]", "[LOCATION]", "[ENTITY_RECONCILIATION_JOB]") + .toString()) + .setInputConfig(InputConfig.newBuilder().build()) + .setOutputConfig(OutputConfig.newBuilder().build()) + .setState(JobState.forNumber(0)) + .setError(Status.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setReconConfig(ReconConfig.newBuilder().build()) + .build(); + mockEnterpriseKnowledgeGraphService.addResponse(expectedResponse); + + String name = "name3373707"; + + EntityReconciliationJob actualResponse = client.getEntityReconciliationJob(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEnterpriseKnowledgeGraphService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetEntityReconciliationJobRequest actualRequest = + ((GetEntityReconciliationJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getEntityReconciliationJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEnterpriseKnowledgeGraphService.addException(exception); + + try { + String name = "name3373707"; + client.getEntityReconciliationJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listEntityReconciliationJobsTest() throws Exception { + EntityReconciliationJob responsesElement = EntityReconciliationJob.newBuilder().build(); + ListEntityReconciliationJobsResponse expectedResponse = + ListEntityReconciliationJobsResponse.newBuilder() + .setNextPageToken("") + .addAllEntityReconciliationJobs(Arrays.asList(responsesElement)) + .build(); + mockEnterpriseKnowledgeGraphService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListEntityReconciliationJobsPagedResponse pagedListResponse = + client.listEntityReconciliationJobs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getEntityReconciliationJobsList().get(0), resources.get(0)); + + List actualRequests = mockEnterpriseKnowledgeGraphService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListEntityReconciliationJobsRequest actualRequest = + ((ListEntityReconciliationJobsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listEntityReconciliationJobsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEnterpriseKnowledgeGraphService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listEntityReconciliationJobs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listEntityReconciliationJobsTest2() throws Exception { + EntityReconciliationJob responsesElement = EntityReconciliationJob.newBuilder().build(); + ListEntityReconciliationJobsResponse expectedResponse = + ListEntityReconciliationJobsResponse.newBuilder() + .setNextPageToken("") + .addAllEntityReconciliationJobs(Arrays.asList(responsesElement)) + .build(); + mockEnterpriseKnowledgeGraphService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListEntityReconciliationJobsPagedResponse pagedListResponse = + client.listEntityReconciliationJobs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getEntityReconciliationJobsList().get(0), resources.get(0)); + + List actualRequests = mockEnterpriseKnowledgeGraphService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListEntityReconciliationJobsRequest actualRequest = + ((ListEntityReconciliationJobsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listEntityReconciliationJobsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEnterpriseKnowledgeGraphService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listEntityReconciliationJobs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void cancelEntityReconciliationJobTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockEnterpriseKnowledgeGraphService.addResponse(expectedResponse); + + EntityReconciliationJobName name = + EntityReconciliationJobName.of("[PROJECT]", "[LOCATION]", "[ENTITY_RECONCILIATION_JOB]"); + + client.cancelEntityReconciliationJob(name); + + List actualRequests = mockEnterpriseKnowledgeGraphService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CancelEntityReconciliationJobRequest actualRequest = + ((CancelEntityReconciliationJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void cancelEntityReconciliationJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEnterpriseKnowledgeGraphService.addException(exception); + + try { + EntityReconciliationJobName name = + EntityReconciliationJobName.of("[PROJECT]", "[LOCATION]", "[ENTITY_RECONCILIATION_JOB]"); + client.cancelEntityReconciliationJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void cancelEntityReconciliationJobTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockEnterpriseKnowledgeGraphService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.cancelEntityReconciliationJob(name); + + List actualRequests = mockEnterpriseKnowledgeGraphService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CancelEntityReconciliationJobRequest actualRequest = + ((CancelEntityReconciliationJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void cancelEntityReconciliationJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEnterpriseKnowledgeGraphService.addException(exception); + + try { + String name = "name3373707"; + client.cancelEntityReconciliationJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteEntityReconciliationJobTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockEnterpriseKnowledgeGraphService.addResponse(expectedResponse); + + EntityReconciliationJobName name = + EntityReconciliationJobName.of("[PROJECT]", "[LOCATION]", "[ENTITY_RECONCILIATION_JOB]"); + + client.deleteEntityReconciliationJob(name); + + List actualRequests = mockEnterpriseKnowledgeGraphService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteEntityReconciliationJobRequest actualRequest = + ((DeleteEntityReconciliationJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteEntityReconciliationJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEnterpriseKnowledgeGraphService.addException(exception); + + try { + EntityReconciliationJobName name = + EntityReconciliationJobName.of("[PROJECT]", "[LOCATION]", "[ENTITY_RECONCILIATION_JOB]"); + client.deleteEntityReconciliationJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteEntityReconciliationJobTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockEnterpriseKnowledgeGraphService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteEntityReconciliationJob(name); + + List actualRequests = mockEnterpriseKnowledgeGraphService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteEntityReconciliationJobRequest actualRequest = + ((DeleteEntityReconciliationJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteEntityReconciliationJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEnterpriseKnowledgeGraphService.addException(exception); + + try { + String name = "name3373707"; + client.deleteEntityReconciliationJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/test/java/com/google/cloud/enterpriseknowledgegraph/v1/MockEnterpriseKnowledgeGraphService.java b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/test/java/com/google/cloud/enterpriseknowledgegraph/v1/MockEnterpriseKnowledgeGraphService.java new file mode 100644 index 000000000000..6d0435e79428 --- /dev/null +++ b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/test/java/com/google/cloud/enterpriseknowledgegraph/v1/MockEnterpriseKnowledgeGraphService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.enterpriseknowledgegraph.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockEnterpriseKnowledgeGraphService implements MockGrpcService { + private final MockEnterpriseKnowledgeGraphServiceImpl serviceImpl; + + public MockEnterpriseKnowledgeGraphService() { + serviceImpl = new MockEnterpriseKnowledgeGraphServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/test/java/com/google/cloud/enterpriseknowledgegraph/v1/MockEnterpriseKnowledgeGraphServiceImpl.java b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/test/java/com/google/cloud/enterpriseknowledgegraph/v1/MockEnterpriseKnowledgeGraphServiceImpl.java new file mode 100644 index 000000000000..5a00e2efd36c --- /dev/null +++ b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/src/test/java/com/google/cloud/enterpriseknowledgegraph/v1/MockEnterpriseKnowledgeGraphServiceImpl.java @@ -0,0 +1,170 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.enterpriseknowledgegraph.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphServiceGrpc.EnterpriseKnowledgeGraphServiceImplBase; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockEnterpriseKnowledgeGraphServiceImpl + extends EnterpriseKnowledgeGraphServiceImplBase { + private List requests; + private Queue responses; + + public MockEnterpriseKnowledgeGraphServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createEntityReconciliationJob( + CreateEntityReconciliationJobRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof EntityReconciliationJob) { + requests.add(request); + responseObserver.onNext(((EntityReconciliationJob) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateEntityReconciliationJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + EntityReconciliationJob.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getEntityReconciliationJob( + GetEntityReconciliationJobRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof EntityReconciliationJob) { + requests.add(request); + responseObserver.onNext(((EntityReconciliationJob) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetEntityReconciliationJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + EntityReconciliationJob.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listEntityReconciliationJobs( + ListEntityReconciliationJobsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListEntityReconciliationJobsResponse) { + requests.add(request); + responseObserver.onNext(((ListEntityReconciliationJobsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListEntityReconciliationJobs, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListEntityReconciliationJobsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void cancelEntityReconciliationJob( + CancelEntityReconciliationJobRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CancelEntityReconciliationJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteEntityReconciliationJob( + DeleteEntityReconciliationJobRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteEntityReconciliationJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-enterpriseknowledgegraph/grpc-google-cloud-enterpriseknowledgegraph-v1/pom.xml b/java-enterpriseknowledgegraph/grpc-google-cloud-enterpriseknowledgegraph-v1/pom.xml new file mode 100644 index 000000000000..72a1e2676790 --- /dev/null +++ b/java-enterpriseknowledgegraph/grpc-google-cloud-enterpriseknowledgegraph-v1/pom.xml @@ -0,0 +1,45 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-enterpriseknowledgegraph-v1 + 0.0.1-SNAPSHOT + grpc-google-cloud-enterpriseknowledgegraph-v1 + GRPC library for google-cloud-enterpriseknowledgegraph + + com.google.cloud + google-cloud-enterpriseknowledgegraph-parent + 0.0.1-SNAPSHOT + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-cloud-enterpriseknowledgegraph-v1 + + + com.google.guava + guava + + + \ No newline at end of file diff --git a/java-enterpriseknowledgegraph/grpc-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/EnterpriseKnowledgeGraphServiceGrpc.java b/java-enterpriseknowledgegraph/grpc-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/EnterpriseKnowledgeGraphServiceGrpc.java new file mode 100644 index 000000000000..2d1fec6f3770 --- /dev/null +++ b/java-enterpriseknowledgegraph/grpc-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/EnterpriseKnowledgeGraphServiceGrpc.java @@ -0,0 +1,941 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.enterpriseknowledgegraph.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * APIs for enterprise knowledge graph product.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/enterpriseknowledgegraph/v1/service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class EnterpriseKnowledgeGraphServiceGrpc { + + private EnterpriseKnowledgeGraphServiceGrpc() {} + + public static final String SERVICE_NAME = + "google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest, + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob> + getCreateEntityReconciliationJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateEntityReconciliationJob", + requestType = + com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest.class, + responseType = com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest, + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob> + getCreateEntityReconciliationJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest, + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob> + getCreateEntityReconciliationJobMethod; + if ((getCreateEntityReconciliationJobMethod = + EnterpriseKnowledgeGraphServiceGrpc.getCreateEntityReconciliationJobMethod) + == null) { + synchronized (EnterpriseKnowledgeGraphServiceGrpc.class) { + if ((getCreateEntityReconciliationJobMethod = + EnterpriseKnowledgeGraphServiceGrpc.getCreateEntityReconciliationJobMethod) + == null) { + EnterpriseKnowledgeGraphServiceGrpc.getCreateEntityReconciliationJobMethod = + getCreateEntityReconciliationJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateEntityReconciliationJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.enterpriseknowledgegraph.v1 + .CreateEntityReconciliationJobRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob + .getDefaultInstance())) + .setSchemaDescriptor( + new EnterpriseKnowledgeGraphServiceMethodDescriptorSupplier( + "CreateEntityReconciliationJob")) + .build(); + } + } + } + return getCreateEntityReconciliationJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest, + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob> + getGetEntityReconciliationJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetEntityReconciliationJob", + requestType = + com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest.class, + responseType = com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest, + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob> + getGetEntityReconciliationJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest, + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob> + getGetEntityReconciliationJobMethod; + if ((getGetEntityReconciliationJobMethod = + EnterpriseKnowledgeGraphServiceGrpc.getGetEntityReconciliationJobMethod) + == null) { + synchronized (EnterpriseKnowledgeGraphServiceGrpc.class) { + if ((getGetEntityReconciliationJobMethod = + EnterpriseKnowledgeGraphServiceGrpc.getGetEntityReconciliationJobMethod) + == null) { + EnterpriseKnowledgeGraphServiceGrpc.getGetEntityReconciliationJobMethod = + getGetEntityReconciliationJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetEntityReconciliationJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.enterpriseknowledgegraph.v1 + .GetEntityReconciliationJobRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob + .getDefaultInstance())) + .setSchemaDescriptor( + new EnterpriseKnowledgeGraphServiceMethodDescriptorSupplier( + "GetEntityReconciliationJob")) + .build(); + } + } + } + return getGetEntityReconciliationJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest, + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse> + getListEntityReconciliationJobsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListEntityReconciliationJobs", + requestType = + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest.class, + responseType = + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest, + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse> + getListEntityReconciliationJobsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest, + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse> + getListEntityReconciliationJobsMethod; + if ((getListEntityReconciliationJobsMethod = + EnterpriseKnowledgeGraphServiceGrpc.getListEntityReconciliationJobsMethod) + == null) { + synchronized (EnterpriseKnowledgeGraphServiceGrpc.class) { + if ((getListEntityReconciliationJobsMethod = + EnterpriseKnowledgeGraphServiceGrpc.getListEntityReconciliationJobsMethod) + == null) { + EnterpriseKnowledgeGraphServiceGrpc.getListEntityReconciliationJobsMethod = + getListEntityReconciliationJobsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListEntityReconciliationJobs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.enterpriseknowledgegraph.v1 + .ListEntityReconciliationJobsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.enterpriseknowledgegraph.v1 + .ListEntityReconciliationJobsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new EnterpriseKnowledgeGraphServiceMethodDescriptorSupplier( + "ListEntityReconciliationJobs")) + .build(); + } + } + } + return getListEntityReconciliationJobsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest, + com.google.protobuf.Empty> + getCancelEntityReconciliationJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CancelEntityReconciliationJob", + requestType = + com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest, + com.google.protobuf.Empty> + getCancelEntityReconciliationJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest, + com.google.protobuf.Empty> + getCancelEntityReconciliationJobMethod; + if ((getCancelEntityReconciliationJobMethod = + EnterpriseKnowledgeGraphServiceGrpc.getCancelEntityReconciliationJobMethod) + == null) { + synchronized (EnterpriseKnowledgeGraphServiceGrpc.class) { + if ((getCancelEntityReconciliationJobMethod = + EnterpriseKnowledgeGraphServiceGrpc.getCancelEntityReconciliationJobMethod) + == null) { + EnterpriseKnowledgeGraphServiceGrpc.getCancelEntityReconciliationJobMethod = + getCancelEntityReconciliationJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CancelEntityReconciliationJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.enterpriseknowledgegraph.v1 + .CancelEntityReconciliationJobRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new EnterpriseKnowledgeGraphServiceMethodDescriptorSupplier( + "CancelEntityReconciliationJob")) + .build(); + } + } + } + return getCancelEntityReconciliationJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest, + com.google.protobuf.Empty> + getDeleteEntityReconciliationJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteEntityReconciliationJob", + requestType = + com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest, + com.google.protobuf.Empty> + getDeleteEntityReconciliationJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest, + com.google.protobuf.Empty> + getDeleteEntityReconciliationJobMethod; + if ((getDeleteEntityReconciliationJobMethod = + EnterpriseKnowledgeGraphServiceGrpc.getDeleteEntityReconciliationJobMethod) + == null) { + synchronized (EnterpriseKnowledgeGraphServiceGrpc.class) { + if ((getDeleteEntityReconciliationJobMethod = + EnterpriseKnowledgeGraphServiceGrpc.getDeleteEntityReconciliationJobMethod) + == null) { + EnterpriseKnowledgeGraphServiceGrpc.getDeleteEntityReconciliationJobMethod = + getDeleteEntityReconciliationJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteEntityReconciliationJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.enterpriseknowledgegraph.v1 + .DeleteEntityReconciliationJobRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new EnterpriseKnowledgeGraphServiceMethodDescriptorSupplier( + "DeleteEntityReconciliationJob")) + .build(); + } + } + } + return getDeleteEntityReconciliationJobMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static EnterpriseKnowledgeGraphServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public EnterpriseKnowledgeGraphServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EnterpriseKnowledgeGraphServiceStub(channel, callOptions); + } + }; + return EnterpriseKnowledgeGraphServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static EnterpriseKnowledgeGraphServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public EnterpriseKnowledgeGraphServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EnterpriseKnowledgeGraphServiceBlockingStub(channel, callOptions); + } + }; + return EnterpriseKnowledgeGraphServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static EnterpriseKnowledgeGraphServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public EnterpriseKnowledgeGraphServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EnterpriseKnowledgeGraphServiceFutureStub(channel, callOptions); + } + }; + return EnterpriseKnowledgeGraphServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * APIs for enterprise knowledge graph product.
+   * 
+ */ + public abstract static class EnterpriseKnowledgeGraphServiceImplBase + implements io.grpc.BindableService { + + /** + * + * + *
+     * Creates a EntityReconciliationJob. A EntityReconciliationJob once created
+     * will right away be attempted to start.
+     * 
+ */ + public void createEntityReconciliationJob( + com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateEntityReconciliationJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a EntityReconciliationJob.
+     * 
+ */ + public void getEntityReconciliationJob( + com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetEntityReconciliationJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Entity Reconciliation Jobs.
+     * 
+ */ + public void listEntityReconciliationJobs( + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListEntityReconciliationJobsMethod(), responseObserver); + } + + /** + * + * + *
+     * Cancels a EntityReconciliationJob. Success of cancellation is not
+     * guaranteed.
+     * 
+ */ + public void cancelEntityReconciliationJob( + com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCancelEntityReconciliationJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a EntityReconciliationJob.
+     * It only deletes the job when the job state is in FAILED, SUCCEEDED, and
+     * CANCELLED.
+     * 
+ */ + public void deleteEntityReconciliationJob( + com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteEntityReconciliationJobMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateEntityReconciliationJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.enterpriseknowledgegraph.v1 + .CreateEntityReconciliationJobRequest, + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob>( + this, METHODID_CREATE_ENTITY_RECONCILIATION_JOB))) + .addMethod( + getGetEntityReconciliationJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.enterpriseknowledgegraph.v1 + .GetEntityReconciliationJobRequest, + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob>( + this, METHODID_GET_ENTITY_RECONCILIATION_JOB))) + .addMethod( + getListEntityReconciliationJobsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.enterpriseknowledgegraph.v1 + .ListEntityReconciliationJobsRequest, + com.google.cloud.enterpriseknowledgegraph.v1 + .ListEntityReconciliationJobsResponse>( + this, METHODID_LIST_ENTITY_RECONCILIATION_JOBS))) + .addMethod( + getCancelEntityReconciliationJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.enterpriseknowledgegraph.v1 + .CancelEntityReconciliationJobRequest, + com.google.protobuf.Empty>(this, METHODID_CANCEL_ENTITY_RECONCILIATION_JOB))) + .addMethod( + getDeleteEntityReconciliationJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.enterpriseknowledgegraph.v1 + .DeleteEntityReconciliationJobRequest, + com.google.protobuf.Empty>(this, METHODID_DELETE_ENTITY_RECONCILIATION_JOB))) + .build(); + } + } + + /** + * + * + *
+   * APIs for enterprise knowledge graph product.
+   * 
+ */ + public static final class EnterpriseKnowledgeGraphServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private EnterpriseKnowledgeGraphServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected EnterpriseKnowledgeGraphServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EnterpriseKnowledgeGraphServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a EntityReconciliationJob. A EntityReconciliationJob once created
+     * will right away be attempted to start.
+     * 
+ */ + public void createEntityReconciliationJob( + com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateEntityReconciliationJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a EntityReconciliationJob.
+     * 
+ */ + public void getEntityReconciliationJob( + com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetEntityReconciliationJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists Entity Reconciliation Jobs.
+     * 
+ */ + public void listEntityReconciliationJobs( + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListEntityReconciliationJobsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Cancels a EntityReconciliationJob. Success of cancellation is not
+     * guaranteed.
+     * 
+ */ + public void cancelEntityReconciliationJob( + com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCancelEntityReconciliationJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a EntityReconciliationJob.
+     * It only deletes the job when the job state is in FAILED, SUCCEEDED, and
+     * CANCELLED.
+     * 
+ */ + public void deleteEntityReconciliationJob( + com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteEntityReconciliationJobMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * APIs for enterprise knowledge graph product.
+   * 
+ */ + public static final class EnterpriseKnowledgeGraphServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private EnterpriseKnowledgeGraphServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected EnterpriseKnowledgeGraphServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EnterpriseKnowledgeGraphServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a EntityReconciliationJob. A EntityReconciliationJob once created
+     * will right away be attempted to start.
+     * 
+ */ + public com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob + createEntityReconciliationJob( + com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateEntityReconciliationJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a EntityReconciliationJob.
+     * 
+ */ + public com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob + getEntityReconciliationJob( + com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetEntityReconciliationJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Entity Reconciliation Jobs.
+     * 
+ */ + public com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse + listEntityReconciliationJobs( + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListEntityReconciliationJobsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Cancels a EntityReconciliationJob. Success of cancellation is not
+     * guaranteed.
+     * 
+ */ + public com.google.protobuf.Empty cancelEntityReconciliationJob( + com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCancelEntityReconciliationJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a EntityReconciliationJob.
+     * It only deletes the job when the job state is in FAILED, SUCCEEDED, and
+     * CANCELLED.
+     * 
+ */ + public com.google.protobuf.Empty deleteEntityReconciliationJob( + com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteEntityReconciliationJobMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * APIs for enterprise knowledge graph product.
+   * 
+ */ + public static final class EnterpriseKnowledgeGraphServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private EnterpriseKnowledgeGraphServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected EnterpriseKnowledgeGraphServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EnterpriseKnowledgeGraphServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a EntityReconciliationJob. A EntityReconciliationJob once created
+     * will right away be attempted to start.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob> + createEntityReconciliationJob( + com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateEntityReconciliationJobMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Gets a EntityReconciliationJob.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob> + getEntityReconciliationJob( + com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetEntityReconciliationJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Entity Reconciliation Jobs.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse> + listEntityReconciliationJobs( + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListEntityReconciliationJobsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Cancels a EntityReconciliationJob. Success of cancellation is not
+     * guaranteed.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + cancelEntityReconciliationJob( + com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCancelEntityReconciliationJobMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Deletes a EntityReconciliationJob.
+     * It only deletes the job when the job state is in FAILED, SUCCEEDED, and
+     * CANCELLED.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteEntityReconciliationJob( + com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteEntityReconciliationJobMethod(), getCallOptions()), + request); + } + } + + private static final int METHODID_CREATE_ENTITY_RECONCILIATION_JOB = 0; + private static final int METHODID_GET_ENTITY_RECONCILIATION_JOB = 1; + private static final int METHODID_LIST_ENTITY_RECONCILIATION_JOBS = 2; + private static final int METHODID_CANCEL_ENTITY_RECONCILIATION_JOB = 3; + private static final int METHODID_DELETE_ENTITY_RECONCILIATION_JOB = 4; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final EnterpriseKnowledgeGraphServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(EnterpriseKnowledgeGraphServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_ENTITY_RECONCILIATION_JOB: + serviceImpl.createEntityReconciliationJob( + (com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob>) + responseObserver); + break; + case METHODID_GET_ENTITY_RECONCILIATION_JOB: + serviceImpl.getEntityReconciliationJob( + (com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob>) + responseObserver); + break; + case METHODID_LIST_ENTITY_RECONCILIATION_JOBS: + serviceImpl.listEntityReconciliationJobs( + (com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.enterpriseknowledgegraph.v1 + .ListEntityReconciliationJobsResponse>) + responseObserver); + break; + case METHODID_CANCEL_ENTITY_RECONCILIATION_JOB: + serviceImpl.cancelEntityReconciliationJob( + (com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest) + request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_ENTITY_RECONCILIATION_JOB: + serviceImpl.deleteEntityReconciliationJob( + (com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest) + request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class EnterpriseKnowledgeGraphServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + EnterpriseKnowledgeGraphServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("EnterpriseKnowledgeGraphService"); + } + } + + private static final class EnterpriseKnowledgeGraphServiceFileDescriptorSupplier + extends EnterpriseKnowledgeGraphServiceBaseDescriptorSupplier { + EnterpriseKnowledgeGraphServiceFileDescriptorSupplier() {} + } + + private static final class EnterpriseKnowledgeGraphServiceMethodDescriptorSupplier + extends EnterpriseKnowledgeGraphServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + EnterpriseKnowledgeGraphServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (EnterpriseKnowledgeGraphServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor( + new EnterpriseKnowledgeGraphServiceFileDescriptorSupplier()) + .addMethod(getCreateEntityReconciliationJobMethod()) + .addMethod(getGetEntityReconciliationJobMethod()) + .addMethod(getListEntityReconciliationJobsMethod()) + .addMethod(getCancelEntityReconciliationJobMethod()) + .addMethod(getDeleteEntityReconciliationJobMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-enterpriseknowledgegraph/owlbot.py b/java-enterpriseknowledgegraph/owlbot.py new file mode 100644 index 000000000000..7a77cf5ee557 --- /dev/null +++ b/java-enterpriseknowledgegraph/owlbot.py @@ -0,0 +1,35 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import synthtool as s +from synthtool.languages import java + + +for library in s.get_staging_dirs(): + # put any special-case replacements here + s.move(library) + +s.remove_staging_dirs() +java.common_templates(excludes=[ + ".github/*", + ".kokoro/*", + "samples/*", + "CODE_OF_CONDUCT.md", + "CONTRIBUTING.md", + "LICENSE", + "SECURITY.md", + "java.header", + "license-checks.xml", + "renovate.json" +]) \ No newline at end of file diff --git a/java-enterpriseknowledgegraph/pom.xml b/java-enterpriseknowledgegraph/pom.xml new file mode 100644 index 000000000000..1db0d7e4babf --- /dev/null +++ b/java-enterpriseknowledgegraph/pom.xml @@ -0,0 +1,53 @@ + + + 4.0.0 + com.google.cloud + google-cloud-enterpriseknowledgegraph-parent + pom + 0.0.1-SNAPSHOT + Google Enterprise Knowledge Graph Parent + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-jar-parent + 0.1.1-SNAPSHOT + ../google-cloud-jar-parent/pom.xml + + + + UTF-8 + UTF-8 + github + google-cloud-enterpriseknowledgegraph-parent + + + + + + com.google.cloud + google-cloud-enterpriseknowledgegraph + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-enterpriseknowledgegraph-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-enterpriseknowledgegraph-v1 + 0.0.1-SNAPSHOT + + + + + + google-cloud-enterpriseknowledgegraph + grpc-google-cloud-enterpriseknowledgegraph-v1 + proto-google-cloud-enterpriseknowledgegraph-v1 + google-cloud-enterpriseknowledgegraph-bom + + diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/clirr-ignored-differences.xml b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/clirr-ignored-differences.xml new file mode 100644 index 000000000000..0989ef367234 --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/clirr-ignored-differences.xml @@ -0,0 +1,19 @@ + + + + + 7012 + com/google/cloud/enterpriseknowledgegraph/v1/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/enterpriseknowledgegraph/v1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/enterpriseknowledgegraph/v1/*OrBuilder + boolean has*(*) + + diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/pom.xml b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/pom.xml new file mode 100644 index 000000000000..fce3fd3ce60f --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/pom.xml @@ -0,0 +1,37 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-enterpriseknowledgegraph-v1 + 0.0.1-SNAPSHOT + proto-google-cloud-enterpriseknowledgegraph-v1 + Proto library for google-cloud-enterpriseknowledgegraph + + com.google.cloud + google-cloud-enterpriseknowledgegraph-parent + 0.0.1-SNAPSHOT + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api + api-common + + + com.google.guava + guava + + + diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/AffinityClusteringConfig.java b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/AffinityClusteringConfig.java new file mode 100644 index 000000000000..950ba0dda5d9 --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/AffinityClusteringConfig.java @@ -0,0 +1,538 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/enterpriseknowledgegraph/v1/service.proto + +package com.google.cloud.enterpriseknowledgegraph.v1; + +/** + * + * + *
+ * Options for affinity clustering.
+ * 
+ * + * Protobuf type {@code google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig} + */ +public final class AffinityClusteringConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig) + AffinityClusteringConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use AffinityClusteringConfig.newBuilder() to construct. + private AffinityClusteringConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AffinityClusteringConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AffinityClusteringConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_AffinityClusteringConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_AffinityClusteringConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig.class, + com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig.Builder.class); + } + + public static final int COMPRESSION_ROUND_COUNT_FIELD_NUMBER = 1; + private long compressionRoundCount_; + /** + * + * + *
+   * Number of iterations to perform. Default value is 1.
+   * 
+ * + * int64 compression_round_count = 1; + * + * @return The compressionRoundCount. + */ + @java.lang.Override + public long getCompressionRoundCount() { + return compressionRoundCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (compressionRoundCount_ != 0L) { + output.writeInt64(1, compressionRoundCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (compressionRoundCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, compressionRoundCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig)) { + return super.equals(obj); + } + com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig other = + (com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig) obj; + + if (getCompressionRoundCount() != other.getCompressionRoundCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + COMPRESSION_ROUND_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCompressionRoundCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Options for affinity clustering.
+   * 
+ * + * Protobuf type {@code google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig) + com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_AffinityClusteringConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_AffinityClusteringConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig.class, + com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig.Builder.class); + } + + // Construct using + // com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + compressionRoundCount_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_AffinityClusteringConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig + getDefaultInstanceForType() { + return com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig build() { + com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig buildPartial() { + com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig result = + new com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig(this); + result.compressionRoundCount_ = compressionRoundCount_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig) { + return mergeFrom( + (com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig other) { + if (other + == com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig + .getDefaultInstance()) return this; + if (other.getCompressionRoundCount() != 0L) { + setCompressionRoundCount(other.getCompressionRoundCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + compressionRoundCount_ = input.readInt64(); + + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private long compressionRoundCount_; + /** + * + * + *
+     * Number of iterations to perform. Default value is 1.
+     * 
+ * + * int64 compression_round_count = 1; + * + * @return The compressionRoundCount. + */ + @java.lang.Override + public long getCompressionRoundCount() { + return compressionRoundCount_; + } + /** + * + * + *
+     * Number of iterations to perform. Default value is 1.
+     * 
+ * + * int64 compression_round_count = 1; + * + * @param value The compressionRoundCount to set. + * @return This builder for chaining. + */ + public Builder setCompressionRoundCount(long value) { + + compressionRoundCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of iterations to perform. Default value is 1.
+     * 
+ * + * int64 compression_round_count = 1; + * + * @return This builder for chaining. + */ + public Builder clearCompressionRoundCount() { + + compressionRoundCount_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig) + private static final com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig(); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AffinityClusteringConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/AffinityClusteringConfigOrBuilder.java b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/AffinityClusteringConfigOrBuilder.java new file mode 100644 index 000000000000..e30d164e5336 --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/AffinityClusteringConfigOrBuilder.java @@ -0,0 +1,38 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/enterpriseknowledgegraph/v1/service.proto + +package com.google.cloud.enterpriseknowledgegraph.v1; + +public interface AffinityClusteringConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Number of iterations to perform. Default value is 1.
+   * 
+ * + * int64 compression_round_count = 1; + * + * @return The compressionRoundCount. + */ + long getCompressionRoundCount(); +} diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/BigQueryInputConfig.java b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/BigQueryInputConfig.java new file mode 100644 index 000000000000..e08ad6cc688a --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/BigQueryInputConfig.java @@ -0,0 +1,814 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/enterpriseknowledgegraph/v1/service.proto + +package com.google.cloud.enterpriseknowledgegraph.v1; + +/** + * + * + *
+ * The input config for BigQuery tables.
+ * 
+ * + * Protobuf type {@code google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig} + */ +public final class BigQueryInputConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig) + BigQueryInputConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use BigQueryInputConfig.newBuilder() to construct. + private BigQueryInputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BigQueryInputConfig() { + bigqueryTable_ = ""; + gcsUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BigQueryInputConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_BigQueryInputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_BigQueryInputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig.class, + com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig.Builder.class); + } + + public static final int BIGQUERY_TABLE_FIELD_NUMBER = 1; + private volatile java.lang.Object bigqueryTable_; + /** + * + * + *
+   * Required. Format is “projects/*/datasets/*/tables/*”.
+   * 
+ * + * + * string bigquery_table = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bigqueryTable. + */ + @java.lang.Override + public java.lang.String getBigqueryTable() { + java.lang.Object ref = bigqueryTable_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bigqueryTable_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format is “projects/*/datasets/*/tables/*”.
+   * 
+ * + * + * string bigquery_table = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for bigqueryTable. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBigqueryTableBytes() { + java.lang.Object ref = bigqueryTable_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + bigqueryTable_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GCS_URI_FIELD_NUMBER = 2; + private volatile java.lang.Object gcsUri_; + /** + * + * + *
+   * Required. Schema mapping file
+   * 
+ * + * string gcs_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The gcsUri. + */ + @java.lang.Override + public java.lang.String getGcsUri() { + java.lang.Object ref = gcsUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsUri_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Schema mapping file
+   * 
+ * + * string gcs_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for gcsUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGcsUriBytes() { + java.lang.Object ref = gcsUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcsUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bigqueryTable_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, bigqueryTable_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, gcsUri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bigqueryTable_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, bigqueryTable_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, gcsUri_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig)) { + return super.equals(obj); + } + com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig other = + (com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig) obj; + + if (!getBigqueryTable().equals(other.getBigqueryTable())) return false; + if (!getGcsUri().equals(other.getGcsUri())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BIGQUERY_TABLE_FIELD_NUMBER; + hash = (53 * hash) + getBigqueryTable().hashCode(); + hash = (37 * hash) + GCS_URI_FIELD_NUMBER; + hash = (53 * hash) + getGcsUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The input config for BigQuery tables.
+   * 
+ * + * Protobuf type {@code google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig) + com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_BigQueryInputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_BigQueryInputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig.class, + com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig.Builder.class); + } + + // Construct using com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bigqueryTable_ = ""; + + gcsUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_BigQueryInputConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig + getDefaultInstanceForType() { + return com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig build() { + com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig buildPartial() { + com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig result = + new com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig(this); + result.bigqueryTable_ = bigqueryTable_; + result.gcsUri_ = gcsUri_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig) { + return mergeFrom((com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig other) { + if (other + == com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig.getDefaultInstance()) + return this; + if (!other.getBigqueryTable().isEmpty()) { + bigqueryTable_ = other.bigqueryTable_; + onChanged(); + } + if (!other.getGcsUri().isEmpty()) { + gcsUri_ = other.gcsUri_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + bigqueryTable_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + gcsUri_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object bigqueryTable_ = ""; + /** + * + * + *
+     * Required. Format is “projects/*/datasets/*/tables/*”.
+     * 
+ * + * + * string bigquery_table = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bigqueryTable. + */ + public java.lang.String getBigqueryTable() { + java.lang.Object ref = bigqueryTable_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bigqueryTable_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format is “projects/*/datasets/*/tables/*”.
+     * 
+ * + * + * string bigquery_table = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for bigqueryTable. + */ + public com.google.protobuf.ByteString getBigqueryTableBytes() { + java.lang.Object ref = bigqueryTable_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + bigqueryTable_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format is “projects/*/datasets/*/tables/*”.
+     * 
+ * + * + * string bigquery_table = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bigqueryTable to set. + * @return This builder for chaining. + */ + public Builder setBigqueryTable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + bigqueryTable_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format is “projects/*/datasets/*/tables/*”.
+     * 
+ * + * + * string bigquery_table = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearBigqueryTable() { + + bigqueryTable_ = getDefaultInstance().getBigqueryTable(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format is “projects/*/datasets/*/tables/*”.
+     * 
+ * + * + * string bigquery_table = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for bigqueryTable to set. + * @return This builder for chaining. + */ + public Builder setBigqueryTableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + bigqueryTable_ = value; + onChanged(); + return this; + } + + private java.lang.Object gcsUri_ = ""; + /** + * + * + *
+     * Required. Schema mapping file
+     * 
+ * + * string gcs_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The gcsUri. + */ + public java.lang.String getGcsUri() { + java.lang.Object ref = gcsUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Schema mapping file
+     * 
+ * + * string gcs_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for gcsUri. + */ + public com.google.protobuf.ByteString getGcsUriBytes() { + java.lang.Object ref = gcsUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcsUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Schema mapping file
+     * 
+ * + * string gcs_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The gcsUri to set. + * @return This builder for chaining. + */ + public Builder setGcsUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + gcsUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Schema mapping file
+     * 
+ * + * string gcs_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearGcsUri() { + + gcsUri_ = getDefaultInstance().getGcsUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Schema mapping file
+     * 
+ * + * string gcs_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for gcsUri to set. + * @return This builder for chaining. + */ + public Builder setGcsUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + gcsUri_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig) + private static final com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig(); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigQueryInputConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/BigQueryInputConfigOrBuilder.java b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/BigQueryInputConfigOrBuilder.java new file mode 100644 index 000000000000..1036c75f3e49 --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/BigQueryInputConfigOrBuilder.java @@ -0,0 +1,79 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/enterpriseknowledgegraph/v1/service.proto + +package com.google.cloud.enterpriseknowledgegraph.v1; + +public interface BigQueryInputConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format is “projects/*/datasets/*/tables/*”.
+   * 
+ * + * + * string bigquery_table = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bigqueryTable. + */ + java.lang.String getBigqueryTable(); + /** + * + * + *
+   * Required. Format is “projects/*/datasets/*/tables/*”.
+   * 
+ * + * + * string bigquery_table = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for bigqueryTable. + */ + com.google.protobuf.ByteString getBigqueryTableBytes(); + + /** + * + * + *
+   * Required. Schema mapping file
+   * 
+ * + * string gcs_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The gcsUri. + */ + java.lang.String getGcsUri(); + /** + * + * + *
+   * Required. Schema mapping file
+   * 
+ * + * string gcs_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for gcsUri. + */ + com.google.protobuf.ByteString getGcsUriBytes(); +} diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/CancelEntityReconciliationJobRequest.java b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/CancelEntityReconciliationJobRequest.java new file mode 100644 index 000000000000..171f1f99522a --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/CancelEntityReconciliationJobRequest.java @@ -0,0 +1,677 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/enterpriseknowledgegraph/v1/service.proto + +package com.google.cloud.enterpriseknowledgegraph.v1; + +/** + * + * + *
+ * Request message for CancelEntityReconciliationJob.
+ * 
+ * + * Protobuf type {@code + * google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest} + */ +public final class CancelEntityReconciliationJobRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest) + CancelEntityReconciliationJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CancelEntityReconciliationJobRequest.newBuilder() to construct. + private CancelEntityReconciliationJobRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CancelEntityReconciliationJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CancelEntityReconciliationJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_CancelEntityReconciliationJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_CancelEntityReconciliationJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest.class, + com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest + .Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the EntityReconciliationJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the EntityReconciliationJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest)) { + return super.equals(obj); + } + com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest other = + (com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for CancelEntityReconciliationJob.
+   * 
+ * + * Protobuf type {@code + * google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest) + com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_CancelEntityReconciliationJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_CancelEntityReconciliationJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest + .class, + com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_CancelEntityReconciliationJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest + getDefaultInstanceForType() { + return com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest + build() { + com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest + buildPartial() { + com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest result = + new com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest( + this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest) { + return mergeFrom( + (com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest other) { + if (other + == com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the EntityReconciliationJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the EntityReconciliationJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the EntityReconciliationJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the EntityReconciliationJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the EntityReconciliationJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest) + private static final com.google.cloud.enterpriseknowledgegraph.v1 + .CancelEntityReconciliationJobRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest(); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CancelEntityReconciliationJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/CancelEntityReconciliationJobRequestOrBuilder.java b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/CancelEntityReconciliationJobRequestOrBuilder.java new file mode 100644 index 000000000000..da1422569bdf --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/CancelEntityReconciliationJobRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/enterpriseknowledgegraph/v1/service.proto + +package com.google.cloud.enterpriseknowledgegraph.v1; + +public interface CancelEntityReconciliationJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.enterpriseknowledgegraph.v1.CancelEntityReconciliationJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the EntityReconciliationJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the EntityReconciliationJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/CommonOperationMetadata.java b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/CommonOperationMetadata.java new file mode 100644 index 000000000000..437157a8a22c --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/CommonOperationMetadata.java @@ -0,0 +1,1387 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/enterpriseknowledgegraph/v1/operation_metadata.proto + +package com.google.cloud.enterpriseknowledgegraph.v1; + +/** + * + * + *
+ * The common metadata for long running operations.
+ * 
+ * + * Protobuf type {@code google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata} + */ +public final class CommonOperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata) + CommonOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use CommonOperationMetadata.newBuilder() to construct. + private CommonOperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CommonOperationMetadata() { + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CommonOperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.OperationMetadataProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_CommonOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.enterpriseknowledgegraph.v1.OperationMetadataProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_CommonOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata.class, + com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata.Builder.class); + } + + /** + * + * + *
+   * State of the longrunning operation.
+   * 
+ * + * Protobuf enum {@code google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified state.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * Operation is still running.
+     * 
+ * + * RUNNING = 1; + */ + RUNNING(1), + /** + * + * + *
+     * Operation is being cancelled.
+     * 
+ * + * CANCELLING = 2; + */ + CANCELLING(2), + /** + * + * + *
+     * Operation succeeded.
+     * 
+ * + * SUCCEEDED = 3; + */ + SUCCEEDED(3), + /** + * + * + *
+     * Operation failed.
+     * 
+ * + * FAILED = 4; + */ + FAILED(4), + /** + * + * + *
+     * Operation is cancelled.
+     * 
+ * + * CANCELLED = 5; + */ + CANCELLED(5), + /** + * + * + *
+     * Operation is pending not running yet.
+     * 
+ * + * PENDING = 6; + */ + PENDING(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified state.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Operation is still running.
+     * 
+ * + * RUNNING = 1; + */ + public static final int RUNNING_VALUE = 1; + /** + * + * + *
+     * Operation is being cancelled.
+     * 
+ * + * CANCELLING = 2; + */ + public static final int CANCELLING_VALUE = 2; + /** + * + * + *
+     * Operation succeeded.
+     * 
+ * + * SUCCEEDED = 3; + */ + public static final int SUCCEEDED_VALUE = 3; + /** + * + * + *
+     * Operation failed.
+     * 
+ * + * FAILED = 4; + */ + public static final int FAILED_VALUE = 4; + /** + * + * + *
+     * Operation is cancelled.
+     * 
+ * + * CANCELLED = 5; + */ + public static final int CANCELLED_VALUE = 5; + /** + * + * + *
+     * Operation is pending not running yet.
+     * 
+ * + * PENDING = 6; + */ + public static final int PENDING_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return RUNNING; + case 2: + return CANCELLING; + case 3: + return SUCCEEDED; + case 4: + return FAILED; + case 5: + return CANCELLED; + case 6: + return PENDING; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata.State) + } + + public static final int STATE_FIELD_NUMBER = 1; + private int state_; + /** + * + * + *
+   * The state of the operation.
+   * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata.State state = 1; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * The state of the operation.
+   * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata.State state = 1; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata.State result = + com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata.State.valueOf(state_); + return result == null + ? com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata.State.UNRECOGNIZED + : result; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * The creation time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * The creation time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * The creation time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * The last update time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * The last update time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * The last update time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (state_ + != com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata.State + .STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, state_); + } + if (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(3, getUpdateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (state_ + != com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata.State + .STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata other = + (com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata) obj; + + if (state_ != other.state_) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The common metadata for long running operations.
+   * 
+ * + * Protobuf type {@code google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata) + com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.OperationMetadataProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_CommonOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.enterpriseknowledgegraph.v1.OperationMetadataProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_CommonOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata.class, + com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + state_ = 0; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.enterpriseknowledgegraph.v1.OperationMetadataProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_CommonOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata build() { + com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata buildPartial() { + com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata result = + new com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata(this); + result.state_ = state_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata) { + return mergeFrom( + (com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata other) { + if (other + == com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata + .getDefaultInstance()) return this; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + state_ = input.readEnum(); + + break; + } // case 8 + case 18: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * The state of the operation.
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata.State state = 1; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * The state of the operation.
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata.State state = 1; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The state of the operation.
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata.State state = 1; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata.State result = + com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata.State.valueOf( + state_); + return result == null + ? com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The state of the operation.
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata.State state = 1; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState( + com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The state of the operation.
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata.State state = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * The creation time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * The creation time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The creation time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The creation time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The creation time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The creation time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The creation time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The creation time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * The creation time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * The last update time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * The last update time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The last update time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The last update time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The last update time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The last update time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The last update time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The last update time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * The last update time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata) + private static final com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata(); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CommonOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/CommonOperationMetadataOrBuilder.java b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/CommonOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..ab3ae56335ee --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/CommonOperationMetadataOrBuilder.java @@ -0,0 +1,120 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/enterpriseknowledgegraph/v1/operation_metadata.proto + +package com.google.cloud.enterpriseknowledgegraph.v1; + +public interface CommonOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The state of the operation.
+   * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata.State state = 1; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * The state of the operation.
+   * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata.State state = 1; + * + * @return The state. + */ + com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata.State getState(); + + /** + * + * + *
+   * The creation time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * The creation time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * The creation time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * The last update time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * The last update time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * The last update time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/ConnectedComponentsConfig.java b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/ConnectedComponentsConfig.java new file mode 100644 index 000000000000..8297f02ff5a6 --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/ConnectedComponentsConfig.java @@ -0,0 +1,540 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/enterpriseknowledgegraph/v1/service.proto + +package com.google.cloud.enterpriseknowledgegraph.v1; + +/** + * + * + *
+ * Options for connected components.
+ * 
+ * + * Protobuf type {@code google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig} + */ +public final class ConnectedComponentsConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig) + ConnectedComponentsConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConnectedComponentsConfig.newBuilder() to construct. + private ConnectedComponentsConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConnectedComponentsConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ConnectedComponentsConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_ConnectedComponentsConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_ConnectedComponentsConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig.class, + com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig.Builder.class); + } + + public static final int WEIGHT_THRESHOLD_FIELD_NUMBER = 1; + private float weightThreshold_; + /** + * + * + *
+   * Threshold used for connected components. Default value is 0.85.
+   * 
+ * + * float weight_threshold = 1; + * + * @return The weightThreshold. + */ + @java.lang.Override + public float getWeightThreshold() { + return weightThreshold_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(weightThreshold_) != 0) { + output.writeFloat(1, weightThreshold_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(weightThreshold_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, weightThreshold_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig)) { + return super.equals(obj); + } + com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig other = + (com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig) obj; + + if (java.lang.Float.floatToIntBits(getWeightThreshold()) + != java.lang.Float.floatToIntBits(other.getWeightThreshold())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + WEIGHT_THRESHOLD_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getWeightThreshold()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Options for connected components.
+   * 
+ * + * Protobuf type {@code google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig) + com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_ConnectedComponentsConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_ConnectedComponentsConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig.class, + com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig.Builder.class); + } + + // Construct using + // com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + weightThreshold_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_ConnectedComponentsConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig + getDefaultInstanceForType() { + return com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig build() { + com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig buildPartial() { + com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig result = + new com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig(this); + result.weightThreshold_ = weightThreshold_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig) { + return mergeFrom( + (com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig other) { + if (other + == com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig + .getDefaultInstance()) return this; + if (other.getWeightThreshold() != 0F) { + setWeightThreshold(other.getWeightThreshold()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + weightThreshold_ = input.readFloat(); + + break; + } // case 13 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private float weightThreshold_; + /** + * + * + *
+     * Threshold used for connected components. Default value is 0.85.
+     * 
+ * + * float weight_threshold = 1; + * + * @return The weightThreshold. + */ + @java.lang.Override + public float getWeightThreshold() { + return weightThreshold_; + } + /** + * + * + *
+     * Threshold used for connected components. Default value is 0.85.
+     * 
+ * + * float weight_threshold = 1; + * + * @param value The weightThreshold to set. + * @return This builder for chaining. + */ + public Builder setWeightThreshold(float value) { + + weightThreshold_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Threshold used for connected components. Default value is 0.85.
+     * 
+ * + * float weight_threshold = 1; + * + * @return This builder for chaining. + */ + public Builder clearWeightThreshold() { + + weightThreshold_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig) + private static final com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig(); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConnectedComponentsConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/ConnectedComponentsConfigOrBuilder.java b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/ConnectedComponentsConfigOrBuilder.java new file mode 100644 index 000000000000..9019eff4a6e6 --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/ConnectedComponentsConfigOrBuilder.java @@ -0,0 +1,38 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/enterpriseknowledgegraph/v1/service.proto + +package com.google.cloud.enterpriseknowledgegraph.v1; + +public interface ConnectedComponentsConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Threshold used for connected components. Default value is 0.85.
+   * 
+ * + * float weight_threshold = 1; + * + * @return The weightThreshold. + */ + float getWeightThreshold(); +} diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/CreateEntityReconciliationJobRequest.java b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/CreateEntityReconciliationJobRequest.java new file mode 100644 index 000000000000..4364931a55cd --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/CreateEntityReconciliationJobRequest.java @@ -0,0 +1,984 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/enterpriseknowledgegraph/v1/service.proto + +package com.google.cloud.enterpriseknowledgegraph.v1; + +/** + * + * + *
+ * Request message for CreateEntityReconciliationJob.
+ * 
+ * + * Protobuf type {@code + * google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest} + */ +public final class CreateEntityReconciliationJobRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest) + CreateEntityReconciliationJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateEntityReconciliationJobRequest.newBuilder() to construct. + private CreateEntityReconciliationJobRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateEntityReconciliationJobRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateEntityReconciliationJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_CreateEntityReconciliationJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_CreateEntityReconciliationJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest.class, + com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest + .Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the Location to create the
+   * EntityReconciliationJob in. Format:
+   * `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Location to create the
+   * EntityReconciliationJob in. Format:
+   * `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENTITY_RECONCILIATION_JOB_FIELD_NUMBER = 2; + private com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob + entityReconciliationJob_; + /** + * + * + *
+   * Required. The EntityReconciliationJob to create.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the entityReconciliationJob field is set. + */ + @java.lang.Override + public boolean hasEntityReconciliationJob() { + return entityReconciliationJob_ != null; + } + /** + * + * + *
+   * Required. The EntityReconciliationJob to create.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The entityReconciliationJob. + */ + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob + getEntityReconciliationJob() { + return entityReconciliationJob_ == null + ? com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob.getDefaultInstance() + : entityReconciliationJob_; + } + /** + * + * + *
+   * Required. The EntityReconciliationJob to create.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJobOrBuilder + getEntityReconciliationJobOrBuilder() { + return getEntityReconciliationJob(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (entityReconciliationJob_ != null) { + output.writeMessage(2, getEntityReconciliationJob()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (entityReconciliationJob_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEntityReconciliationJob()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest)) { + return super.equals(obj); + } + com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest other = + (com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasEntityReconciliationJob() != other.hasEntityReconciliationJob()) return false; + if (hasEntityReconciliationJob()) { + if (!getEntityReconciliationJob().equals(other.getEntityReconciliationJob())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasEntityReconciliationJob()) { + hash = (37 * hash) + ENTITY_RECONCILIATION_JOB_FIELD_NUMBER; + hash = (53 * hash) + getEntityReconciliationJob().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for CreateEntityReconciliationJob.
+   * 
+ * + * Protobuf type {@code + * google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest) + com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_CreateEntityReconciliationJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_CreateEntityReconciliationJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest + .class, + com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (entityReconciliationJobBuilder_ == null) { + entityReconciliationJob_ = null; + } else { + entityReconciliationJob_ = null; + entityReconciliationJobBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_CreateEntityReconciliationJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest + getDefaultInstanceForType() { + return com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest + build() { + com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest + buildPartial() { + com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest result = + new com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest( + this); + result.parent_ = parent_; + if (entityReconciliationJobBuilder_ == null) { + result.entityReconciliationJob_ = entityReconciliationJob_; + } else { + result.entityReconciliationJob_ = entityReconciliationJobBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest) { + return mergeFrom( + (com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest other) { + if (other + == com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasEntityReconciliationJob()) { + mergeEntityReconciliationJob(other.getEntityReconciliationJob()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage( + getEntityReconciliationJobFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Location to create the
+     * EntityReconciliationJob in. Format:
+     * `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to create the
+     * EntityReconciliationJob in. Format:
+     * `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to create the
+     * EntityReconciliationJob in. Format:
+     * `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to create the
+     * EntityReconciliationJob in. Format:
+     * `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to create the
+     * EntityReconciliationJob in. Format:
+     * `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob + entityReconciliationJob_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob, + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob.Builder, + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJobOrBuilder> + entityReconciliationJobBuilder_; + /** + * + * + *
+     * Required. The EntityReconciliationJob to create.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the entityReconciliationJob field is set. + */ + public boolean hasEntityReconciliationJob() { + return entityReconciliationJobBuilder_ != null || entityReconciliationJob_ != null; + } + /** + * + * + *
+     * Required. The EntityReconciliationJob to create.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The entityReconciliationJob. + */ + public com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob + getEntityReconciliationJob() { + if (entityReconciliationJobBuilder_ == null) { + return entityReconciliationJob_ == null + ? com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob + .getDefaultInstance() + : entityReconciliationJob_; + } else { + return entityReconciliationJobBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The EntityReconciliationJob to create.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEntityReconciliationJob( + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob value) { + if (entityReconciliationJobBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + entityReconciliationJob_ = value; + onChanged(); + } else { + entityReconciliationJobBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The EntityReconciliationJob to create.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEntityReconciliationJob( + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob.Builder + builderForValue) { + if (entityReconciliationJobBuilder_ == null) { + entityReconciliationJob_ = builderForValue.build(); + onChanged(); + } else { + entityReconciliationJobBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The EntityReconciliationJob to create.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeEntityReconciliationJob( + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob value) { + if (entityReconciliationJobBuilder_ == null) { + if (entityReconciliationJob_ != null) { + entityReconciliationJob_ = + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob.newBuilder( + entityReconciliationJob_) + .mergeFrom(value) + .buildPartial(); + } else { + entityReconciliationJob_ = value; + } + onChanged(); + } else { + entityReconciliationJobBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The EntityReconciliationJob to create.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearEntityReconciliationJob() { + if (entityReconciliationJobBuilder_ == null) { + entityReconciliationJob_ = null; + onChanged(); + } else { + entityReconciliationJob_ = null; + entityReconciliationJobBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The EntityReconciliationJob to create.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob.Builder + getEntityReconciliationJobBuilder() { + + onChanged(); + return getEntityReconciliationJobFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The EntityReconciliationJob to create.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJobOrBuilder + getEntityReconciliationJobOrBuilder() { + if (entityReconciliationJobBuilder_ != null) { + return entityReconciliationJobBuilder_.getMessageOrBuilder(); + } else { + return entityReconciliationJob_ == null + ? com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob + .getDefaultInstance() + : entityReconciliationJob_; + } + } + /** + * + * + *
+     * Required. The EntityReconciliationJob to create.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob, + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob.Builder, + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJobOrBuilder> + getEntityReconciliationJobFieldBuilder() { + if (entityReconciliationJobBuilder_ == null) { + entityReconciliationJobBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob, + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob.Builder, + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJobOrBuilder>( + getEntityReconciliationJob(), getParentForChildren(), isClean()); + entityReconciliationJob_ = null; + } + return entityReconciliationJobBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest) + private static final com.google.cloud.enterpriseknowledgegraph.v1 + .CreateEntityReconciliationJobRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest(); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateEntityReconciliationJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/CreateEntityReconciliationJobRequestOrBuilder.java b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/CreateEntityReconciliationJobRequestOrBuilder.java new file mode 100644 index 000000000000..15aced5c633e --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/CreateEntityReconciliationJobRequestOrBuilder.java @@ -0,0 +1,100 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/enterpriseknowledgegraph/v1/service.proto + +package com.google.cloud.enterpriseknowledgegraph.v1; + +public interface CreateEntityReconciliationJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.enterpriseknowledgegraph.v1.CreateEntityReconciliationJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location to create the
+   * EntityReconciliationJob in. Format:
+   * `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the Location to create the
+   * EntityReconciliationJob in. Format:
+   * `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The EntityReconciliationJob to create.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the entityReconciliationJob field is set. + */ + boolean hasEntityReconciliationJob(); + /** + * + * + *
+   * Required. The EntityReconciliationJob to create.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The entityReconciliationJob. + */ + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob getEntityReconciliationJob(); + /** + * + * + *
+   * Required. The EntityReconciliationJob to create.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJobOrBuilder + getEntityReconciliationJobOrBuilder(); +} diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/DeleteEntityReconciliationJobRequest.java b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/DeleteEntityReconciliationJobRequest.java new file mode 100644 index 000000000000..7b7c3f2fe1e8 --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/DeleteEntityReconciliationJobRequest.java @@ -0,0 +1,677 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/enterpriseknowledgegraph/v1/service.proto + +package com.google.cloud.enterpriseknowledgegraph.v1; + +/** + * + * + *
+ * Request message for DeleteEntityReconciliationJob.
+ * 
+ * + * Protobuf type {@code + * google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest} + */ +public final class DeleteEntityReconciliationJobRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest) + DeleteEntityReconciliationJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteEntityReconciliationJobRequest.newBuilder() to construct. + private DeleteEntityReconciliationJobRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteEntityReconciliationJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteEntityReconciliationJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_DeleteEntityReconciliationJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_DeleteEntityReconciliationJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest.class, + com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest + .Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the EntityReconciliationJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the EntityReconciliationJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest)) { + return super.equals(obj); + } + com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest other = + (com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for DeleteEntityReconciliationJob.
+   * 
+ * + * Protobuf type {@code + * google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest) + com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_DeleteEntityReconciliationJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_DeleteEntityReconciliationJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest + .class, + com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_DeleteEntityReconciliationJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest + getDefaultInstanceForType() { + return com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest + build() { + com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest + buildPartial() { + com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest result = + new com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest( + this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest) { + return mergeFrom( + (com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest other) { + if (other + == com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the EntityReconciliationJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the EntityReconciliationJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the EntityReconciliationJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the EntityReconciliationJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the EntityReconciliationJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest) + private static final com.google.cloud.enterpriseknowledgegraph.v1 + .DeleteEntityReconciliationJobRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest(); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteEntityReconciliationJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/DeleteEntityReconciliationJobRequestOrBuilder.java b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/DeleteEntityReconciliationJobRequestOrBuilder.java new file mode 100644 index 000000000000..5cd5df2c92aa --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/DeleteEntityReconciliationJobRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/enterpriseknowledgegraph/v1/service.proto + +package com.google.cloud.enterpriseknowledgegraph.v1; + +public interface DeleteEntityReconciliationJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.enterpriseknowledgegraph.v1.DeleteEntityReconciliationJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the EntityReconciliationJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the EntityReconciliationJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/DeleteOperationMetadata.java b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/DeleteOperationMetadata.java new file mode 100644 index 000000000000..ab7ef3a5a34e --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/DeleteOperationMetadata.java @@ -0,0 +1,737 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/enterpriseknowledgegraph/v1/service.proto + +package com.google.cloud.enterpriseknowledgegraph.v1; + +/** + * + * + *
+ * Details of operations that perform deletes of any entities.
+ * 
+ * + * Protobuf type {@code google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata} + */ +public final class DeleteOperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata) + DeleteOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteOperationMetadata.newBuilder() to construct. + private DeleteOperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteOperationMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteOperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_DeleteOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_DeleteOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata.class, + com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata.Builder.class); + } + + public static final int COMMON_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata commonMetadata_; + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata common_metadata = 1; + * + * + * @return Whether the commonMetadata field is set. + */ + @java.lang.Override + public boolean hasCommonMetadata() { + return commonMetadata_ != null; + } + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata common_metadata = 1; + * + * + * @return The commonMetadata. + */ + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata getCommonMetadata() { + return commonMetadata_ == null + ? com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata.getDefaultInstance() + : commonMetadata_; + } + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata common_metadata = 1; + * + */ + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadataOrBuilder + getCommonMetadataOrBuilder() { + return getCommonMetadata(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (commonMetadata_ != null) { + output.writeMessage(1, getCommonMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (commonMetadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCommonMetadata()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata other = + (com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata) obj; + + if (hasCommonMetadata() != other.hasCommonMetadata()) return false; + if (hasCommonMetadata()) { + if (!getCommonMetadata().equals(other.getCommonMetadata())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCommonMetadata()) { + hash = (37 * hash) + COMMON_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getCommonMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of operations that perform deletes of any entities.
+   * 
+ * + * Protobuf type {@code google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata) + com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_DeleteOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_DeleteOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata.class, + com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (commonMetadataBuilder_ == null) { + commonMetadata_ = null; + } else { + commonMetadata_ = null; + commonMetadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_DeleteOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata build() { + com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata buildPartial() { + com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata result = + new com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata(this); + if (commonMetadataBuilder_ == null) { + result.commonMetadata_ = commonMetadata_; + } else { + result.commonMetadata_ = commonMetadataBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata) { + return mergeFrom( + (com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata other) { + if (other + == com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata + .getDefaultInstance()) return this; + if (other.hasCommonMetadata()) { + mergeCommonMetadata(other.getCommonMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCommonMetadataFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata commonMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata, + com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata.Builder, + com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadataOrBuilder> + commonMetadataBuilder_; + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata common_metadata = 1; + * + * + * @return Whether the commonMetadata field is set. + */ + public boolean hasCommonMetadata() { + return commonMetadataBuilder_ != null || commonMetadata_ != null; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata common_metadata = 1; + * + * + * @return The commonMetadata. + */ + public com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata + getCommonMetadata() { + if (commonMetadataBuilder_ == null) { + return commonMetadata_ == null + ? com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata + .getDefaultInstance() + : commonMetadata_; + } else { + return commonMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata common_metadata = 1; + * + */ + public Builder setCommonMetadata( + com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata value) { + if (commonMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + commonMetadata_ = value; + onChanged(); + } else { + commonMetadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata common_metadata = 1; + * + */ + public Builder setCommonMetadata( + com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata.Builder + builderForValue) { + if (commonMetadataBuilder_ == null) { + commonMetadata_ = builderForValue.build(); + onChanged(); + } else { + commonMetadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata common_metadata = 1; + * + */ + public Builder mergeCommonMetadata( + com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata value) { + if (commonMetadataBuilder_ == null) { + if (commonMetadata_ != null) { + commonMetadata_ = + com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata.newBuilder( + commonMetadata_) + .mergeFrom(value) + .buildPartial(); + } else { + commonMetadata_ = value; + } + onChanged(); + } else { + commonMetadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata common_metadata = 1; + * + */ + public Builder clearCommonMetadata() { + if (commonMetadataBuilder_ == null) { + commonMetadata_ = null; + onChanged(); + } else { + commonMetadata_ = null; + commonMetadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata common_metadata = 1; + * + */ + public com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata.Builder + getCommonMetadataBuilder() { + + onChanged(); + return getCommonMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata common_metadata = 1; + * + */ + public com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadataOrBuilder + getCommonMetadataOrBuilder() { + if (commonMetadataBuilder_ != null) { + return commonMetadataBuilder_.getMessageOrBuilder(); + } else { + return commonMetadata_ == null + ? com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata + .getDefaultInstance() + : commonMetadata_; + } + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata common_metadata = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata, + com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata.Builder, + com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadataOrBuilder> + getCommonMetadataFieldBuilder() { + if (commonMetadataBuilder_ == null) { + commonMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata, + com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata.Builder, + com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadataOrBuilder>( + getCommonMetadata(), getParentForChildren(), isClean()); + commonMetadata_ = null; + } + return commonMetadataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata) + private static final com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata(); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/DeleteOperationMetadataOrBuilder.java b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/DeleteOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..8b475d292229 --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/DeleteOperationMetadataOrBuilder.java @@ -0,0 +1,64 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/enterpriseknowledgegraph/v1/service.proto + +package com.google.cloud.enterpriseknowledgegraph.v1; + +public interface DeleteOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.enterpriseknowledgegraph.v1.DeleteOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata common_metadata = 1; + * + * + * @return Whether the commonMetadata field is set. + */ + boolean hasCommonMetadata(); + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata common_metadata = 1; + * + * + * @return The commonMetadata. + */ + com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata getCommonMetadata(); + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadata common_metadata = 1; + * + */ + com.google.cloud.enterpriseknowledgegraph.v1.CommonOperationMetadataOrBuilder + getCommonMetadataOrBuilder(); +} diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/EntityReconciliationJob.java b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/EntityReconciliationJob.java new file mode 100644 index 000000000000..22f8c49840ab --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/EntityReconciliationJob.java @@ -0,0 +1,2826 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/enterpriseknowledgegraph/v1/service.proto + +package com.google.cloud.enterpriseknowledgegraph.v1; + +/** + * + * + *
+ * Entity reconciliation job message.
+ * 
+ * + * Protobuf type {@code google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob} + */ +public final class EntityReconciliationJob extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob) + EntityReconciliationJobOrBuilder { + private static final long serialVersionUID = 0L; + // Use EntityReconciliationJob.newBuilder() to construct. + private EntityReconciliationJob(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EntityReconciliationJob() { + name_ = ""; + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EntityReconciliationJob(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_EntityReconciliationJob_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_EntityReconciliationJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob.class, + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. Resource name of the EntityReconciliationJob.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Resource name of the EntityReconciliationJob.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INPUT_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.enterpriseknowledgegraph.v1.InputConfig inputConfig_; + /** + * + * + *
+   * Required. Information about the input BigQuery tables.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the inputConfig field is set. + */ + @java.lang.Override + public boolean hasInputConfig() { + return inputConfig_ != null; + } + /** + * + * + *
+   * Required. Information about the input BigQuery tables.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The inputConfig. + */ + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.InputConfig getInputConfig() { + return inputConfig_ == null + ? com.google.cloud.enterpriseknowledgegraph.v1.InputConfig.getDefaultInstance() + : inputConfig_; + } + /** + * + * + *
+   * Required. Information about the input BigQuery tables.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.InputConfigOrBuilder + getInputConfigOrBuilder() { + return getInputConfig(); + } + + public static final int OUTPUT_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig outputConfig_; + /** + * + * + *
+   * Required. The desired output location.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the outputConfig field is set. + */ + @java.lang.Override + public boolean hasOutputConfig() { + return outputConfig_ != null; + } + /** + * + * + *
+   * Required. The desired output location.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The outputConfig. + */ + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig getOutputConfig() { + return outputConfig_ == null + ? com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig.getDefaultInstance() + : outputConfig_; + } + /** + * + * + *
+   * Required. The desired output location.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.OutputConfigOrBuilder + getOutputConfigOrBuilder() { + return getOutputConfig(); + } + + public static final int STATE_FIELD_NUMBER = 4; + private int state_; + /** + * + * + *
+   * Output only. The detailed state of the job.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.JobState state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The detailed state of the job.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.JobState state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.JobState getState() { + @SuppressWarnings("deprecation") + com.google.cloud.enterpriseknowledgegraph.v1.JobState result = + com.google.cloud.enterpriseknowledgegraph.v1.JobState.valueOf(state_); + return result == null + ? com.google.cloud.enterpriseknowledgegraph.v1.JobState.UNRECOGNIZED + : result; + } + + public static final int ERROR_FIELD_NUMBER = 5; + private com.google.rpc.Status error_; + /** + * + * + *
+   * Output only. Only populated when the job's state is JOB_STATE_FAILED or
+   * JOB_STATE_CANCELLED.
+   * 
+ * + * .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return error_ != null; + } + /** + * + * + *
+   * Output only. Only populated when the job's state is JOB_STATE_FAILED or
+   * JOB_STATE_CANCELLED.
+   * 
+ * + * .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + /** + * + * + *
+   * Output only. Only populated when the job's state is JOB_STATE_FAILED or
+   * JOB_STATE_CANCELLED.
+   * 
+ * + * .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + return getError(); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time when the EntityReconciliationJob was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the EntityReconciliationJob was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time when the EntityReconciliationJob was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * Output only. Time when the EntityReconciliationJob entered any of the
+   * following states: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`,
+   * `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the EntityReconciliationJob entered any of the
+   * following states: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`,
+   * `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * Output only. Time when the EntityReconciliationJob entered any of the
+   * following states: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`,
+   * `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Time when the EntityReconciliationJob was most recently
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the EntityReconciliationJob was most recently
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Time when the EntityReconciliationJob was most recently
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int RECON_CONFIG_FIELD_NUMBER = 9; + private com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig reconConfig_; + /** + * + * + *
+   * Optional. Recon configs to adjust the clustering behavior.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig recon_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the reconConfig field is set. + */ + @java.lang.Override + public boolean hasReconConfig() { + return reconConfig_ != null; + } + /** + * + * + *
+   * Optional. Recon configs to adjust the clustering behavior.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig recon_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The reconConfig. + */ + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig getReconConfig() { + return reconConfig_ == null + ? com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.getDefaultInstance() + : reconConfig_; + } + /** + * + * + *
+   * Optional. Recon configs to adjust the clustering behavior.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig recon_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.ReconConfigOrBuilder + getReconConfigOrBuilder() { + return getReconConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (inputConfig_ != null) { + output.writeMessage(2, getInputConfig()); + } + if (outputConfig_ != null) { + output.writeMessage(3, getOutputConfig()); + } + if (state_ + != com.google.cloud.enterpriseknowledgegraph.v1.JobState.JOB_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, state_); + } + if (error_ != null) { + output.writeMessage(5, getError()); + } + if (createTime_ != null) { + output.writeMessage(6, getCreateTime()); + } + if (endTime_ != null) { + output.writeMessage(7, getEndTime()); + } + if (updateTime_ != null) { + output.writeMessage(8, getUpdateTime()); + } + if (reconConfig_ != null) { + output.writeMessage(9, getReconConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (inputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getInputConfig()); + } + if (outputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOutputConfig()); + } + if (state_ + != com.google.cloud.enterpriseknowledgegraph.v1.JobState.JOB_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); + } + if (error_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getError()); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCreateTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getEndTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getUpdateTime()); + } + if (reconConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getReconConfig()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob)) { + return super.equals(obj); + } + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob other = + (com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob) obj; + + if (!getName().equals(other.getName())) return false; + if (hasInputConfig() != other.hasInputConfig()) return false; + if (hasInputConfig()) { + if (!getInputConfig().equals(other.getInputConfig())) return false; + } + if (hasOutputConfig() != other.hasOutputConfig()) return false; + if (hasOutputConfig()) { + if (!getOutputConfig().equals(other.getOutputConfig())) return false; + } + if (state_ != other.state_) return false; + if (hasError() != other.hasError()) return false; + if (hasError()) { + if (!getError().equals(other.getError())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (hasReconConfig() != other.hasReconConfig()) return false; + if (hasReconConfig()) { + if (!getReconConfig().equals(other.getReconConfig())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasInputConfig()) { + hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getInputConfig().hashCode(); + } + if (hasOutputConfig()) { + hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getOutputConfig().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasError()) { + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasReconConfig()) { + hash = (37 * hash) + RECON_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getReconConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Entity reconciliation job message.
+   * 
+ * + * Protobuf type {@code google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob) + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJobOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_EntityReconciliationJob_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_EntityReconciliationJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob.class, + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob.Builder.class); + } + + // Construct using + // com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (inputConfigBuilder_ == null) { + inputConfig_ = null; + } else { + inputConfig_ = null; + inputConfigBuilder_ = null; + } + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + state_ = 0; + + if (errorBuilder_ == null) { + error_ = null; + } else { + error_ = null; + errorBuilder_ = null; + } + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + if (reconConfigBuilder_ == null) { + reconConfig_ = null; + } else { + reconConfig_ = null; + reconConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_EntityReconciliationJob_descriptor; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob + getDefaultInstanceForType() { + return com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob build() { + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob buildPartial() { + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob result = + new com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob(this); + result.name_ = name_; + if (inputConfigBuilder_ == null) { + result.inputConfig_ = inputConfig_; + } else { + result.inputConfig_ = inputConfigBuilder_.build(); + } + if (outputConfigBuilder_ == null) { + result.outputConfig_ = outputConfig_; + } else { + result.outputConfig_ = outputConfigBuilder_.build(); + } + result.state_ = state_; + if (errorBuilder_ == null) { + result.error_ = error_; + } else { + result.error_ = errorBuilder_.build(); + } + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + if (reconConfigBuilder_ == null) { + result.reconConfig_ = reconConfig_; + } else { + result.reconConfig_ = reconConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob) { + return mergeFrom( + (com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob other) { + if (other + == com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasInputConfig()) { + mergeInputConfig(other.getInputConfig()); + } + if (other.hasOutputConfig()) { + mergeOutputConfig(other.getOutputConfig()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasError()) { + mergeError(other.getError()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasReconConfig()) { + mergeReconConfig(other.getReconConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getInputConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getOutputConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 32: + { + state_ = input.readEnum(); + + break; + } // case 32 + case 42: + { + input.readMessage(getErrorFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 50: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 50 + case 58: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 58 + case 66: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 66 + case 74: + { + input.readMessage(getReconConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 74 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Resource name of the EntityReconciliationJob.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Resource name of the EntityReconciliationJob.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Resource name of the EntityReconciliationJob.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of the EntityReconciliationJob.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of the EntityReconciliationJob.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.cloud.enterpriseknowledgegraph.v1.InputConfig inputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.enterpriseknowledgegraph.v1.InputConfig, + com.google.cloud.enterpriseknowledgegraph.v1.InputConfig.Builder, + com.google.cloud.enterpriseknowledgegraph.v1.InputConfigOrBuilder> + inputConfigBuilder_; + /** + * + * + *
+     * Required. Information about the input BigQuery tables.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the inputConfig field is set. + */ + public boolean hasInputConfig() { + return inputConfigBuilder_ != null || inputConfig_ != null; + } + /** + * + * + *
+     * Required. Information about the input BigQuery tables.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The inputConfig. + */ + public com.google.cloud.enterpriseknowledgegraph.v1.InputConfig getInputConfig() { + if (inputConfigBuilder_ == null) { + return inputConfig_ == null + ? com.google.cloud.enterpriseknowledgegraph.v1.InputConfig.getDefaultInstance() + : inputConfig_; + } else { + return inputConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Information about the input BigQuery tables.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInputConfig(com.google.cloud.enterpriseknowledgegraph.v1.InputConfig value) { + if (inputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputConfig_ = value; + onChanged(); + } else { + inputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Information about the input BigQuery tables.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInputConfig( + com.google.cloud.enterpriseknowledgegraph.v1.InputConfig.Builder builderForValue) { + if (inputConfigBuilder_ == null) { + inputConfig_ = builderForValue.build(); + onChanged(); + } else { + inputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Information about the input BigQuery tables.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeInputConfig( + com.google.cloud.enterpriseknowledgegraph.v1.InputConfig value) { + if (inputConfigBuilder_ == null) { + if (inputConfig_ != null) { + inputConfig_ = + com.google.cloud.enterpriseknowledgegraph.v1.InputConfig.newBuilder(inputConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + inputConfig_ = value; + } + onChanged(); + } else { + inputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Information about the input BigQuery tables.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearInputConfig() { + if (inputConfigBuilder_ == null) { + inputConfig_ = null; + onChanged(); + } else { + inputConfig_ = null; + inputConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Information about the input BigQuery tables.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.enterpriseknowledgegraph.v1.InputConfig.Builder + getInputConfigBuilder() { + + onChanged(); + return getInputConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Information about the input BigQuery tables.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.enterpriseknowledgegraph.v1.InputConfigOrBuilder + getInputConfigOrBuilder() { + if (inputConfigBuilder_ != null) { + return inputConfigBuilder_.getMessageOrBuilder(); + } else { + return inputConfig_ == null + ? com.google.cloud.enterpriseknowledgegraph.v1.InputConfig.getDefaultInstance() + : inputConfig_; + } + } + /** + * + * + *
+     * Required. Information about the input BigQuery tables.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.enterpriseknowledgegraph.v1.InputConfig, + com.google.cloud.enterpriseknowledgegraph.v1.InputConfig.Builder, + com.google.cloud.enterpriseknowledgegraph.v1.InputConfigOrBuilder> + getInputConfigFieldBuilder() { + if (inputConfigBuilder_ == null) { + inputConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.enterpriseknowledgegraph.v1.InputConfig, + com.google.cloud.enterpriseknowledgegraph.v1.InputConfig.Builder, + com.google.cloud.enterpriseknowledgegraph.v1.InputConfigOrBuilder>( + getInputConfig(), getParentForChildren(), isClean()); + inputConfig_ = null; + } + return inputConfigBuilder_; + } + + private com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig outputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig, + com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig.Builder, + com.google.cloud.enterpriseknowledgegraph.v1.OutputConfigOrBuilder> + outputConfigBuilder_; + /** + * + * + *
+     * Required. The desired output location.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the outputConfig field is set. + */ + public boolean hasOutputConfig() { + return outputConfigBuilder_ != null || outputConfig_ != null; + } + /** + * + * + *
+     * Required. The desired output location.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The outputConfig. + */ + public com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig getOutputConfig() { + if (outputConfigBuilder_ == null) { + return outputConfig_ == null + ? com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig.getDefaultInstance() + : outputConfig_; + } else { + return outputConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The desired output location.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOutputConfig( + com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputConfig_ = value; + onChanged(); + } else { + outputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The desired output location.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOutputConfig( + com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig.Builder builderForValue) { + if (outputConfigBuilder_ == null) { + outputConfig_ = builderForValue.build(); + onChanged(); + } else { + outputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The desired output location.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeOutputConfig( + com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (outputConfig_ != null) { + outputConfig_ = + com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig.newBuilder(outputConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + outputConfig_ = value; + } + onChanged(); + } else { + outputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The desired output location.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearOutputConfig() { + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + onChanged(); + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The desired output location.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig.Builder + getOutputConfigBuilder() { + + onChanged(); + return getOutputConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The desired output location.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.enterpriseknowledgegraph.v1.OutputConfigOrBuilder + getOutputConfigOrBuilder() { + if (outputConfigBuilder_ != null) { + return outputConfigBuilder_.getMessageOrBuilder(); + } else { + return outputConfig_ == null + ? com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig.getDefaultInstance() + : outputConfig_; + } + } + /** + * + * + *
+     * Required. The desired output location.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig, + com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig.Builder, + com.google.cloud.enterpriseknowledgegraph.v1.OutputConfigOrBuilder> + getOutputConfigFieldBuilder() { + if (outputConfigBuilder_ == null) { + outputConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig, + com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig.Builder, + com.google.cloud.enterpriseknowledgegraph.v1.OutputConfigOrBuilder>( + getOutputConfig(), getParentForChildren(), isClean()); + outputConfig_ = null; + } + return outputConfigBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.JobState state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.JobState state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.JobState state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.JobState getState() { + @SuppressWarnings("deprecation") + com.google.cloud.enterpriseknowledgegraph.v1.JobState result = + com.google.cloud.enterpriseknowledgegraph.v1.JobState.valueOf(state_); + return result == null + ? com.google.cloud.enterpriseknowledgegraph.v1.JobState.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.JobState state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.enterpriseknowledgegraph.v1.JobState value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.JobState state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private com.google.rpc.Status error_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + errorBuilder_; + /** + * + * + *
+     * Output only. Only populated when the job's state is JOB_STATE_FAILED or
+     * JOB_STATE_CANCELLED.
+     * 
+ * + * .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + public boolean hasError() { + return errorBuilder_ != null || error_ != null; + } + /** + * + * + *
+     * Output only. Only populated when the job's state is JOB_STATE_FAILED or
+     * JOB_STATE_CANCELLED.
+     * 
+ * + * .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } else { + return errorBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Only populated when the job's state is JOB_STATE_FAILED or
+     * JOB_STATE_CANCELLED.
+     * 
+ * + * .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Only populated when the job's state is JOB_STATE_FAILED or
+     * JOB_STATE_CANCELLED.
+     * 
+ * + * .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setError(com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Only populated when the job's state is JOB_STATE_FAILED or
+     * JOB_STATE_CANCELLED.
+     * 
+ * + * .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (error_ != null) { + error_ = com.google.rpc.Status.newBuilder(error_).mergeFrom(value).buildPartial(); + } else { + error_ = value; + } + onChanged(); + } else { + errorBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Only populated when the job's state is JOB_STATE_FAILED or
+     * JOB_STATE_CANCELLED.
+     * 
+ * + * .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearError() { + if (errorBuilder_ == null) { + error_ = null; + onChanged(); + } else { + error_ = null; + errorBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Only populated when the job's state is JOB_STATE_FAILED or
+     * JOB_STATE_CANCELLED.
+     * 
+ * + * .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + + onChanged(); + return getErrorFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Only populated when the job's state is JOB_STATE_FAILED or
+     * JOB_STATE_CANCELLED.
+     * 
+ * + * .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + } + /** + * + * + *
+     * Output only. Only populated when the job's state is JOB_STATE_FAILED or
+     * JOB_STATE_CANCELLED.
+     * 
+ * + * .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>(getError(), getParentForChildren(), isClean()); + error_ = null; + } + return errorBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the EntityReconciliationJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Time when the EntityReconciliationJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the EntityReconciliationJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the EntityReconciliationJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the EntityReconciliationJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the EntityReconciliationJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the EntityReconciliationJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the EntityReconciliationJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time when the EntityReconciliationJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the EntityReconciliationJob entered any of the
+     * following states: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`,
+     * `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * Output only. Time when the EntityReconciliationJob entered any of the
+     * following states: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`,
+     * `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the EntityReconciliationJob entered any of the
+     * following states: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`,
+     * `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the EntityReconciliationJob entered any of the
+     * following states: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`,
+     * `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the EntityReconciliationJob entered any of the
+     * following states: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`,
+     * `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the EntityReconciliationJob entered any of the
+     * following states: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`,
+     * `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the EntityReconciliationJob entered any of the
+     * following states: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`,
+     * `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the EntityReconciliationJob entered any of the
+     * following states: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`,
+     * `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * Output only. Time when the EntityReconciliationJob entered any of the
+     * following states: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`,
+     * `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the EntityReconciliationJob was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. Time when the EntityReconciliationJob was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the EntityReconciliationJob was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the EntityReconciliationJob was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the EntityReconciliationJob was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the EntityReconciliationJob was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the EntityReconciliationJob was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the EntityReconciliationJob was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Time when the EntityReconciliationJob was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig reconConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig, + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Builder, + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfigOrBuilder> + reconConfigBuilder_; + /** + * + * + *
+     * Optional. Recon configs to adjust the clustering behavior.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig recon_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the reconConfig field is set. + */ + public boolean hasReconConfig() { + return reconConfigBuilder_ != null || reconConfig_ != null; + } + /** + * + * + *
+     * Optional. Recon configs to adjust the clustering behavior.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig recon_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The reconConfig. + */ + public com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig getReconConfig() { + if (reconConfigBuilder_ == null) { + return reconConfig_ == null + ? com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.getDefaultInstance() + : reconConfig_; + } else { + return reconConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Recon configs to adjust the clustering behavior.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig recon_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setReconConfig(com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig value) { + if (reconConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reconConfig_ = value; + onChanged(); + } else { + reconConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Recon configs to adjust the clustering behavior.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig recon_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setReconConfig( + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Builder builderForValue) { + if (reconConfigBuilder_ == null) { + reconConfig_ = builderForValue.build(); + onChanged(); + } else { + reconConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Recon configs to adjust the clustering behavior.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig recon_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeReconConfig( + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig value) { + if (reconConfigBuilder_ == null) { + if (reconConfig_ != null) { + reconConfig_ = + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.newBuilder(reconConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + reconConfig_ = value; + } + onChanged(); + } else { + reconConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Recon configs to adjust the clustering behavior.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig recon_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearReconConfig() { + if (reconConfigBuilder_ == null) { + reconConfig_ = null; + onChanged(); + } else { + reconConfig_ = null; + reconConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Recon configs to adjust the clustering behavior.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig recon_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Builder + getReconConfigBuilder() { + + onChanged(); + return getReconConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Recon configs to adjust the clustering behavior.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig recon_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.enterpriseknowledgegraph.v1.ReconConfigOrBuilder + getReconConfigOrBuilder() { + if (reconConfigBuilder_ != null) { + return reconConfigBuilder_.getMessageOrBuilder(); + } else { + return reconConfig_ == null + ? com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.getDefaultInstance() + : reconConfig_; + } + } + /** + * + * + *
+     * Optional. Recon configs to adjust the clustering behavior.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig recon_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig, + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Builder, + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfigOrBuilder> + getReconConfigFieldBuilder() { + if (reconConfigBuilder_ == null) { + reconConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig, + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Builder, + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfigOrBuilder>( + getReconConfig(), getParentForChildren(), isClean()); + reconConfig_ = null; + } + return reconConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob) + } + + // @@protoc_insertion_point(class_scope:google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob) + private static final com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob(); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EntityReconciliationJob parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/EntityReconciliationJobName.java b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/EntityReconciliationJobName.java new file mode 100644 index 000000000000..58125fcad06e --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/EntityReconciliationJobName.java @@ -0,0 +1,240 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.enterpriseknowledgegraph.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class EntityReconciliationJobName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_ENTITY_RECONCILIATION_JOB = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String entityReconciliationJob; + + @Deprecated + protected EntityReconciliationJobName() { + project = null; + location = null; + entityReconciliationJob = null; + } + + private EntityReconciliationJobName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + entityReconciliationJob = Preconditions.checkNotNull(builder.getEntityReconciliationJob()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getEntityReconciliationJob() { + return entityReconciliationJob; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static EntityReconciliationJobName of( + String project, String location, String entityReconciliationJob) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setEntityReconciliationJob(entityReconciliationJob) + .build(); + } + + public static String format(String project, String location, String entityReconciliationJob) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setEntityReconciliationJob(entityReconciliationJob) + .build() + .toString(); + } + + public static EntityReconciliationJobName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_ENTITY_RECONCILIATION_JOB.validatedMatch( + formattedString, + "EntityReconciliationJobName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("entity_reconciliation_job")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (EntityReconciliationJobName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_ENTITY_RECONCILIATION_JOB.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (entityReconciliationJob != null) { + fieldMapBuilder.put("entity_reconciliation_job", entityReconciliationJob); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_ENTITY_RECONCILIATION_JOB.instantiate( + "project", + project, + "location", + location, + "entity_reconciliation_job", + entityReconciliationJob); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + EntityReconciliationJobName that = ((EntityReconciliationJobName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.entityReconciliationJob, that.entityReconciliationJob); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(entityReconciliationJob); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}. + */ + public static class Builder { + private String project; + private String location; + private String entityReconciliationJob; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getEntityReconciliationJob() { + return entityReconciliationJob; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setEntityReconciliationJob(String entityReconciliationJob) { + this.entityReconciliationJob = entityReconciliationJob; + return this; + } + + private Builder(EntityReconciliationJobName entityReconciliationJobName) { + this.project = entityReconciliationJobName.project; + this.location = entityReconciliationJobName.location; + this.entityReconciliationJob = entityReconciliationJobName.entityReconciliationJob; + } + + public EntityReconciliationJobName build() { + return new EntityReconciliationJobName(this); + } + } +} diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/EntityReconciliationJobOrBuilder.java b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/EntityReconciliationJobOrBuilder.java new file mode 100644 index 000000000000..2e645d2bdc9f --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/EntityReconciliationJobOrBuilder.java @@ -0,0 +1,363 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/enterpriseknowledgegraph/v1/service.proto + +package com.google.cloud.enterpriseknowledgegraph.v1; + +public interface EntityReconciliationJobOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Resource name of the EntityReconciliationJob.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Resource name of the EntityReconciliationJob.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Information about the input BigQuery tables.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the inputConfig field is set. + */ + boolean hasInputConfig(); + /** + * + * + *
+   * Required. Information about the input BigQuery tables.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The inputConfig. + */ + com.google.cloud.enterpriseknowledgegraph.v1.InputConfig getInputConfig(); + /** + * + * + *
+   * Required. Information about the input BigQuery tables.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.enterpriseknowledgegraph.v1.InputConfigOrBuilder getInputConfigOrBuilder(); + + /** + * + * + *
+   * Required. The desired output location.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the outputConfig field is set. + */ + boolean hasOutputConfig(); + /** + * + * + *
+   * Required. The desired output location.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The outputConfig. + */ + com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig getOutputConfig(); + /** + * + * + *
+   * Required. The desired output location.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.enterpriseknowledgegraph.v1.OutputConfigOrBuilder getOutputConfigOrBuilder(); + + /** + * + * + *
+   * Output only. The detailed state of the job.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.JobState state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The detailed state of the job.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.JobState state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.enterpriseknowledgegraph.v1.JobState getState(); + + /** + * + * + *
+   * Output only. Only populated when the job's state is JOB_STATE_FAILED or
+   * JOB_STATE_CANCELLED.
+   * 
+ * + * .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + boolean hasError(); + /** + * + * + *
+   * Output only. Only populated when the job's state is JOB_STATE_FAILED or
+   * JOB_STATE_CANCELLED.
+   * 
+ * + * .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + com.google.rpc.Status getError(); + /** + * + * + *
+   * Output only. Only populated when the job's state is JOB_STATE_FAILED or
+   * JOB_STATE_CANCELLED.
+   * 
+ * + * .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the EntityReconciliationJob was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time when the EntityReconciliationJob was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time when the EntityReconciliationJob was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the EntityReconciliationJob entered any of the
+   * following states: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`,
+   * `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Output only. Time when the EntityReconciliationJob entered any of the
+   * following states: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`,
+   * `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Output only. Time when the EntityReconciliationJob entered any of the
+   * following states: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`,
+   * `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the EntityReconciliationJob was most recently
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Time when the EntityReconciliationJob was most recently
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Time when the EntityReconciliationJob was most recently
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Recon configs to adjust the clustering behavior.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig recon_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the reconConfig field is set. + */ + boolean hasReconConfig(); + /** + * + * + *
+   * Optional. Recon configs to adjust the clustering behavior.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig recon_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The reconConfig. + */ + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig getReconConfig(); + /** + * + * + *
+   * Optional. Recon configs to adjust the clustering behavior.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig recon_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfigOrBuilder getReconConfigOrBuilder(); +} diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/GetEntityReconciliationJobRequest.java b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/GetEntityReconciliationJobRequest.java new file mode 100644 index 000000000000..3116762153c5 --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/GetEntityReconciliationJobRequest.java @@ -0,0 +1,671 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/enterpriseknowledgegraph/v1/service.proto + +package com.google.cloud.enterpriseknowledgegraph.v1; + +/** + * + * + *
+ * Request message for GetEntityReconciliationJob.
+ * 
+ * + * Protobuf type {@code google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest} + */ +public final class GetEntityReconciliationJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest) + GetEntityReconciliationJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetEntityReconciliationJobRequest.newBuilder() to construct. + private GetEntityReconciliationJobRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetEntityReconciliationJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetEntityReconciliationJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_GetEntityReconciliationJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_GetEntityReconciliationJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest.class, + com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the EntityReconciliationJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the EntityReconciliationJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest)) { + return super.equals(obj); + } + com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest other = + (com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for GetEntityReconciliationJob.
+   * 
+ * + * Protobuf type {@code + * google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest) + com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_GetEntityReconciliationJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_GetEntityReconciliationJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest.class, + com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_GetEntityReconciliationJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest + getDefaultInstanceForType() { + return com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest build() { + com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest + buildPartial() { + com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest result = + new com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest) { + return mergeFrom( + (com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest other) { + if (other + == com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the EntityReconciliationJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the EntityReconciliationJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the EntityReconciliationJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the EntityReconciliationJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the EntityReconciliationJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest) + private static final com.google.cloud.enterpriseknowledgegraph.v1 + .GetEntityReconciliationJobRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest(); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetEntityReconciliationJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/GetEntityReconciliationJobRequestOrBuilder.java b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/GetEntityReconciliationJobRequestOrBuilder.java new file mode 100644 index 000000000000..ab00e31032c4 --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/GetEntityReconciliationJobRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/enterpriseknowledgegraph/v1/service.proto + +package com.google.cloud.enterpriseknowledgegraph.v1; + +public interface GetEntityReconciliationJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.enterpriseknowledgegraph.v1.GetEntityReconciliationJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the EntityReconciliationJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the EntityReconciliationJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/InputConfig.java b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/InputConfig.java new file mode 100644 index 000000000000..57ef38b96269 --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/InputConfig.java @@ -0,0 +1,1653 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/enterpriseknowledgegraph/v1/service.proto + +package com.google.cloud.enterpriseknowledgegraph.v1; + +/** + * + * + *
+ * The desired input location and metadata.
+ * 
+ * + * Protobuf type {@code google.cloud.enterpriseknowledgegraph.v1.InputConfig} + */ +public final class InputConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.enterpriseknowledgegraph.v1.InputConfig) + InputConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use InputConfig.newBuilder() to construct. + private InputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InputConfig() { + bigqueryInputConfigs_ = java.util.Collections.emptyList(); + entityType_ = 0; + previousResultBigqueryTable_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InputConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_InputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_InputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.enterpriseknowledgegraph.v1.InputConfig.class, + com.google.cloud.enterpriseknowledgegraph.v1.InputConfig.Builder.class); + } + + /** + * + * + *
+   * The type of entities we will support. Currently, we only support people,
+   * establishment, property, and product types. If the type is
+   * unspecified, it will be generic type.
+   * 
+ * + * Protobuf enum {@code google.cloud.enterpriseknowledgegraph.v1.InputConfig.EntityType} + */ + public enum EntityType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The default value.
+     * 
+ * + * ENTITY_TYPE_UNSPECIFIED = 0; + */ + ENTITY_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * People entity.
+     * 
+ * + * PEOPLE = 1 [deprecated = true]; + */ + @java.lang.Deprecated + PEOPLE(1), + /** + * + * + *
+     * Establishment entity.
+     * 
+ * + * ESTABLISHMENT = 2 [deprecated = true]; + */ + @java.lang.Deprecated + ESTABLISHMENT(2), + /** + * + * + *
+     * Property entity. e.g. real estate property.
+     * 
+ * + * PROPERTY = 3 [deprecated = true]; + */ + @java.lang.Deprecated + PROPERTY(3), + /** + * + * + *
+     * Product entity.
+     * 
+ * + * PRODUCT = 4; + */ + PRODUCT(4), + /** + * + * + *
+     * Organization entity.
+     * 
+ * + * ORGANIZATION = 5; + */ + ORGANIZATION(5), + /** + * + * + *
+     * Local Business entity.
+     * 
+ * + * LOCAL_BUSINESS = 6; + */ + LOCAL_BUSINESS(6), + /** + * + * + *
+     * Person entity.
+     * 
+ * + * PERSON = 7; + */ + PERSON(7), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The default value.
+     * 
+ * + * ENTITY_TYPE_UNSPECIFIED = 0; + */ + public static final int ENTITY_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * People entity.
+     * 
+ * + * PEOPLE = 1 [deprecated = true]; + */ + @java.lang.Deprecated public static final int PEOPLE_VALUE = 1; + /** + * + * + *
+     * Establishment entity.
+     * 
+ * + * ESTABLISHMENT = 2 [deprecated = true]; + */ + @java.lang.Deprecated public static final int ESTABLISHMENT_VALUE = 2; + /** + * + * + *
+     * Property entity. e.g. real estate property.
+     * 
+ * + * PROPERTY = 3 [deprecated = true]; + */ + @java.lang.Deprecated public static final int PROPERTY_VALUE = 3; + /** + * + * + *
+     * Product entity.
+     * 
+ * + * PRODUCT = 4; + */ + public static final int PRODUCT_VALUE = 4; + /** + * + * + *
+     * Organization entity.
+     * 
+ * + * ORGANIZATION = 5; + */ + public static final int ORGANIZATION_VALUE = 5; + /** + * + * + *
+     * Local Business entity.
+     * 
+ * + * LOCAL_BUSINESS = 6; + */ + public static final int LOCAL_BUSINESS_VALUE = 6; + /** + * + * + *
+     * Person entity.
+     * 
+ * + * PERSON = 7; + */ + public static final int PERSON_VALUE = 7; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static EntityType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static EntityType forNumber(int value) { + switch (value) { + case 0: + return ENTITY_TYPE_UNSPECIFIED; + case 1: + return PEOPLE; + case 2: + return ESTABLISHMENT; + case 3: + return PROPERTY; + case 4: + return PRODUCT; + case 5: + return ORGANIZATION; + case 6: + return LOCAL_BUSINESS; + case 7: + return PERSON; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public EntityType findValueByNumber(int number) { + return EntityType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.InputConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final EntityType[] VALUES = values(); + + public static EntityType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private EntityType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.enterpriseknowledgegraph.v1.InputConfig.EntityType) + } + + public static final int BIGQUERY_INPUT_CONFIGS_FIELD_NUMBER = 1; + private java.util.List + bigqueryInputConfigs_; + /** + * + * + *
+   * Set of input BigQuery tables.
+   * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig bigquery_input_configs = 1; + * + */ + @java.lang.Override + public java.util.List + getBigqueryInputConfigsList() { + return bigqueryInputConfigs_; + } + /** + * + * + *
+   * Set of input BigQuery tables.
+   * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig bigquery_input_configs = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfigOrBuilder> + getBigqueryInputConfigsOrBuilderList() { + return bigqueryInputConfigs_; + } + /** + * + * + *
+   * Set of input BigQuery tables.
+   * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig bigquery_input_configs = 1; + * + */ + @java.lang.Override + public int getBigqueryInputConfigsCount() { + return bigqueryInputConfigs_.size(); + } + /** + * + * + *
+   * Set of input BigQuery tables.
+   * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig bigquery_input_configs = 1; + * + */ + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig getBigqueryInputConfigs( + int index) { + return bigqueryInputConfigs_.get(index); + } + /** + * + * + *
+   * Set of input BigQuery tables.
+   * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig bigquery_input_configs = 1; + * + */ + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfigOrBuilder + getBigqueryInputConfigsOrBuilder(int index) { + return bigqueryInputConfigs_.get(index); + } + + public static final int ENTITY_TYPE_FIELD_NUMBER = 2; + private int entityType_; + /** + * + * + *
+   * Entity type
+   * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.InputConfig.EntityType entity_type = 2; + * + * @return The enum numeric value on the wire for entityType. + */ + @java.lang.Override + public int getEntityTypeValue() { + return entityType_; + } + /** + * + * + *
+   * Entity type
+   * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.InputConfig.EntityType entity_type = 2; + * + * @return The entityType. + */ + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.InputConfig.EntityType getEntityType() { + @SuppressWarnings("deprecation") + com.google.cloud.enterpriseknowledgegraph.v1.InputConfig.EntityType result = + com.google.cloud.enterpriseknowledgegraph.v1.InputConfig.EntityType.valueOf(entityType_); + return result == null + ? com.google.cloud.enterpriseknowledgegraph.v1.InputConfig.EntityType.UNRECOGNIZED + : result; + } + + public static final int PREVIOUS_RESULT_BIGQUERY_TABLE_FIELD_NUMBER = 3; + private volatile java.lang.Object previousResultBigqueryTable_; + /** + * + * + *
+   * Optional. Provide the bigquery table containing the previous results if
+   * cluster ID stability is desired. Format is
+   * “projects/*/datasets/*/tables/*".
+   * 
+ * + * + * string previous_result_bigquery_table = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The previousResultBigqueryTable. + */ + @java.lang.Override + public java.lang.String getPreviousResultBigqueryTable() { + java.lang.Object ref = previousResultBigqueryTable_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + previousResultBigqueryTable_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Provide the bigquery table containing the previous results if
+   * cluster ID stability is desired. Format is
+   * “projects/*/datasets/*/tables/*".
+   * 
+ * + * + * string previous_result_bigquery_table = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for previousResultBigqueryTable. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPreviousResultBigqueryTableBytes() { + java.lang.Object ref = previousResultBigqueryTable_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + previousResultBigqueryTable_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < bigqueryInputConfigs_.size(); i++) { + output.writeMessage(1, bigqueryInputConfigs_.get(i)); + } + if (entityType_ + != com.google.cloud.enterpriseknowledgegraph.v1.InputConfig.EntityType + .ENTITY_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, entityType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(previousResultBigqueryTable_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, previousResultBigqueryTable_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < bigqueryInputConfigs_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, bigqueryInputConfigs_.get(i)); + } + if (entityType_ + != com.google.cloud.enterpriseknowledgegraph.v1.InputConfig.EntityType + .ENTITY_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, entityType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(previousResultBigqueryTable_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(3, previousResultBigqueryTable_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.enterpriseknowledgegraph.v1.InputConfig)) { + return super.equals(obj); + } + com.google.cloud.enterpriseknowledgegraph.v1.InputConfig other = + (com.google.cloud.enterpriseknowledgegraph.v1.InputConfig) obj; + + if (!getBigqueryInputConfigsList().equals(other.getBigqueryInputConfigsList())) return false; + if (entityType_ != other.entityType_) return false; + if (!getPreviousResultBigqueryTable().equals(other.getPreviousResultBigqueryTable())) + return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getBigqueryInputConfigsCount() > 0) { + hash = (37 * hash) + BIGQUERY_INPUT_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getBigqueryInputConfigsList().hashCode(); + } + hash = (37 * hash) + ENTITY_TYPE_FIELD_NUMBER; + hash = (53 * hash) + entityType_; + hash = (37 * hash) + PREVIOUS_RESULT_BIGQUERY_TABLE_FIELD_NUMBER; + hash = (53 * hash) + getPreviousResultBigqueryTable().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.InputConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.InputConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.InputConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.InputConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.InputConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.InputConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.InputConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.InputConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.InputConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.InputConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.InputConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.InputConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.enterpriseknowledgegraph.v1.InputConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The desired input location and metadata.
+   * 
+ * + * Protobuf type {@code google.cloud.enterpriseknowledgegraph.v1.InputConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.enterpriseknowledgegraph.v1.InputConfig) + com.google.cloud.enterpriseknowledgegraph.v1.InputConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_InputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_InputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.enterpriseknowledgegraph.v1.InputConfig.class, + com.google.cloud.enterpriseknowledgegraph.v1.InputConfig.Builder.class); + } + + // Construct using com.google.cloud.enterpriseknowledgegraph.v1.InputConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (bigqueryInputConfigsBuilder_ == null) { + bigqueryInputConfigs_ = java.util.Collections.emptyList(); + } else { + bigqueryInputConfigs_ = null; + bigqueryInputConfigsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + entityType_ = 0; + + previousResultBigqueryTable_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_InputConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.InputConfig getDefaultInstanceForType() { + return com.google.cloud.enterpriseknowledgegraph.v1.InputConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.InputConfig build() { + com.google.cloud.enterpriseknowledgegraph.v1.InputConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.InputConfig buildPartial() { + com.google.cloud.enterpriseknowledgegraph.v1.InputConfig result = + new com.google.cloud.enterpriseknowledgegraph.v1.InputConfig(this); + int from_bitField0_ = bitField0_; + if (bigqueryInputConfigsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + bigqueryInputConfigs_ = java.util.Collections.unmodifiableList(bigqueryInputConfigs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.bigqueryInputConfigs_ = bigqueryInputConfigs_; + } else { + result.bigqueryInputConfigs_ = bigqueryInputConfigsBuilder_.build(); + } + result.entityType_ = entityType_; + result.previousResultBigqueryTable_ = previousResultBigqueryTable_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.enterpriseknowledgegraph.v1.InputConfig) { + return mergeFrom((com.google.cloud.enterpriseknowledgegraph.v1.InputConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.enterpriseknowledgegraph.v1.InputConfig other) { + if (other == com.google.cloud.enterpriseknowledgegraph.v1.InputConfig.getDefaultInstance()) + return this; + if (bigqueryInputConfigsBuilder_ == null) { + if (!other.bigqueryInputConfigs_.isEmpty()) { + if (bigqueryInputConfigs_.isEmpty()) { + bigqueryInputConfigs_ = other.bigqueryInputConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBigqueryInputConfigsIsMutable(); + bigqueryInputConfigs_.addAll(other.bigqueryInputConfigs_); + } + onChanged(); + } + } else { + if (!other.bigqueryInputConfigs_.isEmpty()) { + if (bigqueryInputConfigsBuilder_.isEmpty()) { + bigqueryInputConfigsBuilder_.dispose(); + bigqueryInputConfigsBuilder_ = null; + bigqueryInputConfigs_ = other.bigqueryInputConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + bigqueryInputConfigsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBigqueryInputConfigsFieldBuilder() + : null; + } else { + bigqueryInputConfigsBuilder_.addAllMessages(other.bigqueryInputConfigs_); + } + } + } + if (other.entityType_ != 0) { + setEntityTypeValue(other.getEntityTypeValue()); + } + if (!other.getPreviousResultBigqueryTable().isEmpty()) { + previousResultBigqueryTable_ = other.previousResultBigqueryTable_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig m = + input.readMessage( + com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig.parser(), + extensionRegistry); + if (bigqueryInputConfigsBuilder_ == null) { + ensureBigqueryInputConfigsIsMutable(); + bigqueryInputConfigs_.add(m); + } else { + bigqueryInputConfigsBuilder_.addMessage(m); + } + break; + } // case 10 + case 16: + { + entityType_ = input.readEnum(); + + break; + } // case 16 + case 26: + { + previousResultBigqueryTable_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + bigqueryInputConfigs_ = java.util.Collections.emptyList(); + + private void ensureBigqueryInputConfigsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + bigqueryInputConfigs_ = + new java.util.ArrayList< + com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig>( + bigqueryInputConfigs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig, + com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig.Builder, + com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfigOrBuilder> + bigqueryInputConfigsBuilder_; + + /** + * + * + *
+     * Set of input BigQuery tables.
+     * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig bigquery_input_configs = 1; + * + */ + public java.util.List + getBigqueryInputConfigsList() { + if (bigqueryInputConfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList(bigqueryInputConfigs_); + } else { + return bigqueryInputConfigsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Set of input BigQuery tables.
+     * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig bigquery_input_configs = 1; + * + */ + public int getBigqueryInputConfigsCount() { + if (bigqueryInputConfigsBuilder_ == null) { + return bigqueryInputConfigs_.size(); + } else { + return bigqueryInputConfigsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Set of input BigQuery tables.
+     * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig bigquery_input_configs = 1; + * + */ + public com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig getBigqueryInputConfigs( + int index) { + if (bigqueryInputConfigsBuilder_ == null) { + return bigqueryInputConfigs_.get(index); + } else { + return bigqueryInputConfigsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Set of input BigQuery tables.
+     * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig bigquery_input_configs = 1; + * + */ + public Builder setBigqueryInputConfigs( + int index, com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig value) { + if (bigqueryInputConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBigqueryInputConfigsIsMutable(); + bigqueryInputConfigs_.set(index, value); + onChanged(); + } else { + bigqueryInputConfigsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Set of input BigQuery tables.
+     * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig bigquery_input_configs = 1; + * + */ + public Builder setBigqueryInputConfigs( + int index, + com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig.Builder builderForValue) { + if (bigqueryInputConfigsBuilder_ == null) { + ensureBigqueryInputConfigsIsMutable(); + bigqueryInputConfigs_.set(index, builderForValue.build()); + onChanged(); + } else { + bigqueryInputConfigsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Set of input BigQuery tables.
+     * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig bigquery_input_configs = 1; + * + */ + public Builder addBigqueryInputConfigs( + com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig value) { + if (bigqueryInputConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBigqueryInputConfigsIsMutable(); + bigqueryInputConfigs_.add(value); + onChanged(); + } else { + bigqueryInputConfigsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Set of input BigQuery tables.
+     * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig bigquery_input_configs = 1; + * + */ + public Builder addBigqueryInputConfigs( + int index, com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig value) { + if (bigqueryInputConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBigqueryInputConfigsIsMutable(); + bigqueryInputConfigs_.add(index, value); + onChanged(); + } else { + bigqueryInputConfigsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Set of input BigQuery tables.
+     * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig bigquery_input_configs = 1; + * + */ + public Builder addBigqueryInputConfigs( + com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig.Builder builderForValue) { + if (bigqueryInputConfigsBuilder_ == null) { + ensureBigqueryInputConfigsIsMutable(); + bigqueryInputConfigs_.add(builderForValue.build()); + onChanged(); + } else { + bigqueryInputConfigsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Set of input BigQuery tables.
+     * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig bigquery_input_configs = 1; + * + */ + public Builder addBigqueryInputConfigs( + int index, + com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig.Builder builderForValue) { + if (bigqueryInputConfigsBuilder_ == null) { + ensureBigqueryInputConfigsIsMutable(); + bigqueryInputConfigs_.add(index, builderForValue.build()); + onChanged(); + } else { + bigqueryInputConfigsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Set of input BigQuery tables.
+     * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig bigquery_input_configs = 1; + * + */ + public Builder addAllBigqueryInputConfigs( + java.lang.Iterable< + ? extends com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig> + values) { + if (bigqueryInputConfigsBuilder_ == null) { + ensureBigqueryInputConfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, bigqueryInputConfigs_); + onChanged(); + } else { + bigqueryInputConfigsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Set of input BigQuery tables.
+     * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig bigquery_input_configs = 1; + * + */ + public Builder clearBigqueryInputConfigs() { + if (bigqueryInputConfigsBuilder_ == null) { + bigqueryInputConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + bigqueryInputConfigsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Set of input BigQuery tables.
+     * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig bigquery_input_configs = 1; + * + */ + public Builder removeBigqueryInputConfigs(int index) { + if (bigqueryInputConfigsBuilder_ == null) { + ensureBigqueryInputConfigsIsMutable(); + bigqueryInputConfigs_.remove(index); + onChanged(); + } else { + bigqueryInputConfigsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Set of input BigQuery tables.
+     * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig bigquery_input_configs = 1; + * + */ + public com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig.Builder + getBigqueryInputConfigsBuilder(int index) { + return getBigqueryInputConfigsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Set of input BigQuery tables.
+     * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig bigquery_input_configs = 1; + * + */ + public com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfigOrBuilder + getBigqueryInputConfigsOrBuilder(int index) { + if (bigqueryInputConfigsBuilder_ == null) { + return bigqueryInputConfigs_.get(index); + } else { + return bigqueryInputConfigsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Set of input BigQuery tables.
+     * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig bigquery_input_configs = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfigOrBuilder> + getBigqueryInputConfigsOrBuilderList() { + if (bigqueryInputConfigsBuilder_ != null) { + return bigqueryInputConfigsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bigqueryInputConfigs_); + } + } + /** + * + * + *
+     * Set of input BigQuery tables.
+     * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig bigquery_input_configs = 1; + * + */ + public com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig.Builder + addBigqueryInputConfigsBuilder() { + return getBigqueryInputConfigsFieldBuilder() + .addBuilder( + com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig + .getDefaultInstance()); + } + /** + * + * + *
+     * Set of input BigQuery tables.
+     * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig bigquery_input_configs = 1; + * + */ + public com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig.Builder + addBigqueryInputConfigsBuilder(int index) { + return getBigqueryInputConfigsFieldBuilder() + .addBuilder( + index, + com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig + .getDefaultInstance()); + } + /** + * + * + *
+     * Set of input BigQuery tables.
+     * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig bigquery_input_configs = 1; + * + */ + public java.util.List + getBigqueryInputConfigsBuilderList() { + return getBigqueryInputConfigsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig, + com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig.Builder, + com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfigOrBuilder> + getBigqueryInputConfigsFieldBuilder() { + if (bigqueryInputConfigsBuilder_ == null) { + bigqueryInputConfigsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig, + com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig.Builder, + com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfigOrBuilder>( + bigqueryInputConfigs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + bigqueryInputConfigs_ = null; + } + return bigqueryInputConfigsBuilder_; + } + + private int entityType_ = 0; + /** + * + * + *
+     * Entity type
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.InputConfig.EntityType entity_type = 2; + * + * + * @return The enum numeric value on the wire for entityType. + */ + @java.lang.Override + public int getEntityTypeValue() { + return entityType_; + } + /** + * + * + *
+     * Entity type
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.InputConfig.EntityType entity_type = 2; + * + * + * @param value The enum numeric value on the wire for entityType to set. + * @return This builder for chaining. + */ + public Builder setEntityTypeValue(int value) { + + entityType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Entity type
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.InputConfig.EntityType entity_type = 2; + * + * + * @return The entityType. + */ + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.InputConfig.EntityType getEntityType() { + @SuppressWarnings("deprecation") + com.google.cloud.enterpriseknowledgegraph.v1.InputConfig.EntityType result = + com.google.cloud.enterpriseknowledgegraph.v1.InputConfig.EntityType.valueOf(entityType_); + return result == null + ? com.google.cloud.enterpriseknowledgegraph.v1.InputConfig.EntityType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Entity type
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.InputConfig.EntityType entity_type = 2; + * + * + * @param value The entityType to set. + * @return This builder for chaining. + */ + public Builder setEntityType( + com.google.cloud.enterpriseknowledgegraph.v1.InputConfig.EntityType value) { + if (value == null) { + throw new NullPointerException(); + } + + entityType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Entity type
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.InputConfig.EntityType entity_type = 2; + * + * + * @return This builder for chaining. + */ + public Builder clearEntityType() { + + entityType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object previousResultBigqueryTable_ = ""; + /** + * + * + *
+     * Optional. Provide the bigquery table containing the previous results if
+     * cluster ID stability is desired. Format is
+     * “projects/*/datasets/*/tables/*".
+     * 
+ * + * + * string previous_result_bigquery_table = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The previousResultBigqueryTable. + */ + public java.lang.String getPreviousResultBigqueryTable() { + java.lang.Object ref = previousResultBigqueryTable_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + previousResultBigqueryTable_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Provide the bigquery table containing the previous results if
+     * cluster ID stability is desired. Format is
+     * “projects/*/datasets/*/tables/*".
+     * 
+ * + * + * string previous_result_bigquery_table = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for previousResultBigqueryTable. + */ + public com.google.protobuf.ByteString getPreviousResultBigqueryTableBytes() { + java.lang.Object ref = previousResultBigqueryTable_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + previousResultBigqueryTable_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Provide the bigquery table containing the previous results if
+     * cluster ID stability is desired. Format is
+     * “projects/*/datasets/*/tables/*".
+     * 
+ * + * + * string previous_result_bigquery_table = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The previousResultBigqueryTable to set. + * @return This builder for chaining. + */ + public Builder setPreviousResultBigqueryTable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + previousResultBigqueryTable_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Provide the bigquery table containing the previous results if
+     * cluster ID stability is desired. Format is
+     * “projects/*/datasets/*/tables/*".
+     * 
+ * + * + * string previous_result_bigquery_table = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearPreviousResultBigqueryTable() { + + previousResultBigqueryTable_ = getDefaultInstance().getPreviousResultBigqueryTable(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Provide the bigquery table containing the previous results if
+     * cluster ID stability is desired. Format is
+     * “projects/*/datasets/*/tables/*".
+     * 
+ * + * + * string previous_result_bigquery_table = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for previousResultBigqueryTable to set. + * @return This builder for chaining. + */ + public Builder setPreviousResultBigqueryTableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + previousResultBigqueryTable_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.enterpriseknowledgegraph.v1.InputConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.enterpriseknowledgegraph.v1.InputConfig) + private static final com.google.cloud.enterpriseknowledgegraph.v1.InputConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.enterpriseknowledgegraph.v1.InputConfig(); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.InputConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InputConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.InputConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/InputConfigOrBuilder.java b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/InputConfigOrBuilder.java new file mode 100644 index 000000000000..4adf1127106d --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/InputConfigOrBuilder.java @@ -0,0 +1,149 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/enterpriseknowledgegraph/v1/service.proto + +package com.google.cloud.enterpriseknowledgegraph.v1; + +public interface InputConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.enterpriseknowledgegraph.v1.InputConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Set of input BigQuery tables.
+   * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig bigquery_input_configs = 1; + * + */ + java.util.List + getBigqueryInputConfigsList(); + /** + * + * + *
+   * Set of input BigQuery tables.
+   * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig bigquery_input_configs = 1; + * + */ + com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig getBigqueryInputConfigs( + int index); + /** + * + * + *
+   * Set of input BigQuery tables.
+   * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig bigquery_input_configs = 1; + * + */ + int getBigqueryInputConfigsCount(); + /** + * + * + *
+   * Set of input BigQuery tables.
+   * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig bigquery_input_configs = 1; + * + */ + java.util.List< + ? extends com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfigOrBuilder> + getBigqueryInputConfigsOrBuilderList(); + /** + * + * + *
+   * Set of input BigQuery tables.
+   * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfig bigquery_input_configs = 1; + * + */ + com.google.cloud.enterpriseknowledgegraph.v1.BigQueryInputConfigOrBuilder + getBigqueryInputConfigsOrBuilder(int index); + + /** + * + * + *
+   * Entity type
+   * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.InputConfig.EntityType entity_type = 2; + * + * @return The enum numeric value on the wire for entityType. + */ + int getEntityTypeValue(); + /** + * + * + *
+   * Entity type
+   * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.InputConfig.EntityType entity_type = 2; + * + * @return The entityType. + */ + com.google.cloud.enterpriseknowledgegraph.v1.InputConfig.EntityType getEntityType(); + + /** + * + * + *
+   * Optional. Provide the bigquery table containing the previous results if
+   * cluster ID stability is desired. Format is
+   * “projects/*/datasets/*/tables/*".
+   * 
+ * + * + * string previous_result_bigquery_table = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The previousResultBigqueryTable. + */ + java.lang.String getPreviousResultBigqueryTable(); + /** + * + * + *
+   * Optional. Provide the bigquery table containing the previous results if
+   * cluster ID stability is desired. Format is
+   * “projects/*/datasets/*/tables/*".
+   * 
+ * + * + * string previous_result_bigquery_table = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for previousResultBigqueryTable. + */ + com.google.protobuf.ByteString getPreviousResultBigqueryTableBytes(); +} diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/JobState.java b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/JobState.java new file mode 100644 index 000000000000..1bdd7840b623 --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/JobState.java @@ -0,0 +1,332 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/enterpriseknowledgegraph/v1/job_state.proto + +package com.google.cloud.enterpriseknowledgegraph.v1; + +/** + * + * + *
+ * Describes the state of a job.
+ * 
+ * + * Protobuf enum {@code google.cloud.enterpriseknowledgegraph.v1.JobState} + */ +public enum JobState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * The job state is unspecified.
+   * 
+ * + * JOB_STATE_UNSPECIFIED = 0; + */ + JOB_STATE_UNSPECIFIED(0), + /** + * + * + *
+   * The service is preparing to run the job.
+   * 
+ * + * JOB_STATE_PENDING = 9; + */ + JOB_STATE_PENDING(9), + /** + * + * + *
+   * The job is in progress.
+   * 
+ * + * JOB_STATE_RUNNING = 1; + */ + JOB_STATE_RUNNING(1), + /** + * + * + *
+   * The job completed successfully.
+   * 
+ * + * JOB_STATE_SUCCEEDED = 2; + */ + JOB_STATE_SUCCEEDED(2), + /** + * + * + *
+   * The job failed.
+   * 
+ * + * JOB_STATE_FAILED = 3; + */ + JOB_STATE_FAILED(3), + /** + * + * + *
+   * The job has been cancelled.
+   * 
+ * + * JOB_STATE_CANCELLED = 4; + */ + JOB_STATE_CANCELLED(4), + /** + * + * + *
+   * Entity Recon API: The knowledge extraction job is running.
+   * 
+ * + * JOB_STATE_KNOWLEDGE_EXTRACTION = 5; + */ + JOB_STATE_KNOWLEDGE_EXTRACTION(5), + /** + * + * + *
+   * Entity Recon API: The preprocessing job is running.
+   * 
+ * + * JOB_STATE_RECON_PREPROCESSING = 6; + */ + JOB_STATE_RECON_PREPROCESSING(6), + /** + * + * + *
+   * Entity Recon API: The clustering job is running.
+   * 
+ * + * JOB_STATE_CLUSTERING = 7; + */ + JOB_STATE_CLUSTERING(7), + /** + * + * + *
+   * Entity Recon API: The exporting clusters job is running.
+   * 
+ * + * JOB_STATE_EXPORTING_CLUSTERS = 8; + */ + JOB_STATE_EXPORTING_CLUSTERS(8), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * The job state is unspecified.
+   * 
+ * + * JOB_STATE_UNSPECIFIED = 0; + */ + public static final int JOB_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * The service is preparing to run the job.
+   * 
+ * + * JOB_STATE_PENDING = 9; + */ + public static final int JOB_STATE_PENDING_VALUE = 9; + /** + * + * + *
+   * The job is in progress.
+   * 
+ * + * JOB_STATE_RUNNING = 1; + */ + public static final int JOB_STATE_RUNNING_VALUE = 1; + /** + * + * + *
+   * The job completed successfully.
+   * 
+ * + * JOB_STATE_SUCCEEDED = 2; + */ + public static final int JOB_STATE_SUCCEEDED_VALUE = 2; + /** + * + * + *
+   * The job failed.
+   * 
+ * + * JOB_STATE_FAILED = 3; + */ + public static final int JOB_STATE_FAILED_VALUE = 3; + /** + * + * + *
+   * The job has been cancelled.
+   * 
+ * + * JOB_STATE_CANCELLED = 4; + */ + public static final int JOB_STATE_CANCELLED_VALUE = 4; + /** + * + * + *
+   * Entity Recon API: The knowledge extraction job is running.
+   * 
+ * + * JOB_STATE_KNOWLEDGE_EXTRACTION = 5; + */ + public static final int JOB_STATE_KNOWLEDGE_EXTRACTION_VALUE = 5; + /** + * + * + *
+   * Entity Recon API: The preprocessing job is running.
+   * 
+ * + * JOB_STATE_RECON_PREPROCESSING = 6; + */ + public static final int JOB_STATE_RECON_PREPROCESSING_VALUE = 6; + /** + * + * + *
+   * Entity Recon API: The clustering job is running.
+   * 
+ * + * JOB_STATE_CLUSTERING = 7; + */ + public static final int JOB_STATE_CLUSTERING_VALUE = 7; + /** + * + * + *
+   * Entity Recon API: The exporting clusters job is running.
+   * 
+ * + * JOB_STATE_EXPORTING_CLUSTERS = 8; + */ + public static final int JOB_STATE_EXPORTING_CLUSTERS_VALUE = 8; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static JobState valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static JobState forNumber(int value) { + switch (value) { + case 0: + return JOB_STATE_UNSPECIFIED; + case 9: + return JOB_STATE_PENDING; + case 1: + return JOB_STATE_RUNNING; + case 2: + return JOB_STATE_SUCCEEDED; + case 3: + return JOB_STATE_FAILED; + case 4: + return JOB_STATE_CANCELLED; + case 5: + return JOB_STATE_KNOWLEDGE_EXTRACTION; + case 6: + return JOB_STATE_RECON_PREPROCESSING; + case 7: + return JOB_STATE_CLUSTERING; + case 8: + return JOB_STATE_EXPORTING_CLUSTERS; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public JobState findValueByNumber(int number) { + return JobState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.JobStateProto.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final JobState[] VALUES = values(); + + public static JobState valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private JobState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.enterpriseknowledgegraph.v1.JobState) +} diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/JobStateProto.java b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/JobStateProto.java new file mode 100644 index 000000000000..c5e187515919 --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/JobStateProto.java @@ -0,0 +1,60 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/enterpriseknowledgegraph/v1/job_state.proto + +package com.google.cloud.enterpriseknowledgegraph.v1; + +public final class JobStateProto { + private JobStateProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n8google/cloud/enterpriseknowledgegraph/" + + "v1/job_state.proto\022(google.cloud.enterpr" + + "iseknowledgegraph.v1*\236\002\n\010JobState\022\031\n\025JOB" + + "_STATE_UNSPECIFIED\020\000\022\025\n\021JOB_STATE_PENDIN" + + "G\020\t\022\025\n\021JOB_STATE_RUNNING\020\001\022\027\n\023JOB_STATE_" + + "SUCCEEDED\020\002\022\024\n\020JOB_STATE_FAILED\020\003\022\027\n\023JOB" + + "_STATE_CANCELLED\020\004\022\"\n\036JOB_STATE_KNOWLEDG" + + "E_EXTRACTION\020\005\022!\n\035JOB_STATE_RECON_PREPRO" + + "CESSING\020\006\022\030\n\024JOB_STATE_CLUSTERING\020\007\022 \n\034J" + + "OB_STATE_EXPORTING_CLUSTERS\020\010B\241\001\n,com.go" + + "ogle.cloud.enterpriseknowledgegraph.v1B\r" + + "JobStateProtoP\001Z`google.golang.org/genpr" + + "oto/googleapis/cloud/enterpriseknowledge" + + "graph/v1;enterpriseknowledgegraphb\006proto" + + "3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/ListEntityReconciliationJobsRequest.java b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/ListEntityReconciliationJobsRequest.java new file mode 100644 index 000000000000..d131212a7c60 --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/ListEntityReconciliationJobsRequest.java @@ -0,0 +1,1126 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/enterpriseknowledgegraph/v1/service.proto + +package com.google.cloud.enterpriseknowledgegraph.v1; + +/** + * + * + *
+ * Request message for
+ * [EnterpriseKnowledgeGraphService.ListEntityReconciliationJobs][google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService.ListEntityReconciliationJobs].
+ * 
+ * + * Protobuf type {@code + * google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest} + */ +public final class ListEntityReconciliationJobsRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest) + ListEntityReconciliationJobsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListEntityReconciliationJobsRequest.newBuilder() to construct. + private ListEntityReconciliationJobsRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListEntityReconciliationJobsRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListEntityReconciliationJobsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_ListEntityReconciliationJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_ListEntityReconciliationJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest.class, + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest.Builder + .class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The name of the EntityReconciliationJob's parent resource.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the EntityReconciliationJob's parent resource.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * An expression for filtering the results of the request. For field names
+   * both snake_case and camelCase are supported.
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * An expression for filtering the results of the request. For field names
+   * both snake_case and camelCase are supported.
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + * + * + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The standard list page token.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The standard list page token.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest)) { + return super.equals(obj); + } + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest other = + (com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [EnterpriseKnowledgeGraphService.ListEntityReconciliationJobs][google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService.ListEntityReconciliationJobs].
+   * 
+ * + * Protobuf type {@code + * google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest) + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_ListEntityReconciliationJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_ListEntityReconciliationJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest + .class, + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + filter_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_ListEntityReconciliationJobsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest + getDefaultInstanceForType() { + return com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest + build() { + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest + buildPartial() { + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest result = + new com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest( + this); + result.parent_ = parent_; + result.filter_ = filter_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest) { + return mergeFrom( + (com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest other) { + if (other + == com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + pageSize_ = input.readInt32(); + + break; + } // case 24 + case 34: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The name of the EntityReconciliationJob's parent resource.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the EntityReconciliationJob's parent resource.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the EntityReconciliationJob's parent resource.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the EntityReconciliationJob's parent resource.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the EntityReconciliationJob's parent resource.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * An expression for filtering the results of the request. For field names
+     * both snake_case and camelCase are supported.
+     * 
+ * + * string filter = 2; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * An expression for filtering the results of the request. For field names
+     * both snake_case and camelCase are supported.
+     * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * An expression for filtering the results of the request. For field names
+     * both snake_case and camelCase are supported.
+     * 
+ * + * string filter = 2; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * An expression for filtering the results of the request. For field names
+     * both snake_case and camelCase are supported.
+     * 
+ * + * string filter = 2; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * An expression for filtering the results of the request. For field names
+     * both snake_case and camelCase are supported.
+     * 
+ * + * string filter = 2; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The standard list page token.
+     * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The standard list page token.
+     * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The standard list page token.
+     * 
+ * + * string page_token = 4; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page token.
+     * 
+ * + * string page_token = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page token.
+     * 
+ * + * string page_token = 4; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest) + private static final com.google.cloud.enterpriseknowledgegraph.v1 + .ListEntityReconciliationJobsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest(); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListEntityReconciliationJobsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/ListEntityReconciliationJobsRequestOrBuilder.java b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/ListEntityReconciliationJobsRequestOrBuilder.java new file mode 100644 index 000000000000..745b2703322c --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/ListEntityReconciliationJobsRequestOrBuilder.java @@ -0,0 +1,121 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/enterpriseknowledgegraph/v1/service.proto + +package com.google.cloud.enterpriseknowledgegraph.v1; + +public interface ListEntityReconciliationJobsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the EntityReconciliationJob's parent resource.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The name of the EntityReconciliationJob's parent resource.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * An expression for filtering the results of the request. For field names
+   * both snake_case and camelCase are supported.
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * An expression for filtering the results of the request. For field names
+   * both snake_case and camelCase are supported.
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The standard list page token.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The standard list page token.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/ListEntityReconciliationJobsResponse.java b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/ListEntityReconciliationJobsResponse.java new file mode 100644 index 000000000000..4abde1736f7a --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/ListEntityReconciliationJobsResponse.java @@ -0,0 +1,1250 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/enterpriseknowledgegraph/v1/service.proto + +package com.google.cloud.enterpriseknowledgegraph.v1; + +/** + * + * + *
+ * Response message for
+ * [EnterpriseKnowledgeGraphService.ListEntityReconciliationJobs][google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService.ListEntityReconciliationJobs].
+ * 
+ * + * Protobuf type {@code + * google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse} + */ +public final class ListEntityReconciliationJobsResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse) + ListEntityReconciliationJobsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListEntityReconciliationJobsResponse.newBuilder() to construct. + private ListEntityReconciliationJobsResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListEntityReconciliationJobsResponse() { + entityReconciliationJobs_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListEntityReconciliationJobsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_ListEntityReconciliationJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_ListEntityReconciliationJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse.class, + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse + .Builder.class); + } + + public static final int ENTITY_RECONCILIATION_JOBS_FIELD_NUMBER = 1; + private java.util.List + entityReconciliationJobs_; + /** + * + * + *
+   * A list of EntityReconciliationJobs that matches the specified filter in the
+   * request.
+   * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_jobs = 1; + * + */ + @java.lang.Override + public java.util.List + getEntityReconciliationJobsList() { + return entityReconciliationJobs_; + } + /** + * + * + *
+   * A list of EntityReconciliationJobs that matches the specified filter in the
+   * request.
+   * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_jobs = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJobOrBuilder> + getEntityReconciliationJobsOrBuilderList() { + return entityReconciliationJobs_; + } + /** + * + * + *
+   * A list of EntityReconciliationJobs that matches the specified filter in the
+   * request.
+   * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_jobs = 1; + * + */ + @java.lang.Override + public int getEntityReconciliationJobsCount() { + return entityReconciliationJobs_.size(); + } + /** + * + * + *
+   * A list of EntityReconciliationJobs that matches the specified filter in the
+   * request.
+   * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_jobs = 1; + * + */ + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob + getEntityReconciliationJobs(int index) { + return entityReconciliationJobs_.get(index); + } + /** + * + * + *
+   * A list of EntityReconciliationJobs that matches the specified filter in the
+   * request.
+   * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_jobs = 1; + * + */ + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJobOrBuilder + getEntityReconciliationJobsOrBuilder(int index) { + return entityReconciliationJobs_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * The standard List next-page token.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The standard List next-page token.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < entityReconciliationJobs_.size(); i++) { + output.writeMessage(1, entityReconciliationJobs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < entityReconciliationJobs_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, entityReconciliationJobs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse)) { + return super.equals(obj); + } + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse other = + (com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse) obj; + + if (!getEntityReconciliationJobsList().equals(other.getEntityReconciliationJobsList())) + return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEntityReconciliationJobsCount() > 0) { + hash = (37 * hash) + ENTITY_RECONCILIATION_JOBS_FIELD_NUMBER; + hash = (53 * hash) + getEntityReconciliationJobsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for
+   * [EnterpriseKnowledgeGraphService.ListEntityReconciliationJobs][google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService.ListEntityReconciliationJobs].
+   * 
+ * + * Protobuf type {@code + * google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse) + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_ListEntityReconciliationJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_ListEntityReconciliationJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse + .class, + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse + .Builder.class); + } + + // Construct using + // com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (entityReconciliationJobsBuilder_ == null) { + entityReconciliationJobs_ = java.util.Collections.emptyList(); + } else { + entityReconciliationJobs_ = null; + entityReconciliationJobsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_ListEntityReconciliationJobsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse + getDefaultInstanceForType() { + return com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse + build() { + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse + buildPartial() { + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse result = + new com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse( + this); + int from_bitField0_ = bitField0_; + if (entityReconciliationJobsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + entityReconciliationJobs_ = + java.util.Collections.unmodifiableList(entityReconciliationJobs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.entityReconciliationJobs_ = entityReconciliationJobs_; + } else { + result.entityReconciliationJobs_ = entityReconciliationJobsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse) { + return mergeFrom( + (com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse other) { + if (other + == com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse + .getDefaultInstance()) return this; + if (entityReconciliationJobsBuilder_ == null) { + if (!other.entityReconciliationJobs_.isEmpty()) { + if (entityReconciliationJobs_.isEmpty()) { + entityReconciliationJobs_ = other.entityReconciliationJobs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEntityReconciliationJobsIsMutable(); + entityReconciliationJobs_.addAll(other.entityReconciliationJobs_); + } + onChanged(); + } + } else { + if (!other.entityReconciliationJobs_.isEmpty()) { + if (entityReconciliationJobsBuilder_.isEmpty()) { + entityReconciliationJobsBuilder_.dispose(); + entityReconciliationJobsBuilder_ = null; + entityReconciliationJobs_ = other.entityReconciliationJobs_; + bitField0_ = (bitField0_ & ~0x00000001); + entityReconciliationJobsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEntityReconciliationJobsFieldBuilder() + : null; + } else { + entityReconciliationJobsBuilder_.addAllMessages(other.entityReconciliationJobs_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob m = + input.readMessage( + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob + .parser(), + extensionRegistry); + if (entityReconciliationJobsBuilder_ == null) { + ensureEntityReconciliationJobsIsMutable(); + entityReconciliationJobs_.add(m); + } else { + entityReconciliationJobsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + entityReconciliationJobs_ = java.util.Collections.emptyList(); + + private void ensureEntityReconciliationJobsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + entityReconciliationJobs_ = + new java.util.ArrayList< + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob>( + entityReconciliationJobs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob, + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob.Builder, + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJobOrBuilder> + entityReconciliationJobsBuilder_; + + /** + * + * + *
+     * A list of EntityReconciliationJobs that matches the specified filter in the
+     * request.
+     * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_jobs = 1; + * + */ + public java.util.List + getEntityReconciliationJobsList() { + if (entityReconciliationJobsBuilder_ == null) { + return java.util.Collections.unmodifiableList(entityReconciliationJobs_); + } else { + return entityReconciliationJobsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of EntityReconciliationJobs that matches the specified filter in the
+     * request.
+     * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_jobs = 1; + * + */ + public int getEntityReconciliationJobsCount() { + if (entityReconciliationJobsBuilder_ == null) { + return entityReconciliationJobs_.size(); + } else { + return entityReconciliationJobsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of EntityReconciliationJobs that matches the specified filter in the
+     * request.
+     * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_jobs = 1; + * + */ + public com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob + getEntityReconciliationJobs(int index) { + if (entityReconciliationJobsBuilder_ == null) { + return entityReconciliationJobs_.get(index); + } else { + return entityReconciliationJobsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of EntityReconciliationJobs that matches the specified filter in the
+     * request.
+     * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_jobs = 1; + * + */ + public Builder setEntityReconciliationJobs( + int index, com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob value) { + if (entityReconciliationJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntityReconciliationJobsIsMutable(); + entityReconciliationJobs_.set(index, value); + onChanged(); + } else { + entityReconciliationJobsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of EntityReconciliationJobs that matches the specified filter in the
+     * request.
+     * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_jobs = 1; + * + */ + public Builder setEntityReconciliationJobs( + int index, + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob.Builder + builderForValue) { + if (entityReconciliationJobsBuilder_ == null) { + ensureEntityReconciliationJobsIsMutable(); + entityReconciliationJobs_.set(index, builderForValue.build()); + onChanged(); + } else { + entityReconciliationJobsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of EntityReconciliationJobs that matches the specified filter in the
+     * request.
+     * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_jobs = 1; + * + */ + public Builder addEntityReconciliationJobs( + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob value) { + if (entityReconciliationJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntityReconciliationJobsIsMutable(); + entityReconciliationJobs_.add(value); + onChanged(); + } else { + entityReconciliationJobsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of EntityReconciliationJobs that matches the specified filter in the
+     * request.
+     * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_jobs = 1; + * + */ + public Builder addEntityReconciliationJobs( + int index, com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob value) { + if (entityReconciliationJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntityReconciliationJobsIsMutable(); + entityReconciliationJobs_.add(index, value); + onChanged(); + } else { + entityReconciliationJobsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of EntityReconciliationJobs that matches the specified filter in the
+     * request.
+     * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_jobs = 1; + * + */ + public Builder addEntityReconciliationJobs( + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob.Builder + builderForValue) { + if (entityReconciliationJobsBuilder_ == null) { + ensureEntityReconciliationJobsIsMutable(); + entityReconciliationJobs_.add(builderForValue.build()); + onChanged(); + } else { + entityReconciliationJobsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of EntityReconciliationJobs that matches the specified filter in the
+     * request.
+     * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_jobs = 1; + * + */ + public Builder addEntityReconciliationJobs( + int index, + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob.Builder + builderForValue) { + if (entityReconciliationJobsBuilder_ == null) { + ensureEntityReconciliationJobsIsMutable(); + entityReconciliationJobs_.add(index, builderForValue.build()); + onChanged(); + } else { + entityReconciliationJobsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of EntityReconciliationJobs that matches the specified filter in the
+     * request.
+     * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_jobs = 1; + * + */ + public Builder addAllEntityReconciliationJobs( + java.lang.Iterable< + ? extends com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob> + values) { + if (entityReconciliationJobsBuilder_ == null) { + ensureEntityReconciliationJobsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entityReconciliationJobs_); + onChanged(); + } else { + entityReconciliationJobsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of EntityReconciliationJobs that matches the specified filter in the
+     * request.
+     * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_jobs = 1; + * + */ + public Builder clearEntityReconciliationJobs() { + if (entityReconciliationJobsBuilder_ == null) { + entityReconciliationJobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + entityReconciliationJobsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of EntityReconciliationJobs that matches the specified filter in the
+     * request.
+     * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_jobs = 1; + * + */ + public Builder removeEntityReconciliationJobs(int index) { + if (entityReconciliationJobsBuilder_ == null) { + ensureEntityReconciliationJobsIsMutable(); + entityReconciliationJobs_.remove(index); + onChanged(); + } else { + entityReconciliationJobsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of EntityReconciliationJobs that matches the specified filter in the
+     * request.
+     * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_jobs = 1; + * + */ + public com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob.Builder + getEntityReconciliationJobsBuilder(int index) { + return getEntityReconciliationJobsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of EntityReconciliationJobs that matches the specified filter in the
+     * request.
+     * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_jobs = 1; + * + */ + public com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJobOrBuilder + getEntityReconciliationJobsOrBuilder(int index) { + if (entityReconciliationJobsBuilder_ == null) { + return entityReconciliationJobs_.get(index); + } else { + return entityReconciliationJobsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of EntityReconciliationJobs that matches the specified filter in the
+     * request.
+     * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_jobs = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJobOrBuilder> + getEntityReconciliationJobsOrBuilderList() { + if (entityReconciliationJobsBuilder_ != null) { + return entityReconciliationJobsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(entityReconciliationJobs_); + } + } + /** + * + * + *
+     * A list of EntityReconciliationJobs that matches the specified filter in the
+     * request.
+     * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_jobs = 1; + * + */ + public com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob.Builder + addEntityReconciliationJobsBuilder() { + return getEntityReconciliationJobsFieldBuilder() + .addBuilder( + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob + .getDefaultInstance()); + } + /** + * + * + *
+     * A list of EntityReconciliationJobs that matches the specified filter in the
+     * request.
+     * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_jobs = 1; + * + */ + public com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob.Builder + addEntityReconciliationJobsBuilder(int index) { + return getEntityReconciliationJobsFieldBuilder() + .addBuilder( + index, + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob + .getDefaultInstance()); + } + /** + * + * + *
+     * A list of EntityReconciliationJobs that matches the specified filter in the
+     * request.
+     * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_jobs = 1; + * + */ + public java.util.List< + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob.Builder> + getEntityReconciliationJobsBuilderList() { + return getEntityReconciliationJobsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob, + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob.Builder, + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJobOrBuilder> + getEntityReconciliationJobsFieldBuilder() { + if (entityReconciliationJobsBuilder_ == null) { + entityReconciliationJobsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob, + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob.Builder, + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJobOrBuilder>( + entityReconciliationJobs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + entityReconciliationJobs_ = null; + } + return entityReconciliationJobsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse) + private static final com.google.cloud.enterpriseknowledgegraph.v1 + .ListEntityReconciliationJobsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse(); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListEntityReconciliationJobsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/ListEntityReconciliationJobsResponseOrBuilder.java b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/ListEntityReconciliationJobsResponseOrBuilder.java new file mode 100644 index 000000000000..53dd4050f796 --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/ListEntityReconciliationJobsResponseOrBuilder.java @@ -0,0 +1,121 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/enterpriseknowledgegraph/v1/service.proto + +package com.google.cloud.enterpriseknowledgegraph.v1; + +public interface ListEntityReconciliationJobsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.enterpriseknowledgegraph.v1.ListEntityReconciliationJobsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of EntityReconciliationJobs that matches the specified filter in the
+   * request.
+   * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_jobs = 1; + * + */ + java.util.List + getEntityReconciliationJobsList(); + /** + * + * + *
+   * A list of EntityReconciliationJobs that matches the specified filter in the
+   * request.
+   * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_jobs = 1; + * + */ + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob getEntityReconciliationJobs( + int index); + /** + * + * + *
+   * A list of EntityReconciliationJobs that matches the specified filter in the
+   * request.
+   * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_jobs = 1; + * + */ + int getEntityReconciliationJobsCount(); + /** + * + * + *
+   * A list of EntityReconciliationJobs that matches the specified filter in the
+   * request.
+   * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_jobs = 1; + * + */ + java.util.List< + ? extends com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJobOrBuilder> + getEntityReconciliationJobsOrBuilderList(); + /** + * + * + *
+   * A list of EntityReconciliationJobs that matches the specified filter in the
+   * request.
+   * 
+ * + * + * repeated .google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJob entity_reconciliation_jobs = 1; + * + */ + com.google.cloud.enterpriseknowledgegraph.v1.EntityReconciliationJobOrBuilder + getEntityReconciliationJobsOrBuilder(int index); + + /** + * + * + *
+   * The standard List next-page token.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * The standard List next-page token.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/LocationName.java b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/LocationName.java new file mode 100644 index 000000000000..b1f1bdb1360f --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/LocationName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.enterpriseknowledgegraph.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class LocationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + + @Deprecated + protected LocationName() { + project = null; + location = null; + } + + private LocationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LocationName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static LocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION.validatedMatch( + formattedString, "LocationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (LocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION.instantiate("project", project, "location", location); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + LocationName that = ((LocationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/locations/{location}. */ + public static class Builder { + private String project; + private String location; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(LocationName locationName) { + this.project = locationName.project; + this.location = locationName.location; + } + + public LocationName build() { + return new LocationName(this); + } + } +} diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/OperationMetadataProto.java b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/OperationMetadataProto.java new file mode 100644 index 000000000000..eefae14d268e --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/OperationMetadataProto.java @@ -0,0 +1,79 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/enterpriseknowledgegraph/v1/operation_metadata.proto + +package com.google.cloud.enterpriseknowledgegraph.v1; + +public final class OperationMetadataProto { + private OperationMetadataProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_enterpriseknowledgegraph_v1_CommonOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_enterpriseknowledgegraph_v1_CommonOperationMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nAgoogle/cloud/enterpriseknowledgegraph/" + + "v1/operation_metadata.proto\022(google.clou" + + "d.enterpriseknowledgegraph.v1\032\037google/pr" + + "otobuf/timestamp.proto\"\307\002\n\027CommonOperati" + + "onMetadata\022V\n\005state\030\001 \001(\0162G.google.cloud" + + ".enterpriseknowledgegraph.v1.CommonOpera" + + "tionMetadata.State\022/\n\013create_time\030\002 \001(\0132" + + "\032.google.protobuf.Timestamp\022/\n\013update_ti" + + "me\030\003 \001(\0132\032.google.protobuf.Timestamp\"r\n\005" + + "State\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007RUNNING\020" + + "\001\022\016\n\nCANCELLING\020\002\022\r\n\tSUCCEEDED\020\003\022\n\n\006FAIL" + + "ED\020\004\022\r\n\tCANCELLED\020\005\022\013\n\007PENDING\020\006B\252\001\n,com" + + ".google.cloud.enterpriseknowledgegraph.v" + + "1B\026OperationMetadataProtoP\001Z`google.gola" + + "ng.org/genproto/googleapis/cloud/enterpr" + + "iseknowledgegraph/v1;enterpriseknowledge" + + "graphb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_enterpriseknowledgegraph_v1_CommonOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_enterpriseknowledgegraph_v1_CommonOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_enterpriseknowledgegraph_v1_CommonOperationMetadata_descriptor, + new java.lang.String[] { + "State", "CreateTime", "UpdateTime", + }); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/OutputConfig.java b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/OutputConfig.java new file mode 100644 index 000000000000..28eda8ad3807 --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/OutputConfig.java @@ -0,0 +1,616 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/enterpriseknowledgegraph/v1/service.proto + +package com.google.cloud.enterpriseknowledgegraph.v1; + +/** + * + * + *
+ * The desired output location and metadata.
+ * 
+ * + * Protobuf type {@code google.cloud.enterpriseknowledgegraph.v1.OutputConfig} + */ +public final class OutputConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.enterpriseknowledgegraph.v1.OutputConfig) + OutputConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use OutputConfig.newBuilder() to construct. + private OutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OutputConfig() { + bigqueryDataset_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OutputConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_OutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_OutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig.class, + com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig.Builder.class); + } + + public static final int BIGQUERY_DATASET_FIELD_NUMBER = 1; + private volatile java.lang.Object bigqueryDataset_; + /** + * + * + *
+   * Format is “projects/*/datasets/*”.
+   * 
+ * + * string bigquery_dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bigqueryDataset. + */ + @java.lang.Override + public java.lang.String getBigqueryDataset() { + java.lang.Object ref = bigqueryDataset_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bigqueryDataset_ = s; + return s; + } + } + /** + * + * + *
+   * Format is “projects/*/datasets/*”.
+   * 
+ * + * string bigquery_dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for bigqueryDataset. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBigqueryDatasetBytes() { + java.lang.Object ref = bigqueryDataset_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + bigqueryDataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bigqueryDataset_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, bigqueryDataset_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bigqueryDataset_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, bigqueryDataset_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig)) { + return super.equals(obj); + } + com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig other = + (com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig) obj; + + if (!getBigqueryDataset().equals(other.getBigqueryDataset())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BIGQUERY_DATASET_FIELD_NUMBER; + hash = (53 * hash) + getBigqueryDataset().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The desired output location and metadata.
+   * 
+ * + * Protobuf type {@code google.cloud.enterpriseknowledgegraph.v1.OutputConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.enterpriseknowledgegraph.v1.OutputConfig) + com.google.cloud.enterpriseknowledgegraph.v1.OutputConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_OutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_OutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig.class, + com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig.Builder.class); + } + + // Construct using com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bigqueryDataset_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_OutputConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig getDefaultInstanceForType() { + return com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig build() { + com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig buildPartial() { + com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig result = + new com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig(this); + result.bigqueryDataset_ = bigqueryDataset_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig) { + return mergeFrom((com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig other) { + if (other == com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig.getDefaultInstance()) + return this; + if (!other.getBigqueryDataset().isEmpty()) { + bigqueryDataset_ = other.bigqueryDataset_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + bigqueryDataset_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object bigqueryDataset_ = ""; + /** + * + * + *
+     * Format is “projects/*/datasets/*”.
+     * 
+ * + * string bigquery_dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bigqueryDataset. + */ + public java.lang.String getBigqueryDataset() { + java.lang.Object ref = bigqueryDataset_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bigqueryDataset_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Format is “projects/*/datasets/*”.
+     * 
+ * + * string bigquery_dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for bigqueryDataset. + */ + public com.google.protobuf.ByteString getBigqueryDatasetBytes() { + java.lang.Object ref = bigqueryDataset_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + bigqueryDataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Format is “projects/*/datasets/*”.
+     * 
+ * + * string bigquery_dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bigqueryDataset to set. + * @return This builder for chaining. + */ + public Builder setBigqueryDataset(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + bigqueryDataset_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Format is “projects/*/datasets/*”.
+     * 
+ * + * string bigquery_dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearBigqueryDataset() { + + bigqueryDataset_ = getDefaultInstance().getBigqueryDataset(); + onChanged(); + return this; + } + /** + * + * + *
+     * Format is “projects/*/datasets/*”.
+     * 
+ * + * string bigquery_dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for bigqueryDataset to set. + * @return This builder for chaining. + */ + public Builder setBigqueryDatasetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + bigqueryDataset_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.enterpriseknowledgegraph.v1.OutputConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.enterpriseknowledgegraph.v1.OutputConfig) + private static final com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig(); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OutputConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.OutputConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/OutputConfigOrBuilder.java b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/OutputConfigOrBuilder.java new file mode 100644 index 000000000000..d5a9f52db6a7 --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/OutputConfigOrBuilder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/enterpriseknowledgegraph/v1/service.proto + +package com.google.cloud.enterpriseknowledgegraph.v1; + +public interface OutputConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.enterpriseknowledgegraph.v1.OutputConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Format is “projects/*/datasets/*”.
+   * 
+ * + * string bigquery_dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bigqueryDataset. + */ + java.lang.String getBigqueryDataset(); + /** + * + * + *
+   * Format is “projects/*/datasets/*”.
+   * 
+ * + * string bigquery_dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for bigqueryDataset. + */ + com.google.protobuf.ByteString getBigqueryDatasetBytes(); +} diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/ReconConfig.java b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/ReconConfig.java new file mode 100644 index 000000000000..a5f811071ef7 --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/ReconConfig.java @@ -0,0 +1,3214 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/enterpriseknowledgegraph/v1/service.proto + +package com.google.cloud.enterpriseknowledgegraph.v1; + +/** + * + * + *
+ * Recon configs
+ * 
+ * + * Protobuf type {@code google.cloud.enterpriseknowledgegraph.v1.ReconConfig} + */ +public final class ReconConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.enterpriseknowledgegraph.v1.ReconConfig) + ReconConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReconConfig.newBuilder() to construct. + private ReconConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReconConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReconConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_ReconConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_ReconConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.class, + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Builder.class); + } + + public interface OptionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * If true, separate clusters by their geographic region (from geocoding).
+     * Uses the following entity features:
+     *  - schema.org/addressLocality
+     *  - schema.org/addressRegion
+     *  - schema.org/addressCountry
+     * Warning: processing will no longer be regionalized!
+     * 
+ * + * bool enable_geocoding_separation = 100; + * + * @return The enableGeocodingSeparation. + */ + boolean getEnableGeocodingSeparation(); + } + /** + * + * + *
+   * Options for experimental changes on entity clustering behavior.
+   * 
+ * + * Protobuf type {@code google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options} + */ + public static final class Options extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options) + OptionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use Options.newBuilder() to construct. + private Options(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Options() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Options(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_ReconConfig_Options_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_ReconConfig_Options_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options.class, + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options.Builder.class); + } + + public static final int ENABLE_GEOCODING_SEPARATION_FIELD_NUMBER = 100; + private boolean enableGeocodingSeparation_; + /** + * + * + *
+     * If true, separate clusters by their geographic region (from geocoding).
+     * Uses the following entity features:
+     *  - schema.org/addressLocality
+     *  - schema.org/addressRegion
+     *  - schema.org/addressCountry
+     * Warning: processing will no longer be regionalized!
+     * 
+ * + * bool enable_geocoding_separation = 100; + * + * @return The enableGeocodingSeparation. + */ + @java.lang.Override + public boolean getEnableGeocodingSeparation() { + return enableGeocodingSeparation_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (enableGeocodingSeparation_ != false) { + output.writeBool(100, enableGeocodingSeparation_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enableGeocodingSeparation_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(100, enableGeocodingSeparation_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options)) { + return super.equals(obj); + } + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options other = + (com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options) obj; + + if (getEnableGeocodingSeparation() != other.getEnableGeocodingSeparation()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLE_GEOCODING_SEPARATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableGeocodingSeparation()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Options for experimental changes on entity clustering behavior.
+     * 
+ * + * Protobuf type {@code google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options) + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.OptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_ReconConfig_Options_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_ReconConfig_Options_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options.class, + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options.Builder.class); + } + + // Construct using + // com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + enableGeocodingSeparation_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_ReconConfig_Options_descriptor; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options + getDefaultInstanceForType() { + return com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options build() { + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options buildPartial() { + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options result = + new com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options(this); + result.enableGeocodingSeparation_ = enableGeocodingSeparation_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options) { + return mergeFrom( + (com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options other) { + if (other + == com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options + .getDefaultInstance()) return this; + if (other.getEnableGeocodingSeparation() != false) { + setEnableGeocodingSeparation(other.getEnableGeocodingSeparation()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 800: + { + enableGeocodingSeparation_ = input.readBool(); + + break; + } // case 800 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private boolean enableGeocodingSeparation_; + /** + * + * + *
+       * If true, separate clusters by their geographic region (from geocoding).
+       * Uses the following entity features:
+       *  - schema.org/addressLocality
+       *  - schema.org/addressRegion
+       *  - schema.org/addressCountry
+       * Warning: processing will no longer be regionalized!
+       * 
+ * + * bool enable_geocoding_separation = 100; + * + * @return The enableGeocodingSeparation. + */ + @java.lang.Override + public boolean getEnableGeocodingSeparation() { + return enableGeocodingSeparation_; + } + /** + * + * + *
+       * If true, separate clusters by their geographic region (from geocoding).
+       * Uses the following entity features:
+       *  - schema.org/addressLocality
+       *  - schema.org/addressRegion
+       *  - schema.org/addressCountry
+       * Warning: processing will no longer be regionalized!
+       * 
+ * + * bool enable_geocoding_separation = 100; + * + * @param value The enableGeocodingSeparation to set. + * @return This builder for chaining. + */ + public Builder setEnableGeocodingSeparation(boolean value) { + + enableGeocodingSeparation_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * If true, separate clusters by their geographic region (from geocoding).
+       * Uses the following entity features:
+       *  - schema.org/addressLocality
+       *  - schema.org/addressRegion
+       *  - schema.org/addressCountry
+       * Warning: processing will no longer be regionalized!
+       * 
+ * + * bool enable_geocoding_separation = 100; + * + * @return This builder for chaining. + */ + public Builder clearEnableGeocodingSeparation() { + + enableGeocodingSeparation_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options) + } + + // @@protoc_insertion_point(class_scope:google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options) + private static final com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options(); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Options parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ModelConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Model name. Refer to external documentation for valid names.
+     * If unspecified, it defaults to the one mentioned in the documentation.
+     * 
+ * + * string model_name = 1; + * + * @return The modelName. + */ + java.lang.String getModelName(); + /** + * + * + *
+     * Model name. Refer to external documentation for valid names.
+     * If unspecified, it defaults to the one mentioned in the documentation.
+     * 
+ * + * string model_name = 1; + * + * @return The bytes for modelName. + */ + com.google.protobuf.ByteString getModelNameBytes(); + + /** + * + * + *
+     * Model version tag. Refer to external documentation for valid tags.
+     * If unspecified, it defaults to the one mentioned in the documentation.
+     * 
+ * + * string version_tag = 2; + * + * @return The versionTag. + */ + java.lang.String getVersionTag(); + /** + * + * + *
+     * Model version tag. Refer to external documentation for valid tags.
+     * If unspecified, it defaults to the one mentioned in the documentation.
+     * 
+ * + * string version_tag = 2; + * + * @return The bytes for versionTag. + */ + com.google.protobuf.ByteString getVersionTagBytes(); + } + /** + * + * + *
+   * Model Configs
+   * 
+ * + * Protobuf type {@code google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig} + */ + public static final class ModelConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig) + ModelConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ModelConfig.newBuilder() to construct. + private ModelConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ModelConfig() { + modelName_ = ""; + versionTag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ModelConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_ReconConfig_ModelConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_ReconConfig_ModelConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig.class, + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig.Builder.class); + } + + public static final int MODEL_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object modelName_; + /** + * + * + *
+     * Model name. Refer to external documentation for valid names.
+     * If unspecified, it defaults to the one mentioned in the documentation.
+     * 
+ * + * string model_name = 1; + * + * @return The modelName. + */ + @java.lang.Override + public java.lang.String getModelName() { + java.lang.Object ref = modelName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + modelName_ = s; + return s; + } + } + /** + * + * + *
+     * Model name. Refer to external documentation for valid names.
+     * If unspecified, it defaults to the one mentioned in the documentation.
+     * 
+ * + * string model_name = 1; + * + * @return The bytes for modelName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModelNameBytes() { + java.lang.Object ref = modelName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + modelName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_TAG_FIELD_NUMBER = 2; + private volatile java.lang.Object versionTag_; + /** + * + * + *
+     * Model version tag. Refer to external documentation for valid tags.
+     * If unspecified, it defaults to the one mentioned in the documentation.
+     * 
+ * + * string version_tag = 2; + * + * @return The versionTag. + */ + @java.lang.Override + public java.lang.String getVersionTag() { + java.lang.Object ref = versionTag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + versionTag_ = s; + return s; + } + } + /** + * + * + *
+     * Model version tag. Refer to external documentation for valid tags.
+     * If unspecified, it defaults to the one mentioned in the documentation.
+     * 
+ * + * string version_tag = 2; + * + * @return The bytes for versionTag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionTagBytes() { + java.lang.Object ref = versionTag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + versionTag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(modelName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, modelName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(versionTag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, versionTag_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(modelName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, modelName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(versionTag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, versionTag_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig)) { + return super.equals(obj); + } + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig other = + (com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig) obj; + + if (!getModelName().equals(other.getModelName())) return false; + if (!getVersionTag().equals(other.getVersionTag())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MODEL_NAME_FIELD_NUMBER; + hash = (53 * hash) + getModelName().hashCode(); + hash = (37 * hash) + VERSION_TAG_FIELD_NUMBER; + hash = (53 * hash) + getVersionTag().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Model Configs
+     * 
+ * + * Protobuf type {@code google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig) + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_ReconConfig_ModelConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_ReconConfig_ModelConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig.class, + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig.Builder.class); + } + + // Construct using + // com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + modelName_ = ""; + + versionTag_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_ReconConfig_ModelConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig + getDefaultInstanceForType() { + return com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig build() { + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig buildPartial() { + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig result = + new com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig(this); + result.modelName_ = modelName_; + result.versionTag_ = versionTag_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig) { + return mergeFrom( + (com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig other) { + if (other + == com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig + .getDefaultInstance()) return this; + if (!other.getModelName().isEmpty()) { + modelName_ = other.modelName_; + onChanged(); + } + if (!other.getVersionTag().isEmpty()) { + versionTag_ = other.versionTag_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + modelName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + versionTag_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object modelName_ = ""; + /** + * + * + *
+       * Model name. Refer to external documentation for valid names.
+       * If unspecified, it defaults to the one mentioned in the documentation.
+       * 
+ * + * string model_name = 1; + * + * @return The modelName. + */ + public java.lang.String getModelName() { + java.lang.Object ref = modelName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + modelName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Model name. Refer to external documentation for valid names.
+       * If unspecified, it defaults to the one mentioned in the documentation.
+       * 
+ * + * string model_name = 1; + * + * @return The bytes for modelName. + */ + public com.google.protobuf.ByteString getModelNameBytes() { + java.lang.Object ref = modelName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + modelName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Model name. Refer to external documentation for valid names.
+       * If unspecified, it defaults to the one mentioned in the documentation.
+       * 
+ * + * string model_name = 1; + * + * @param value The modelName to set. + * @return This builder for chaining. + */ + public Builder setModelName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + modelName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Model name. Refer to external documentation for valid names.
+       * If unspecified, it defaults to the one mentioned in the documentation.
+       * 
+ * + * string model_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearModelName() { + + modelName_ = getDefaultInstance().getModelName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Model name. Refer to external documentation for valid names.
+       * If unspecified, it defaults to the one mentioned in the documentation.
+       * 
+ * + * string model_name = 1; + * + * @param value The bytes for modelName to set. + * @return This builder for chaining. + */ + public Builder setModelNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + modelName_ = value; + onChanged(); + return this; + } + + private java.lang.Object versionTag_ = ""; + /** + * + * + *
+       * Model version tag. Refer to external documentation for valid tags.
+       * If unspecified, it defaults to the one mentioned in the documentation.
+       * 
+ * + * string version_tag = 2; + * + * @return The versionTag. + */ + public java.lang.String getVersionTag() { + java.lang.Object ref = versionTag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + versionTag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Model version tag. Refer to external documentation for valid tags.
+       * If unspecified, it defaults to the one mentioned in the documentation.
+       * 
+ * + * string version_tag = 2; + * + * @return The bytes for versionTag. + */ + public com.google.protobuf.ByteString getVersionTagBytes() { + java.lang.Object ref = versionTag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + versionTag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Model version tag. Refer to external documentation for valid tags.
+       * If unspecified, it defaults to the one mentioned in the documentation.
+       * 
+ * + * string version_tag = 2; + * + * @param value The versionTag to set. + * @return This builder for chaining. + */ + public Builder setVersionTag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + versionTag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Model version tag. Refer to external documentation for valid tags.
+       * If unspecified, it defaults to the one mentioned in the documentation.
+       * 
+ * + * string version_tag = 2; + * + * @return This builder for chaining. + */ + public Builder clearVersionTag() { + + versionTag_ = getDefaultInstance().getVersionTag(); + onChanged(); + return this; + } + /** + * + * + *
+       * Model version tag. Refer to external documentation for valid tags.
+       * If unspecified, it defaults to the one mentioned in the documentation.
+       * 
+ * + * string version_tag = 2; + * + * @param value The bytes for versionTag to set. + * @return This builder for chaining. + */ + public Builder setVersionTagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + versionTag_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig) + private static final com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig(); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ModelConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int clusteringConfigCase_ = 0; + private java.lang.Object clusteringConfig_; + + public enum ClusteringConfigCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CONNECTED_COMPONENTS_CONFIG(1), + AFFINITY_CLUSTERING_CONFIG(2), + CLUSTERINGCONFIG_NOT_SET(0); + private final int value; + + private ClusteringConfigCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ClusteringConfigCase valueOf(int value) { + return forNumber(value); + } + + public static ClusteringConfigCase forNumber(int value) { + switch (value) { + case 1: + return CONNECTED_COMPONENTS_CONFIG; + case 2: + return AFFINITY_CLUSTERING_CONFIG; + case 0: + return CLUSTERINGCONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ClusteringConfigCase getClusteringConfigCase() { + return ClusteringConfigCase.forNumber(clusteringConfigCase_); + } + + public static final int CONNECTED_COMPONENTS_CONFIG_FIELD_NUMBER = 1; + /** + * + * + *
+   * Configs for connected components.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig connected_components_config = 1; + * + * + * @return Whether the connectedComponentsConfig field is set. + */ + @java.lang.Override + public boolean hasConnectedComponentsConfig() { + return clusteringConfigCase_ == 1; + } + /** + * + * + *
+   * Configs for connected components.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig connected_components_config = 1; + * + * + * @return The connectedComponentsConfig. + */ + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig + getConnectedComponentsConfig() { + if (clusteringConfigCase_ == 1) { + return (com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig) + clusteringConfig_; + } + return com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig + .getDefaultInstance(); + } + /** + * + * + *
+   * Configs for connected components.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig connected_components_config = 1; + * + */ + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfigOrBuilder + getConnectedComponentsConfigOrBuilder() { + if (clusteringConfigCase_ == 1) { + return (com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig) + clusteringConfig_; + } + return com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig + .getDefaultInstance(); + } + + public static final int AFFINITY_CLUSTERING_CONFIG_FIELD_NUMBER = 2; + /** + * + * + *
+   * Configs for affinity clustering.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig affinity_clustering_config = 2; + * + * + * @return Whether the affinityClusteringConfig field is set. + */ + @java.lang.Override + public boolean hasAffinityClusteringConfig() { + return clusteringConfigCase_ == 2; + } + /** + * + * + *
+   * Configs for affinity clustering.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig affinity_clustering_config = 2; + * + * + * @return The affinityClusteringConfig. + */ + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig + getAffinityClusteringConfig() { + if (clusteringConfigCase_ == 2) { + return (com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig) + clusteringConfig_; + } + return com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig + .getDefaultInstance(); + } + /** + * + * + *
+   * Configs for affinity clustering.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig affinity_clustering_config = 2; + * + */ + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfigOrBuilder + getAffinityClusteringConfigOrBuilder() { + if (clusteringConfigCase_ == 2) { + return (com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig) + clusteringConfig_; + } + return com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig + .getDefaultInstance(); + } + + public static final int OPTIONS_FIELD_NUMBER = 3; + private com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options options_; + /** + * + * + *
+   * Extra options that affect entity clustering behavior.
+   * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options options = 3; + * + * @return Whether the options field is set. + */ + @java.lang.Override + public boolean hasOptions() { + return options_ != null; + } + /** + * + * + *
+   * Extra options that affect entity clustering behavior.
+   * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options options = 3; + * + * @return The options. + */ + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options getOptions() { + return options_ == null + ? com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options.getDefaultInstance() + : options_; + } + /** + * + * + *
+   * Extra options that affect entity clustering behavior.
+   * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options options = 3; + */ + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.OptionsOrBuilder + getOptionsOrBuilder() { + return getOptions(); + } + + public static final int MODEL_CONFIG_FIELD_NUMBER = 4; + private com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig modelConfig_; + /** + * + * + *
+   * Model Configs
+   * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig model_config = 4; + * + * + * @return Whether the modelConfig field is set. + */ + @java.lang.Override + public boolean hasModelConfig() { + return modelConfig_ != null; + } + /** + * + * + *
+   * Model Configs
+   * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig model_config = 4; + * + * + * @return The modelConfig. + */ + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig getModelConfig() { + return modelConfig_ == null + ? com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig.getDefaultInstance() + : modelConfig_; + } + /** + * + * + *
+   * Model Configs
+   * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig model_config = 4; + * + */ + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfigOrBuilder + getModelConfigOrBuilder() { + return getModelConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (clusteringConfigCase_ == 1) { + output.writeMessage( + 1, + (com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig) + clusteringConfig_); + } + if (clusteringConfigCase_ == 2) { + output.writeMessage( + 2, + (com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig) + clusteringConfig_); + } + if (options_ != null) { + output.writeMessage(3, getOptions()); + } + if (modelConfig_ != null) { + output.writeMessage(4, getModelConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (clusteringConfigCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, + (com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig) + clusteringConfig_); + } + if (clusteringConfigCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig) + clusteringConfig_); + } + if (options_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOptions()); + } + if (modelConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getModelConfig()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig)) { + return super.equals(obj); + } + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig other = + (com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig) obj; + + if (hasOptions() != other.hasOptions()) return false; + if (hasOptions()) { + if (!getOptions().equals(other.getOptions())) return false; + } + if (hasModelConfig() != other.hasModelConfig()) return false; + if (hasModelConfig()) { + if (!getModelConfig().equals(other.getModelConfig())) return false; + } + if (!getClusteringConfigCase().equals(other.getClusteringConfigCase())) return false; + switch (clusteringConfigCase_) { + case 1: + if (!getConnectedComponentsConfig().equals(other.getConnectedComponentsConfig())) + return false; + break; + case 2: + if (!getAffinityClusteringConfig().equals(other.getAffinityClusteringConfig())) + return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasOptions()) { + hash = (37 * hash) + OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getOptions().hashCode(); + } + if (hasModelConfig()) { + hash = (37 * hash) + MODEL_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getModelConfig().hashCode(); + } + switch (clusteringConfigCase_) { + case 1: + hash = (37 * hash) + CONNECTED_COMPONENTS_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getConnectedComponentsConfig().hashCode(); + break; + case 2: + hash = (37 * hash) + AFFINITY_CLUSTERING_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getAffinityClusteringConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Recon configs
+   * 
+ * + * Protobuf type {@code google.cloud.enterpriseknowledgegraph.v1.ReconConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.enterpriseknowledgegraph.v1.ReconConfig) + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_ReconConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_ReconConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.class, + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Builder.class); + } + + // Construct using com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (connectedComponentsConfigBuilder_ != null) { + connectedComponentsConfigBuilder_.clear(); + } + if (affinityClusteringConfigBuilder_ != null) { + affinityClusteringConfigBuilder_.clear(); + } + if (optionsBuilder_ == null) { + options_ = null; + } else { + options_ = null; + optionsBuilder_ = null; + } + if (modelConfigBuilder_ == null) { + modelConfig_ = null; + } else { + modelConfig_ = null; + modelConfigBuilder_ = null; + } + clusteringConfigCase_ = 0; + clusteringConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.enterpriseknowledgegraph.v1.ServiceProto + .internal_static_google_cloud_enterpriseknowledgegraph_v1_ReconConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig getDefaultInstanceForType() { + return com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig build() { + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig buildPartial() { + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig result = + new com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig(this); + if (clusteringConfigCase_ == 1) { + if (connectedComponentsConfigBuilder_ == null) { + result.clusteringConfig_ = clusteringConfig_; + } else { + result.clusteringConfig_ = connectedComponentsConfigBuilder_.build(); + } + } + if (clusteringConfigCase_ == 2) { + if (affinityClusteringConfigBuilder_ == null) { + result.clusteringConfig_ = clusteringConfig_; + } else { + result.clusteringConfig_ = affinityClusteringConfigBuilder_.build(); + } + } + if (optionsBuilder_ == null) { + result.options_ = options_; + } else { + result.options_ = optionsBuilder_.build(); + } + if (modelConfigBuilder_ == null) { + result.modelConfig_ = modelConfig_; + } else { + result.modelConfig_ = modelConfigBuilder_.build(); + } + result.clusteringConfigCase_ = clusteringConfigCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig) { + return mergeFrom((com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig other) { + if (other == com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.getDefaultInstance()) + return this; + if (other.hasOptions()) { + mergeOptions(other.getOptions()); + } + if (other.hasModelConfig()) { + mergeModelConfig(other.getModelConfig()); + } + switch (other.getClusteringConfigCase()) { + case CONNECTED_COMPONENTS_CONFIG: + { + mergeConnectedComponentsConfig(other.getConnectedComponentsConfig()); + break; + } + case AFFINITY_CLUSTERING_CONFIG: + { + mergeAffinityClusteringConfig(other.getAffinityClusteringConfig()); + break; + } + case CLUSTERINGCONFIG_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getConnectedComponentsConfigFieldBuilder().getBuilder(), extensionRegistry); + clusteringConfigCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + getAffinityClusteringConfigFieldBuilder().getBuilder(), extensionRegistry); + clusteringConfigCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getOptionsFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + input.readMessage(getModelConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int clusteringConfigCase_ = 0; + private java.lang.Object clusteringConfig_; + + public ClusteringConfigCase getClusteringConfigCase() { + return ClusteringConfigCase.forNumber(clusteringConfigCase_); + } + + public Builder clearClusteringConfig() { + clusteringConfigCase_ = 0; + clusteringConfig_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig, + com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig.Builder, + com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfigOrBuilder> + connectedComponentsConfigBuilder_; + /** + * + * + *
+     * Configs for connected components.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig connected_components_config = 1; + * + * + * @return Whether the connectedComponentsConfig field is set. + */ + @java.lang.Override + public boolean hasConnectedComponentsConfig() { + return clusteringConfigCase_ == 1; + } + /** + * + * + *
+     * Configs for connected components.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig connected_components_config = 1; + * + * + * @return The connectedComponentsConfig. + */ + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig + getConnectedComponentsConfig() { + if (connectedComponentsConfigBuilder_ == null) { + if (clusteringConfigCase_ == 1) { + return (com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig) + clusteringConfig_; + } + return com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig + .getDefaultInstance(); + } else { + if (clusteringConfigCase_ == 1) { + return connectedComponentsConfigBuilder_.getMessage(); + } + return com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Configs for connected components.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig connected_components_config = 1; + * + */ + public Builder setConnectedComponentsConfig( + com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig value) { + if (connectedComponentsConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + clusteringConfig_ = value; + onChanged(); + } else { + connectedComponentsConfigBuilder_.setMessage(value); + } + clusteringConfigCase_ = 1; + return this; + } + /** + * + * + *
+     * Configs for connected components.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig connected_components_config = 1; + * + */ + public Builder setConnectedComponentsConfig( + com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig.Builder + builderForValue) { + if (connectedComponentsConfigBuilder_ == null) { + clusteringConfig_ = builderForValue.build(); + onChanged(); + } else { + connectedComponentsConfigBuilder_.setMessage(builderForValue.build()); + } + clusteringConfigCase_ = 1; + return this; + } + /** + * + * + *
+     * Configs for connected components.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig connected_components_config = 1; + * + */ + public Builder mergeConnectedComponentsConfig( + com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig value) { + if (connectedComponentsConfigBuilder_ == null) { + if (clusteringConfigCase_ == 1 + && clusteringConfig_ + != com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig + .getDefaultInstance()) { + clusteringConfig_ = + com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig.newBuilder( + (com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig) + clusteringConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + clusteringConfig_ = value; + } + onChanged(); + } else { + if (clusteringConfigCase_ == 1) { + connectedComponentsConfigBuilder_.mergeFrom(value); + } else { + connectedComponentsConfigBuilder_.setMessage(value); + } + } + clusteringConfigCase_ = 1; + return this; + } + /** + * + * + *
+     * Configs for connected components.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig connected_components_config = 1; + * + */ + public Builder clearConnectedComponentsConfig() { + if (connectedComponentsConfigBuilder_ == null) { + if (clusteringConfigCase_ == 1) { + clusteringConfigCase_ = 0; + clusteringConfig_ = null; + onChanged(); + } + } else { + if (clusteringConfigCase_ == 1) { + clusteringConfigCase_ = 0; + clusteringConfig_ = null; + } + connectedComponentsConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configs for connected components.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig connected_components_config = 1; + * + */ + public com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig.Builder + getConnectedComponentsConfigBuilder() { + return getConnectedComponentsConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configs for connected components.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig connected_components_config = 1; + * + */ + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfigOrBuilder + getConnectedComponentsConfigOrBuilder() { + if ((clusteringConfigCase_ == 1) && (connectedComponentsConfigBuilder_ != null)) { + return connectedComponentsConfigBuilder_.getMessageOrBuilder(); + } else { + if (clusteringConfigCase_ == 1) { + return (com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig) + clusteringConfig_; + } + return com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Configs for connected components.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig connected_components_config = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig, + com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig.Builder, + com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfigOrBuilder> + getConnectedComponentsConfigFieldBuilder() { + if (connectedComponentsConfigBuilder_ == null) { + if (!(clusteringConfigCase_ == 1)) { + clusteringConfig_ = + com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig + .getDefaultInstance(); + } + connectedComponentsConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig, + com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig.Builder, + com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfigOrBuilder>( + (com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig) + clusteringConfig_, + getParentForChildren(), + isClean()); + clusteringConfig_ = null; + } + clusteringConfigCase_ = 1; + onChanged(); + ; + return connectedComponentsConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig, + com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig.Builder, + com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfigOrBuilder> + affinityClusteringConfigBuilder_; + /** + * + * + *
+     * Configs for affinity clustering.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig affinity_clustering_config = 2; + * + * + * @return Whether the affinityClusteringConfig field is set. + */ + @java.lang.Override + public boolean hasAffinityClusteringConfig() { + return clusteringConfigCase_ == 2; + } + /** + * + * + *
+     * Configs for affinity clustering.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig affinity_clustering_config = 2; + * + * + * @return The affinityClusteringConfig. + */ + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig + getAffinityClusteringConfig() { + if (affinityClusteringConfigBuilder_ == null) { + if (clusteringConfigCase_ == 2) { + return (com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig) + clusteringConfig_; + } + return com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig + .getDefaultInstance(); + } else { + if (clusteringConfigCase_ == 2) { + return affinityClusteringConfigBuilder_.getMessage(); + } + return com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Configs for affinity clustering.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig affinity_clustering_config = 2; + * + */ + public Builder setAffinityClusteringConfig( + com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig value) { + if (affinityClusteringConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + clusteringConfig_ = value; + onChanged(); + } else { + affinityClusteringConfigBuilder_.setMessage(value); + } + clusteringConfigCase_ = 2; + return this; + } + /** + * + * + *
+     * Configs for affinity clustering.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig affinity_clustering_config = 2; + * + */ + public Builder setAffinityClusteringConfig( + com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig.Builder + builderForValue) { + if (affinityClusteringConfigBuilder_ == null) { + clusteringConfig_ = builderForValue.build(); + onChanged(); + } else { + affinityClusteringConfigBuilder_.setMessage(builderForValue.build()); + } + clusteringConfigCase_ = 2; + return this; + } + /** + * + * + *
+     * Configs for affinity clustering.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig affinity_clustering_config = 2; + * + */ + public Builder mergeAffinityClusteringConfig( + com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig value) { + if (affinityClusteringConfigBuilder_ == null) { + if (clusteringConfigCase_ == 2 + && clusteringConfig_ + != com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig + .getDefaultInstance()) { + clusteringConfig_ = + com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig.newBuilder( + (com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig) + clusteringConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + clusteringConfig_ = value; + } + onChanged(); + } else { + if (clusteringConfigCase_ == 2) { + affinityClusteringConfigBuilder_.mergeFrom(value); + } else { + affinityClusteringConfigBuilder_.setMessage(value); + } + } + clusteringConfigCase_ = 2; + return this; + } + /** + * + * + *
+     * Configs for affinity clustering.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig affinity_clustering_config = 2; + * + */ + public Builder clearAffinityClusteringConfig() { + if (affinityClusteringConfigBuilder_ == null) { + if (clusteringConfigCase_ == 2) { + clusteringConfigCase_ = 0; + clusteringConfig_ = null; + onChanged(); + } + } else { + if (clusteringConfigCase_ == 2) { + clusteringConfigCase_ = 0; + clusteringConfig_ = null; + } + affinityClusteringConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configs for affinity clustering.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig affinity_clustering_config = 2; + * + */ + public com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig.Builder + getAffinityClusteringConfigBuilder() { + return getAffinityClusteringConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configs for affinity clustering.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig affinity_clustering_config = 2; + * + */ + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfigOrBuilder + getAffinityClusteringConfigOrBuilder() { + if ((clusteringConfigCase_ == 2) && (affinityClusteringConfigBuilder_ != null)) { + return affinityClusteringConfigBuilder_.getMessageOrBuilder(); + } else { + if (clusteringConfigCase_ == 2) { + return (com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig) + clusteringConfig_; + } + return com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Configs for affinity clustering.
+     * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig affinity_clustering_config = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig, + com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig.Builder, + com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfigOrBuilder> + getAffinityClusteringConfigFieldBuilder() { + if (affinityClusteringConfigBuilder_ == null) { + if (!(clusteringConfigCase_ == 2)) { + clusteringConfig_ = + com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig + .getDefaultInstance(); + } + affinityClusteringConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig, + com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig.Builder, + com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfigOrBuilder>( + (com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig) + clusteringConfig_, + getParentForChildren(), + isClean()); + clusteringConfig_ = null; + } + clusteringConfigCase_ = 2; + onChanged(); + ; + return affinityClusteringConfigBuilder_; + } + + private com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options options_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options, + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options.Builder, + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.OptionsOrBuilder> + optionsBuilder_; + /** + * + * + *
+     * Extra options that affect entity clustering behavior.
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options options = 3; + * + * @return Whether the options field is set. + */ + public boolean hasOptions() { + return optionsBuilder_ != null || options_ != null; + } + /** + * + * + *
+     * Extra options that affect entity clustering behavior.
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options options = 3; + * + * @return The options. + */ + public com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options getOptions() { + if (optionsBuilder_ == null) { + return options_ == null + ? com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options.getDefaultInstance() + : options_; + } else { + return optionsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Extra options that affect entity clustering behavior.
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options options = 3; + */ + public Builder setOptions( + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + options_ = value; + onChanged(); + } else { + optionsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Extra options that affect entity clustering behavior.
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options options = 3; + */ + public Builder setOptions( + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options.Builder builderForValue) { + if (optionsBuilder_ == null) { + options_ = builderForValue.build(); + onChanged(); + } else { + optionsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Extra options that affect entity clustering behavior.
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options options = 3; + */ + public Builder mergeOptions( + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options value) { + if (optionsBuilder_ == null) { + if (options_ != null) { + options_ = + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options.newBuilder(options_) + .mergeFrom(value) + .buildPartial(); + } else { + options_ = value; + } + onChanged(); + } else { + optionsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Extra options that affect entity clustering behavior.
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options options = 3; + */ + public Builder clearOptions() { + if (optionsBuilder_ == null) { + options_ = null; + onChanged(); + } else { + options_ = null; + optionsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Extra options that affect entity clustering behavior.
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options options = 3; + */ + public com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options.Builder + getOptionsBuilder() { + + onChanged(); + return getOptionsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Extra options that affect entity clustering behavior.
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options options = 3; + */ + public com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.OptionsOrBuilder + getOptionsOrBuilder() { + if (optionsBuilder_ != null) { + return optionsBuilder_.getMessageOrBuilder(); + } else { + return options_ == null + ? com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options.getDefaultInstance() + : options_; + } + } + /** + * + * + *
+     * Extra options that affect entity clustering behavior.
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options options = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options, + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options.Builder, + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.OptionsOrBuilder> + getOptionsFieldBuilder() { + if (optionsBuilder_ == null) { + optionsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options, + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options.Builder, + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.OptionsOrBuilder>( + getOptions(), getParentForChildren(), isClean()); + options_ = null; + } + return optionsBuilder_; + } + + private com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig modelConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig, + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig.Builder, + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfigOrBuilder> + modelConfigBuilder_; + /** + * + * + *
+     * Model Configs
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig model_config = 4; + * + * + * @return Whether the modelConfig field is set. + */ + public boolean hasModelConfig() { + return modelConfigBuilder_ != null || modelConfig_ != null; + } + /** + * + * + *
+     * Model Configs
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig model_config = 4; + * + * + * @return The modelConfig. + */ + public com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig getModelConfig() { + if (modelConfigBuilder_ == null) { + return modelConfig_ == null + ? com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig + .getDefaultInstance() + : modelConfig_; + } else { + return modelConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Model Configs
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig model_config = 4; + * + */ + public Builder setModelConfig( + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig value) { + if (modelConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + modelConfig_ = value; + onChanged(); + } else { + modelConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Model Configs
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig model_config = 4; + * + */ + public Builder setModelConfig( + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig.Builder + builderForValue) { + if (modelConfigBuilder_ == null) { + modelConfig_ = builderForValue.build(); + onChanged(); + } else { + modelConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Model Configs
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig model_config = 4; + * + */ + public Builder mergeModelConfig( + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig value) { + if (modelConfigBuilder_ == null) { + if (modelConfig_ != null) { + modelConfig_ = + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig.newBuilder( + modelConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + modelConfig_ = value; + } + onChanged(); + } else { + modelConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Model Configs
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig model_config = 4; + * + */ + public Builder clearModelConfig() { + if (modelConfigBuilder_ == null) { + modelConfig_ = null; + onChanged(); + } else { + modelConfig_ = null; + modelConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Model Configs
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig model_config = 4; + * + */ + public com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig.Builder + getModelConfigBuilder() { + + onChanged(); + return getModelConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Model Configs
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig model_config = 4; + * + */ + public com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfigOrBuilder + getModelConfigOrBuilder() { + if (modelConfigBuilder_ != null) { + return modelConfigBuilder_.getMessageOrBuilder(); + } else { + return modelConfig_ == null + ? com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig + .getDefaultInstance() + : modelConfig_; + } + } + /** + * + * + *
+     * Model Configs
+     * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig model_config = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig, + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig.Builder, + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfigOrBuilder> + getModelConfigFieldBuilder() { + if (modelConfigBuilder_ == null) { + modelConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig, + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig.Builder, + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfigOrBuilder>( + getModelConfig(), getParentForChildren(), isClean()); + modelConfig_ = null; + } + return modelConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.enterpriseknowledgegraph.v1.ReconConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.enterpriseknowledgegraph.v1.ReconConfig) + private static final com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig(); + } + + public static com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReconConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/ReconConfigOrBuilder.java b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/ReconConfigOrBuilder.java new file mode 100644 index 000000000000..6257e80834d3 --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/ReconConfigOrBuilder.java @@ -0,0 +1,188 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/enterpriseknowledgegraph/v1/service.proto + +package com.google.cloud.enterpriseknowledgegraph.v1; + +public interface ReconConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.enterpriseknowledgegraph.v1.ReconConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Configs for connected components.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig connected_components_config = 1; + * + * + * @return Whether the connectedComponentsConfig field is set. + */ + boolean hasConnectedComponentsConfig(); + /** + * + * + *
+   * Configs for connected components.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig connected_components_config = 1; + * + * + * @return The connectedComponentsConfig. + */ + com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig + getConnectedComponentsConfig(); + /** + * + * + *
+   * Configs for connected components.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfig connected_components_config = 1; + * + */ + com.google.cloud.enterpriseknowledgegraph.v1.ConnectedComponentsConfigOrBuilder + getConnectedComponentsConfigOrBuilder(); + + /** + * + * + *
+   * Configs for affinity clustering.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig affinity_clustering_config = 2; + * + * + * @return Whether the affinityClusteringConfig field is set. + */ + boolean hasAffinityClusteringConfig(); + /** + * + * + *
+   * Configs for affinity clustering.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig affinity_clustering_config = 2; + * + * + * @return The affinityClusteringConfig. + */ + com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig + getAffinityClusteringConfig(); + /** + * + * + *
+   * Configs for affinity clustering.
+   * 
+ * + * + * .google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfig affinity_clustering_config = 2; + * + */ + com.google.cloud.enterpriseknowledgegraph.v1.AffinityClusteringConfigOrBuilder + getAffinityClusteringConfigOrBuilder(); + + /** + * + * + *
+   * Extra options that affect entity clustering behavior.
+   * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options options = 3; + * + * @return Whether the options field is set. + */ + boolean hasOptions(); + /** + * + * + *
+   * Extra options that affect entity clustering behavior.
+   * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options options = 3; + * + * @return The options. + */ + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options getOptions(); + /** + * + * + *
+   * Extra options that affect entity clustering behavior.
+   * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig.Options options = 3; + */ + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.OptionsOrBuilder getOptionsOrBuilder(); + + /** + * + * + *
+   * Model Configs
+   * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig model_config = 4; + * + * + * @return Whether the modelConfig field is set. + */ + boolean hasModelConfig(); + /** + * + * + *
+   * Model Configs
+   * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig model_config = 4; + * + * + * @return The modelConfig. + */ + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig getModelConfig(); + /** + * + * + *
+   * Model Configs
+   * 
+ * + * .google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfig model_config = 4; + * + */ + com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ModelConfigOrBuilder + getModelConfigOrBuilder(); + + public com.google.cloud.enterpriseknowledgegraph.v1.ReconConfig.ClusteringConfigCase + getClusteringConfigCase(); +} diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/ServiceProto.java b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/ServiceProto.java new file mode 100644 index 000000000000..65808b36dc6e --- /dev/null +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/src/main/java/com/google/cloud/enterpriseknowledgegraph/v1/ServiceProto.java @@ -0,0 +1,419 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/enterpriseknowledgegraph/v1/service.proto + +package com.google.cloud.enterpriseknowledgegraph.v1; + +public final class ServiceProto { + private ServiceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_enterpriseknowledgegraph_v1_InputConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_enterpriseknowledgegraph_v1_InputConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_enterpriseknowledgegraph_v1_BigQueryInputConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_enterpriseknowledgegraph_v1_BigQueryInputConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_enterpriseknowledgegraph_v1_OutputConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_enterpriseknowledgegraph_v1_OutputConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_enterpriseknowledgegraph_v1_ReconConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_enterpriseknowledgegraph_v1_ReconConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_enterpriseknowledgegraph_v1_ReconConfig_Options_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_enterpriseknowledgegraph_v1_ReconConfig_Options_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_enterpriseknowledgegraph_v1_ReconConfig_ModelConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_enterpriseknowledgegraph_v1_ReconConfig_ModelConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_enterpriseknowledgegraph_v1_ConnectedComponentsConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_enterpriseknowledgegraph_v1_ConnectedComponentsConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_enterpriseknowledgegraph_v1_AffinityClusteringConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_enterpriseknowledgegraph_v1_AffinityClusteringConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_enterpriseknowledgegraph_v1_DeleteOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_enterpriseknowledgegraph_v1_DeleteOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_enterpriseknowledgegraph_v1_CreateEntityReconciliationJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_enterpriseknowledgegraph_v1_CreateEntityReconciliationJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_enterpriseknowledgegraph_v1_GetEntityReconciliationJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_enterpriseknowledgegraph_v1_GetEntityReconciliationJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_enterpriseknowledgegraph_v1_ListEntityReconciliationJobsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_enterpriseknowledgegraph_v1_ListEntityReconciliationJobsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_enterpriseknowledgegraph_v1_ListEntityReconciliationJobsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_enterpriseknowledgegraph_v1_ListEntityReconciliationJobsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_enterpriseknowledgegraph_v1_CancelEntityReconciliationJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_enterpriseknowledgegraph_v1_CancelEntityReconciliationJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_enterpriseknowledgegraph_v1_DeleteEntityReconciliationJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_enterpriseknowledgegraph_v1_DeleteEntityReconciliationJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_enterpriseknowledgegraph_v1_EntityReconciliationJob_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_enterpriseknowledgegraph_v1_EntityReconciliationJob_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n6google/cloud/enterpriseknowledgegraph/" + + "v1/service.proto\022(google.cloud.enterpris" + + "eknowledgegraph.v1\032\034google/api/annotatio" + + "ns.proto\032\027google/api/client.proto\032\037googl" + + "e/api/field_behavior.proto\032\031google/api/r" + + "esource.proto\0328google/cloud/enterprisekn" + + "owledgegraph/v1/job_state.proto\032Agoogle/" + + "cloud/enterpriseknowledgegraph/v1/operat" + + "ion_metadata.proto\032\033google/protobuf/empt" + + "y.proto\032\037google/protobuf/timestamp.proto" + + "\032\027google/rpc/status.proto\"\266\003\n\013InputConfi" + + "g\022]\n\026bigquery_input_configs\030\001 \003(\0132=.goog" + + "le.cloud.enterpriseknowledgegraph.v1.Big" + + "QueryInputConfig\022U\n\013entity_type\030\002 \001(\0162@." + + "google.cloud.enterpriseknowledgegraph.v1" + + ".InputConfig.EntityType\022M\n\036previous_resu" + + "lt_bigquery_table\030\003 \001(\tB%\340A\001\372A\037\n\035bigquer" + + "y.googleapis.com/Table\"\241\001\n\nEntityType\022\033\n" + + "\027ENTITY_TYPE_UNSPECIFIED\020\000\022\016\n\006PEOPLE\020\001\032\002" + + "\010\001\022\025\n\rESTABLISHMENT\020\002\032\002\010\001\022\020\n\010PROPERTY\020\003\032" + + "\002\010\001\022\013\n\007PRODUCT\020\004\022\020\n\014ORGANIZATION\020\005\022\022\n\016LO" + + "CAL_BUSINESS\020\006\022\n\n\006PERSON\020\007\"j\n\023BigQueryIn" + + "putConfig\022=\n\016bigquery_table\030\001 \001(\tB%\340A\002\372A" + + "\037\n\035bigquery.googleapis.com/Table\022\024\n\007gcs_" + + "uri\030\002 \001(\tB\003\340A\002\"N\n\014OutputConfig\022>\n\020bigque" + + "ry_dataset\030\001 \001(\tB$\372A!\n\037bigquery.googleap" + + "is.com/Dataset\"\211\004\n\013ReconConfig\022j\n\033connec" + + "ted_components_config\030\001 \001(\0132C.google.clo" + + "ud.enterpriseknowledgegraph.v1.Connected" + + "ComponentsConfigH\000\022h\n\032affinity_clusterin" + + "g_config\030\002 \001(\0132B.google.cloud.enterprise" + + "knowledgegraph.v1.AffinityClusteringConf" + + "igH\000\022N\n\007options\030\003 \001(\0132=.google.cloud.ent" + + "erpriseknowledgegraph.v1.ReconConfig.Opt" + + "ions\022W\n\014model_config\030\004 \001(\0132A.google.clou" + + "d.enterpriseknowledgegraph.v1.ReconConfi" + + "g.ModelConfig\032.\n\007Options\022#\n\033enable_geoco" + + "ding_separation\030d \001(\010\0326\n\013ModelConfig\022\022\n\n" + + "model_name\030\001 \001(\t\022\023\n\013version_tag\030\002 \001(\tB\023\n" + + "\021clustering_config\"5\n\031ConnectedComponent" + + "sConfig\022\030\n\020weight_threshold\030\001 \001(\002\";\n\030Aff" + + "inityClusteringConfig\022\037\n\027compression_rou" + + "nd_count\030\001 \001(\003\"u\n\027DeleteOperationMetadat" + + "a\022Z\n\017common_metadata\030\001 \001(\0132A.google.clou" + + "d.enterpriseknowledgegraph.v1.CommonOper" + + "ationMetadata\"\333\001\n$CreateEntityReconcilia" + + "tionJobRequest\022H\n\006parent\030\001 \001(\tB8\340A\002\372A2\n0" + + "enterpriseknowledgegraph.googleapis.com/" + + "Location\022i\n\031entity_reconciliation_job\030\002 " + + "\001(\0132A.google.cloud.enterpriseknowledgegr" + + "aph.v1.EntityReconciliationJobB\003\340A\002\"z\n!G" + + "etEntityReconciliationJobRequest\022U\n\004name" + + "\030\001 \001(\tBG\340A\002\372AA\n?enterpriseknowledgegraph" + + ".googleapis.com/EntityReconciliationJob\"" + + "\246\001\n#ListEntityReconciliationJobsRequest\022" + + "H\n\006parent\030\001 \001(\tB8\340A\002\372A2\n0enterpriseknowl" + + "edgegraph.googleapis.com/Location\022\016\n\006fil" + + "ter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_tok" + + "en\030\004 \001(\t\"\246\001\n$ListEntityReconciliationJob" + + "sResponse\022e\n\032entity_reconciliation_jobs\030" + + "\001 \003(\0132A.google.cloud.enterpriseknowledge" + + "graph.v1.EntityReconciliationJob\022\027\n\017next" + + "_page_token\030\002 \001(\t\"}\n$CancelEntityReconci" + + "liationJobRequest\022U\n\004name\030\001 \001(\tBG\340A\002\372AA\n" + + "?enterpriseknowledgegraph.googleapis.com" + + "/EntityReconciliationJob\"}\n$DeleteEntity" + + "ReconciliationJobRequest\022U\n\004name\030\001 \001(\tBG" + + "\340A\002\372AA\n?enterpriseknowledgegraph.googlea" + + "pis.com/EntityReconciliationJob\"\331\005\n\027Enti" + + "tyReconciliationJob\022\021\n\004name\030\001 \001(\tB\003\340A\003\022P" + + "\n\014input_config\030\002 \001(\01325.google.cloud.ente" + + "rpriseknowledgegraph.v1.InputConfigB\003\340A\002" + + "\022R\n\routput_config\030\003 \001(\01326.google.cloud.e" + + "nterpriseknowledgegraph.v1.OutputConfigB" + + "\003\340A\002\022F\n\005state\030\004 \001(\01622.google.cloud.enter" + + "priseknowledgegraph.v1.JobStateB\003\340A\003\022&\n\005" + + "error\030\005 \001(\0132\022.google.rpc.StatusB\003\340A\003\0224\n\013" + + "create_time\030\006 \001(\0132\032.google.protobuf.Time" + + "stampB\003\340A\003\0221\n\010end_time\030\007 \001(\0132\032.google.pr" + + "otobuf.TimestampB\003\340A\003\0224\n\013update_time\030\010 \001" + + "(\0132\032.google.protobuf.TimestampB\003\340A\003\022P\n\014r" + + "econ_config\030\t \001(\01325.google.cloud.enterpr" + + "iseknowledgegraph.v1.ReconConfigB\003\340A\001:\243\001" + + "\352A\237\001\n?enterpriseknowledgegraph.googleapi" + + "s.com/EntityReconciliationJob\022\\projects/" + + "{project}/locations/{location}/entityRec" + + "onciliationJobs/{entity_reconciliation_j" + + "ob}2\373\n\n\037EnterpriseKnowledgeGraphService\022" + + "\267\002\n\035CreateEntityReconciliationJob\022N.goog" + + "le.cloud.enterpriseknowledgegraph.v1.Cre" + + "ateEntityReconciliationJobRequest\032A.goog" + + "le.cloud.enterpriseknowledgegraph.v1.Ent" + + "ityReconciliationJob\"\202\001\202\323\344\223\002Y\"\022\022*java-dns java-document-ai java-domains + java-enterpriseknowledgegraph java-errorreporting java-essential-contacts java-eventarc diff --git a/release-please-config.json b/release-please-config.json index 53b784dfff02..a93ad7fb46c5 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -196,6 +196,9 @@ "java-domains": { "component": "google-cloud-domains" }, + "java-enterpriseknowledgegraph": { + "component": "google-cloud-enterpriseknowledgegraph" + }, "java-errorreporting": { "component": "google-cloud-errorreporting" }, From b58b7fea96ff62d33ea10cf70f97385b8adabb8c Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 21 Oct 2022 20:27:54 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- java-enterpriseknowledgegraph/.gitignore | 17 +++++++++++++++++ .../pom.xml | 2 +- .../pom.xml | 4 ++-- java-enterpriseknowledgegraph/pom.xml | 3 ++- 4 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 java-enterpriseknowledgegraph/.gitignore diff --git a/java-enterpriseknowledgegraph/.gitignore b/java-enterpriseknowledgegraph/.gitignore new file mode 100644 index 000000000000..069d08fc73e8 --- /dev/null +++ b/java-enterpriseknowledgegraph/.gitignore @@ -0,0 +1,17 @@ +# Maven +target/ + +# Eclipse +.classpath +.project +.settings + +# Intellij +*.iml +.idea/ + +# python utilities +*.pyc +__pycache__ + +.flattened-pom.xml diff --git a/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph-bom/pom.xml b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph-bom/pom.xml index 1085445dd6f5..a1cedcd2ffbb 100644 --- a/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph-bom/pom.xml +++ b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph-bom/pom.xml @@ -1,4 +1,4 @@ - + 4.0.0 com.google.cloud diff --git a/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/pom.xml b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/pom.xml index eb8ddba02739..dd25c06b4ed8 100644 --- a/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/pom.xml +++ b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/pom.xml @@ -1,4 +1,4 @@ - + 4.0.0 com.google.cloud @@ -110,4 +110,4 @@ test - \ No newline at end of file + diff --git a/java-enterpriseknowledgegraph/pom.xml b/java-enterpriseknowledgegraph/pom.xml index 1db0d7e4babf..3ba9decbf525 100644 --- a/java-enterpriseknowledgegraph/pom.xml +++ b/java-enterpriseknowledgegraph/pom.xml @@ -50,4 +50,5 @@ proto-google-cloud-enterpriseknowledgegraph-v1 google-cloud-enterpriseknowledgegraph-bom - + +