diff --git a/gapic-libraries-bom/pom.xml b/gapic-libraries-bom/pom.xml index 19023c5ce42b..9e576329d9c1 100644 --- a/gapic-libraries-bom/pom.xml +++ b/gapic-libraries-bom/pom.xml @@ -343,6 +343,13 @@ pom import + + com.google.cloud + google-cloud-datalineage-bom + 0.0.1-SNAPSHOT + pom + import + com.google.cloud google-cloud-dataplex-bom diff --git a/java-datalineage/.OwlBot.yaml b/java-datalineage/.OwlBot.yaml new file mode 100644 index 000000000000..48b9cf573b95 --- /dev/null +++ b/java-datalineage/.OwlBot.yaml @@ -0,0 +1,35 @@ +# 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-datalineage/grpc-google-.*/src" +- "/java-datalineage/proto-google-.*/src" +- "/java-datalineage/google-.*/src" +- "/java-datalineage/samples/snippets/generated" + +deep-preserve-regex: +- "/java-datalineage/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" + +deep-copy-regex: +- source: "/google/cloud/datacatalog/lineage/(v.*)/.*-java/proto-google-.*/src" + dest: "/owl-bot-staging/java-datalineage/$1/proto-google-cloud-datalineage-$1/src" +- source: "/google/cloud/datacatalog/lineage/(v.*)/.*-java/grpc-google-.*/src" + dest: "/owl-bot-staging/java-datalineage/$1/grpc-google-cloud-datalineage-$1/src" +- source: "/google/cloud/datacatalog/lineage/(v.*)/.*-java/gapic-google-.*/src" + dest: "/owl-bot-staging/java-datalineage/$1/google-cloud-datalineage/src" +- source: "/google/cloud/datacatalog/lineage/(v.*)/.*-java/samples/snippets/generated" + dest: "/owl-bot-staging/java-datalineage/$1/samples/snippets/generated" + +api-name: datalineage \ No newline at end of file diff --git a/java-datalineage/.repo-metadata.json b/java-datalineage/.repo-metadata.json new file mode 100644 index 000000000000..40e04d79a5f3 --- /dev/null +++ b/java-datalineage/.repo-metadata.json @@ -0,0 +1,16 @@ +{ + "api_shortname": "datalineage", + "name_pretty": "Data Lineage", + "product_documentation": "https://cloud.google.com/data-catalog/docs/data-lineage/", + "api_description": "Lineage is used to track data flows between assets over time.", + "client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-datalineage/latest/overview", + "release_level": "preview", + "transport": "grpc", + "language": "java", + "repo": "googleapis/java-datalineage", + "repo_short": "java-datalineage", + "distribution_name": "com.google.cloud:google-cloud-datalineage", + "api_id": "datalineage.googleapis.com", + "library_type": "GAPIC_AUTO", + "requires_billing": true +} \ No newline at end of file diff --git a/java-datalineage/README.md b/java-datalineage/README.md new file mode 100644 index 000000000000..2b3b9197aac2 --- /dev/null +++ b/java-datalineage/README.md @@ -0,0 +1,201 @@ +# Google Data Lineage Client for Java + +Java idiomatic client for [Data Lineage][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-datalineage + 0.0.0 + +``` + +If you are using Gradle without BOM, add this to your dependencies: + +```Groovy +implementation 'com.google.cloud:google-cloud-datalineage:0.0.0' +``` + +If you are using SBT, add this to your dependencies: + +```Scala +libraryDependencies += "com.google.cloud" % "google-cloud-datalineage" % "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 Data Lineage APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the Data Lineage API calls. + +## Getting Started + +### Prerequisites + +You will need a [Google Cloud Platform Console][developer-console] project with the Data Lineage [API enabled][enable-api]. +You will need to [enable billing][enable-billing] to use Google Data Lineage. +[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-datalineage` library. See the [Quickstart](#quickstart) section +to add `google-cloud-datalineage` as a dependency in your code. + +## About Data Lineage + + +[Data Lineage][product-docs] Lineage is used to track data flows between assets over time. + +See the [Data Lineage client library docs][javadocs] to learn how to +use this Data Lineage Client Library. + + + + + + +## Troubleshooting + +To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. + +## Transport + +Data Lineage 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/data-catalog/docs/data-lineage/ +[javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-datalineage/latest/overview +[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-datalineage/java7.svg +[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-datalineage/java7.html +[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-datalineage/java8.svg +[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-datalineage/java8.html +[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-datalineage/java8-osx.svg +[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-datalineage/java8-osx.html +[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-datalineage/java8-win.svg +[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-datalineage/java8-win.html +[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-datalineage/java11.svg +[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-datalineage/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-datalineage.svg +[maven-version-link]: https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-datalineage&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-datalineage/blob/main/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/java-datalineage/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/java-datalineage/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=datalineage.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-datalineage/google-cloud-datalineage-bom/pom.xml b/java-datalineage/google-cloud-datalineage-bom/pom.xml new file mode 100644 index 000000000000..74fa390cf60c --- /dev/null +++ b/java-datalineage/google-cloud-datalineage-bom/pom.xml @@ -0,0 +1,44 @@ + + + 4.0.0 + com.google.cloud + google-cloud-datalineage-bom + 0.0.1-SNAPSHOT + pom + + + com.google.cloud + google-cloud-pom-parent + 1.3.0-SNAPSHOT + ../../google-cloud-pom-parent/pom.xml + + + Google Data Lineage BOM + + BOM for Data Lineage + + + + true + + + + + + com.google.cloud + google-cloud-datalineage + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-datalineage-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-datalineage-v1 + 0.0.1-SNAPSHOT + + + + diff --git a/java-datalineage/google-cloud-datalineage/pom.xml b/java-datalineage/google-cloud-datalineage/pom.xml new file mode 100644 index 000000000000..fea288c314dc --- /dev/null +++ b/java-datalineage/google-cloud-datalineage/pom.xml @@ -0,0 +1,113 @@ + + + 4.0.0 + com.google.cloud + google-cloud-datalineage + 0.0.1-SNAPSHOT + jar + Google Data Lineage + Data Lineage Lineage is used to track data flows between assets over time. + + com.google.cloud + google-cloud-datalineage-parent + 0.0.1-SNAPSHOT + + + google-cloud-datalineage + + + + 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-datalineage-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-datalineage-v1 + test + + + + com.google.api + gax + testlib + test + + + com.google.api + gax-grpc + testlib + test + + + com.google.api + gax-httpjson + testlib + test + + + diff --git a/java-datalineage/google-cloud-datalineage/src/main/java/com/google/cloud/datacatalog/lineage/v1/LineageClient.java b/java-datalineage/google-cloud-datalineage/src/main/java/com/google/cloud/datacatalog/lineage/v1/LineageClient.java new file mode 100644 index 000000000000..ab8b2f8661a8 --- /dev/null +++ b/java-datalineage/google-cloud-datalineage/src/main/java/com/google/cloud/datacatalog/lineage/v1/LineageClient.java @@ -0,0 +1,2637 @@ +/* + * 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.datacatalog.lineage.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +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.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.datacatalog.lineage.v1.stub.LineageStub; +import com.google.cloud.datacatalog.lineage.v1.stub.LineageStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Lineage is used to track data flows between assets over time. You can create + * [LineageEvents][google.cloud.datacatalog.lineage.v1.LineageEvent] to record lineage between + * multiple sources and a single target, for example, when table data is based on data from multiple + * tables. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+ *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ *   Process process = Process.newBuilder().build();
+ *   Process response = lineageClient.createProcess(parent, process);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the LineageClient 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 LineageSettings 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
+ * LineageSettings lineageSettings =
+ *     LineageSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * LineageClient lineageClient = LineageClient.create(lineageSettings);
+ * }
+ * + *

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
+ * LineageSettings lineageSettings = LineageSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * LineageClient lineageClient = LineageClient.create(lineageSettings);
+ * }
+ * + *

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
+ * LineageSettings lineageSettings = LineageSettings.newHttpJsonBuilder().build();
+ * LineageClient lineageClient = LineageClient.create(lineageSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class LineageClient implements BackgroundResource { + private final LineageSettings settings; + private final LineageStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of LineageClient with default settings. */ + public static final LineageClient create() throws IOException { + return create(LineageSettings.newBuilder().build()); + } + + /** + * Constructs an instance of LineageClient, 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 LineageClient create(LineageSettings settings) throws IOException { + return new LineageClient(settings); + } + + /** + * Constructs an instance of LineageClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(LineageSettings). + */ + public static final LineageClient create(LineageStub stub) { + return new LineageClient(stub); + } + + /** + * Constructs an instance of LineageClient, 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 LineageClient(LineageSettings settings) throws IOException { + this.settings = settings; + this.stub = ((LineageStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected LineageClient(LineageStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final LineageSettings getSettings() { + return settings; + } + + public LineageStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new process. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Process process = Process.newBuilder().build();
+   *   Process response = lineageClient.createProcess(parent, process);
+   * }
+   * }
+ * + * @param parent Required. The name of the project and its location that should own the process. + * @param process Required. The process to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Process createProcess(LocationName parent, Process process) { + CreateProcessRequest request = + CreateProcessRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setProcess(process) + .build(); + return createProcess(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new process. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Process process = Process.newBuilder().build();
+   *   Process response = lineageClient.createProcess(parent, process);
+   * }
+   * }
+ * + * @param parent Required. The name of the project and its location that should own the process. + * @param process Required. The process to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Process createProcess(String parent, Process process) { + CreateProcessRequest request = + CreateProcessRequest.newBuilder().setParent(parent).setProcess(process).build(); + return createProcess(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new process. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   CreateProcessRequest request =
+   *       CreateProcessRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setProcess(Process.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Process response = lineageClient.createProcess(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 Process createProcess(CreateProcessRequest request) { + return createProcessCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new process. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   CreateProcessRequest request =
+   *       CreateProcessRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setProcess(Process.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = lineageClient.createProcessCallable().futureCall(request);
+   *   // Do something.
+   *   Process response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createProcessCallable() { + return stub.createProcessCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a process. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   Process process = Process.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Process response = lineageClient.updateProcess(process, updateMask);
+   * }
+   * }
+ * + * @param process Required. The lineage process to update. + *

The process's `name` field is used to identify the process to update. + * @param updateMask The list of fields to update. Currently not used. The whole message is + * updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Process updateProcess(Process process, FieldMask updateMask) { + UpdateProcessRequest request = + UpdateProcessRequest.newBuilder().setProcess(process).setUpdateMask(updateMask).build(); + return updateProcess(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a process. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   UpdateProcessRequest request =
+   *       UpdateProcessRequest.newBuilder()
+   *           .setProcess(Process.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setAllowMissing(true)
+   *           .build();
+   *   Process response = lineageClient.updateProcess(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 Process updateProcess(UpdateProcessRequest request) { + return updateProcessCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a process. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   UpdateProcessRequest request =
+   *       UpdateProcessRequest.newBuilder()
+   *           .setProcess(Process.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setAllowMissing(true)
+   *           .build();
+   *   ApiFuture future = lineageClient.updateProcessCallable().futureCall(request);
+   *   // Do something.
+   *   Process response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateProcessCallable() { + return stub.updateProcessCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of the specified process. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   ProcessName name = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]");
+   *   Process response = lineageClient.getProcess(name);
+   * }
+   * }
+ * + * @param name Required. The name of the process to get. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Process getProcess(ProcessName name) { + GetProcessRequest request = + GetProcessRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getProcess(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of the specified process. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   String name = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString();
+   *   Process response = lineageClient.getProcess(name);
+   * }
+   * }
+ * + * @param name Required. The name of the process to get. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Process getProcess(String name) { + GetProcessRequest request = GetProcessRequest.newBuilder().setName(name).build(); + return getProcess(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of the specified process. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   GetProcessRequest request =
+   *       GetProcessRequest.newBuilder()
+   *           .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString())
+   *           .build();
+   *   Process response = lineageClient.getProcess(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 Process getProcess(GetProcessRequest request) { + return getProcessCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of the specified process. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   GetProcessRequest request =
+   *       GetProcessRequest.newBuilder()
+   *           .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString())
+   *           .build();
+   *   ApiFuture future = lineageClient.getProcessCallable().futureCall(request);
+   *   // Do something.
+   *   Process response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getProcessCallable() { + return stub.getProcessCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List processes in the given project and location. List order is descending by insertion time. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Process element : lineageClient.listProcesses(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The name of the project and its location that owns this collection of + * processes. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListProcessesPagedResponse listProcesses(LocationName parent) { + ListProcessesRequest request = + ListProcessesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listProcesses(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List processes in the given project and location. List order is descending by insertion time. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Process element : lineageClient.listProcesses(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The name of the project and its location that owns this collection of + * processes. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListProcessesPagedResponse listProcesses(String parent) { + ListProcessesRequest request = ListProcessesRequest.newBuilder().setParent(parent).build(); + return listProcesses(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List processes in the given project and location. List order is descending by insertion time. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   ListProcessesRequest request =
+   *       ListProcessesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Process element : lineageClient.listProcesses(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 ListProcessesPagedResponse listProcesses(ListProcessesRequest request) { + return listProcessesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List processes in the given project and location. List order is descending by insertion time. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   ListProcessesRequest request =
+   *       ListProcessesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = lineageClient.listProcessesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Process element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listProcessesPagedCallable() { + return stub.listProcessesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List processes in the given project and location. List order is descending by insertion time. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   ListProcessesRequest request =
+   *       ListProcessesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListProcessesResponse response = lineageClient.listProcessesCallable().call(request);
+   *     for (Process element : response.getProcessesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listProcessesCallable() { + return stub.listProcessesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the process with the specified name. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   ProcessName name = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]");
+   *   lineageClient.deleteProcessAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the process to delete. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteProcessAsync(ProcessName name) { + DeleteProcessRequest request = + DeleteProcessRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteProcessAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the process with the specified name. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   String name = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString();
+   *   lineageClient.deleteProcessAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the process to delete. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteProcessAsync(String name) { + DeleteProcessRequest request = DeleteProcessRequest.newBuilder().setName(name).build(); + return deleteProcessAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the process with the specified name. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   DeleteProcessRequest request =
+   *       DeleteProcessRequest.newBuilder()
+   *           .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString())
+   *           .setAllowMissing(true)
+   *           .build();
+   *   lineageClient.deleteProcessAsync(request).get();
+   * }
+   * }
+ * + * @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 OperationFuture deleteProcessAsync( + DeleteProcessRequest request) { + return deleteProcessOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the process with the specified name. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   DeleteProcessRequest request =
+   *       DeleteProcessRequest.newBuilder()
+   *           .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString())
+   *           .setAllowMissing(true)
+   *           .build();
+   *   OperationFuture future =
+   *       lineageClient.deleteProcessOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteProcessOperationCallable() { + return stub.deleteProcessOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the process with the specified name. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   DeleteProcessRequest request =
+   *       DeleteProcessRequest.newBuilder()
+   *           .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString())
+   *           .setAllowMissing(true)
+   *           .build();
+   *   ApiFuture future = lineageClient.deleteProcessCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteProcessCallable() { + return stub.deleteProcessCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new run. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   ProcessName parent = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]");
+   *   Run run = Run.newBuilder().build();
+   *   Run response = lineageClient.createRun(parent, run);
+   * }
+   * }
+ * + * @param parent Required. The name of the process that should own the run. + * @param run Required. The run to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Run createRun(ProcessName parent, Run run) { + CreateRunRequest request = + CreateRunRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setRun(run) + .build(); + return createRun(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new run. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   String parent = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString();
+   *   Run run = Run.newBuilder().build();
+   *   Run response = lineageClient.createRun(parent, run);
+   * }
+   * }
+ * + * @param parent Required. The name of the process that should own the run. + * @param run Required. The run to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Run createRun(String parent, Run run) { + CreateRunRequest request = CreateRunRequest.newBuilder().setParent(parent).setRun(run).build(); + return createRun(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new run. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   CreateRunRequest request =
+   *       CreateRunRequest.newBuilder()
+   *           .setParent(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString())
+   *           .setRun(Run.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Run response = lineageClient.createRun(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 Run createRun(CreateRunRequest request) { + return createRunCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new run. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   CreateRunRequest request =
+   *       CreateRunRequest.newBuilder()
+   *           .setParent(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString())
+   *           .setRun(Run.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = lineageClient.createRunCallable().futureCall(request);
+   *   // Do something.
+   *   Run response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createRunCallable() { + return stub.createRunCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a run. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   Run run = Run.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Run response = lineageClient.updateRun(run, updateMask);
+   * }
+   * }
+ * + * @param run Required. The lineage run to update. + *

The run's `name` field is used to identify the run to update. + *

Format: `projects/{project}/locations/{location}/processes/{process}/runs/{run}`. + * @param updateMask The list of fields to update. Currently not used. The whole message is + * updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Run updateRun(Run run, FieldMask updateMask) { + UpdateRunRequest request = + UpdateRunRequest.newBuilder().setRun(run).setUpdateMask(updateMask).build(); + return updateRun(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a run. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   UpdateRunRequest request =
+   *       UpdateRunRequest.newBuilder()
+   *           .setRun(Run.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Run response = lineageClient.updateRun(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 Run updateRun(UpdateRunRequest request) { + return updateRunCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a run. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   UpdateRunRequest request =
+   *       UpdateRunRequest.newBuilder()
+   *           .setRun(Run.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = lineageClient.updateRunCallable().futureCall(request);
+   *   // Do something.
+   *   Run response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateRunCallable() { + return stub.updateRunCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of the specified run. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   RunName name = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]");
+   *   Run response = lineageClient.getRun(name);
+   * }
+   * }
+ * + * @param name Required. The name of the run to get. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Run getRun(RunName name) { + GetRunRequest request = + GetRunRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getRun(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of the specified run. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   String name = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString();
+   *   Run response = lineageClient.getRun(name);
+   * }
+   * }
+ * + * @param name Required. The name of the run to get. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Run getRun(String name) { + GetRunRequest request = GetRunRequest.newBuilder().setName(name).build(); + return getRun(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of the specified run. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   GetRunRequest request =
+   *       GetRunRequest.newBuilder()
+   *           .setName(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString())
+   *           .build();
+   *   Run response = lineageClient.getRun(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 Run getRun(GetRunRequest request) { + return getRunCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of the specified run. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   GetRunRequest request =
+   *       GetRunRequest.newBuilder()
+   *           .setName(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString())
+   *           .build();
+   *   ApiFuture future = lineageClient.getRunCallable().futureCall(request);
+   *   // Do something.
+   *   Run response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getRunCallable() { + return stub.getRunCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists runs in the given project and location. List order is descending by `start_time`. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   ProcessName parent = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]");
+   *   for (Run element : lineageClient.listRuns(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The name of process that owns this collection of runs. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRunsPagedResponse listRuns(ProcessName parent) { + ListRunsRequest request = + ListRunsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listRuns(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists runs in the given project and location. List order is descending by `start_time`. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   String parent = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString();
+   *   for (Run element : lineageClient.listRuns(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The name of process that owns this collection of runs. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRunsPagedResponse listRuns(String parent) { + ListRunsRequest request = ListRunsRequest.newBuilder().setParent(parent).build(); + return listRuns(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists runs in the given project and location. List order is descending by `start_time`. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   ListRunsRequest request =
+   *       ListRunsRequest.newBuilder()
+   *           .setParent(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Run element : lineageClient.listRuns(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 ListRunsPagedResponse listRuns(ListRunsRequest request) { + return listRunsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists runs in the given project and location. List order is descending by `start_time`. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   ListRunsRequest request =
+   *       ListRunsRequest.newBuilder()
+   *           .setParent(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = lineageClient.listRunsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Run element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listRunsPagedCallable() { + return stub.listRunsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists runs in the given project and location. List order is descending by `start_time`. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   ListRunsRequest request =
+   *       ListRunsRequest.newBuilder()
+   *           .setParent(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListRunsResponse response = lineageClient.listRunsCallable().call(request);
+   *     for (Run element : response.getRunsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listRunsCallable() { + return stub.listRunsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the run with the specified name. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   RunName name = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]");
+   *   lineageClient.deleteRunAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the run to delete. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteRunAsync(RunName name) { + DeleteRunRequest request = + DeleteRunRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteRunAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the run with the specified name. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   String name = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString();
+   *   lineageClient.deleteRunAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the run to delete. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteRunAsync(String name) { + DeleteRunRequest request = DeleteRunRequest.newBuilder().setName(name).build(); + return deleteRunAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the run with the specified name. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   DeleteRunRequest request =
+   *       DeleteRunRequest.newBuilder()
+   *           .setName(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString())
+   *           .setAllowMissing(true)
+   *           .build();
+   *   lineageClient.deleteRunAsync(request).get();
+   * }
+   * }
+ * + * @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 OperationFuture deleteRunAsync(DeleteRunRequest request) { + return deleteRunOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the run with the specified name. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   DeleteRunRequest request =
+   *       DeleteRunRequest.newBuilder()
+   *           .setName(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString())
+   *           .setAllowMissing(true)
+   *           .build();
+   *   OperationFuture future =
+   *       lineageClient.deleteRunOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteRunOperationCallable() { + return stub.deleteRunOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the run with the specified name. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   DeleteRunRequest request =
+   *       DeleteRunRequest.newBuilder()
+   *           .setName(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString())
+   *           .setAllowMissing(true)
+   *           .build();
+   *   ApiFuture future = lineageClient.deleteRunCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteRunCallable() { + return stub.deleteRunCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new lineage event. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   RunName parent = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]");
+   *   LineageEvent lineageEvent = LineageEvent.newBuilder().build();
+   *   LineageEvent response = lineageClient.createLineageEvent(parent, lineageEvent);
+   * }
+   * }
+ * + * @param parent Required. The name of the run that should own the lineage event. + * @param lineageEvent Required. The lineage event to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LineageEvent createLineageEvent(RunName parent, LineageEvent lineageEvent) { + CreateLineageEventRequest request = + CreateLineageEventRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setLineageEvent(lineageEvent) + .build(); + return createLineageEvent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new lineage event. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   String parent = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString();
+   *   LineageEvent lineageEvent = LineageEvent.newBuilder().build();
+   *   LineageEvent response = lineageClient.createLineageEvent(parent, lineageEvent);
+   * }
+   * }
+ * + * @param parent Required. The name of the run that should own the lineage event. + * @param lineageEvent Required. The lineage event to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LineageEvent createLineageEvent(String parent, LineageEvent lineageEvent) { + CreateLineageEventRequest request = + CreateLineageEventRequest.newBuilder() + .setParent(parent) + .setLineageEvent(lineageEvent) + .build(); + return createLineageEvent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new lineage event. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   CreateLineageEventRequest request =
+   *       CreateLineageEventRequest.newBuilder()
+   *           .setParent(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString())
+   *           .setLineageEvent(LineageEvent.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   LineageEvent response = lineageClient.createLineageEvent(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 LineageEvent createLineageEvent(CreateLineageEventRequest request) { + return createLineageEventCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new lineage event. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   CreateLineageEventRequest request =
+   *       CreateLineageEventRequest.newBuilder()
+   *           .setParent(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString())
+   *           .setLineageEvent(LineageEvent.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       lineageClient.createLineageEventCallable().futureCall(request);
+   *   // Do something.
+   *   LineageEvent response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createLineageEventCallable() { + return stub.createLineageEventCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a specified lineage event. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   LineageEventName name =
+   *       LineageEventName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]");
+   *   LineageEvent response = lineageClient.getLineageEvent(name);
+   * }
+   * }
+ * + * @param name Required. The name of the lineage event to get. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LineageEvent getLineageEvent(LineageEventName name) { + GetLineageEventRequest request = + GetLineageEventRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getLineageEvent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a specified lineage event. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   String name =
+   *       LineageEventName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]")
+   *           .toString();
+   *   LineageEvent response = lineageClient.getLineageEvent(name);
+   * }
+   * }
+ * + * @param name Required. The name of the lineage event to get. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LineageEvent getLineageEvent(String name) { + GetLineageEventRequest request = GetLineageEventRequest.newBuilder().setName(name).build(); + return getLineageEvent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a specified lineage event. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   GetLineageEventRequest request =
+   *       GetLineageEventRequest.newBuilder()
+   *           .setName(
+   *               LineageEventName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]")
+   *                   .toString())
+   *           .build();
+   *   LineageEvent response = lineageClient.getLineageEvent(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 LineageEvent getLineageEvent(GetLineageEventRequest request) { + return getLineageEventCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a specified lineage event. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   GetLineageEventRequest request =
+   *       GetLineageEventRequest.newBuilder()
+   *           .setName(
+   *               LineageEventName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = lineageClient.getLineageEventCallable().futureCall(request);
+   *   // Do something.
+   *   LineageEvent response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLineageEventCallable() { + return stub.getLineageEventCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists lineage events in the given project and location. The list order is not defined. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   RunName parent = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]");
+   *   for (LineageEvent element : lineageClient.listLineageEvents(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The name of the run that owns the collection of lineage events to get. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLineageEventsPagedResponse listLineageEvents(RunName parent) { + ListLineageEventsRequest request = + ListLineageEventsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listLineageEvents(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists lineage events in the given project and location. The list order is not defined. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   String parent = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString();
+   *   for (LineageEvent element : lineageClient.listLineageEvents(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The name of the run that owns the collection of lineage events to get. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLineageEventsPagedResponse listLineageEvents(String parent) { + ListLineageEventsRequest request = + ListLineageEventsRequest.newBuilder().setParent(parent).build(); + return listLineageEvents(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists lineage events in the given project and location. The list order is not defined. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   ListLineageEventsRequest request =
+   *       ListLineageEventsRequest.newBuilder()
+   *           .setParent(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (LineageEvent element : lineageClient.listLineageEvents(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 ListLineageEventsPagedResponse listLineageEvents(ListLineageEventsRequest request) { + return listLineageEventsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists lineage events in the given project and location. The list order is not defined. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   ListLineageEventsRequest request =
+   *       ListLineageEventsRequest.newBuilder()
+   *           .setParent(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       lineageClient.listLineageEventsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (LineageEvent element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLineageEventsPagedCallable() { + return stub.listLineageEventsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists lineage events in the given project and location. The list order is not defined. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   ListLineageEventsRequest request =
+   *       ListLineageEventsRequest.newBuilder()
+   *           .setParent(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLineageEventsResponse response =
+   *         lineageClient.listLineageEventsCallable().call(request);
+   *     for (LineageEvent element : response.getLineageEventsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLineageEventsCallable() { + return stub.listLineageEventsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the lineage event with the specified name. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   LineageEventName name =
+   *       LineageEventName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]");
+   *   lineageClient.deleteLineageEvent(name);
+   * }
+   * }
+ * + * @param name Required. The name of the lineage event to delete. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteLineageEvent(LineageEventName name) { + DeleteLineageEventRequest request = + DeleteLineageEventRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteLineageEvent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the lineage event with the specified name. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   String name =
+   *       LineageEventName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]")
+   *           .toString();
+   *   lineageClient.deleteLineageEvent(name);
+   * }
+   * }
+ * + * @param name Required. The name of the lineage event to delete. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteLineageEvent(String name) { + DeleteLineageEventRequest request = + DeleteLineageEventRequest.newBuilder().setName(name).build(); + deleteLineageEvent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the lineage event with the specified name. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   DeleteLineageEventRequest request =
+   *       DeleteLineageEventRequest.newBuilder()
+   *           .setName(
+   *               LineageEventName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]")
+   *                   .toString())
+   *           .setAllowMissing(true)
+   *           .build();
+   *   lineageClient.deleteLineageEvent(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 deleteLineageEvent(DeleteLineageEventRequest request) { + deleteLineageEventCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the lineage event with the specified name. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   DeleteLineageEventRequest request =
+   *       DeleteLineageEventRequest.newBuilder()
+   *           .setName(
+   *               LineageEventName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]")
+   *                   .toString())
+   *           .setAllowMissing(true)
+   *           .build();
+   *   ApiFuture future = lineageClient.deleteLineageEventCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteLineageEventCallable() { + return stub.deleteLineageEventCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieve a list of links connected to a specific asset. Links represent the data flow between + * **source** (upstream) and **target** (downstream) assets in + * transformation pipelines. Links are stored in the same project as the Lineage Events that + * create them. + * + *

You can retrieve links in every project where you have the `datalineage.events.get` + * permission. The project provided in the URL is used for Billing and Quota. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   SearchLinksRequest request =
+   *       SearchLinksRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Link element : lineageClient.searchLinks(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 SearchLinksPagedResponse searchLinks(SearchLinksRequest request) { + return searchLinksPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieve a list of links connected to a specific asset. Links represent the data flow between + * **source** (upstream) and **target** (downstream) assets in + * transformation pipelines. Links are stored in the same project as the Lineage Events that + * create them. + * + *

You can retrieve links in every project where you have the `datalineage.events.get` + * permission. The project provided in the URL is used for Billing and Quota. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   SearchLinksRequest request =
+   *       SearchLinksRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = lineageClient.searchLinksPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Link element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + searchLinksPagedCallable() { + return stub.searchLinksPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieve a list of links connected to a specific asset. Links represent the data flow between + * **source** (upstream) and **target** (downstream) assets in + * transformation pipelines. Links are stored in the same project as the Lineage Events that + * create them. + * + *

You can retrieve links in every project where you have the `datalineage.events.get` + * permission. The project provided in the URL is used for Billing and Quota. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   SearchLinksRequest request =
+   *       SearchLinksRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     SearchLinksResponse response = lineageClient.searchLinksCallable().call(request);
+   *     for (Link element : response.getLinksList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable searchLinksCallable() { + return stub.searchLinksCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieve information about LineageProcesses associated with specific links. LineageProcesses + * are transformation pipelines that result in data flowing from **source** to + * **target** assets. Links between assets represent this operation. + * + *

If you have specific link names, you can use this method to verify which LineageProcesses + * contribute to creating those links. See the + * [SearchLinks][google.cloud.datacatalog.lineage.v1.Lineage.SearchLinks] method for more + * information on how to retrieve link name. + * + *

You can retrieve the LineageProcess information in every project where you have the + * `datalineage.events.get` permission. The project provided in the URL is used for Billing and + * Quota. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   BatchSearchLinkProcessesRequest request =
+   *       BatchSearchLinkProcessesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .addAllLinks(new ArrayList())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (ProcessLinks element : lineageClient.batchSearchLinkProcesses(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 BatchSearchLinkProcessesPagedResponse batchSearchLinkProcesses( + BatchSearchLinkProcessesRequest request) { + return batchSearchLinkProcessesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieve information about LineageProcesses associated with specific links. LineageProcesses + * are transformation pipelines that result in data flowing from **source** to + * **target** assets. Links between assets represent this operation. + * + *

If you have specific link names, you can use this method to verify which LineageProcesses + * contribute to creating those links. See the + * [SearchLinks][google.cloud.datacatalog.lineage.v1.Lineage.SearchLinks] method for more + * information on how to retrieve link name. + * + *

You can retrieve the LineageProcess information in every project where you have the + * `datalineage.events.get` permission. The project provided in the URL is used for Billing and + * Quota. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   BatchSearchLinkProcessesRequest request =
+   *       BatchSearchLinkProcessesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .addAllLinks(new ArrayList())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       lineageClient.batchSearchLinkProcessesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (ProcessLinks element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + batchSearchLinkProcessesPagedCallable() { + return stub.batchSearchLinkProcessesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieve information about LineageProcesses associated with specific links. LineageProcesses + * are transformation pipelines that result in data flowing from **source** to + * **target** assets. Links between assets represent this operation. + * + *

If you have specific link names, you can use this method to verify which LineageProcesses + * contribute to creating those links. See the + * [SearchLinks][google.cloud.datacatalog.lineage.v1.Lineage.SearchLinks] method for more + * information on how to retrieve link name. + * + *

You can retrieve the LineageProcess information in every project where you have the + * `datalineage.events.get` permission. The project provided in the URL is used for Billing and + * Quota. + * + *

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 (LineageClient lineageClient = LineageClient.create()) {
+   *   BatchSearchLinkProcessesRequest request =
+   *       BatchSearchLinkProcessesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .addAllLinks(new ArrayList())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     BatchSearchLinkProcessesResponse response =
+   *         lineageClient.batchSearchLinkProcessesCallable().call(request);
+   *     for (ProcessLinks element : response.getProcessLinksList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + batchSearchLinkProcessesCallable() { + return stub.batchSearchLinkProcessesCallable(); + } + + @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 ListProcessesPagedResponse + extends AbstractPagedListResponse< + ListProcessesRequest, + ListProcessesResponse, + Process, + ListProcessesPage, + ListProcessesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListProcessesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListProcessesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListProcessesPagedResponse(ListProcessesPage page) { + super(page, ListProcessesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListProcessesPage + extends AbstractPage< + ListProcessesRequest, ListProcessesResponse, Process, ListProcessesPage> { + + private ListProcessesPage( + PageContext context, + ListProcessesResponse response) { + super(context, response); + } + + private static ListProcessesPage createEmptyPage() { + return new ListProcessesPage(null, null); + } + + @Override + protected ListProcessesPage createPage( + PageContext context, + ListProcessesResponse response) { + return new ListProcessesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListProcessesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListProcessesRequest, + ListProcessesResponse, + Process, + ListProcessesPage, + ListProcessesFixedSizeCollection> { + + private ListProcessesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListProcessesFixedSizeCollection createEmptyCollection() { + return new ListProcessesFixedSizeCollection(null, 0); + } + + @Override + protected ListProcessesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListProcessesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListRunsPagedResponse + extends AbstractPagedListResponse< + ListRunsRequest, ListRunsResponse, Run, ListRunsPage, ListRunsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListRunsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListRunsPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListRunsPagedResponse(ListRunsPage page) { + super(page, ListRunsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListRunsPage + extends AbstractPage { + + private ListRunsPage( + PageContext context, ListRunsResponse response) { + super(context, response); + } + + private static ListRunsPage createEmptyPage() { + return new ListRunsPage(null, null); + } + + @Override + protected ListRunsPage createPage( + PageContext context, ListRunsResponse response) { + return new ListRunsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListRunsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListRunsRequest, ListRunsResponse, Run, ListRunsPage, ListRunsFixedSizeCollection> { + + private ListRunsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListRunsFixedSizeCollection createEmptyCollection() { + return new ListRunsFixedSizeCollection(null, 0); + } + + @Override + protected ListRunsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListRunsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLineageEventsPagedResponse + extends AbstractPagedListResponse< + ListLineageEventsRequest, + ListLineageEventsResponse, + LineageEvent, + ListLineageEventsPage, + ListLineageEventsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLineageEventsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLineageEventsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLineageEventsPagedResponse(ListLineageEventsPage page) { + super(page, ListLineageEventsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLineageEventsPage + extends AbstractPage< + ListLineageEventsRequest, + ListLineageEventsResponse, + LineageEvent, + ListLineageEventsPage> { + + private ListLineageEventsPage( + PageContext context, + ListLineageEventsResponse response) { + super(context, response); + } + + private static ListLineageEventsPage createEmptyPage() { + return new ListLineageEventsPage(null, null); + } + + @Override + protected ListLineageEventsPage createPage( + PageContext context, + ListLineageEventsResponse response) { + return new ListLineageEventsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLineageEventsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLineageEventsRequest, + ListLineageEventsResponse, + LineageEvent, + ListLineageEventsPage, + ListLineageEventsFixedSizeCollection> { + + private ListLineageEventsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLineageEventsFixedSizeCollection createEmptyCollection() { + return new ListLineageEventsFixedSizeCollection(null, 0); + } + + @Override + protected ListLineageEventsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLineageEventsFixedSizeCollection(pages, collectionSize); + } + } + + public static class SearchLinksPagedResponse + extends AbstractPagedListResponse< + SearchLinksRequest, + SearchLinksResponse, + Link, + SearchLinksPage, + SearchLinksFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + SearchLinksPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new SearchLinksPagedResponse(input), MoreExecutors.directExecutor()); + } + + private SearchLinksPagedResponse(SearchLinksPage page) { + super(page, SearchLinksFixedSizeCollection.createEmptyCollection()); + } + } + + public static class SearchLinksPage + extends AbstractPage { + + private SearchLinksPage( + PageContext context, + SearchLinksResponse response) { + super(context, response); + } + + private static SearchLinksPage createEmptyPage() { + return new SearchLinksPage(null, null); + } + + @Override + protected SearchLinksPage createPage( + PageContext context, + SearchLinksResponse response) { + return new SearchLinksPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class SearchLinksFixedSizeCollection + extends AbstractFixedSizeCollection< + SearchLinksRequest, + SearchLinksResponse, + Link, + SearchLinksPage, + SearchLinksFixedSizeCollection> { + + private SearchLinksFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static SearchLinksFixedSizeCollection createEmptyCollection() { + return new SearchLinksFixedSizeCollection(null, 0); + } + + @Override + protected SearchLinksFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new SearchLinksFixedSizeCollection(pages, collectionSize); + } + } + + public static class BatchSearchLinkProcessesPagedResponse + extends AbstractPagedListResponse< + BatchSearchLinkProcessesRequest, + BatchSearchLinkProcessesResponse, + ProcessLinks, + BatchSearchLinkProcessesPage, + BatchSearchLinkProcessesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + BatchSearchLinkProcessesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new BatchSearchLinkProcessesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private BatchSearchLinkProcessesPagedResponse(BatchSearchLinkProcessesPage page) { + super(page, BatchSearchLinkProcessesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class BatchSearchLinkProcessesPage + extends AbstractPage< + BatchSearchLinkProcessesRequest, + BatchSearchLinkProcessesResponse, + ProcessLinks, + BatchSearchLinkProcessesPage> { + + private BatchSearchLinkProcessesPage( + PageContext + context, + BatchSearchLinkProcessesResponse response) { + super(context, response); + } + + private static BatchSearchLinkProcessesPage createEmptyPage() { + return new BatchSearchLinkProcessesPage(null, null); + } + + @Override + protected BatchSearchLinkProcessesPage createPage( + PageContext + context, + BatchSearchLinkProcessesResponse response) { + return new BatchSearchLinkProcessesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class BatchSearchLinkProcessesFixedSizeCollection + extends AbstractFixedSizeCollection< + BatchSearchLinkProcessesRequest, + BatchSearchLinkProcessesResponse, + ProcessLinks, + BatchSearchLinkProcessesPage, + BatchSearchLinkProcessesFixedSizeCollection> { + + private BatchSearchLinkProcessesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static BatchSearchLinkProcessesFixedSizeCollection createEmptyCollection() { + return new BatchSearchLinkProcessesFixedSizeCollection(null, 0); + } + + @Override + protected BatchSearchLinkProcessesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new BatchSearchLinkProcessesFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-datalineage/google-cloud-datalineage/src/main/java/com/google/cloud/datacatalog/lineage/v1/LineageSettings.java b/java-datalineage/google-cloud-datalineage/src/main/java/com/google/cloud/datacatalog/lineage/v1/LineageSettings.java new file mode 100644 index 000000000000..c03c5d647394 --- /dev/null +++ b/java-datalineage/google-cloud-datalineage/src/main/java/com/google/cloud/datacatalog/lineage/v1/LineageSettings.java @@ -0,0 +1,410 @@ +/* + * 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.datacatalog.lineage.v1; + +import static com.google.cloud.datacatalog.lineage.v1.LineageClient.BatchSearchLinkProcessesPagedResponse; +import static com.google.cloud.datacatalog.lineage.v1.LineageClient.ListLineageEventsPagedResponse; +import static com.google.cloud.datacatalog.lineage.v1.LineageClient.ListProcessesPagedResponse; +import static com.google.cloud.datacatalog.lineage.v1.LineageClient.ListRunsPagedResponse; +import static com.google.cloud.datacatalog.lineage.v1.LineageClient.SearchLinksPagedResponse; + +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.OperationCallSettings; +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.datacatalog.lineage.v1.stub.LineageStubSettings; +import com.google.longrunning.Operation; +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 LineageClient}. + * + *

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

    + *
  • The default service address (datalineage.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 createProcess 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
+ * LineageSettings.Builder lineageSettingsBuilder = LineageSettings.newBuilder();
+ * lineageSettingsBuilder
+ *     .createProcessSettings()
+ *     .setRetrySettings(
+ *         lineageSettingsBuilder
+ *             .createProcessSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * LineageSettings lineageSettings = lineageSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class LineageSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createProcess. */ + public UnaryCallSettings createProcessSettings() { + return ((LineageStubSettings) getStubSettings()).createProcessSettings(); + } + + /** Returns the object with the settings used for calls to updateProcess. */ + public UnaryCallSettings updateProcessSettings() { + return ((LineageStubSettings) getStubSettings()).updateProcessSettings(); + } + + /** Returns the object with the settings used for calls to getProcess. */ + public UnaryCallSettings getProcessSettings() { + return ((LineageStubSettings) getStubSettings()).getProcessSettings(); + } + + /** Returns the object with the settings used for calls to listProcesses. */ + public PagedCallSettings + listProcessesSettings() { + return ((LineageStubSettings) getStubSettings()).listProcessesSettings(); + } + + /** Returns the object with the settings used for calls to deleteProcess. */ + public UnaryCallSettings deleteProcessSettings() { + return ((LineageStubSettings) getStubSettings()).deleteProcessSettings(); + } + + /** Returns the object with the settings used for calls to deleteProcess. */ + public OperationCallSettings + deleteProcessOperationSettings() { + return ((LineageStubSettings) getStubSettings()).deleteProcessOperationSettings(); + } + + /** Returns the object with the settings used for calls to createRun. */ + public UnaryCallSettings createRunSettings() { + return ((LineageStubSettings) getStubSettings()).createRunSettings(); + } + + /** Returns the object with the settings used for calls to updateRun. */ + public UnaryCallSettings updateRunSettings() { + return ((LineageStubSettings) getStubSettings()).updateRunSettings(); + } + + /** Returns the object with the settings used for calls to getRun. */ + public UnaryCallSettings getRunSettings() { + return ((LineageStubSettings) getStubSettings()).getRunSettings(); + } + + /** Returns the object with the settings used for calls to listRuns. */ + public PagedCallSettings + listRunsSettings() { + return ((LineageStubSettings) getStubSettings()).listRunsSettings(); + } + + /** Returns the object with the settings used for calls to deleteRun. */ + public UnaryCallSettings deleteRunSettings() { + return ((LineageStubSettings) getStubSettings()).deleteRunSettings(); + } + + /** Returns the object with the settings used for calls to deleteRun. */ + public OperationCallSettings + deleteRunOperationSettings() { + return ((LineageStubSettings) getStubSettings()).deleteRunOperationSettings(); + } + + /** Returns the object with the settings used for calls to createLineageEvent. */ + public UnaryCallSettings createLineageEventSettings() { + return ((LineageStubSettings) getStubSettings()).createLineageEventSettings(); + } + + /** Returns the object with the settings used for calls to getLineageEvent. */ + public UnaryCallSettings getLineageEventSettings() { + return ((LineageStubSettings) getStubSettings()).getLineageEventSettings(); + } + + /** Returns the object with the settings used for calls to listLineageEvents. */ + public PagedCallSettings< + ListLineageEventsRequest, ListLineageEventsResponse, ListLineageEventsPagedResponse> + listLineageEventsSettings() { + return ((LineageStubSettings) getStubSettings()).listLineageEventsSettings(); + } + + /** Returns the object with the settings used for calls to deleteLineageEvent. */ + public UnaryCallSettings deleteLineageEventSettings() { + return ((LineageStubSettings) getStubSettings()).deleteLineageEventSettings(); + } + + /** Returns the object with the settings used for calls to searchLinks. */ + public PagedCallSettings + searchLinksSettings() { + return ((LineageStubSettings) getStubSettings()).searchLinksSettings(); + } + + /** Returns the object with the settings used for calls to batchSearchLinkProcesses. */ + public PagedCallSettings< + BatchSearchLinkProcessesRequest, + BatchSearchLinkProcessesResponse, + BatchSearchLinkProcessesPagedResponse> + batchSearchLinkProcessesSettings() { + return ((LineageStubSettings) getStubSettings()).batchSearchLinkProcessesSettings(); + } + + public static final LineageSettings create(LineageStubSettings stub) throws IOException { + return new LineageSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return LineageStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return LineageStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return LineageStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return LineageStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return LineageStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return LineageStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return LineageStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return LineageStubSettings.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 LineageSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for LineageSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(LineageStubSettings.newBuilder(clientContext)); + } + + protected Builder(LineageSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(LineageStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(LineageStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(LineageStubSettings.newHttpJsonBuilder()); + } + + public LineageStubSettings.Builder getStubSettingsBuilder() { + return ((LineageStubSettings.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 createProcess. */ + public UnaryCallSettings.Builder createProcessSettings() { + return getStubSettingsBuilder().createProcessSettings(); + } + + /** Returns the builder for the settings used for calls to updateProcess. */ + public UnaryCallSettings.Builder updateProcessSettings() { + return getStubSettingsBuilder().updateProcessSettings(); + } + + /** Returns the builder for the settings used for calls to getProcess. */ + public UnaryCallSettings.Builder getProcessSettings() { + return getStubSettingsBuilder().getProcessSettings(); + } + + /** Returns the builder for the settings used for calls to listProcesses. */ + public PagedCallSettings.Builder< + ListProcessesRequest, ListProcessesResponse, ListProcessesPagedResponse> + listProcessesSettings() { + return getStubSettingsBuilder().listProcessesSettings(); + } + + /** Returns the builder for the settings used for calls to deleteProcess. */ + public UnaryCallSettings.Builder deleteProcessSettings() { + return getStubSettingsBuilder().deleteProcessSettings(); + } + + /** Returns the builder for the settings used for calls to deleteProcess. */ + public OperationCallSettings.Builder + deleteProcessOperationSettings() { + return getStubSettingsBuilder().deleteProcessOperationSettings(); + } + + /** Returns the builder for the settings used for calls to createRun. */ + public UnaryCallSettings.Builder createRunSettings() { + return getStubSettingsBuilder().createRunSettings(); + } + + /** Returns the builder for the settings used for calls to updateRun. */ + public UnaryCallSettings.Builder updateRunSettings() { + return getStubSettingsBuilder().updateRunSettings(); + } + + /** Returns the builder for the settings used for calls to getRun. */ + public UnaryCallSettings.Builder getRunSettings() { + return getStubSettingsBuilder().getRunSettings(); + } + + /** Returns the builder for the settings used for calls to listRuns. */ + public PagedCallSettings.Builder + listRunsSettings() { + return getStubSettingsBuilder().listRunsSettings(); + } + + /** Returns the builder for the settings used for calls to deleteRun. */ + public UnaryCallSettings.Builder deleteRunSettings() { + return getStubSettingsBuilder().deleteRunSettings(); + } + + /** Returns the builder for the settings used for calls to deleteRun. */ + public OperationCallSettings.Builder + deleteRunOperationSettings() { + return getStubSettingsBuilder().deleteRunOperationSettings(); + } + + /** Returns the builder for the settings used for calls to createLineageEvent. */ + public UnaryCallSettings.Builder + createLineageEventSettings() { + return getStubSettingsBuilder().createLineageEventSettings(); + } + + /** Returns the builder for the settings used for calls to getLineageEvent. */ + public UnaryCallSettings.Builder + getLineageEventSettings() { + return getStubSettingsBuilder().getLineageEventSettings(); + } + + /** Returns the builder for the settings used for calls to listLineageEvents. */ + public PagedCallSettings.Builder< + ListLineageEventsRequest, ListLineageEventsResponse, ListLineageEventsPagedResponse> + listLineageEventsSettings() { + return getStubSettingsBuilder().listLineageEventsSettings(); + } + + /** Returns the builder for the settings used for calls to deleteLineageEvent. */ + public UnaryCallSettings.Builder + deleteLineageEventSettings() { + return getStubSettingsBuilder().deleteLineageEventSettings(); + } + + /** Returns the builder for the settings used for calls to searchLinks. */ + public PagedCallSettings.Builder< + SearchLinksRequest, SearchLinksResponse, SearchLinksPagedResponse> + searchLinksSettings() { + return getStubSettingsBuilder().searchLinksSettings(); + } + + /** Returns the builder for the settings used for calls to batchSearchLinkProcesses. */ + public PagedCallSettings.Builder< + BatchSearchLinkProcessesRequest, + BatchSearchLinkProcessesResponse, + BatchSearchLinkProcessesPagedResponse> + batchSearchLinkProcessesSettings() { + return getStubSettingsBuilder().batchSearchLinkProcessesSettings(); + } + + @Override + public LineageSettings build() throws IOException { + return new LineageSettings(this); + } + } +} diff --git a/java-datalineage/google-cloud-datalineage/src/main/java/com/google/cloud/datacatalog/lineage/v1/gapic_metadata.json b/java-datalineage/google-cloud-datalineage/src/main/java/com/google/cloud/datacatalog/lineage/v1/gapic_metadata.json new file mode 100644 index 000000000000..ee3a155cf465 --- /dev/null +++ b/java-datalineage/google-cloud-datalineage/src/main/java/com/google/cloud/datacatalog/lineage/v1/gapic_metadata.json @@ -0,0 +1,66 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.datacatalog.lineage.v1", + "libraryPackage": "com.google.cloud.datacatalog.lineage.v1", + "services": { + "Lineage": { + "clients": { + "grpc": { + "libraryClient": "LineageClient", + "rpcs": { + "BatchSearchLinkProcesses": { + "methods": ["batchSearchLinkProcesses", "batchSearchLinkProcessesPagedCallable", "batchSearchLinkProcessesCallable"] + }, + "CreateLineageEvent": { + "methods": ["createLineageEvent", "createLineageEvent", "createLineageEvent", "createLineageEventCallable"] + }, + "CreateProcess": { + "methods": ["createProcess", "createProcess", "createProcess", "createProcessCallable"] + }, + "CreateRun": { + "methods": ["createRun", "createRun", "createRun", "createRunCallable"] + }, + "DeleteLineageEvent": { + "methods": ["deleteLineageEvent", "deleteLineageEvent", "deleteLineageEvent", "deleteLineageEventCallable"] + }, + "DeleteProcess": { + "methods": ["deleteProcessAsync", "deleteProcessAsync", "deleteProcessAsync", "deleteProcessOperationCallable", "deleteProcessCallable"] + }, + "DeleteRun": { + "methods": ["deleteRunAsync", "deleteRunAsync", "deleteRunAsync", "deleteRunOperationCallable", "deleteRunCallable"] + }, + "GetLineageEvent": { + "methods": ["getLineageEvent", "getLineageEvent", "getLineageEvent", "getLineageEventCallable"] + }, + "GetProcess": { + "methods": ["getProcess", "getProcess", "getProcess", "getProcessCallable"] + }, + "GetRun": { + "methods": ["getRun", "getRun", "getRun", "getRunCallable"] + }, + "ListLineageEvents": { + "methods": ["listLineageEvents", "listLineageEvents", "listLineageEvents", "listLineageEventsPagedCallable", "listLineageEventsCallable"] + }, + "ListProcesses": { + "methods": ["listProcesses", "listProcesses", "listProcesses", "listProcessesPagedCallable", "listProcessesCallable"] + }, + "ListRuns": { + "methods": ["listRuns", "listRuns", "listRuns", "listRunsPagedCallable", "listRunsCallable"] + }, + "SearchLinks": { + "methods": ["searchLinks", "searchLinksPagedCallable", "searchLinksCallable"] + }, + "UpdateProcess": { + "methods": ["updateProcess", "updateProcess", "updateProcessCallable"] + }, + "UpdateRun": { + "methods": ["updateRun", "updateRun", "updateRunCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-datalineage/google-cloud-datalineage/src/main/java/com/google/cloud/datacatalog/lineage/v1/package-info.java b/java-datalineage/google-cloud-datalineage/src/main/java/com/google/cloud/datacatalog/lineage/v1/package-info.java new file mode 100644 index 000000000000..31671ce445ef --- /dev/null +++ b/java-datalineage/google-cloud-datalineage/src/main/java/com/google/cloud/datacatalog/lineage/v1/package-info.java @@ -0,0 +1,47 @@ +/* + * 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 Data Lineage API + * + *

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

======================= LineageClient ======================= + * + *

Service Description: Lineage is used to track data flows between assets over time. You can + * create [LineageEvents][google.cloud.datacatalog.lineage.v1.LineageEvent] to record lineage + * between multiple sources and a single target, for example, when table data is based on data from + * multiple tables. + * + *

Sample for LineageClient: + * + *

{@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 (LineageClient lineageClient = LineageClient.create()) {
+ *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ *   Process process = Process.newBuilder().build();
+ *   Process response = lineageClient.createProcess(parent, process);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.datacatalog.lineage.v1; + +import javax.annotation.Generated; diff --git a/java-datalineage/google-cloud-datalineage/src/main/java/com/google/cloud/datacatalog/lineage/v1/stub/GrpcLineageCallableFactory.java b/java-datalineage/google-cloud-datalineage/src/main/java/com/google/cloud/datacatalog/lineage/v1/stub/GrpcLineageCallableFactory.java new file mode 100644 index 000000000000..03e4af1d6a05 --- /dev/null +++ b/java-datalineage/google-cloud-datalineage/src/main/java/com/google/cloud/datacatalog/lineage/v1/stub/GrpcLineageCallableFactory.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.datacatalog.lineage.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 Lineage service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcLineageCallableFactory 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-datalineage/google-cloud-datalineage/src/main/java/com/google/cloud/datacatalog/lineage/v1/stub/GrpcLineageStub.java b/java-datalineage/google-cloud-datalineage/src/main/java/com/google/cloud/datacatalog/lineage/v1/stub/GrpcLineageStub.java new file mode 100644 index 000000000000..f7e4c5f3dfa5 --- /dev/null +++ b/java-datalineage/google-cloud-datalineage/src/main/java/com/google/cloud/datacatalog/lineage/v1/stub/GrpcLineageStub.java @@ -0,0 +1,719 @@ +/* + * 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.datacatalog.lineage.v1.stub; + +import static com.google.cloud.datacatalog.lineage.v1.LineageClient.BatchSearchLinkProcessesPagedResponse; +import static com.google.cloud.datacatalog.lineage.v1.LineageClient.ListLineageEventsPagedResponse; +import static com.google.cloud.datacatalog.lineage.v1.LineageClient.ListProcessesPagedResponse; +import static com.google.cloud.datacatalog.lineage.v1.LineageClient.ListRunsPagedResponse; +import static com.google.cloud.datacatalog.lineage.v1.LineageClient.SearchLinksPagedResponse; + +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.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest; +import com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse; +import com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest; +import com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest; +import com.google.cloud.datacatalog.lineage.v1.CreateRunRequest; +import com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest; +import com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest; +import com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest; +import com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest; +import com.google.cloud.datacatalog.lineage.v1.GetProcessRequest; +import com.google.cloud.datacatalog.lineage.v1.GetRunRequest; +import com.google.cloud.datacatalog.lineage.v1.LineageEvent; +import com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest; +import com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse; +import com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest; +import com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse; +import com.google.cloud.datacatalog.lineage.v1.ListRunsRequest; +import com.google.cloud.datacatalog.lineage.v1.ListRunsResponse; +import com.google.cloud.datacatalog.lineage.v1.OperationMetadata; +import com.google.cloud.datacatalog.lineage.v1.Process; +import com.google.cloud.datacatalog.lineage.v1.Run; +import com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest; +import com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse; +import com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest; +import com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +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 Lineage service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcLineageStub extends LineageStub { + private static final MethodDescriptor + createProcessMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.lineage.v1.Lineage/CreateProcess") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateProcessRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Process.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateProcessMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.lineage.v1.Lineage/UpdateProcess") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateProcessRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Process.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getProcessMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.lineage.v1.Lineage/GetProcess") + .setRequestMarshaller(ProtoUtils.marshaller(GetProcessRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Process.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listProcessesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.lineage.v1.Lineage/ListProcesses") + .setRequestMarshaller( + ProtoUtils.marshaller(ListProcessesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListProcessesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteProcessMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.lineage.v1.Lineage/DeleteProcess") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteProcessRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor createRunMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.lineage.v1.Lineage/CreateRun") + .setRequestMarshaller(ProtoUtils.marshaller(CreateRunRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Run.getDefaultInstance())) + .build(); + + private static final MethodDescriptor updateRunMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.lineage.v1.Lineage/UpdateRun") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateRunRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Run.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getRunMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.lineage.v1.Lineage/GetRun") + .setRequestMarshaller(ProtoUtils.marshaller(GetRunRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Run.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listRunsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.lineage.v1.Lineage/ListRuns") + .setRequestMarshaller(ProtoUtils.marshaller(ListRunsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListRunsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor deleteRunMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.lineage.v1.Lineage/DeleteRun") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteRunRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createLineageEventMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.lineage.v1.Lineage/CreateLineageEvent") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateLineageEventRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(LineageEvent.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getLineageEventMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.lineage.v1.Lineage/GetLineageEvent") + .setRequestMarshaller( + ProtoUtils.marshaller(GetLineageEventRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(LineageEvent.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listLineageEventsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.lineage.v1.Lineage/ListLineageEvents") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLineageEventsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLineageEventsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteLineageEventMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.lineage.v1.Lineage/DeleteLineageEvent") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteLineageEventRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + searchLinksMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.lineage.v1.Lineage/SearchLinks") + .setRequestMarshaller(ProtoUtils.marshaller(SearchLinksRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(SearchLinksResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + BatchSearchLinkProcessesRequest, BatchSearchLinkProcessesResponse> + batchSearchLinkProcessesMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.datacatalog.lineage.v1.Lineage/BatchSearchLinkProcesses") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchSearchLinkProcessesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(BatchSearchLinkProcessesResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable createProcessCallable; + private final UnaryCallable updateProcessCallable; + private final UnaryCallable getProcessCallable; + private final UnaryCallable listProcessesCallable; + private final UnaryCallable + listProcessesPagedCallable; + private final UnaryCallable deleteProcessCallable; + private final OperationCallable + deleteProcessOperationCallable; + private final UnaryCallable createRunCallable; + private final UnaryCallable updateRunCallable; + private final UnaryCallable getRunCallable; + private final UnaryCallable listRunsCallable; + private final UnaryCallable listRunsPagedCallable; + private final UnaryCallable deleteRunCallable; + private final OperationCallable + deleteRunOperationCallable; + private final UnaryCallable createLineageEventCallable; + private final UnaryCallable getLineageEventCallable; + private final UnaryCallable + listLineageEventsCallable; + private final UnaryCallable + listLineageEventsPagedCallable; + private final UnaryCallable deleteLineageEventCallable; + private final UnaryCallable searchLinksCallable; + private final UnaryCallable + searchLinksPagedCallable; + private final UnaryCallable + batchSearchLinkProcessesCallable; + private final UnaryCallable< + BatchSearchLinkProcessesRequest, BatchSearchLinkProcessesPagedResponse> + batchSearchLinkProcessesPagedCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcLineageStub create(LineageStubSettings settings) throws IOException { + return new GrpcLineageStub(settings, ClientContext.create(settings)); + } + + public static final GrpcLineageStub create(ClientContext clientContext) throws IOException { + return new GrpcLineageStub(LineageStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcLineageStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcLineageStub( + LineageStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcLineageStub, 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 GrpcLineageStub(LineageStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcLineageCallableFactory()); + } + + /** + * Constructs an instance of GrpcLineageStub, 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 GrpcLineageStub( + LineageStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createProcessTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createProcessMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings updateProcessTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateProcessMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("process.name", String.valueOf(request.getProcess().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings getProcessTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getProcessMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings listProcessesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listProcessesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteProcessTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteProcessMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createRunTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createRunMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings updateRunTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateRunMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("run.name", String.valueOf(request.getRun().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings getRunTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getRunMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings listRunsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listRunsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteRunTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteRunMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createLineageEventTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createLineageEventMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getLineageEventTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLineageEventMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listLineageEventsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLineageEventsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteLineageEventTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteLineageEventMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings searchLinksTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(searchLinksMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + batchSearchLinkProcessesTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(batchSearchLinkProcessesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + + this.createProcessCallable = + callableFactory.createUnaryCallable( + createProcessTransportSettings, settings.createProcessSettings(), clientContext); + this.updateProcessCallable = + callableFactory.createUnaryCallable( + updateProcessTransportSettings, settings.updateProcessSettings(), clientContext); + this.getProcessCallable = + callableFactory.createUnaryCallable( + getProcessTransportSettings, settings.getProcessSettings(), clientContext); + this.listProcessesCallable = + callableFactory.createUnaryCallable( + listProcessesTransportSettings, settings.listProcessesSettings(), clientContext); + this.listProcessesPagedCallable = + callableFactory.createPagedCallable( + listProcessesTransportSettings, settings.listProcessesSettings(), clientContext); + this.deleteProcessCallable = + callableFactory.createUnaryCallable( + deleteProcessTransportSettings, settings.deleteProcessSettings(), clientContext); + this.deleteProcessOperationCallable = + callableFactory.createOperationCallable( + deleteProcessTransportSettings, + settings.deleteProcessOperationSettings(), + clientContext, + operationsStub); + this.createRunCallable = + callableFactory.createUnaryCallable( + createRunTransportSettings, settings.createRunSettings(), clientContext); + this.updateRunCallable = + callableFactory.createUnaryCallable( + updateRunTransportSettings, settings.updateRunSettings(), clientContext); + this.getRunCallable = + callableFactory.createUnaryCallable( + getRunTransportSettings, settings.getRunSettings(), clientContext); + this.listRunsCallable = + callableFactory.createUnaryCallable( + listRunsTransportSettings, settings.listRunsSettings(), clientContext); + this.listRunsPagedCallable = + callableFactory.createPagedCallable( + listRunsTransportSettings, settings.listRunsSettings(), clientContext); + this.deleteRunCallable = + callableFactory.createUnaryCallable( + deleteRunTransportSettings, settings.deleteRunSettings(), clientContext); + this.deleteRunOperationCallable = + callableFactory.createOperationCallable( + deleteRunTransportSettings, + settings.deleteRunOperationSettings(), + clientContext, + operationsStub); + this.createLineageEventCallable = + callableFactory.createUnaryCallable( + createLineageEventTransportSettings, + settings.createLineageEventSettings(), + clientContext); + this.getLineageEventCallable = + callableFactory.createUnaryCallable( + getLineageEventTransportSettings, settings.getLineageEventSettings(), clientContext); + this.listLineageEventsCallable = + callableFactory.createUnaryCallable( + listLineageEventsTransportSettings, + settings.listLineageEventsSettings(), + clientContext); + this.listLineageEventsPagedCallable = + callableFactory.createPagedCallable( + listLineageEventsTransportSettings, + settings.listLineageEventsSettings(), + clientContext); + this.deleteLineageEventCallable = + callableFactory.createUnaryCallable( + deleteLineageEventTransportSettings, + settings.deleteLineageEventSettings(), + clientContext); + this.searchLinksCallable = + callableFactory.createUnaryCallable( + searchLinksTransportSettings, settings.searchLinksSettings(), clientContext); + this.searchLinksPagedCallable = + callableFactory.createPagedCallable( + searchLinksTransportSettings, settings.searchLinksSettings(), clientContext); + this.batchSearchLinkProcessesCallable = + callableFactory.createUnaryCallable( + batchSearchLinkProcessesTransportSettings, + settings.batchSearchLinkProcessesSettings(), + clientContext); + this.batchSearchLinkProcessesPagedCallable = + callableFactory.createPagedCallable( + batchSearchLinkProcessesTransportSettings, + settings.batchSearchLinkProcessesSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable createProcessCallable() { + return createProcessCallable; + } + + @Override + public UnaryCallable updateProcessCallable() { + return updateProcessCallable; + } + + @Override + public UnaryCallable getProcessCallable() { + return getProcessCallable; + } + + @Override + public UnaryCallable listProcessesCallable() { + return listProcessesCallable; + } + + @Override + public UnaryCallable + listProcessesPagedCallable() { + return listProcessesPagedCallable; + } + + @Override + public UnaryCallable deleteProcessCallable() { + return deleteProcessCallable; + } + + @Override + public OperationCallable + deleteProcessOperationCallable() { + return deleteProcessOperationCallable; + } + + @Override + public UnaryCallable createRunCallable() { + return createRunCallable; + } + + @Override + public UnaryCallable updateRunCallable() { + return updateRunCallable; + } + + @Override + public UnaryCallable getRunCallable() { + return getRunCallable; + } + + @Override + public UnaryCallable listRunsCallable() { + return listRunsCallable; + } + + @Override + public UnaryCallable listRunsPagedCallable() { + return listRunsPagedCallable; + } + + @Override + public UnaryCallable deleteRunCallable() { + return deleteRunCallable; + } + + @Override + public OperationCallable + deleteRunOperationCallable() { + return deleteRunOperationCallable; + } + + @Override + public UnaryCallable createLineageEventCallable() { + return createLineageEventCallable; + } + + @Override + public UnaryCallable getLineageEventCallable() { + return getLineageEventCallable; + } + + @Override + public UnaryCallable + listLineageEventsCallable() { + return listLineageEventsCallable; + } + + @Override + public UnaryCallable + listLineageEventsPagedCallable() { + return listLineageEventsPagedCallable; + } + + @Override + public UnaryCallable deleteLineageEventCallable() { + return deleteLineageEventCallable; + } + + @Override + public UnaryCallable searchLinksCallable() { + return searchLinksCallable; + } + + @Override + public UnaryCallable searchLinksPagedCallable() { + return searchLinksPagedCallable; + } + + @Override + public UnaryCallable + batchSearchLinkProcessesCallable() { + return batchSearchLinkProcessesCallable; + } + + @Override + public UnaryCallable + batchSearchLinkProcessesPagedCallable() { + return batchSearchLinkProcessesPagedCallable; + } + + @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-datalineage/google-cloud-datalineage/src/main/java/com/google/cloud/datacatalog/lineage/v1/stub/HttpJsonLineageCallableFactory.java b/java-datalineage/google-cloud-datalineage/src/main/java/com/google/cloud/datacatalog/lineage/v1/stub/HttpJsonLineageCallableFactory.java new file mode 100644 index 000000000000..549b4263e652 --- /dev/null +++ b/java-datalineage/google-cloud-datalineage/src/main/java/com/google/cloud/datacatalog/lineage/v1/stub/HttpJsonLineageCallableFactory.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.datacatalog.lineage.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 Lineage service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonLineageCallableFactory + 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-datalineage/google-cloud-datalineage/src/main/java/com/google/cloud/datacatalog/lineage/v1/stub/HttpJsonLineageStub.java b/java-datalineage/google-cloud-datalineage/src/main/java/com/google/cloud/datacatalog/lineage/v1/stub/HttpJsonLineageStub.java new file mode 100644 index 000000000000..97af59d4ada6 --- /dev/null +++ b/java-datalineage/google-cloud-datalineage/src/main/java/com/google/cloud/datacatalog/lineage/v1/stub/HttpJsonLineageStub.java @@ -0,0 +1,1111 @@ +/* + * 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.datacatalog.lineage.v1.stub; + +import static com.google.cloud.datacatalog.lineage.v1.LineageClient.BatchSearchLinkProcessesPagedResponse; +import static com.google.cloud.datacatalog.lineage.v1.LineageClient.ListLineageEventsPagedResponse; +import static com.google.cloud.datacatalog.lineage.v1.LineageClient.ListProcessesPagedResponse; +import static com.google.cloud.datacatalog.lineage.v1.LineageClient.ListRunsPagedResponse; +import static com.google.cloud.datacatalog.lineage.v1.LineageClient.SearchLinksPagedResponse; + +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.HttpJsonOperationSnapshot; +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.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest; +import com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse; +import com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest; +import com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest; +import com.google.cloud.datacatalog.lineage.v1.CreateRunRequest; +import com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest; +import com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest; +import com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest; +import com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest; +import com.google.cloud.datacatalog.lineage.v1.GetProcessRequest; +import com.google.cloud.datacatalog.lineage.v1.GetRunRequest; +import com.google.cloud.datacatalog.lineage.v1.LineageEvent; +import com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest; +import com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse; +import com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest; +import com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse; +import com.google.cloud.datacatalog.lineage.v1.ListRunsRequest; +import com.google.cloud.datacatalog.lineage.v1.ListRunsResponse; +import com.google.cloud.datacatalog.lineage.v1.OperationMetadata; +import com.google.cloud.datacatalog.lineage.v1.Process; +import com.google.cloud.datacatalog.lineage.v1.Run; +import com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest; +import com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse; +import com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest; +import com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest; +import com.google.longrunning.Operation; +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 Lineage service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonLineageStub extends LineageStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(OperationMetadata.getDescriptor()) + .add(Empty.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + createProcessMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.datacatalog.lineage.v1.Lineage/CreateProcess") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/processes", + 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, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("process", request.getProcess(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Process.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateProcessMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.datacatalog.lineage.v1.Lineage/UpdateProcess") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{process.name=projects/*/locations/*/processes/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "process.name", request.getProcess().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "allowMissing", request.getAllowMissing()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("process", request.getProcess(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Process.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getProcessMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.datacatalog.lineage.v1.Lineage/GetProcess") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/processes/*}", + 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(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Process.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listProcessesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.datacatalog.lineage.v1.Lineage/ListProcesses") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/processes", + 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, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListProcessesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteProcessMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.datacatalog.lineage.v1.Lineage/DeleteProcess") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/processes/*}", + 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(); + serializer.putQueryParam( + fields, "allowMissing", request.getAllowMissing()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteProcessRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor createRunMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.datacatalog.lineage.v1.Lineage/CreateRun") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/processes/*}/runs", + 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, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> ProtoRestSerializer.create().toBody("run", request.getRun(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Run.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor updateRunMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.datacatalog.lineage.v1.Lineage/UpdateRun") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{run.name=projects/*/locations/*/processes/*/runs/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "run.name", request.getRun().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> ProtoRestSerializer.create().toBody("run", request.getRun(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Run.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getRunMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.datacatalog.lineage.v1.Lineage/GetRun") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/processes/*/runs/*}", + 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(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Run.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listRunsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.datacatalog.lineage.v1.Lineage/ListRuns") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/processes/*}/runs", + 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, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListRunsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor deleteRunMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.datacatalog.lineage.v1.Lineage/DeleteRun") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/processes/*/runs/*}", + 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(); + serializer.putQueryParam(fields, "allowMissing", request.getAllowMissing()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteRunRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + createLineageEventMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.datacatalog.lineage.v1.Lineage/CreateLineageEvent") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/processes/*/runs/*}/lineageEvents", + 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, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("lineageEvent", request.getLineageEvent(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(LineageEvent.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLineageEventMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.datacatalog.lineage.v1.Lineage/GetLineageEvent") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/processes/*/runs/*/lineageEvents/*}", + 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(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(LineageEvent.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listLineageEventsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.datacatalog.lineage.v1.Lineage/ListLineageEvents") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/processes/*/runs/*}/lineageEvents", + 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, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListLineageEventsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteLineageEventMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.datacatalog.lineage.v1.Lineage/DeleteLineageEvent") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/processes/*/runs/*/lineageEvents/*}", + 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(); + serializer.putQueryParam( + fields, "allowMissing", request.getAllowMissing()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + searchLinksMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.datacatalog.lineage.v1.Lineage/SearchLinks") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}:searchLinks", + 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, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SearchLinksResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + BatchSearchLinkProcessesRequest, BatchSearchLinkProcessesResponse> + batchSearchLinkProcessesMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.datacatalog.lineage.v1.Lineage/BatchSearchLinkProcesses") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}:batchSearchLinkProcesses", + 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, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(BatchSearchLinkProcessesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable createProcessCallable; + private final UnaryCallable updateProcessCallable; + private final UnaryCallable getProcessCallable; + private final UnaryCallable listProcessesCallable; + private final UnaryCallable + listProcessesPagedCallable; + private final UnaryCallable deleteProcessCallable; + private final OperationCallable + deleteProcessOperationCallable; + private final UnaryCallable createRunCallable; + private final UnaryCallable updateRunCallable; + private final UnaryCallable getRunCallable; + private final UnaryCallable listRunsCallable; + private final UnaryCallable listRunsPagedCallable; + private final UnaryCallable deleteRunCallable; + private final OperationCallable + deleteRunOperationCallable; + private final UnaryCallable createLineageEventCallable; + private final UnaryCallable getLineageEventCallable; + private final UnaryCallable + listLineageEventsCallable; + private final UnaryCallable + listLineageEventsPagedCallable; + private final UnaryCallable deleteLineageEventCallable; + private final UnaryCallable searchLinksCallable; + private final UnaryCallable + searchLinksPagedCallable; + private final UnaryCallable + batchSearchLinkProcessesCallable; + private final UnaryCallable< + BatchSearchLinkProcessesRequest, BatchSearchLinkProcessesPagedResponse> + batchSearchLinkProcessesPagedCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonLineageStub create(LineageStubSettings settings) throws IOException { + return new HttpJsonLineageStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonLineageStub create(ClientContext clientContext) throws IOException { + return new HttpJsonLineageStub(LineageStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonLineageStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonLineageStub( + LineageStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonLineageStub, 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 HttpJsonLineageStub(LineageStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonLineageCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonLineageStub, 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 HttpJsonLineageStub( + LineageStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry); + + HttpJsonCallSettings createProcessTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createProcessMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings updateProcessTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateProcessMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getProcessTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getProcessMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listProcessesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listProcessesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteProcessTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteProcessMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings createRunTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createRunMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings updateRunTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateRunMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getRunTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getRunMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings listRunsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listRunsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteRunTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteRunMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + createLineageEventTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createLineageEventMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getLineageEventTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLineageEventMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listLineageEventsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLineageEventsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteLineageEventTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteLineageEventMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings searchLinksTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(searchLinksMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + batchSearchLinkProcessesTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(batchSearchLinkProcessesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.createProcessCallable = + callableFactory.createUnaryCallable( + createProcessTransportSettings, settings.createProcessSettings(), clientContext); + this.updateProcessCallable = + callableFactory.createUnaryCallable( + updateProcessTransportSettings, settings.updateProcessSettings(), clientContext); + this.getProcessCallable = + callableFactory.createUnaryCallable( + getProcessTransportSettings, settings.getProcessSettings(), clientContext); + this.listProcessesCallable = + callableFactory.createUnaryCallable( + listProcessesTransportSettings, settings.listProcessesSettings(), clientContext); + this.listProcessesPagedCallable = + callableFactory.createPagedCallable( + listProcessesTransportSettings, settings.listProcessesSettings(), clientContext); + this.deleteProcessCallable = + callableFactory.createUnaryCallable( + deleteProcessTransportSettings, settings.deleteProcessSettings(), clientContext); + this.deleteProcessOperationCallable = + callableFactory.createOperationCallable( + deleteProcessTransportSettings, + settings.deleteProcessOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.createRunCallable = + callableFactory.createUnaryCallable( + createRunTransportSettings, settings.createRunSettings(), clientContext); + this.updateRunCallable = + callableFactory.createUnaryCallable( + updateRunTransportSettings, settings.updateRunSettings(), clientContext); + this.getRunCallable = + callableFactory.createUnaryCallable( + getRunTransportSettings, settings.getRunSettings(), clientContext); + this.listRunsCallable = + callableFactory.createUnaryCallable( + listRunsTransportSettings, settings.listRunsSettings(), clientContext); + this.listRunsPagedCallable = + callableFactory.createPagedCallable( + listRunsTransportSettings, settings.listRunsSettings(), clientContext); + this.deleteRunCallable = + callableFactory.createUnaryCallable( + deleteRunTransportSettings, settings.deleteRunSettings(), clientContext); + this.deleteRunOperationCallable = + callableFactory.createOperationCallable( + deleteRunTransportSettings, + settings.deleteRunOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.createLineageEventCallable = + callableFactory.createUnaryCallable( + createLineageEventTransportSettings, + settings.createLineageEventSettings(), + clientContext); + this.getLineageEventCallable = + callableFactory.createUnaryCallable( + getLineageEventTransportSettings, settings.getLineageEventSettings(), clientContext); + this.listLineageEventsCallable = + callableFactory.createUnaryCallable( + listLineageEventsTransportSettings, + settings.listLineageEventsSettings(), + clientContext); + this.listLineageEventsPagedCallable = + callableFactory.createPagedCallable( + listLineageEventsTransportSettings, + settings.listLineageEventsSettings(), + clientContext); + this.deleteLineageEventCallable = + callableFactory.createUnaryCallable( + deleteLineageEventTransportSettings, + settings.deleteLineageEventSettings(), + clientContext); + this.searchLinksCallable = + callableFactory.createUnaryCallable( + searchLinksTransportSettings, settings.searchLinksSettings(), clientContext); + this.searchLinksPagedCallable = + callableFactory.createPagedCallable( + searchLinksTransportSettings, settings.searchLinksSettings(), clientContext); + this.batchSearchLinkProcessesCallable = + callableFactory.createUnaryCallable( + batchSearchLinkProcessesTransportSettings, + settings.batchSearchLinkProcessesSettings(), + clientContext); + this.batchSearchLinkProcessesPagedCallable = + callableFactory.createPagedCallable( + batchSearchLinkProcessesTransportSettings, + settings.batchSearchLinkProcessesSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(createProcessMethodDescriptor); + methodDescriptors.add(updateProcessMethodDescriptor); + methodDescriptors.add(getProcessMethodDescriptor); + methodDescriptors.add(listProcessesMethodDescriptor); + methodDescriptors.add(deleteProcessMethodDescriptor); + methodDescriptors.add(createRunMethodDescriptor); + methodDescriptors.add(updateRunMethodDescriptor); + methodDescriptors.add(getRunMethodDescriptor); + methodDescriptors.add(listRunsMethodDescriptor); + methodDescriptors.add(deleteRunMethodDescriptor); + methodDescriptors.add(createLineageEventMethodDescriptor); + methodDescriptors.add(getLineageEventMethodDescriptor); + methodDescriptors.add(listLineageEventsMethodDescriptor); + methodDescriptors.add(deleteLineageEventMethodDescriptor); + methodDescriptors.add(searchLinksMethodDescriptor); + methodDescriptors.add(batchSearchLinkProcessesMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable createProcessCallable() { + return createProcessCallable; + } + + @Override + public UnaryCallable updateProcessCallable() { + return updateProcessCallable; + } + + @Override + public UnaryCallable getProcessCallable() { + return getProcessCallable; + } + + @Override + public UnaryCallable listProcessesCallable() { + return listProcessesCallable; + } + + @Override + public UnaryCallable + listProcessesPagedCallable() { + return listProcessesPagedCallable; + } + + @Override + public UnaryCallable deleteProcessCallable() { + return deleteProcessCallable; + } + + @Override + public OperationCallable + deleteProcessOperationCallable() { + return deleteProcessOperationCallable; + } + + @Override + public UnaryCallable createRunCallable() { + return createRunCallable; + } + + @Override + public UnaryCallable updateRunCallable() { + return updateRunCallable; + } + + @Override + public UnaryCallable getRunCallable() { + return getRunCallable; + } + + @Override + public UnaryCallable listRunsCallable() { + return listRunsCallable; + } + + @Override + public UnaryCallable listRunsPagedCallable() { + return listRunsPagedCallable; + } + + @Override + public UnaryCallable deleteRunCallable() { + return deleteRunCallable; + } + + @Override + public OperationCallable + deleteRunOperationCallable() { + return deleteRunOperationCallable; + } + + @Override + public UnaryCallable createLineageEventCallable() { + return createLineageEventCallable; + } + + @Override + public UnaryCallable getLineageEventCallable() { + return getLineageEventCallable; + } + + @Override + public UnaryCallable + listLineageEventsCallable() { + return listLineageEventsCallable; + } + + @Override + public UnaryCallable + listLineageEventsPagedCallable() { + return listLineageEventsPagedCallable; + } + + @Override + public UnaryCallable deleteLineageEventCallable() { + return deleteLineageEventCallable; + } + + @Override + public UnaryCallable searchLinksCallable() { + return searchLinksCallable; + } + + @Override + public UnaryCallable searchLinksPagedCallable() { + return searchLinksPagedCallable; + } + + @Override + public UnaryCallable + batchSearchLinkProcessesCallable() { + return batchSearchLinkProcessesCallable; + } + + @Override + public UnaryCallable + batchSearchLinkProcessesPagedCallable() { + return batchSearchLinkProcessesPagedCallable; + } + + @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-datalineage/google-cloud-datalineage/src/main/java/com/google/cloud/datacatalog/lineage/v1/stub/LineageStub.java b/java-datalineage/google-cloud-datalineage/src/main/java/com/google/cloud/datacatalog/lineage/v1/stub/LineageStub.java new file mode 100644 index 000000000000..88f59a7527d0 --- /dev/null +++ b/java-datalineage/google-cloud-datalineage/src/main/java/com/google/cloud/datacatalog/lineage/v1/stub/LineageStub.java @@ -0,0 +1,177 @@ +/* + * 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.datacatalog.lineage.v1.stub; + +import static com.google.cloud.datacatalog.lineage.v1.LineageClient.BatchSearchLinkProcessesPagedResponse; +import static com.google.cloud.datacatalog.lineage.v1.LineageClient.ListLineageEventsPagedResponse; +import static com.google.cloud.datacatalog.lineage.v1.LineageClient.ListProcessesPagedResponse; +import static com.google.cloud.datacatalog.lineage.v1.LineageClient.ListRunsPagedResponse; +import static com.google.cloud.datacatalog.lineage.v1.LineageClient.SearchLinksPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest; +import com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse; +import com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest; +import com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest; +import com.google.cloud.datacatalog.lineage.v1.CreateRunRequest; +import com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest; +import com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest; +import com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest; +import com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest; +import com.google.cloud.datacatalog.lineage.v1.GetProcessRequest; +import com.google.cloud.datacatalog.lineage.v1.GetRunRequest; +import com.google.cloud.datacatalog.lineage.v1.LineageEvent; +import com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest; +import com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse; +import com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest; +import com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse; +import com.google.cloud.datacatalog.lineage.v1.ListRunsRequest; +import com.google.cloud.datacatalog.lineage.v1.ListRunsResponse; +import com.google.cloud.datacatalog.lineage.v1.OperationMetadata; +import com.google.cloud.datacatalog.lineage.v1.Process; +import com.google.cloud.datacatalog.lineage.v1.Run; +import com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest; +import com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse; +import com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest; +import com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the Lineage service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class LineageStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable createProcessCallable() { + throw new UnsupportedOperationException("Not implemented: createProcessCallable()"); + } + + public UnaryCallable updateProcessCallable() { + throw new UnsupportedOperationException("Not implemented: updateProcessCallable()"); + } + + public UnaryCallable getProcessCallable() { + throw new UnsupportedOperationException("Not implemented: getProcessCallable()"); + } + + public UnaryCallable + listProcessesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listProcessesPagedCallable()"); + } + + public UnaryCallable listProcessesCallable() { + throw new UnsupportedOperationException("Not implemented: listProcessesCallable()"); + } + + public OperationCallable + deleteProcessOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteProcessOperationCallable()"); + } + + public UnaryCallable deleteProcessCallable() { + throw new UnsupportedOperationException("Not implemented: deleteProcessCallable()"); + } + + public UnaryCallable createRunCallable() { + throw new UnsupportedOperationException("Not implemented: createRunCallable()"); + } + + public UnaryCallable updateRunCallable() { + throw new UnsupportedOperationException("Not implemented: updateRunCallable()"); + } + + public UnaryCallable getRunCallable() { + throw new UnsupportedOperationException("Not implemented: getRunCallable()"); + } + + public UnaryCallable listRunsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listRunsPagedCallable()"); + } + + public UnaryCallable listRunsCallable() { + throw new UnsupportedOperationException("Not implemented: listRunsCallable()"); + } + + public OperationCallable + deleteRunOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteRunOperationCallable()"); + } + + public UnaryCallable deleteRunCallable() { + throw new UnsupportedOperationException("Not implemented: deleteRunCallable()"); + } + + public UnaryCallable createLineageEventCallable() { + throw new UnsupportedOperationException("Not implemented: createLineageEventCallable()"); + } + + public UnaryCallable getLineageEventCallable() { + throw new UnsupportedOperationException("Not implemented: getLineageEventCallable()"); + } + + public UnaryCallable + listLineageEventsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLineageEventsPagedCallable()"); + } + + public UnaryCallable + listLineageEventsCallable() { + throw new UnsupportedOperationException("Not implemented: listLineageEventsCallable()"); + } + + public UnaryCallable deleteLineageEventCallable() { + throw new UnsupportedOperationException("Not implemented: deleteLineageEventCallable()"); + } + + public UnaryCallable searchLinksPagedCallable() { + throw new UnsupportedOperationException("Not implemented: searchLinksPagedCallable()"); + } + + public UnaryCallable searchLinksCallable() { + throw new UnsupportedOperationException("Not implemented: searchLinksCallable()"); + } + + public UnaryCallable + batchSearchLinkProcessesPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: batchSearchLinkProcessesPagedCallable()"); + } + + public UnaryCallable + batchSearchLinkProcessesCallable() { + throw new UnsupportedOperationException("Not implemented: batchSearchLinkProcessesCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-datalineage/google-cloud-datalineage/src/main/java/com/google/cloud/datacatalog/lineage/v1/stub/LineageStubSettings.java b/java-datalineage/google-cloud-datalineage/src/main/java/com/google/cloud/datacatalog/lineage/v1/stub/LineageStubSettings.java new file mode 100644 index 000000000000..bf4cd8c00b26 --- /dev/null +++ b/java-datalineage/google-cloud-datalineage/src/main/java/com/google/cloud/datacatalog/lineage/v1/stub/LineageStubSettings.java @@ -0,0 +1,1128 @@ +/* + * 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.datacatalog.lineage.v1.stub; + +import static com.google.cloud.datacatalog.lineage.v1.LineageClient.BatchSearchLinkProcessesPagedResponse; +import static com.google.cloud.datacatalog.lineage.v1.LineageClient.ListLineageEventsPagedResponse; +import static com.google.cloud.datacatalog.lineage.v1.LineageClient.ListProcessesPagedResponse; +import static com.google.cloud.datacatalog.lineage.v1.LineageClient.ListRunsPagedResponse; +import static com.google.cloud.datacatalog.lineage.v1.LineageClient.SearchLinksPagedResponse; + +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.grpc.ProtoOperationTransformers; +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.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +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.OperationCallSettings; +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.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest; +import com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse; +import com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest; +import com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest; +import com.google.cloud.datacatalog.lineage.v1.CreateRunRequest; +import com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest; +import com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest; +import com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest; +import com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest; +import com.google.cloud.datacatalog.lineage.v1.GetProcessRequest; +import com.google.cloud.datacatalog.lineage.v1.GetRunRequest; +import com.google.cloud.datacatalog.lineage.v1.LineageEvent; +import com.google.cloud.datacatalog.lineage.v1.Link; +import com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest; +import com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse; +import com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest; +import com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse; +import com.google.cloud.datacatalog.lineage.v1.ListRunsRequest; +import com.google.cloud.datacatalog.lineage.v1.ListRunsResponse; +import com.google.cloud.datacatalog.lineage.v1.OperationMetadata; +import com.google.cloud.datacatalog.lineage.v1.Process; +import com.google.cloud.datacatalog.lineage.v1.ProcessLinks; +import com.google.cloud.datacatalog.lineage.v1.Run; +import com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest; +import com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse; +import com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest; +import com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest; +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.longrunning.Operation; +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 LineageStub}. + * + *

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

    + *
  • The default service address (datalineage.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 createProcess 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
+ * LineageStubSettings.Builder lineageSettingsBuilder = LineageStubSettings.newBuilder();
+ * lineageSettingsBuilder
+ *     .createProcessSettings()
+ *     .setRetrySettings(
+ *         lineageSettingsBuilder
+ *             .createProcessSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * LineageStubSettings lineageSettings = lineageSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class LineageStubSettings 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 createProcessSettings; + private final UnaryCallSettings updateProcessSettings; + private final UnaryCallSettings getProcessSettings; + private final PagedCallSettings< + ListProcessesRequest, ListProcessesResponse, ListProcessesPagedResponse> + listProcessesSettings; + private final UnaryCallSettings deleteProcessSettings; + private final OperationCallSettings + deleteProcessOperationSettings; + private final UnaryCallSettings createRunSettings; + private final UnaryCallSettings updateRunSettings; + private final UnaryCallSettings getRunSettings; + private final PagedCallSettings + listRunsSettings; + private final UnaryCallSettings deleteRunSettings; + private final OperationCallSettings + deleteRunOperationSettings; + private final UnaryCallSettings + createLineageEventSettings; + private final UnaryCallSettings getLineageEventSettings; + private final PagedCallSettings< + ListLineageEventsRequest, ListLineageEventsResponse, ListLineageEventsPagedResponse> + listLineageEventsSettings; + private final UnaryCallSettings deleteLineageEventSettings; + private final PagedCallSettings + searchLinksSettings; + private final PagedCallSettings< + BatchSearchLinkProcessesRequest, + BatchSearchLinkProcessesResponse, + BatchSearchLinkProcessesPagedResponse> + batchSearchLinkProcessesSettings; + + private static final PagedListDescriptor + LIST_PROCESSES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListProcessesRequest injectToken(ListProcessesRequest payload, String token) { + return ListProcessesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListProcessesRequest injectPageSize(ListProcessesRequest payload, int pageSize) { + return ListProcessesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListProcessesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListProcessesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListProcessesResponse payload) { + return payload.getProcessesList() == null + ? ImmutableList.of() + : payload.getProcessesList(); + } + }; + + private static final PagedListDescriptor + LIST_RUNS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListRunsRequest injectToken(ListRunsRequest payload, String token) { + return ListRunsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListRunsRequest injectPageSize(ListRunsRequest payload, int pageSize) { + return ListRunsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListRunsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListRunsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListRunsResponse payload) { + return payload.getRunsList() == null + ? ImmutableList.of() + : payload.getRunsList(); + } + }; + + private static final PagedListDescriptor< + ListLineageEventsRequest, ListLineageEventsResponse, LineageEvent> + LIST_LINEAGE_EVENTS_PAGE_STR_DESC = + new PagedListDescriptor< + ListLineageEventsRequest, ListLineageEventsResponse, LineageEvent>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLineageEventsRequest injectToken( + ListLineageEventsRequest payload, String token) { + return ListLineageEventsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLineageEventsRequest injectPageSize( + ListLineageEventsRequest payload, int pageSize) { + return ListLineageEventsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLineageEventsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLineageEventsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLineageEventsResponse payload) { + return payload.getLineageEventsList() == null + ? ImmutableList.of() + : payload.getLineageEventsList(); + } + }; + + private static final PagedListDescriptor + SEARCH_LINKS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public SearchLinksRequest injectToken(SearchLinksRequest payload, String token) { + return SearchLinksRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public SearchLinksRequest injectPageSize(SearchLinksRequest payload, int pageSize) { + return SearchLinksRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(SearchLinksRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(SearchLinksResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(SearchLinksResponse payload) { + return payload.getLinksList() == null + ? ImmutableList.of() + : payload.getLinksList(); + } + }; + + private static final PagedListDescriptor< + BatchSearchLinkProcessesRequest, BatchSearchLinkProcessesResponse, ProcessLinks> + BATCH_SEARCH_LINK_PROCESSES_PAGE_STR_DESC = + new PagedListDescriptor< + BatchSearchLinkProcessesRequest, BatchSearchLinkProcessesResponse, ProcessLinks>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public BatchSearchLinkProcessesRequest injectToken( + BatchSearchLinkProcessesRequest payload, String token) { + return BatchSearchLinkProcessesRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public BatchSearchLinkProcessesRequest injectPageSize( + BatchSearchLinkProcessesRequest payload, int pageSize) { + return BatchSearchLinkProcessesRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(BatchSearchLinkProcessesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(BatchSearchLinkProcessesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + BatchSearchLinkProcessesResponse payload) { + return payload.getProcessLinksList() == null + ? ImmutableList.of() + : payload.getProcessLinksList(); + } + }; + + private static final PagedListResponseFactory< + ListProcessesRequest, ListProcessesResponse, ListProcessesPagedResponse> + LIST_PROCESSES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListProcessesRequest, ListProcessesResponse, ListProcessesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListProcessesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_PROCESSES_PAGE_STR_DESC, request, context); + return ListProcessesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListRunsRequest, ListRunsResponse, ListRunsPagedResponse> + LIST_RUNS_PAGE_STR_FACT = + new PagedListResponseFactory() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListRunsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_RUNS_PAGE_STR_DESC, request, context); + return ListRunsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLineageEventsRequest, ListLineageEventsResponse, ListLineageEventsPagedResponse> + LIST_LINEAGE_EVENTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLineageEventsRequest, + ListLineageEventsResponse, + ListLineageEventsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLineageEventsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_LINEAGE_EVENTS_PAGE_STR_DESC, request, context); + return ListLineageEventsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + SearchLinksRequest, SearchLinksResponse, SearchLinksPagedResponse> + SEARCH_LINKS_PAGE_STR_FACT = + new PagedListResponseFactory< + SearchLinksRequest, SearchLinksResponse, SearchLinksPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + SearchLinksRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, SEARCH_LINKS_PAGE_STR_DESC, request, context); + return SearchLinksPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + BatchSearchLinkProcessesRequest, + BatchSearchLinkProcessesResponse, + BatchSearchLinkProcessesPagedResponse> + BATCH_SEARCH_LINK_PROCESSES_PAGE_STR_FACT = + new PagedListResponseFactory< + BatchSearchLinkProcessesRequest, + BatchSearchLinkProcessesResponse, + BatchSearchLinkProcessesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + BatchSearchLinkProcessesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + BatchSearchLinkProcessesRequest, + BatchSearchLinkProcessesResponse, + ProcessLinks> + pageContext = + PageContext.create( + callable, BATCH_SEARCH_LINK_PROCESSES_PAGE_STR_DESC, request, context); + return BatchSearchLinkProcessesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createProcess. */ + public UnaryCallSettings createProcessSettings() { + return createProcessSettings; + } + + /** Returns the object with the settings used for calls to updateProcess. */ + public UnaryCallSettings updateProcessSettings() { + return updateProcessSettings; + } + + /** Returns the object with the settings used for calls to getProcess. */ + public UnaryCallSettings getProcessSettings() { + return getProcessSettings; + } + + /** Returns the object with the settings used for calls to listProcesses. */ + public PagedCallSettings + listProcessesSettings() { + return listProcessesSettings; + } + + /** Returns the object with the settings used for calls to deleteProcess. */ + public UnaryCallSettings deleteProcessSettings() { + return deleteProcessSettings; + } + + /** Returns the object with the settings used for calls to deleteProcess. */ + public OperationCallSettings + deleteProcessOperationSettings() { + return deleteProcessOperationSettings; + } + + /** Returns the object with the settings used for calls to createRun. */ + public UnaryCallSettings createRunSettings() { + return createRunSettings; + } + + /** Returns the object with the settings used for calls to updateRun. */ + public UnaryCallSettings updateRunSettings() { + return updateRunSettings; + } + + /** Returns the object with the settings used for calls to getRun. */ + public UnaryCallSettings getRunSettings() { + return getRunSettings; + } + + /** Returns the object with the settings used for calls to listRuns. */ + public PagedCallSettings + listRunsSettings() { + return listRunsSettings; + } + + /** Returns the object with the settings used for calls to deleteRun. */ + public UnaryCallSettings deleteRunSettings() { + return deleteRunSettings; + } + + /** Returns the object with the settings used for calls to deleteRun. */ + public OperationCallSettings + deleteRunOperationSettings() { + return deleteRunOperationSettings; + } + + /** Returns the object with the settings used for calls to createLineageEvent. */ + public UnaryCallSettings createLineageEventSettings() { + return createLineageEventSettings; + } + + /** Returns the object with the settings used for calls to getLineageEvent. */ + public UnaryCallSettings getLineageEventSettings() { + return getLineageEventSettings; + } + + /** Returns the object with the settings used for calls to listLineageEvents. */ + public PagedCallSettings< + ListLineageEventsRequest, ListLineageEventsResponse, ListLineageEventsPagedResponse> + listLineageEventsSettings() { + return listLineageEventsSettings; + } + + /** Returns the object with the settings used for calls to deleteLineageEvent. */ + public UnaryCallSettings deleteLineageEventSettings() { + return deleteLineageEventSettings; + } + + /** Returns the object with the settings used for calls to searchLinks. */ + public PagedCallSettings + searchLinksSettings() { + return searchLinksSettings; + } + + /** Returns the object with the settings used for calls to batchSearchLinkProcesses. */ + public PagedCallSettings< + BatchSearchLinkProcessesRequest, + BatchSearchLinkProcessesResponse, + BatchSearchLinkProcessesPagedResponse> + batchSearchLinkProcessesSettings() { + return batchSearchLinkProcessesSettings; + } + + public LineageStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcLineageStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonLineageStub.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 "datalineage.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "datalineage.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(LineageStubSettings.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(LineageStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return LineageStubSettings.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 LineageStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createProcessSettings = settingsBuilder.createProcessSettings().build(); + updateProcessSettings = settingsBuilder.updateProcessSettings().build(); + getProcessSettings = settingsBuilder.getProcessSettings().build(); + listProcessesSettings = settingsBuilder.listProcessesSettings().build(); + deleteProcessSettings = settingsBuilder.deleteProcessSettings().build(); + deleteProcessOperationSettings = settingsBuilder.deleteProcessOperationSettings().build(); + createRunSettings = settingsBuilder.createRunSettings().build(); + updateRunSettings = settingsBuilder.updateRunSettings().build(); + getRunSettings = settingsBuilder.getRunSettings().build(); + listRunsSettings = settingsBuilder.listRunsSettings().build(); + deleteRunSettings = settingsBuilder.deleteRunSettings().build(); + deleteRunOperationSettings = settingsBuilder.deleteRunOperationSettings().build(); + createLineageEventSettings = settingsBuilder.createLineageEventSettings().build(); + getLineageEventSettings = settingsBuilder.getLineageEventSettings().build(); + listLineageEventsSettings = settingsBuilder.listLineageEventsSettings().build(); + deleteLineageEventSettings = settingsBuilder.deleteLineageEventSettings().build(); + searchLinksSettings = settingsBuilder.searchLinksSettings().build(); + batchSearchLinkProcessesSettings = settingsBuilder.batchSearchLinkProcessesSettings().build(); + } + + /** Builder for LineageStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder createProcessSettings; + private final UnaryCallSettings.Builder updateProcessSettings; + private final UnaryCallSettings.Builder getProcessSettings; + private final PagedCallSettings.Builder< + ListProcessesRequest, ListProcessesResponse, ListProcessesPagedResponse> + listProcessesSettings; + private final UnaryCallSettings.Builder deleteProcessSettings; + private final OperationCallSettings.Builder + deleteProcessOperationSettings; + private final UnaryCallSettings.Builder createRunSettings; + private final UnaryCallSettings.Builder updateRunSettings; + private final UnaryCallSettings.Builder getRunSettings; + private final PagedCallSettings.Builder< + ListRunsRequest, ListRunsResponse, ListRunsPagedResponse> + listRunsSettings; + private final UnaryCallSettings.Builder deleteRunSettings; + private final OperationCallSettings.Builder + deleteRunOperationSettings; + private final UnaryCallSettings.Builder + createLineageEventSettings; + private final UnaryCallSettings.Builder + getLineageEventSettings; + private final PagedCallSettings.Builder< + ListLineageEventsRequest, ListLineageEventsResponse, ListLineageEventsPagedResponse> + listLineageEventsSettings; + private final UnaryCallSettings.Builder + deleteLineageEventSettings; + private final PagedCallSettings.Builder< + SearchLinksRequest, SearchLinksResponse, SearchLinksPagedResponse> + searchLinksSettings; + private final PagedCallSettings.Builder< + BatchSearchLinkProcessesRequest, + BatchSearchLinkProcessesResponse, + BatchSearchLinkProcessesPagedResponse> + batchSearchLinkProcessesSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + 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() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .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); + + createProcessSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateProcessSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getProcessSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listProcessesSettings = PagedCallSettings.newBuilder(LIST_PROCESSES_PAGE_STR_FACT); + deleteProcessSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteProcessOperationSettings = OperationCallSettings.newBuilder(); + createRunSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateRunSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getRunSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listRunsSettings = PagedCallSettings.newBuilder(LIST_RUNS_PAGE_STR_FACT); + deleteRunSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteRunOperationSettings = OperationCallSettings.newBuilder(); + createLineageEventSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getLineageEventSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listLineageEventsSettings = PagedCallSettings.newBuilder(LIST_LINEAGE_EVENTS_PAGE_STR_FACT); + deleteLineageEventSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + searchLinksSettings = PagedCallSettings.newBuilder(SEARCH_LINKS_PAGE_STR_FACT); + batchSearchLinkProcessesSettings = + PagedCallSettings.newBuilder(BATCH_SEARCH_LINK_PROCESSES_PAGE_STR_FACT); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createProcessSettings, + updateProcessSettings, + getProcessSettings, + listProcessesSettings, + deleteProcessSettings, + createRunSettings, + updateRunSettings, + getRunSettings, + listRunsSettings, + deleteRunSettings, + createLineageEventSettings, + getLineageEventSettings, + listLineageEventsSettings, + deleteLineageEventSettings, + searchLinksSettings, + batchSearchLinkProcessesSettings); + initDefaults(this); + } + + protected Builder(LineageStubSettings settings) { + super(settings); + + createProcessSettings = settings.createProcessSettings.toBuilder(); + updateProcessSettings = settings.updateProcessSettings.toBuilder(); + getProcessSettings = settings.getProcessSettings.toBuilder(); + listProcessesSettings = settings.listProcessesSettings.toBuilder(); + deleteProcessSettings = settings.deleteProcessSettings.toBuilder(); + deleteProcessOperationSettings = settings.deleteProcessOperationSettings.toBuilder(); + createRunSettings = settings.createRunSettings.toBuilder(); + updateRunSettings = settings.updateRunSettings.toBuilder(); + getRunSettings = settings.getRunSettings.toBuilder(); + listRunsSettings = settings.listRunsSettings.toBuilder(); + deleteRunSettings = settings.deleteRunSettings.toBuilder(); + deleteRunOperationSettings = settings.deleteRunOperationSettings.toBuilder(); + createLineageEventSettings = settings.createLineageEventSettings.toBuilder(); + getLineageEventSettings = settings.getLineageEventSettings.toBuilder(); + listLineageEventsSettings = settings.listLineageEventsSettings.toBuilder(); + deleteLineageEventSettings = settings.deleteLineageEventSettings.toBuilder(); + searchLinksSettings = settings.searchLinksSettings.toBuilder(); + batchSearchLinkProcessesSettings = settings.batchSearchLinkProcessesSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createProcessSettings, + updateProcessSettings, + getProcessSettings, + listProcessesSettings, + deleteProcessSettings, + createRunSettings, + updateRunSettings, + getRunSettings, + listRunsSettings, + deleteRunSettings, + createLineageEventSettings, + getLineageEventSettings, + listLineageEventsSettings, + deleteLineageEventSettings, + searchLinksSettings, + batchSearchLinkProcessesSettings); + } + + 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 + .createProcessSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateProcessSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getProcessSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listProcessesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteProcessSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createRunSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateRunSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getRunSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listRunsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteRunSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createLineageEventSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getLineageEventSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listLineageEventsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteLineageEventSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .searchLinksSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .batchSearchLinkProcessesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteProcessOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteRunOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + 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 createProcess. */ + public UnaryCallSettings.Builder createProcessSettings() { + return createProcessSettings; + } + + /** Returns the builder for the settings used for calls to updateProcess. */ + public UnaryCallSettings.Builder updateProcessSettings() { + return updateProcessSettings; + } + + /** Returns the builder for the settings used for calls to getProcess. */ + public UnaryCallSettings.Builder getProcessSettings() { + return getProcessSettings; + } + + /** Returns the builder for the settings used for calls to listProcesses. */ + public PagedCallSettings.Builder< + ListProcessesRequest, ListProcessesResponse, ListProcessesPagedResponse> + listProcessesSettings() { + return listProcessesSettings; + } + + /** Returns the builder for the settings used for calls to deleteProcess. */ + public UnaryCallSettings.Builder deleteProcessSettings() { + return deleteProcessSettings; + } + + /** Returns the builder for the settings used for calls to deleteProcess. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteProcessOperationSettings() { + return deleteProcessOperationSettings; + } + + /** Returns the builder for the settings used for calls to createRun. */ + public UnaryCallSettings.Builder createRunSettings() { + return createRunSettings; + } + + /** Returns the builder for the settings used for calls to updateRun. */ + public UnaryCallSettings.Builder updateRunSettings() { + return updateRunSettings; + } + + /** Returns the builder for the settings used for calls to getRun. */ + public UnaryCallSettings.Builder getRunSettings() { + return getRunSettings; + } + + /** Returns the builder for the settings used for calls to listRuns. */ + public PagedCallSettings.Builder + listRunsSettings() { + return listRunsSettings; + } + + /** Returns the builder for the settings used for calls to deleteRun. */ + public UnaryCallSettings.Builder deleteRunSettings() { + return deleteRunSettings; + } + + /** Returns the builder for the settings used for calls to deleteRun. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteRunOperationSettings() { + return deleteRunOperationSettings; + } + + /** Returns the builder for the settings used for calls to createLineageEvent. */ + public UnaryCallSettings.Builder + createLineageEventSettings() { + return createLineageEventSettings; + } + + /** Returns the builder for the settings used for calls to getLineageEvent. */ + public UnaryCallSettings.Builder + getLineageEventSettings() { + return getLineageEventSettings; + } + + /** Returns the builder for the settings used for calls to listLineageEvents. */ + public PagedCallSettings.Builder< + ListLineageEventsRequest, ListLineageEventsResponse, ListLineageEventsPagedResponse> + listLineageEventsSettings() { + return listLineageEventsSettings; + } + + /** Returns the builder for the settings used for calls to deleteLineageEvent. */ + public UnaryCallSettings.Builder + deleteLineageEventSettings() { + return deleteLineageEventSettings; + } + + /** Returns the builder for the settings used for calls to searchLinks. */ + public PagedCallSettings.Builder< + SearchLinksRequest, SearchLinksResponse, SearchLinksPagedResponse> + searchLinksSettings() { + return searchLinksSettings; + } + + /** Returns the builder for the settings used for calls to batchSearchLinkProcesses. */ + public PagedCallSettings.Builder< + BatchSearchLinkProcessesRequest, + BatchSearchLinkProcessesResponse, + BatchSearchLinkProcessesPagedResponse> + batchSearchLinkProcessesSettings() { + return batchSearchLinkProcessesSettings; + } + + @Override + public LineageStubSettings build() throws IOException { + return new LineageStubSettings(this); + } + } +} diff --git a/java-datalineage/google-cloud-datalineage/src/test/java/com/google/cloud/datacatalog/lineage/v1/LineageClientHttpJsonTest.java b/java-datalineage/google-cloud-datalineage/src/test/java/com/google/cloud/datacatalog/lineage/v1/LineageClientHttpJsonTest.java new file mode 100644 index 000000000000..a0915a32988f --- /dev/null +++ b/java-datalineage/google-cloud-datalineage/src/test/java/com/google/cloud/datacatalog/lineage/v1/LineageClientHttpJsonTest.java @@ -0,0 +1,1505 @@ +/* + * 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.datacatalog.lineage.v1; + +import static com.google.cloud.datacatalog.lineage.v1.LineageClient.BatchSearchLinkProcessesPagedResponse; +import static com.google.cloud.datacatalog.lineage.v1.LineageClient.ListLineageEventsPagedResponse; +import static com.google.cloud.datacatalog.lineage.v1.LineageClient.ListProcessesPagedResponse; +import static com.google.cloud.datacatalog.lineage.v1.LineageClient.ListRunsPagedResponse; +import static com.google.cloud.datacatalog.lineage.v1.LineageClient.SearchLinksPagedResponse; + +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.datacatalog.lineage.v1.stub.HttpJsonLineageStub; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import com.google.protobuf.Value; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ExecutionException; +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 LineageClientHttpJsonTest { + private static MockHttpService mockService; + private static LineageClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonLineageStub.getMethodDescriptors(), LineageSettings.getDefaultEndpoint()); + LineageSettings settings = + LineageSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + LineageSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = LineageClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void createProcessTest() throws Exception { + Process expectedResponse = + Process.newBuilder() + .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString()) + .setDisplayName("displayName1714148973") + .putAllAttributes(new HashMap()) + .setOrigin(Origin.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Process process = Process.newBuilder().build(); + + Process actualResponse = client.createProcess(parent, process); + 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 createProcessExceptionTest() 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]"); + Process process = Process.newBuilder().build(); + client.createProcess(parent, process); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createProcessTest2() throws Exception { + Process expectedResponse = + Process.newBuilder() + .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString()) + .setDisplayName("displayName1714148973") + .putAllAttributes(new HashMap()) + .setOrigin(Origin.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + Process process = Process.newBuilder().build(); + + Process actualResponse = client.createProcess(parent, process); + 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 createProcessExceptionTest2() 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"; + Process process = Process.newBuilder().build(); + client.createProcess(parent, process); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateProcessTest() throws Exception { + Process expectedResponse = + Process.newBuilder() + .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString()) + .setDisplayName("displayName1714148973") + .putAllAttributes(new HashMap()) + .setOrigin(Origin.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + Process process = + Process.newBuilder() + .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString()) + .setDisplayName("displayName1714148973") + .putAllAttributes(new HashMap()) + .setOrigin(Origin.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Process actualResponse = client.updateProcess(process, updateMask); + 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 updateProcessExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Process process = + Process.newBuilder() + .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString()) + .setDisplayName("displayName1714148973") + .putAllAttributes(new HashMap()) + .setOrigin(Origin.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateProcess(process, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProcessTest() throws Exception { + Process expectedResponse = + Process.newBuilder() + .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString()) + .setDisplayName("displayName1714148973") + .putAllAttributes(new HashMap()) + .setOrigin(Origin.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + ProcessName name = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]"); + + Process actualResponse = client.getProcess(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 getProcessExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProcessName name = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]"); + client.getProcess(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProcessTest2() throws Exception { + Process expectedResponse = + Process.newBuilder() + .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString()) + .setDisplayName("displayName1714148973") + .putAllAttributes(new HashMap()) + .setOrigin(Origin.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-4077/locations/location-4077/processes/processe-4077"; + + Process actualResponse = client.getProcess(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 getProcessExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-4077/locations/location-4077/processes/processe-4077"; + client.getProcess(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProcessesTest() throws Exception { + Process responsesElement = Process.newBuilder().build(); + ListProcessesResponse expectedResponse = + ListProcessesResponse.newBuilder() + .setNextPageToken("") + .addAllProcesses(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListProcessesPagedResponse pagedListResponse = client.listProcesses(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProcessesList().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 listProcessesExceptionTest() 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.listProcesses(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProcessesTest2() throws Exception { + Process responsesElement = Process.newBuilder().build(); + ListProcessesResponse expectedResponse = + ListProcessesResponse.newBuilder() + .setNextPageToken("") + .addAllProcesses(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListProcessesPagedResponse pagedListResponse = client.listProcesses(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProcessesList().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 listProcessesExceptionTest2() 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.listProcesses(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteProcessTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteProcessTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ProcessName name = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]"); + + client.deleteProcessAsync(name).get(); + + 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 deleteProcessExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProcessName name = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]"); + client.deleteProcessAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteProcessTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteProcessTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-4077/locations/location-4077/processes/processe-4077"; + + client.deleteProcessAsync(name).get(); + + 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 deleteProcessExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-4077/locations/location-4077/processes/processe-4077"; + client.deleteProcessAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createRunTest() throws Exception { + Run expectedResponse = + Run.newBuilder() + .setName(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString()) + .setDisplayName("displayName1714148973") + .putAllAttributes(new HashMap()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + ProcessName parent = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]"); + Run run = Run.newBuilder().build(); + + Run actualResponse = client.createRun(parent, run); + 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 createRunExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProcessName parent = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]"); + Run run = Run.newBuilder().build(); + client.createRun(parent, run); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createRunTest2() throws Exception { + Run expectedResponse = + Run.newBuilder() + .setName(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString()) + .setDisplayName("displayName1714148973") + .putAllAttributes(new HashMap()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-8610/locations/location-8610/processes/processe-8610"; + Run run = Run.newBuilder().build(); + + Run actualResponse = client.createRun(parent, run); + 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 createRunExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-8610/locations/location-8610/processes/processe-8610"; + Run run = Run.newBuilder().build(); + client.createRun(parent, run); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateRunTest() throws Exception { + Run expectedResponse = + Run.newBuilder() + .setName(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString()) + .setDisplayName("displayName1714148973") + .putAllAttributes(new HashMap()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + Run run = + Run.newBuilder() + .setName(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString()) + .setDisplayName("displayName1714148973") + .putAllAttributes(new HashMap()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Run actualResponse = client.updateRun(run, updateMask); + 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 updateRunExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Run run = + Run.newBuilder() + .setName(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString()) + .setDisplayName("displayName1714148973") + .putAllAttributes(new HashMap()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateRun(run, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRunTest() throws Exception { + Run expectedResponse = + Run.newBuilder() + .setName(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString()) + .setDisplayName("displayName1714148973") + .putAllAttributes(new HashMap()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + RunName name = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]"); + + Run actualResponse = client.getRun(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 getRunExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RunName name = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]"); + client.getRun(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRunTest2() throws Exception { + Run expectedResponse = + Run.newBuilder() + .setName(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString()) + .setDisplayName("displayName1714148973") + .putAllAttributes(new HashMap()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-2865/locations/location-2865/processes/processe-2865/runs/run-2865"; + + Run actualResponse = client.getRun(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 getRunExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-2865/locations/location-2865/processes/processe-2865/runs/run-2865"; + client.getRun(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRunsTest() throws Exception { + Run responsesElement = Run.newBuilder().build(); + ListRunsResponse expectedResponse = + ListRunsResponse.newBuilder() + .setNextPageToken("") + .addAllRuns(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ProcessName parent = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]"); + + ListRunsPagedResponse pagedListResponse = client.listRuns(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRunsList().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 listRunsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProcessName parent = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]"); + client.listRuns(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRunsTest2() throws Exception { + Run responsesElement = Run.newBuilder().build(); + ListRunsResponse expectedResponse = + ListRunsResponse.newBuilder() + .setNextPageToken("") + .addAllRuns(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-8610/locations/location-8610/processes/processe-8610"; + + ListRunsPagedResponse pagedListResponse = client.listRuns(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRunsList().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 listRunsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-8610/locations/location-8610/processes/processe-8610"; + client.listRuns(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteRunTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteRunTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + RunName name = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]"); + + client.deleteRunAsync(name).get(); + + 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 deleteRunExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RunName name = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]"); + client.deleteRunAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteRunTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteRunTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-2865/locations/location-2865/processes/processe-2865/runs/run-2865"; + + client.deleteRunAsync(name).get(); + + 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 deleteRunExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-2865/locations/location-2865/processes/processe-2865/runs/run-2865"; + client.deleteRunAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createLineageEventTest() throws Exception { + LineageEvent expectedResponse = + LineageEvent.newBuilder() + .setName( + LineageEventName.of( + "[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]") + .toString()) + .addAllLinks(new ArrayList()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + RunName parent = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]"); + LineageEvent lineageEvent = LineageEvent.newBuilder().build(); + + LineageEvent actualResponse = client.createLineageEvent(parent, lineageEvent); + 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 createLineageEventExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RunName parent = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]"); + LineageEvent lineageEvent = LineageEvent.newBuilder().build(); + client.createLineageEvent(parent, lineageEvent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createLineageEventTest2() throws Exception { + LineageEvent expectedResponse = + LineageEvent.newBuilder() + .setName( + LineageEventName.of( + "[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]") + .toString()) + .addAllLinks(new ArrayList()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = + "projects/project-2464/locations/location-2464/processes/processe-2464/runs/run-2464"; + LineageEvent lineageEvent = LineageEvent.newBuilder().build(); + + LineageEvent actualResponse = client.createLineageEvent(parent, lineageEvent); + 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 createLineageEventExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-2464/locations/location-2464/processes/processe-2464/runs/run-2464"; + LineageEvent lineageEvent = LineageEvent.newBuilder().build(); + client.createLineageEvent(parent, lineageEvent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLineageEventTest() throws Exception { + LineageEvent expectedResponse = + LineageEvent.newBuilder() + .setName( + LineageEventName.of( + "[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]") + .toString()) + .addAllLinks(new ArrayList()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + LineageEventName name = + LineageEventName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]"); + + LineageEvent actualResponse = client.getLineageEvent(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 getLineageEventExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LineageEventName name = + LineageEventName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]"); + client.getLineageEvent(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLineageEventTest2() throws Exception { + LineageEvent expectedResponse = + LineageEvent.newBuilder() + .setName( + LineageEventName.of( + "[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]") + .toString()) + .addAllLinks(new ArrayList()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-8417/locations/location-8417/processes/processe-8417/runs/run-8417/lineageEvents/lineageEvent-8417"; + + LineageEvent actualResponse = client.getLineageEvent(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 getLineageEventExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-8417/locations/location-8417/processes/processe-8417/runs/run-8417/lineageEvents/lineageEvent-8417"; + client.getLineageEvent(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLineageEventsTest() throws Exception { + LineageEvent responsesElement = LineageEvent.newBuilder().build(); + ListLineageEventsResponse expectedResponse = + ListLineageEventsResponse.newBuilder() + .setNextPageToken("") + .addAllLineageEvents(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + RunName parent = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]"); + + ListLineageEventsPagedResponse pagedListResponse = client.listLineageEvents(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLineageEventsList().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 listLineageEventsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RunName parent = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]"); + client.listLineageEvents(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLineageEventsTest2() throws Exception { + LineageEvent responsesElement = LineageEvent.newBuilder().build(); + ListLineageEventsResponse expectedResponse = + ListLineageEventsResponse.newBuilder() + .setNextPageToken("") + .addAllLineageEvents(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = + "projects/project-2464/locations/location-2464/processes/processe-2464/runs/run-2464"; + + ListLineageEventsPagedResponse pagedListResponse = client.listLineageEvents(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLineageEventsList().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 listLineageEventsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-2464/locations/location-2464/processes/processe-2464/runs/run-2464"; + client.listLineageEvents(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteLineageEventTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + LineageEventName name = + LineageEventName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]"); + + client.deleteLineageEvent(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 deleteLineageEventExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LineageEventName name = + LineageEventName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]"); + client.deleteLineageEvent(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteLineageEventTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-8417/locations/location-8417/processes/processe-8417/runs/run-8417/lineageEvents/lineageEvent-8417"; + + client.deleteLineageEvent(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 deleteLineageEventExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-8417/locations/location-8417/processes/processe-8417/runs/run-8417/lineageEvents/lineageEvent-8417"; + client.deleteLineageEvent(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchLinksTest() throws Exception { + Link responsesElement = Link.newBuilder().build(); + SearchLinksResponse expectedResponse = + SearchLinksResponse.newBuilder() + .setNextPageToken("") + .addAllLinks(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + SearchLinksRequest request = + SearchLinksRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + SearchLinksPagedResponse pagedListResponse = client.searchLinks(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLinksList().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 searchLinksExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SearchLinksRequest request = + SearchLinksRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.searchLinks(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchSearchLinkProcessesTest() throws Exception { + ProcessLinks responsesElement = ProcessLinks.newBuilder().build(); + BatchSearchLinkProcessesResponse expectedResponse = + BatchSearchLinkProcessesResponse.newBuilder() + .setNextPageToken("") + .addAllProcessLinks(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + BatchSearchLinkProcessesRequest request = + BatchSearchLinkProcessesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .addAllLinks(new ArrayList()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + BatchSearchLinkProcessesPagedResponse pagedListResponse = + client.batchSearchLinkProcesses(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProcessLinksList().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 batchSearchLinkProcessesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BatchSearchLinkProcessesRequest request = + BatchSearchLinkProcessesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .addAllLinks(new ArrayList()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.batchSearchLinkProcesses(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-datalineage/google-cloud-datalineage/src/test/java/com/google/cloud/datacatalog/lineage/v1/LineageClientTest.java b/java-datalineage/google-cloud-datalineage/src/test/java/com/google/cloud/datacatalog/lineage/v1/LineageClientTest.java new file mode 100644 index 000000000000..538b2c58a4d8 --- /dev/null +++ b/java-datalineage/google-cloud-datalineage/src/test/java/com/google/cloud/datacatalog/lineage/v1/LineageClientTest.java @@ -0,0 +1,1332 @@ +/* + * 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.datacatalog.lineage.v1; + +import static com.google.cloud.datacatalog.lineage.v1.LineageClient.BatchSearchLinkProcessesPagedResponse; +import static com.google.cloud.datacatalog.lineage.v1.LineageClient.ListLineageEventsPagedResponse; +import static com.google.cloud.datacatalog.lineage.v1.LineageClient.ListProcessesPagedResponse; +import static com.google.cloud.datacatalog.lineage.v1.LineageClient.ListRunsPagedResponse; +import static com.google.cloud.datacatalog.lineage.v1.LineageClient.SearchLinksPagedResponse; + +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.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import com.google.protobuf.Value; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +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 LineageClientTest { + private static MockLineage mockLineage; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private LineageClient client; + + @BeforeClass + public static void startStaticServer() { + mockLineage = new MockLineage(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockLineage)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + LineageSettings settings = + LineageSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = LineageClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createProcessTest() throws Exception { + Process expectedResponse = + Process.newBuilder() + .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString()) + .setDisplayName("displayName1714148973") + .putAllAttributes(new HashMap()) + .setOrigin(Origin.newBuilder().build()) + .build(); + mockLineage.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Process process = Process.newBuilder().build(); + + Process actualResponse = client.createProcess(parent, process); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLineage.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateProcessRequest actualRequest = ((CreateProcessRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(process, actualRequest.getProcess()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createProcessExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLineage.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Process process = Process.newBuilder().build(); + client.createProcess(parent, process); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createProcessTest2() throws Exception { + Process expectedResponse = + Process.newBuilder() + .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString()) + .setDisplayName("displayName1714148973") + .putAllAttributes(new HashMap()) + .setOrigin(Origin.newBuilder().build()) + .build(); + mockLineage.addResponse(expectedResponse); + + String parent = "parent-995424086"; + Process process = Process.newBuilder().build(); + + Process actualResponse = client.createProcess(parent, process); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLineage.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateProcessRequest actualRequest = ((CreateProcessRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(process, actualRequest.getProcess()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createProcessExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLineage.addException(exception); + + try { + String parent = "parent-995424086"; + Process process = Process.newBuilder().build(); + client.createProcess(parent, process); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateProcessTest() throws Exception { + Process expectedResponse = + Process.newBuilder() + .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString()) + .setDisplayName("displayName1714148973") + .putAllAttributes(new HashMap()) + .setOrigin(Origin.newBuilder().build()) + .build(); + mockLineage.addResponse(expectedResponse); + + Process process = Process.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Process actualResponse = client.updateProcess(process, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLineage.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateProcessRequest actualRequest = ((UpdateProcessRequest) actualRequests.get(0)); + + Assert.assertEquals(process, actualRequest.getProcess()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateProcessExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLineage.addException(exception); + + try { + Process process = Process.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateProcess(process, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProcessTest() throws Exception { + Process expectedResponse = + Process.newBuilder() + .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString()) + .setDisplayName("displayName1714148973") + .putAllAttributes(new HashMap()) + .setOrigin(Origin.newBuilder().build()) + .build(); + mockLineage.addResponse(expectedResponse); + + ProcessName name = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]"); + + Process actualResponse = client.getProcess(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLineage.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetProcessRequest actualRequest = ((GetProcessRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getProcessExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLineage.addException(exception); + + try { + ProcessName name = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]"); + client.getProcess(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProcessTest2() throws Exception { + Process expectedResponse = + Process.newBuilder() + .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString()) + .setDisplayName("displayName1714148973") + .putAllAttributes(new HashMap()) + .setOrigin(Origin.newBuilder().build()) + .build(); + mockLineage.addResponse(expectedResponse); + + String name = "name3373707"; + + Process actualResponse = client.getProcess(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLineage.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetProcessRequest actualRequest = ((GetProcessRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getProcessExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLineage.addException(exception); + + try { + String name = "name3373707"; + client.getProcess(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProcessesTest() throws Exception { + Process responsesElement = Process.newBuilder().build(); + ListProcessesResponse expectedResponse = + ListProcessesResponse.newBuilder() + .setNextPageToken("") + .addAllProcesses(Arrays.asList(responsesElement)) + .build(); + mockLineage.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListProcessesPagedResponse pagedListResponse = client.listProcesses(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProcessesList().get(0), resources.get(0)); + + List actualRequests = mockLineage.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListProcessesRequest actualRequest = ((ListProcessesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listProcessesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLineage.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listProcesses(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProcessesTest2() throws Exception { + Process responsesElement = Process.newBuilder().build(); + ListProcessesResponse expectedResponse = + ListProcessesResponse.newBuilder() + .setNextPageToken("") + .addAllProcesses(Arrays.asList(responsesElement)) + .build(); + mockLineage.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListProcessesPagedResponse pagedListResponse = client.listProcesses(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProcessesList().get(0), resources.get(0)); + + List actualRequests = mockLineage.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListProcessesRequest actualRequest = ((ListProcessesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listProcessesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLineage.addException(exception); + + try { + String parent = "parent-995424086"; + client.listProcesses(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteProcessTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteProcessTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockLineage.addResponse(resultOperation); + + ProcessName name = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]"); + + client.deleteProcessAsync(name).get(); + + List actualRequests = mockLineage.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteProcessRequest actualRequest = ((DeleteProcessRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteProcessExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLineage.addException(exception); + + try { + ProcessName name = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]"); + client.deleteProcessAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteProcessTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteProcessTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockLineage.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteProcessAsync(name).get(); + + List actualRequests = mockLineage.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteProcessRequest actualRequest = ((DeleteProcessRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteProcessExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLineage.addException(exception); + + try { + String name = "name3373707"; + client.deleteProcessAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createRunTest() throws Exception { + Run expectedResponse = + Run.newBuilder() + .setName(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString()) + .setDisplayName("displayName1714148973") + .putAllAttributes(new HashMap()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockLineage.addResponse(expectedResponse); + + ProcessName parent = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]"); + Run run = Run.newBuilder().build(); + + Run actualResponse = client.createRun(parent, run); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLineage.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateRunRequest actualRequest = ((CreateRunRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(run, actualRequest.getRun()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createRunExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLineage.addException(exception); + + try { + ProcessName parent = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]"); + Run run = Run.newBuilder().build(); + client.createRun(parent, run); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createRunTest2() throws Exception { + Run expectedResponse = + Run.newBuilder() + .setName(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString()) + .setDisplayName("displayName1714148973") + .putAllAttributes(new HashMap()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockLineage.addResponse(expectedResponse); + + String parent = "parent-995424086"; + Run run = Run.newBuilder().build(); + + Run actualResponse = client.createRun(parent, run); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLineage.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateRunRequest actualRequest = ((CreateRunRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(run, actualRequest.getRun()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createRunExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLineage.addException(exception); + + try { + String parent = "parent-995424086"; + Run run = Run.newBuilder().build(); + client.createRun(parent, run); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateRunTest() throws Exception { + Run expectedResponse = + Run.newBuilder() + .setName(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString()) + .setDisplayName("displayName1714148973") + .putAllAttributes(new HashMap()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockLineage.addResponse(expectedResponse); + + Run run = Run.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Run actualResponse = client.updateRun(run, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLineage.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateRunRequest actualRequest = ((UpdateRunRequest) actualRequests.get(0)); + + Assert.assertEquals(run, actualRequest.getRun()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateRunExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLineage.addException(exception); + + try { + Run run = Run.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateRun(run, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRunTest() throws Exception { + Run expectedResponse = + Run.newBuilder() + .setName(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString()) + .setDisplayName("displayName1714148973") + .putAllAttributes(new HashMap()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockLineage.addResponse(expectedResponse); + + RunName name = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]"); + + Run actualResponse = client.getRun(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLineage.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetRunRequest actualRequest = ((GetRunRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getRunExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLineage.addException(exception); + + try { + RunName name = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]"); + client.getRun(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRunTest2() throws Exception { + Run expectedResponse = + Run.newBuilder() + .setName(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString()) + .setDisplayName("displayName1714148973") + .putAllAttributes(new HashMap()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockLineage.addResponse(expectedResponse); + + String name = "name3373707"; + + Run actualResponse = client.getRun(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLineage.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetRunRequest actualRequest = ((GetRunRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getRunExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLineage.addException(exception); + + try { + String name = "name3373707"; + client.getRun(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRunsTest() throws Exception { + Run responsesElement = Run.newBuilder().build(); + ListRunsResponse expectedResponse = + ListRunsResponse.newBuilder() + .setNextPageToken("") + .addAllRuns(Arrays.asList(responsesElement)) + .build(); + mockLineage.addResponse(expectedResponse); + + ProcessName parent = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]"); + + ListRunsPagedResponse pagedListResponse = client.listRuns(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRunsList().get(0), resources.get(0)); + + List actualRequests = mockLineage.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListRunsRequest actualRequest = ((ListRunsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listRunsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLineage.addException(exception); + + try { + ProcessName parent = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]"); + client.listRuns(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRunsTest2() throws Exception { + Run responsesElement = Run.newBuilder().build(); + ListRunsResponse expectedResponse = + ListRunsResponse.newBuilder() + .setNextPageToken("") + .addAllRuns(Arrays.asList(responsesElement)) + .build(); + mockLineage.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListRunsPagedResponse pagedListResponse = client.listRuns(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRunsList().get(0), resources.get(0)); + + List actualRequests = mockLineage.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListRunsRequest actualRequest = ((ListRunsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listRunsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLineage.addException(exception); + + try { + String parent = "parent-995424086"; + client.listRuns(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteRunTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteRunTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockLineage.addResponse(resultOperation); + + RunName name = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]"); + + client.deleteRunAsync(name).get(); + + List actualRequests = mockLineage.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteRunRequest actualRequest = ((DeleteRunRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteRunExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLineage.addException(exception); + + try { + RunName name = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]"); + client.deleteRunAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteRunTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteRunTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockLineage.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteRunAsync(name).get(); + + List actualRequests = mockLineage.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteRunRequest actualRequest = ((DeleteRunRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteRunExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLineage.addException(exception); + + try { + String name = "name3373707"; + client.deleteRunAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createLineageEventTest() throws Exception { + LineageEvent expectedResponse = + LineageEvent.newBuilder() + .setName( + LineageEventName.of( + "[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]") + .toString()) + .addAllLinks(new ArrayList()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockLineage.addResponse(expectedResponse); + + RunName parent = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]"); + LineageEvent lineageEvent = LineageEvent.newBuilder().build(); + + LineageEvent actualResponse = client.createLineageEvent(parent, lineageEvent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLineage.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateLineageEventRequest actualRequest = ((CreateLineageEventRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(lineageEvent, actualRequest.getLineageEvent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createLineageEventExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLineage.addException(exception); + + try { + RunName parent = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]"); + LineageEvent lineageEvent = LineageEvent.newBuilder().build(); + client.createLineageEvent(parent, lineageEvent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createLineageEventTest2() throws Exception { + LineageEvent expectedResponse = + LineageEvent.newBuilder() + .setName( + LineageEventName.of( + "[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]") + .toString()) + .addAllLinks(new ArrayList()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockLineage.addResponse(expectedResponse); + + String parent = "parent-995424086"; + LineageEvent lineageEvent = LineageEvent.newBuilder().build(); + + LineageEvent actualResponse = client.createLineageEvent(parent, lineageEvent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLineage.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateLineageEventRequest actualRequest = ((CreateLineageEventRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(lineageEvent, actualRequest.getLineageEvent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createLineageEventExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLineage.addException(exception); + + try { + String parent = "parent-995424086"; + LineageEvent lineageEvent = LineageEvent.newBuilder().build(); + client.createLineageEvent(parent, lineageEvent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLineageEventTest() throws Exception { + LineageEvent expectedResponse = + LineageEvent.newBuilder() + .setName( + LineageEventName.of( + "[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]") + .toString()) + .addAllLinks(new ArrayList()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockLineage.addResponse(expectedResponse); + + LineageEventName name = + LineageEventName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]"); + + LineageEvent actualResponse = client.getLineageEvent(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLineage.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLineageEventRequest actualRequest = ((GetLineageEventRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLineageEventExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLineage.addException(exception); + + try { + LineageEventName name = + LineageEventName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]"); + client.getLineageEvent(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLineageEventTest2() throws Exception { + LineageEvent expectedResponse = + LineageEvent.newBuilder() + .setName( + LineageEventName.of( + "[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]") + .toString()) + .addAllLinks(new ArrayList()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockLineage.addResponse(expectedResponse); + + String name = "name3373707"; + + LineageEvent actualResponse = client.getLineageEvent(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLineage.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLineageEventRequest actualRequest = ((GetLineageEventRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLineageEventExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLineage.addException(exception); + + try { + String name = "name3373707"; + client.getLineageEvent(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLineageEventsTest() throws Exception { + LineageEvent responsesElement = LineageEvent.newBuilder().build(); + ListLineageEventsResponse expectedResponse = + ListLineageEventsResponse.newBuilder() + .setNextPageToken("") + .addAllLineageEvents(Arrays.asList(responsesElement)) + .build(); + mockLineage.addResponse(expectedResponse); + + RunName parent = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]"); + + ListLineageEventsPagedResponse pagedListResponse = client.listLineageEvents(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLineageEventsList().get(0), resources.get(0)); + + List actualRequests = mockLineage.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLineageEventsRequest actualRequest = ((ListLineageEventsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLineageEventsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLineage.addException(exception); + + try { + RunName parent = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]"); + client.listLineageEvents(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLineageEventsTest2() throws Exception { + LineageEvent responsesElement = LineageEvent.newBuilder().build(); + ListLineageEventsResponse expectedResponse = + ListLineageEventsResponse.newBuilder() + .setNextPageToken("") + .addAllLineageEvents(Arrays.asList(responsesElement)) + .build(); + mockLineage.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListLineageEventsPagedResponse pagedListResponse = client.listLineageEvents(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLineageEventsList().get(0), resources.get(0)); + + List actualRequests = mockLineage.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLineageEventsRequest actualRequest = ((ListLineageEventsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLineageEventsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLineage.addException(exception); + + try { + String parent = "parent-995424086"; + client.listLineageEvents(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteLineageEventTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockLineage.addResponse(expectedResponse); + + LineageEventName name = + LineageEventName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]"); + + client.deleteLineageEvent(name); + + List actualRequests = mockLineage.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteLineageEventRequest actualRequest = ((DeleteLineageEventRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteLineageEventExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLineage.addException(exception); + + try { + LineageEventName name = + LineageEventName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]"); + client.deleteLineageEvent(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteLineageEventTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockLineage.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteLineageEvent(name); + + List actualRequests = mockLineage.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteLineageEventRequest actualRequest = ((DeleteLineageEventRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteLineageEventExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLineage.addException(exception); + + try { + String name = "name3373707"; + client.deleteLineageEvent(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchLinksTest() throws Exception { + Link responsesElement = Link.newBuilder().build(); + SearchLinksResponse expectedResponse = + SearchLinksResponse.newBuilder() + .setNextPageToken("") + .addAllLinks(Arrays.asList(responsesElement)) + .build(); + mockLineage.addResponse(expectedResponse); + + SearchLinksRequest request = + SearchLinksRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + SearchLinksPagedResponse pagedListResponse = client.searchLinks(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLinksList().get(0), resources.get(0)); + + List actualRequests = mockLineage.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchLinksRequest actualRequest = ((SearchLinksRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getSource(), actualRequest.getSource()); + Assert.assertEquals(request.getTarget(), actualRequest.getTarget()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchLinksExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLineage.addException(exception); + + try { + SearchLinksRequest request = + SearchLinksRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.searchLinks(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchSearchLinkProcessesTest() throws Exception { + ProcessLinks responsesElement = ProcessLinks.newBuilder().build(); + BatchSearchLinkProcessesResponse expectedResponse = + BatchSearchLinkProcessesResponse.newBuilder() + .setNextPageToken("") + .addAllProcessLinks(Arrays.asList(responsesElement)) + .build(); + mockLineage.addResponse(expectedResponse); + + BatchSearchLinkProcessesRequest request = + BatchSearchLinkProcessesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .addAllLinks(new ArrayList()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + BatchSearchLinkProcessesPagedResponse pagedListResponse = + client.batchSearchLinkProcesses(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProcessLinksList().get(0), resources.get(0)); + + List actualRequests = mockLineage.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchSearchLinkProcessesRequest actualRequest = + ((BatchSearchLinkProcessesRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getLinksList(), actualRequest.getLinksList()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchSearchLinkProcessesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLineage.addException(exception); + + try { + BatchSearchLinkProcessesRequest request = + BatchSearchLinkProcessesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .addAllLinks(new ArrayList()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.batchSearchLinkProcesses(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-datalineage/google-cloud-datalineage/src/test/java/com/google/cloud/datacatalog/lineage/v1/MockLineage.java b/java-datalineage/google-cloud-datalineage/src/test/java/com/google/cloud/datacatalog/lineage/v1/MockLineage.java new file mode 100644 index 000000000000..f344b56bb025 --- /dev/null +++ b/java-datalineage/google-cloud-datalineage/src/test/java/com/google/cloud/datacatalog/lineage/v1/MockLineage.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.datacatalog.lineage.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 MockLineage implements MockGrpcService { + private final MockLineageImpl serviceImpl; + + public MockLineage() { + serviceImpl = new MockLineageImpl(); + } + + @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-datalineage/google-cloud-datalineage/src/test/java/com/google/cloud/datacatalog/lineage/v1/MockLineageImpl.java b/java-datalineage/google-cloud-datalineage/src/test/java/com/google/cloud/datacatalog/lineage/v1/MockLineageImpl.java new file mode 100644 index 000000000000..7e1d2da9c720 --- /dev/null +++ b/java-datalineage/google-cloud-datalineage/src/test/java/com/google/cloud/datacatalog/lineage/v1/MockLineageImpl.java @@ -0,0 +1,394 @@ +/* + * 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.datacatalog.lineage.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.datacatalog.lineage.v1.LineageGrpc.LineageImplBase; +import com.google.longrunning.Operation; +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 MockLineageImpl extends LineageImplBase { + private List requests; + private Queue responses; + + public MockLineageImpl() { + 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 createProcess( + CreateProcessRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Process) { + requests.add(request); + responseObserver.onNext(((Process) 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 CreateProcess, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Process.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateProcess( + UpdateProcessRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Process) { + requests.add(request); + responseObserver.onNext(((Process) 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 UpdateProcess, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Process.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getProcess(GetProcessRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Process) { + requests.add(request); + responseObserver.onNext(((Process) 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 GetProcess, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Process.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listProcesses( + ListProcessesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListProcessesResponse) { + requests.add(request); + responseObserver.onNext(((ListProcessesResponse) 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 ListProcesses, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListProcessesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteProcess( + DeleteProcessRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) 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 DeleteProcess, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createRun(CreateRunRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Run) { + requests.add(request); + responseObserver.onNext(((Run) 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 CreateRun, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Run.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateRun(UpdateRunRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Run) { + requests.add(request); + responseObserver.onNext(((Run) 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 UpdateRun, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Run.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getRun(GetRunRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Run) { + requests.add(request); + responseObserver.onNext(((Run) 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 GetRun, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Run.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listRuns(ListRunsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListRunsResponse) { + requests.add(request); + responseObserver.onNext(((ListRunsResponse) 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 ListRuns, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListRunsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteRun(DeleteRunRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) 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 DeleteRun, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createLineageEvent( + CreateLineageEventRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof LineageEvent) { + requests.add(request); + responseObserver.onNext(((LineageEvent) 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 CreateLineageEvent, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + LineageEvent.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getLineageEvent( + GetLineageEventRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof LineageEvent) { + requests.add(request); + responseObserver.onNext(((LineageEvent) 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 GetLineageEvent, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + LineageEvent.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listLineageEvents( + ListLineageEventsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListLineageEventsResponse) { + requests.add(request); + responseObserver.onNext(((ListLineageEventsResponse) 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 ListLineageEvents, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListLineageEventsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteLineageEvent( + DeleteLineageEventRequest 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 DeleteLineageEvent, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void searchLinks( + SearchLinksRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SearchLinksResponse) { + requests.add(request); + responseObserver.onNext(((SearchLinksResponse) 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 SearchLinks, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SearchLinksResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void batchSearchLinkProcesses( + BatchSearchLinkProcessesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof BatchSearchLinkProcessesResponse) { + requests.add(request); + responseObserver.onNext(((BatchSearchLinkProcessesResponse) 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 BatchSearchLinkProcesses, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + BatchSearchLinkProcessesResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-datalineage/grpc-google-cloud-datalineage-v1/pom.xml b/java-datalineage/grpc-google-cloud-datalineage-v1/pom.xml new file mode 100644 index 000000000000..62d73267e2eb --- /dev/null +++ b/java-datalineage/grpc-google-cloud-datalineage-v1/pom.xml @@ -0,0 +1,45 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-datalineage-v1 + 0.0.1-SNAPSHOT + grpc-google-cloud-datalineage-v1 + GRPC library for google-cloud-datalineage + + com.google.cloud + google-cloud-datalineage-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-datalineage-v1 + + + com.google.guava + guava + + + \ No newline at end of file diff --git a/java-datalineage/grpc-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/LineageGrpc.java b/java-datalineage/grpc-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/LineageGrpc.java new file mode 100644 index 000000000000..b00e05f724de --- /dev/null +++ b/java-datalineage/grpc-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/LineageGrpc.java @@ -0,0 +1,2223 @@ +/* + * 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.datacatalog.lineage.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Lineage is used to track data flows between assets over time. You can
+ * create [LineageEvents][google.cloud.datacatalog.lineage.v1.LineageEvent]
+ * to record lineage between multiple sources and a single target, for
+ * example, when table data is based on data from multiple tables.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/datacatalog/lineage/v1/lineage.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class LineageGrpc { + + private LineageGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.datacatalog.lineage.v1.Lineage"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest, + com.google.cloud.datacatalog.lineage.v1.Process> + getCreateProcessMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateProcess", + requestType = com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest.class, + responseType = com.google.cloud.datacatalog.lineage.v1.Process.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest, + com.google.cloud.datacatalog.lineage.v1.Process> + getCreateProcessMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest, + com.google.cloud.datacatalog.lineage.v1.Process> + getCreateProcessMethod; + if ((getCreateProcessMethod = LineageGrpc.getCreateProcessMethod) == null) { + synchronized (LineageGrpc.class) { + if ((getCreateProcessMethod = LineageGrpc.getCreateProcessMethod) == null) { + LineageGrpc.getCreateProcessMethod = + getCreateProcessMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateProcess")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.lineage.v1.Process.getDefaultInstance())) + .setSchemaDescriptor(new LineageMethodDescriptorSupplier("CreateProcess")) + .build(); + } + } + } + return getCreateProcessMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest, + com.google.cloud.datacatalog.lineage.v1.Process> + getUpdateProcessMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateProcess", + requestType = com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest.class, + responseType = com.google.cloud.datacatalog.lineage.v1.Process.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest, + com.google.cloud.datacatalog.lineage.v1.Process> + getUpdateProcessMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest, + com.google.cloud.datacatalog.lineage.v1.Process> + getUpdateProcessMethod; + if ((getUpdateProcessMethod = LineageGrpc.getUpdateProcessMethod) == null) { + synchronized (LineageGrpc.class) { + if ((getUpdateProcessMethod = LineageGrpc.getUpdateProcessMethod) == null) { + LineageGrpc.getUpdateProcessMethod = + getUpdateProcessMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateProcess")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.lineage.v1.Process.getDefaultInstance())) + .setSchemaDescriptor(new LineageMethodDescriptorSupplier("UpdateProcess")) + .build(); + } + } + } + return getUpdateProcessMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.GetProcessRequest, + com.google.cloud.datacatalog.lineage.v1.Process> + getGetProcessMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetProcess", + requestType = com.google.cloud.datacatalog.lineage.v1.GetProcessRequest.class, + responseType = com.google.cloud.datacatalog.lineage.v1.Process.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.GetProcessRequest, + com.google.cloud.datacatalog.lineage.v1.Process> + getGetProcessMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.GetProcessRequest, + com.google.cloud.datacatalog.lineage.v1.Process> + getGetProcessMethod; + if ((getGetProcessMethod = LineageGrpc.getGetProcessMethod) == null) { + synchronized (LineageGrpc.class) { + if ((getGetProcessMethod = LineageGrpc.getGetProcessMethod) == null) { + LineageGrpc.getGetProcessMethod = + getGetProcessMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetProcess")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.lineage.v1.GetProcessRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.lineage.v1.Process.getDefaultInstance())) + .setSchemaDescriptor(new LineageMethodDescriptorSupplier("GetProcess")) + .build(); + } + } + } + return getGetProcessMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest, + com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse> + getListProcessesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListProcesses", + requestType = com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest.class, + responseType = com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest, + com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse> + getListProcessesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest, + com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse> + getListProcessesMethod; + if ((getListProcessesMethod = LineageGrpc.getListProcessesMethod) == null) { + synchronized (LineageGrpc.class) { + if ((getListProcessesMethod = LineageGrpc.getListProcessesMethod) == null) { + LineageGrpc.getListProcessesMethod = + getListProcessesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListProcesses")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse + .getDefaultInstance())) + .setSchemaDescriptor(new LineageMethodDescriptorSupplier("ListProcesses")) + .build(); + } + } + } + return getListProcessesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest, + com.google.longrunning.Operation> + getDeleteProcessMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteProcess", + requestType = com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest, + com.google.longrunning.Operation> + getDeleteProcessMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest, + com.google.longrunning.Operation> + getDeleteProcessMethod; + if ((getDeleteProcessMethod = LineageGrpc.getDeleteProcessMethod) == null) { + synchronized (LineageGrpc.class) { + if ((getDeleteProcessMethod = LineageGrpc.getDeleteProcessMethod) == null) { + LineageGrpc.getDeleteProcessMethod = + getDeleteProcessMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteProcess")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new LineageMethodDescriptorSupplier("DeleteProcess")) + .build(); + } + } + } + return getDeleteProcessMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.CreateRunRequest, + com.google.cloud.datacatalog.lineage.v1.Run> + getCreateRunMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateRun", + requestType = com.google.cloud.datacatalog.lineage.v1.CreateRunRequest.class, + responseType = com.google.cloud.datacatalog.lineage.v1.Run.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.CreateRunRequest, + com.google.cloud.datacatalog.lineage.v1.Run> + getCreateRunMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.CreateRunRequest, + com.google.cloud.datacatalog.lineage.v1.Run> + getCreateRunMethod; + if ((getCreateRunMethod = LineageGrpc.getCreateRunMethod) == null) { + synchronized (LineageGrpc.class) { + if ((getCreateRunMethod = LineageGrpc.getCreateRunMethod) == null) { + LineageGrpc.getCreateRunMethod = + getCreateRunMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateRun")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.lineage.v1.CreateRunRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.lineage.v1.Run.getDefaultInstance())) + .setSchemaDescriptor(new LineageMethodDescriptorSupplier("CreateRun")) + .build(); + } + } + } + return getCreateRunMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest, + com.google.cloud.datacatalog.lineage.v1.Run> + getUpdateRunMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateRun", + requestType = com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest.class, + responseType = com.google.cloud.datacatalog.lineage.v1.Run.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest, + com.google.cloud.datacatalog.lineage.v1.Run> + getUpdateRunMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest, + com.google.cloud.datacatalog.lineage.v1.Run> + getUpdateRunMethod; + if ((getUpdateRunMethod = LineageGrpc.getUpdateRunMethod) == null) { + synchronized (LineageGrpc.class) { + if ((getUpdateRunMethod = LineageGrpc.getUpdateRunMethod) == null) { + LineageGrpc.getUpdateRunMethod = + getUpdateRunMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateRun")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.lineage.v1.Run.getDefaultInstance())) + .setSchemaDescriptor(new LineageMethodDescriptorSupplier("UpdateRun")) + .build(); + } + } + } + return getUpdateRunMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.GetRunRequest, + com.google.cloud.datacatalog.lineage.v1.Run> + getGetRunMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetRun", + requestType = com.google.cloud.datacatalog.lineage.v1.GetRunRequest.class, + responseType = com.google.cloud.datacatalog.lineage.v1.Run.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.GetRunRequest, + com.google.cloud.datacatalog.lineage.v1.Run> + getGetRunMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.GetRunRequest, + com.google.cloud.datacatalog.lineage.v1.Run> + getGetRunMethod; + if ((getGetRunMethod = LineageGrpc.getGetRunMethod) == null) { + synchronized (LineageGrpc.class) { + if ((getGetRunMethod = LineageGrpc.getGetRunMethod) == null) { + LineageGrpc.getGetRunMethod = + getGetRunMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetRun")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.lineage.v1.GetRunRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.lineage.v1.Run.getDefaultInstance())) + .setSchemaDescriptor(new LineageMethodDescriptorSupplier("GetRun")) + .build(); + } + } + } + return getGetRunMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.ListRunsRequest, + com.google.cloud.datacatalog.lineage.v1.ListRunsResponse> + getListRunsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListRuns", + requestType = com.google.cloud.datacatalog.lineage.v1.ListRunsRequest.class, + responseType = com.google.cloud.datacatalog.lineage.v1.ListRunsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.ListRunsRequest, + com.google.cloud.datacatalog.lineage.v1.ListRunsResponse> + getListRunsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.ListRunsRequest, + com.google.cloud.datacatalog.lineage.v1.ListRunsResponse> + getListRunsMethod; + if ((getListRunsMethod = LineageGrpc.getListRunsMethod) == null) { + synchronized (LineageGrpc.class) { + if ((getListRunsMethod = LineageGrpc.getListRunsMethod) == null) { + LineageGrpc.getListRunsMethod = + getListRunsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListRuns")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.lineage.v1.ListRunsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.lineage.v1.ListRunsResponse + .getDefaultInstance())) + .setSchemaDescriptor(new LineageMethodDescriptorSupplier("ListRuns")) + .build(); + } + } + } + return getListRunsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest, + com.google.longrunning.Operation> + getDeleteRunMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteRun", + requestType = com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest, + com.google.longrunning.Operation> + getDeleteRunMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest, + com.google.longrunning.Operation> + getDeleteRunMethod; + if ((getDeleteRunMethod = LineageGrpc.getDeleteRunMethod) == null) { + synchronized (LineageGrpc.class) { + if ((getDeleteRunMethod = LineageGrpc.getDeleteRunMethod) == null) { + LineageGrpc.getDeleteRunMethod = + getDeleteRunMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteRun")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new LineageMethodDescriptorSupplier("DeleteRun")) + .build(); + } + } + } + return getDeleteRunMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest, + com.google.cloud.datacatalog.lineage.v1.LineageEvent> + getCreateLineageEventMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateLineageEvent", + requestType = com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest.class, + responseType = com.google.cloud.datacatalog.lineage.v1.LineageEvent.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest, + com.google.cloud.datacatalog.lineage.v1.LineageEvent> + getCreateLineageEventMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest, + com.google.cloud.datacatalog.lineage.v1.LineageEvent> + getCreateLineageEventMethod; + if ((getCreateLineageEventMethod = LineageGrpc.getCreateLineageEventMethod) == null) { + synchronized (LineageGrpc.class) { + if ((getCreateLineageEventMethod = LineageGrpc.getCreateLineageEventMethod) == null) { + LineageGrpc.getCreateLineageEventMethod = + getCreateLineageEventMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateLineageEvent")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.lineage.v1.LineageEvent + .getDefaultInstance())) + .setSchemaDescriptor( + new LineageMethodDescriptorSupplier("CreateLineageEvent")) + .build(); + } + } + } + return getCreateLineageEventMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest, + com.google.cloud.datacatalog.lineage.v1.LineageEvent> + getGetLineageEventMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetLineageEvent", + requestType = com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest.class, + responseType = com.google.cloud.datacatalog.lineage.v1.LineageEvent.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest, + com.google.cloud.datacatalog.lineage.v1.LineageEvent> + getGetLineageEventMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest, + com.google.cloud.datacatalog.lineage.v1.LineageEvent> + getGetLineageEventMethod; + if ((getGetLineageEventMethod = LineageGrpc.getGetLineageEventMethod) == null) { + synchronized (LineageGrpc.class) { + if ((getGetLineageEventMethod = LineageGrpc.getGetLineageEventMethod) == null) { + LineageGrpc.getGetLineageEventMethod = + getGetLineageEventMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetLineageEvent")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.lineage.v1.LineageEvent + .getDefaultInstance())) + .setSchemaDescriptor(new LineageMethodDescriptorSupplier("GetLineageEvent")) + .build(); + } + } + } + return getGetLineageEventMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest, + com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse> + getListLineageEventsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListLineageEvents", + requestType = com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest.class, + responseType = com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest, + com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse> + getListLineageEventsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest, + com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse> + getListLineageEventsMethod; + if ((getListLineageEventsMethod = LineageGrpc.getListLineageEventsMethod) == null) { + synchronized (LineageGrpc.class) { + if ((getListLineageEventsMethod = LineageGrpc.getListLineageEventsMethod) == null) { + LineageGrpc.getListLineageEventsMethod = + getListLineageEventsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListLineageEvents")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse + .getDefaultInstance())) + .setSchemaDescriptor(new LineageMethodDescriptorSupplier("ListLineageEvents")) + .build(); + } + } + } + return getListLineageEventsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest, + com.google.protobuf.Empty> + getDeleteLineageEventMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteLineageEvent", + requestType = com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest, + com.google.protobuf.Empty> + getDeleteLineageEventMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest, + com.google.protobuf.Empty> + getDeleteLineageEventMethod; + if ((getDeleteLineageEventMethod = LineageGrpc.getDeleteLineageEventMethod) == null) { + synchronized (LineageGrpc.class) { + if ((getDeleteLineageEventMethod = LineageGrpc.getDeleteLineageEventMethod) == null) { + LineageGrpc.getDeleteLineageEventMethod = + getDeleteLineageEventMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteLineageEvent")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new LineageMethodDescriptorSupplier("DeleteLineageEvent")) + .build(); + } + } + } + return getDeleteLineageEventMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest, + com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse> + getSearchLinksMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SearchLinks", + requestType = com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest.class, + responseType = com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest, + com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse> + getSearchLinksMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest, + com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse> + getSearchLinksMethod; + if ((getSearchLinksMethod = LineageGrpc.getSearchLinksMethod) == null) { + synchronized (LineageGrpc.class) { + if ((getSearchLinksMethod = LineageGrpc.getSearchLinksMethod) == null) { + LineageGrpc.getSearchLinksMethod = + getSearchLinksMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SearchLinks")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse + .getDefaultInstance())) + .setSchemaDescriptor(new LineageMethodDescriptorSupplier("SearchLinks")) + .build(); + } + } + } + return getSearchLinksMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest, + com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse> + getBatchSearchLinkProcessesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchSearchLinkProcesses", + requestType = com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest.class, + responseType = com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest, + com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse> + getBatchSearchLinkProcessesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest, + com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse> + getBatchSearchLinkProcessesMethod; + if ((getBatchSearchLinkProcessesMethod = LineageGrpc.getBatchSearchLinkProcessesMethod) + == null) { + synchronized (LineageGrpc.class) { + if ((getBatchSearchLinkProcessesMethod = LineageGrpc.getBatchSearchLinkProcessesMethod) + == null) { + LineageGrpc.getBatchSearchLinkProcessesMethod = + getBatchSearchLinkProcessesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "BatchSearchLinkProcesses")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.lineage.v1 + .BatchSearchLinkProcessesRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.lineage.v1 + .BatchSearchLinkProcessesResponse.getDefaultInstance())) + .setSchemaDescriptor( + new LineageMethodDescriptorSupplier("BatchSearchLinkProcesses")) + .build(); + } + } + } + return getBatchSearchLinkProcessesMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static LineageStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public LineageStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LineageStub(channel, callOptions); + } + }; + return LineageStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static LineageBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public LineageBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LineageBlockingStub(channel, callOptions); + } + }; + return LineageBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static LineageFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public LineageFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LineageFutureStub(channel, callOptions); + } + }; + return LineageFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Lineage is used to track data flows between assets over time. You can
+   * create [LineageEvents][google.cloud.datacatalog.lineage.v1.LineageEvent]
+   * to record lineage between multiple sources and a single target, for
+   * example, when table data is based on data from multiple tables.
+   * 
+ */ + public abstract static class LineageImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Creates a new process.
+     * 
+ */ + public void createProcess( + com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateProcessMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a process.
+     * 
+ */ + public void updateProcess( + com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateProcessMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the details of the specified process.
+     * 
+ */ + public void getProcess( + com.google.cloud.datacatalog.lineage.v1.GetProcessRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetProcessMethod(), responseObserver); + } + + /** + * + * + *
+     * List processes in the given project and location. List order is descending
+     * by insertion time.
+     * 
+ */ + public void listProcesses( + com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListProcessesMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes the process with the specified name.
+     * 
+ */ + public void deleteProcess( + com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteProcessMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new run.
+     * 
+ */ + public void createRun( + com.google.cloud.datacatalog.lineage.v1.CreateRunRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateRunMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a run.
+     * 
+ */ + public void updateRun( + com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateRunMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the details of the specified run.
+     * 
+ */ + public void getRun( + com.google.cloud.datacatalog.lineage.v1.GetRunRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetRunMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists runs in the given project and location. List order is descending by
+     * `start_time`.
+     * 
+ */ + public void listRuns( + com.google.cloud.datacatalog.lineage.v1.ListRunsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListRunsMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes the run with the specified name.
+     * 
+ */ + public void deleteRun( + com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteRunMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new lineage event.
+     * 
+ */ + public void createLineageEvent( + com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateLineageEventMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a specified lineage event.
+     * 
+ */ + public void getLineageEvent( + com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetLineageEventMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists lineage events in the given project and location. The list order is
+     * not defined.
+     * 
+ */ + public void listLineageEvents( + com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListLineageEventsMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes the lineage event with the specified name.
+     * 
+ */ + public void deleteLineageEvent( + com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteLineageEventMethod(), responseObserver); + } + + /** + * + * + *
+     * Retrieve a list of links connected to a specific asset.
+     * Links represent the data flow between **source** (upstream)
+     * and **target** (downstream) assets in transformation pipelines.
+     * Links are stored in the same project as the Lineage Events that create
+     * them.
+     * You can retrieve links in every project where you have the
+     * `datalineage.events.get` permission. The project provided in the URL
+     * is used for Billing and Quota.
+     * 
+ */ + public void searchLinks( + com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSearchLinksMethod(), responseObserver); + } + + /** + * + * + *
+     * Retrieve information about LineageProcesses associated with specific
+     * links. LineageProcesses are transformation pipelines that result in data
+     * flowing from **source** to **target** assets. Links between assets
+     * represent this operation.
+     * If you have specific link names, you can use this method to
+     * verify which LineageProcesses contribute to creating those links.
+     * See the
+     * [SearchLinks][google.cloud.datacatalog.lineage.v1.Lineage.SearchLinks]
+     * method for more information on how to retrieve link name.
+     * You can retrieve the LineageProcess information in every project where you
+     * have the `datalineage.events.get` permission. The project provided in the
+     * URL is used for Billing and Quota.
+     * 
+ */ + public void batchSearchLinkProcesses( + com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getBatchSearchLinkProcessesMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateProcessMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest, + com.google.cloud.datacatalog.lineage.v1.Process>( + this, METHODID_CREATE_PROCESS))) + .addMethod( + getUpdateProcessMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest, + com.google.cloud.datacatalog.lineage.v1.Process>( + this, METHODID_UPDATE_PROCESS))) + .addMethod( + getGetProcessMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.lineage.v1.GetProcessRequest, + com.google.cloud.datacatalog.lineage.v1.Process>(this, METHODID_GET_PROCESS))) + .addMethod( + getListProcessesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest, + com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse>( + this, METHODID_LIST_PROCESSES))) + .addMethod( + getDeleteProcessMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_PROCESS))) + .addMethod( + getCreateRunMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.lineage.v1.CreateRunRequest, + com.google.cloud.datacatalog.lineage.v1.Run>(this, METHODID_CREATE_RUN))) + .addMethod( + getUpdateRunMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest, + com.google.cloud.datacatalog.lineage.v1.Run>(this, METHODID_UPDATE_RUN))) + .addMethod( + getGetRunMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.lineage.v1.GetRunRequest, + com.google.cloud.datacatalog.lineage.v1.Run>(this, METHODID_GET_RUN))) + .addMethod( + getListRunsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.lineage.v1.ListRunsRequest, + com.google.cloud.datacatalog.lineage.v1.ListRunsResponse>( + this, METHODID_LIST_RUNS))) + .addMethod( + getDeleteRunMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_RUN))) + .addMethod( + getCreateLineageEventMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest, + com.google.cloud.datacatalog.lineage.v1.LineageEvent>( + this, METHODID_CREATE_LINEAGE_EVENT))) + .addMethod( + getGetLineageEventMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest, + com.google.cloud.datacatalog.lineage.v1.LineageEvent>( + this, METHODID_GET_LINEAGE_EVENT))) + .addMethod( + getListLineageEventsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest, + com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse>( + this, METHODID_LIST_LINEAGE_EVENTS))) + .addMethod( + getDeleteLineageEventMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest, + com.google.protobuf.Empty>(this, METHODID_DELETE_LINEAGE_EVENT))) + .addMethod( + getSearchLinksMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest, + com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse>( + this, METHODID_SEARCH_LINKS))) + .addMethod( + getBatchSearchLinkProcessesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest, + com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse>( + this, METHODID_BATCH_SEARCH_LINK_PROCESSES))) + .build(); + } + } + + /** + * + * + *
+   * Lineage is used to track data flows between assets over time. You can
+   * create [LineageEvents][google.cloud.datacatalog.lineage.v1.LineageEvent]
+   * to record lineage between multiple sources and a single target, for
+   * example, when table data is based on data from multiple tables.
+   * 
+ */ + public static final class LineageStub extends io.grpc.stub.AbstractAsyncStub { + private LineageStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected LineageStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LineageStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a new process.
+     * 
+ */ + public void createProcess( + com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateProcessMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a process.
+     * 
+ */ + public void updateProcess( + com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateProcessMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the details of the specified process.
+     * 
+ */ + public void getProcess( + com.google.cloud.datacatalog.lineage.v1.GetProcessRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetProcessMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * List processes in the given project and location. List order is descending
+     * by insertion time.
+     * 
+ */ + public void listProcesses( + com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListProcessesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes the process with the specified name.
+     * 
+ */ + public void deleteProcess( + com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteProcessMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new run.
+     * 
+ */ + public void createRun( + com.google.cloud.datacatalog.lineage.v1.CreateRunRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateRunMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Updates a run.
+     * 
+ */ + public void updateRun( + com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateRunMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Gets the details of the specified run.
+     * 
+ */ + public void getRun( + com.google.cloud.datacatalog.lineage.v1.GetRunRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetRunMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Lists runs in the given project and location. List order is descending by
+     * `start_time`.
+     * 
+ */ + public void listRuns( + com.google.cloud.datacatalog.lineage.v1.ListRunsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListRunsMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Deletes the run with the specified name.
+     * 
+ */ + public void deleteRun( + com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteRunMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Creates a new lineage event.
+     * 
+ */ + public void createLineageEvent( + com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateLineageEventMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a specified lineage event.
+     * 
+ */ + public void getLineageEvent( + com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetLineageEventMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists lineage events in the given project and location. The list order is
+     * not defined.
+     * 
+ */ + public void listLineageEvents( + com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListLineageEventsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes the lineage event with the specified name.
+     * 
+ */ + public void deleteLineageEvent( + com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteLineageEventMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Retrieve a list of links connected to a specific asset.
+     * Links represent the data flow between **source** (upstream)
+     * and **target** (downstream) assets in transformation pipelines.
+     * Links are stored in the same project as the Lineage Events that create
+     * them.
+     * You can retrieve links in every project where you have the
+     * `datalineage.events.get` permission. The project provided in the URL
+     * is used for Billing and Quota.
+     * 
+ */ + public void searchLinks( + com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSearchLinksMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Retrieve information about LineageProcesses associated with specific
+     * links. LineageProcesses are transformation pipelines that result in data
+     * flowing from **source** to **target** assets. Links between assets
+     * represent this operation.
+     * If you have specific link names, you can use this method to
+     * verify which LineageProcesses contribute to creating those links.
+     * See the
+     * [SearchLinks][google.cloud.datacatalog.lineage.v1.Lineage.SearchLinks]
+     * method for more information on how to retrieve link name.
+     * You can retrieve the LineageProcess information in every project where you
+     * have the `datalineage.events.get` permission. The project provided in the
+     * URL is used for Billing and Quota.
+     * 
+ */ + public void batchSearchLinkProcesses( + com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBatchSearchLinkProcessesMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * Lineage is used to track data flows between assets over time. You can
+   * create [LineageEvents][google.cloud.datacatalog.lineage.v1.LineageEvent]
+   * to record lineage between multiple sources and a single target, for
+   * example, when table data is based on data from multiple tables.
+   * 
+ */ + public static final class LineageBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private LineageBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected LineageBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LineageBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a new process.
+     * 
+ */ + public com.google.cloud.datacatalog.lineage.v1.Process createProcess( + com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateProcessMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a process.
+     * 
+ */ + public com.google.cloud.datacatalog.lineage.v1.Process updateProcess( + com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateProcessMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the details of the specified process.
+     * 
+ */ + public com.google.cloud.datacatalog.lineage.v1.Process getProcess( + com.google.cloud.datacatalog.lineage.v1.GetProcessRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetProcessMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List processes in the given project and location. List order is descending
+     * by insertion time.
+     * 
+ */ + public com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse listProcesses( + com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListProcessesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes the process with the specified name.
+     * 
+ */ + public com.google.longrunning.Operation deleteProcess( + com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteProcessMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new run.
+     * 
+ */ + public com.google.cloud.datacatalog.lineage.v1.Run createRun( + com.google.cloud.datacatalog.lineage.v1.CreateRunRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateRunMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a run.
+     * 
+ */ + public com.google.cloud.datacatalog.lineage.v1.Run updateRun( + com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateRunMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the details of the specified run.
+     * 
+ */ + public com.google.cloud.datacatalog.lineage.v1.Run getRun( + com.google.cloud.datacatalog.lineage.v1.GetRunRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetRunMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists runs in the given project and location. List order is descending by
+     * `start_time`.
+     * 
+ */ + public com.google.cloud.datacatalog.lineage.v1.ListRunsResponse listRuns( + com.google.cloud.datacatalog.lineage.v1.ListRunsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListRunsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes the run with the specified name.
+     * 
+ */ + public com.google.longrunning.Operation deleteRun( + com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteRunMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new lineage event.
+     * 
+ */ + public com.google.cloud.datacatalog.lineage.v1.LineageEvent createLineageEvent( + com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateLineageEventMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a specified lineage event.
+     * 
+ */ + public com.google.cloud.datacatalog.lineage.v1.LineageEvent getLineageEvent( + com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetLineageEventMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists lineage events in the given project and location. The list order is
+     * not defined.
+     * 
+ */ + public com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse listLineageEvents( + com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListLineageEventsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes the lineage event with the specified name.
+     * 
+ */ + public com.google.protobuf.Empty deleteLineageEvent( + com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteLineageEventMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Retrieve a list of links connected to a specific asset.
+     * Links represent the data flow between **source** (upstream)
+     * and **target** (downstream) assets in transformation pipelines.
+     * Links are stored in the same project as the Lineage Events that create
+     * them.
+     * You can retrieve links in every project where you have the
+     * `datalineage.events.get` permission. The project provided in the URL
+     * is used for Billing and Quota.
+     * 
+ */ + public com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse searchLinks( + com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSearchLinksMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Retrieve information about LineageProcesses associated with specific
+     * links. LineageProcesses are transformation pipelines that result in data
+     * flowing from **source** to **target** assets. Links between assets
+     * represent this operation.
+     * If you have specific link names, you can use this method to
+     * verify which LineageProcesses contribute to creating those links.
+     * See the
+     * [SearchLinks][google.cloud.datacatalog.lineage.v1.Lineage.SearchLinks]
+     * method for more information on how to retrieve link name.
+     * You can retrieve the LineageProcess information in every project where you
+     * have the `datalineage.events.get` permission. The project provided in the
+     * URL is used for Billing and Quota.
+     * 
+ */ + public com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse + batchSearchLinkProcesses( + com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBatchSearchLinkProcessesMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * Lineage is used to track data flows between assets over time. You can
+   * create [LineageEvents][google.cloud.datacatalog.lineage.v1.LineageEvent]
+   * to record lineage between multiple sources and a single target, for
+   * example, when table data is based on data from multiple tables.
+   * 
+ */ + public static final class LineageFutureStub + extends io.grpc.stub.AbstractFutureStub { + private LineageFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected LineageFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LineageFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a new process.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.lineage.v1.Process> + createProcess(com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateProcessMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a process.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.lineage.v1.Process> + updateProcess(com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateProcessMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the details of the specified process.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.lineage.v1.Process> + getProcess(com.google.cloud.datacatalog.lineage.v1.GetProcessRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetProcessMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * List processes in the given project and location. List order is descending
+     * by insertion time.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse> + listProcesses(com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListProcessesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes the process with the specified name.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteProcess(com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteProcessMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new run.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.lineage.v1.Run> + createRun(com.google.cloud.datacatalog.lineage.v1.CreateRunRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateRunMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a run.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.lineage.v1.Run> + updateRun(com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateRunMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the details of the specified run.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.lineage.v1.Run> + getRun(com.google.cloud.datacatalog.lineage.v1.GetRunRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetRunMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists runs in the given project and location. List order is descending by
+     * `start_time`.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.lineage.v1.ListRunsResponse> + listRuns(com.google.cloud.datacatalog.lineage.v1.ListRunsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListRunsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes the run with the specified name.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteRun(com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteRunMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new lineage event.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.lineage.v1.LineageEvent> + createLineageEvent( + com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateLineageEventMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a specified lineage event.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.lineage.v1.LineageEvent> + getLineageEvent(com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetLineageEventMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists lineage events in the given project and location. The list order is
+     * not defined.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse> + listLineageEvents( + com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListLineageEventsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes the lineage event with the specified name.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteLineageEvent( + com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteLineageEventMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Retrieve a list of links connected to a specific asset.
+     * Links represent the data flow between **source** (upstream)
+     * and **target** (downstream) assets in transformation pipelines.
+     * Links are stored in the same project as the Lineage Events that create
+     * them.
+     * You can retrieve links in every project where you have the
+     * `datalineage.events.get` permission. The project provided in the URL
+     * is used for Billing and Quota.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse> + searchLinks(com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSearchLinksMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Retrieve information about LineageProcesses associated with specific
+     * links. LineageProcesses are transformation pipelines that result in data
+     * flowing from **source** to **target** assets. Links between assets
+     * represent this operation.
+     * If you have specific link names, you can use this method to
+     * verify which LineageProcesses contribute to creating those links.
+     * See the
+     * [SearchLinks][google.cloud.datacatalog.lineage.v1.Lineage.SearchLinks]
+     * method for more information on how to retrieve link name.
+     * You can retrieve the LineageProcess information in every project where you
+     * have the `datalineage.events.get` permission. The project provided in the
+     * URL is used for Billing and Quota.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse> + batchSearchLinkProcesses( + com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBatchSearchLinkProcessesMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_PROCESS = 0; + private static final int METHODID_UPDATE_PROCESS = 1; + private static final int METHODID_GET_PROCESS = 2; + private static final int METHODID_LIST_PROCESSES = 3; + private static final int METHODID_DELETE_PROCESS = 4; + private static final int METHODID_CREATE_RUN = 5; + private static final int METHODID_UPDATE_RUN = 6; + private static final int METHODID_GET_RUN = 7; + private static final int METHODID_LIST_RUNS = 8; + private static final int METHODID_DELETE_RUN = 9; + private static final int METHODID_CREATE_LINEAGE_EVENT = 10; + private static final int METHODID_GET_LINEAGE_EVENT = 11; + private static final int METHODID_LIST_LINEAGE_EVENTS = 12; + private static final int METHODID_DELETE_LINEAGE_EVENT = 13; + private static final int METHODID_SEARCH_LINKS = 14; + private static final int METHODID_BATCH_SEARCH_LINK_PROCESSES = 15; + + 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 LineageImplBase serviceImpl; + private final int methodId; + + MethodHandlers(LineageImplBase 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_PROCESS: + serviceImpl.createProcess( + (com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_PROCESS: + serviceImpl.updateProcess( + (com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_PROCESS: + serviceImpl.getProcess( + (com.google.cloud.datacatalog.lineage.v1.GetProcessRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_PROCESSES: + serviceImpl.listProcesses( + (com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse>) + responseObserver); + break; + case METHODID_DELETE_PROCESS: + serviceImpl.deleteProcess( + (com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_RUN: + serviceImpl.createRun( + (com.google.cloud.datacatalog.lineage.v1.CreateRunRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_RUN: + serviceImpl.updateRun( + (com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_RUN: + serviceImpl.getRun( + (com.google.cloud.datacatalog.lineage.v1.GetRunRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_RUNS: + serviceImpl.listRuns( + (com.google.cloud.datacatalog.lineage.v1.ListRunsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.datacatalog.lineage.v1.ListRunsResponse>) + responseObserver); + break; + case METHODID_DELETE_RUN: + serviceImpl.deleteRun( + (com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_LINEAGE_EVENT: + serviceImpl.createLineageEvent( + (com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_LINEAGE_EVENT: + serviceImpl.getLineageEvent( + (com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_LINEAGE_EVENTS: + serviceImpl.listLineageEvents( + (com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse>) + responseObserver); + break; + case METHODID_DELETE_LINEAGE_EVENT: + serviceImpl.deleteLineageEvent( + (com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SEARCH_LINKS: + serviceImpl.searchLinks( + (com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse>) + responseObserver); + break; + case METHODID_BATCH_SEARCH_LINK_PROCESSES: + serviceImpl.batchSearchLinkProcesses( + (com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse>) + 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 LineageBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + LineageBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Lineage"); + } + } + + private static final class LineageFileDescriptorSupplier extends LineageBaseDescriptorSupplier { + LineageFileDescriptorSupplier() {} + } + + private static final class LineageMethodDescriptorSupplier extends LineageBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + LineageMethodDescriptorSupplier(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 (LineageGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new LineageFileDescriptorSupplier()) + .addMethod(getCreateProcessMethod()) + .addMethod(getUpdateProcessMethod()) + .addMethod(getGetProcessMethod()) + .addMethod(getListProcessesMethod()) + .addMethod(getDeleteProcessMethod()) + .addMethod(getCreateRunMethod()) + .addMethod(getUpdateRunMethod()) + .addMethod(getGetRunMethod()) + .addMethod(getListRunsMethod()) + .addMethod(getDeleteRunMethod()) + .addMethod(getCreateLineageEventMethod()) + .addMethod(getGetLineageEventMethod()) + .addMethod(getListLineageEventsMethod()) + .addMethod(getDeleteLineageEventMethod()) + .addMethod(getSearchLinksMethod()) + .addMethod(getBatchSearchLinkProcessesMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-datalineage/owlbot.py b/java-datalineage/owlbot.py new file mode 100644 index 000000000000..03c0f6686d3f --- /dev/null +++ b/java-datalineage/owlbot.py @@ -0,0 +1,36 @@ +# 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(monorepo=True, excludes=[ + ".github/*", + ".kokoro/*", + "samples/*", + "CODE_OF_CONDUCT.md", + "CONTRIBUTING.md", + "LICENSE", + "SECURITY.md", + "java.header", + "license-checks.xml", + "renovate.json", + ".gitignore" +]) \ No newline at end of file diff --git a/java-datalineage/pom.xml b/java-datalineage/pom.xml new file mode 100644 index 000000000000..88c1df1c71c4 --- /dev/null +++ b/java-datalineage/pom.xml @@ -0,0 +1,54 @@ + + + 4.0.0 + com.google.cloud + google-cloud-datalineage-parent + pom + 0.0.1-SNAPSHOT + Google Data Lineage Parent + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-jar-parent + 1.3.0-SNAPSHOT + ../google-cloud-jar-parent/pom.xml + + + + UTF-8 + UTF-8 + github + google-cloud-datalineage-parent + + + + + + com.google.cloud + google-cloud-datalineage + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-datalineage-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-datalineage-v1 + 0.0.1-SNAPSHOT + + + + + + google-cloud-datalineage + grpc-google-cloud-datalineage-v1 + proto-google-cloud-datalineage-v1 + google-cloud-datalineage-bom + + + diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/clirr-ignored-differences.xml b/java-datalineage/proto-google-cloud-datalineage-v1/clirr-ignored-differences.xml new file mode 100644 index 000000000000..4216d59bc3af --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/clirr-ignored-differences.xml @@ -0,0 +1,19 @@ + + + + + 7012 + com/google/cloud/datacatalog/lineage/v1/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/datacatalog/lineage/v1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/datacatalog/lineage/v1/*OrBuilder + boolean has*(*) + + diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/pom.xml b/java-datalineage/proto-google-cloud-datalineage-v1/pom.xml new file mode 100644 index 000000000000..350b4715c393 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/pom.xml @@ -0,0 +1,37 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-datalineage-v1 + 0.0.1-SNAPSHOT + proto-google-cloud-datalineage-v1 + Proto library for google-cloud-datalineage + + com.google.cloud + google-cloud-datalineage-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-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/BatchSearchLinkProcessesRequest.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/BatchSearchLinkProcessesRequest.java new file mode 100644 index 000000000000..e9a67d6af955 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/BatchSearchLinkProcessesRequest.java @@ -0,0 +1,1273 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +/** + * + * + *
+ * Request message for
+ * [BatchSearchLinkProcesses][google.cloud.datacatalog.lineage.v1.Lineage.BatchSearchLinkProcesses].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest} + */ +public final class BatchSearchLinkProcessesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest) + BatchSearchLinkProcessesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchSearchLinkProcessesRequest.newBuilder() to construct. + private BatchSearchLinkProcessesRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchSearchLinkProcessesRequest() { + parent_ = ""; + links_ = com.google.protobuf.LazyStringArrayList.EMPTY; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchSearchLinkProcessesRequest(); + } + + @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.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_BatchSearchLinkProcessesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_BatchSearchLinkProcessesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest.class, + com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The project and location where you want to search.
+   * 
+ * + * + * 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 project and location where you want to search.
+   * 
+ * + * + * 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 LINKS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList links_; + /** + * + * + *
+   * Required. An array of links to check for their associated LineageProcesses.
+   * The maximum number of items in this array is 100.
+   * If the request contains more than 100 links, it returns the
+   * `INVALID_ARGUMENT` error.
+   * Format: `projects/{project}/locations/{location}/links/{link}`.
+   * 
+ * + * repeated string links = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the links. + */ + public com.google.protobuf.ProtocolStringList getLinksList() { + return links_; + } + /** + * + * + *
+   * Required. An array of links to check for their associated LineageProcesses.
+   * The maximum number of items in this array is 100.
+   * If the request contains more than 100 links, it returns the
+   * `INVALID_ARGUMENT` error.
+   * Format: `projects/{project}/locations/{location}/links/{link}`.
+   * 
+ * + * repeated string links = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of links. + */ + public int getLinksCount() { + return links_.size(); + } + /** + * + * + *
+   * Required. An array of links to check for their associated LineageProcesses.
+   * The maximum number of items in this array is 100.
+   * If the request contains more than 100 links, it returns the
+   * `INVALID_ARGUMENT` error.
+   * Format: `projects/{project}/locations/{location}/links/{link}`.
+   * 
+ * + * repeated string links = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The links at the given index. + */ + public java.lang.String getLinks(int index) { + return links_.get(index); + } + /** + * + * + *
+   * Required. An array of links to check for their associated LineageProcesses.
+   * The maximum number of items in this array is 100.
+   * If the request contains more than 100 links, it returns the
+   * `INVALID_ARGUMENT` error.
+   * Format: `projects/{project}/locations/{location}/links/{link}`.
+   * 
+ * + * repeated string links = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the links at the given index. + */ + public com.google.protobuf.ByteString getLinksBytes(int index) { + return links_.getByteString(index); + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + * + * + *
+   * The maximum number of processes to return in a single page of the response.
+   * A page may contain fewer results than this value.
+   * 
+ * + * 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 page token received from a previous `BatchSearchLinkProcesses` call.
+   * Use it to get the next page.
+   * When requesting subsequent pages of a response, remember that
+   * all parameters must match the values you provided
+   * in the original request.
+   * 
+ * + * 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 page token received from a previous `BatchSearchLinkProcesses` call.
+   * Use it to get the next page.
+   * When requesting subsequent pages of a response, remember that
+   * all parameters must match the values you provided
+   * in the original request.
+   * 
+ * + * 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_); + } + for (int i = 0; i < links_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, links_.getRaw(i)); + } + 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_); + } + { + int dataSize = 0; + for (int i = 0; i < links_.size(); i++) { + dataSize += computeStringSizeNoTag(links_.getRaw(i)); + } + size += dataSize; + size += 1 * getLinksList().size(); + } + 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.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest other = + (com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getLinksList().equals(other.getLinksList())) 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(); + if (getLinksCount() > 0) { + hash = (37 * hash) + LINKS_FIELD_NUMBER; + hash = (53 * hash) + getLinksList().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.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest 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.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest 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.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest 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.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest + 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.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest 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.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest 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
+   * [BatchSearchLinkProcesses][google.cloud.datacatalog.lineage.v1.Lineage.BatchSearchLinkProcesses].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest) + com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_BatchSearchLinkProcessesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_BatchSearchLinkProcessesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest.class, + com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + links_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_BatchSearchLinkProcessesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest + getDefaultInstanceForType() { + return com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest build() { + com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest buildPartial() { + com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest result = + new com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest(this); + int from_bitField0_ = bitField0_; + result.parent_ = parent_; + if (((bitField0_ & 0x00000001) != 0)) { + links_ = links_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.links_ = links_; + 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.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest) { + return mergeFrom( + (com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest other) { + if (other + == com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.links_.isEmpty()) { + if (links_.isEmpty()) { + links_ = other.links_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLinksIsMutable(); + links_.addAll(other.links_); + } + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureLinksIsMutable(); + links_.add(s); + 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 int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The project and location where you want to search.
+     * 
+ * + * + * 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 project and location where you want to search.
+     * 
+ * + * + * 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 project and location where you want to search.
+     * 
+ * + * + * 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 project and location where you want to search.
+     * 
+ * + * + * 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 project and location where you want to search.
+     * 
+ * + * + * 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.protobuf.LazyStringList links_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureLinksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + links_ = new com.google.protobuf.LazyStringArrayList(links_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Required. An array of links to check for their associated LineageProcesses.
+     * The maximum number of items in this array is 100.
+     * If the request contains more than 100 links, it returns the
+     * `INVALID_ARGUMENT` error.
+     * Format: `projects/{project}/locations/{location}/links/{link}`.
+     * 
+ * + * repeated string links = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the links. + */ + public com.google.protobuf.ProtocolStringList getLinksList() { + return links_.getUnmodifiableView(); + } + /** + * + * + *
+     * Required. An array of links to check for their associated LineageProcesses.
+     * The maximum number of items in this array is 100.
+     * If the request contains more than 100 links, it returns the
+     * `INVALID_ARGUMENT` error.
+     * Format: `projects/{project}/locations/{location}/links/{link}`.
+     * 
+ * + * repeated string links = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of links. + */ + public int getLinksCount() { + return links_.size(); + } + /** + * + * + *
+     * Required. An array of links to check for their associated LineageProcesses.
+     * The maximum number of items in this array is 100.
+     * If the request contains more than 100 links, it returns the
+     * `INVALID_ARGUMENT` error.
+     * Format: `projects/{project}/locations/{location}/links/{link}`.
+     * 
+ * + * repeated string links = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The links at the given index. + */ + public java.lang.String getLinks(int index) { + return links_.get(index); + } + /** + * + * + *
+     * Required. An array of links to check for their associated LineageProcesses.
+     * The maximum number of items in this array is 100.
+     * If the request contains more than 100 links, it returns the
+     * `INVALID_ARGUMENT` error.
+     * Format: `projects/{project}/locations/{location}/links/{link}`.
+     * 
+ * + * repeated string links = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the links at the given index. + */ + public com.google.protobuf.ByteString getLinksBytes(int index) { + return links_.getByteString(index); + } + /** + * + * + *
+     * Required. An array of links to check for their associated LineageProcesses.
+     * The maximum number of items in this array is 100.
+     * If the request contains more than 100 links, it returns the
+     * `INVALID_ARGUMENT` error.
+     * Format: `projects/{project}/locations/{location}/links/{link}`.
+     * 
+ * + * repeated string links = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The links to set. + * @return This builder for chaining. + */ + public Builder setLinks(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinksIsMutable(); + links_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. An array of links to check for their associated LineageProcesses.
+     * The maximum number of items in this array is 100.
+     * If the request contains more than 100 links, it returns the
+     * `INVALID_ARGUMENT` error.
+     * Format: `projects/{project}/locations/{location}/links/{link}`.
+     * 
+ * + * repeated string links = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The links to add. + * @return This builder for chaining. + */ + public Builder addLinks(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinksIsMutable(); + links_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. An array of links to check for their associated LineageProcesses.
+     * The maximum number of items in this array is 100.
+     * If the request contains more than 100 links, it returns the
+     * `INVALID_ARGUMENT` error.
+     * Format: `projects/{project}/locations/{location}/links/{link}`.
+     * 
+ * + * repeated string links = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The links to add. + * @return This builder for chaining. + */ + public Builder addAllLinks(java.lang.Iterable values) { + ensureLinksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, links_); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. An array of links to check for their associated LineageProcesses.
+     * The maximum number of items in this array is 100.
+     * If the request contains more than 100 links, it returns the
+     * `INVALID_ARGUMENT` error.
+     * Format: `projects/{project}/locations/{location}/links/{link}`.
+     * 
+ * + * repeated string links = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearLinks() { + links_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. An array of links to check for their associated LineageProcesses.
+     * The maximum number of items in this array is 100.
+     * If the request contains more than 100 links, it returns the
+     * `INVALID_ARGUMENT` error.
+     * Format: `projects/{project}/locations/{location}/links/{link}`.
+     * 
+ * + * repeated string links = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes of the links to add. + * @return This builder for chaining. + */ + public Builder addLinksBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureLinksIsMutable(); + links_.add(value); + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of processes to return in a single page of the response.
+     * A page may contain fewer results than this value.
+     * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of processes to return in a single page of the response.
+     * A page may contain fewer results than this value.
+     * 
+ * + * 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 maximum number of processes to return in a single page of the response.
+     * A page may contain fewer results than this value.
+     * 
+ * + * int32 page_size = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The page token received from a previous `BatchSearchLinkProcesses` call.
+     * Use it to get the next page.
+     * When requesting subsequent pages of a response, remember that
+     * all parameters must match the values you provided
+     * in the original request.
+     * 
+ * + * 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 page token received from a previous `BatchSearchLinkProcesses` call.
+     * Use it to get the next page.
+     * When requesting subsequent pages of a response, remember that
+     * all parameters must match the values you provided
+     * in the original request.
+     * 
+ * + * 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 page token received from a previous `BatchSearchLinkProcesses` call.
+     * Use it to get the next page.
+     * When requesting subsequent pages of a response, remember that
+     * all parameters must match the values you provided
+     * in the original request.
+     * 
+ * + * 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 page token received from a previous `BatchSearchLinkProcesses` call.
+     * Use it to get the next page.
+     * When requesting subsequent pages of a response, remember that
+     * all parameters must match the values you provided
+     * in the original request.
+     * 
+ * + * string page_token = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The page token received from a previous `BatchSearchLinkProcesses` call.
+     * Use it to get the next page.
+     * When requesting subsequent pages of a response, remember that
+     * all parameters must match the values you provided
+     * in the original request.
+     * 
+ * + * 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.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest) + private static final com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest(); + } + + public static com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchSearchLinkProcessesRequest 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.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/BatchSearchLinkProcessesRequestOrBuilder.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/BatchSearchLinkProcessesRequestOrBuilder.java new file mode 100644 index 000000000000..786cbb50f731 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/BatchSearchLinkProcessesRequestOrBuilder.java @@ -0,0 +1,168 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +public interface BatchSearchLinkProcessesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project and location where you want to search.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The project and location where you want to search.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. An array of links to check for their associated LineageProcesses.
+   * The maximum number of items in this array is 100.
+   * If the request contains more than 100 links, it returns the
+   * `INVALID_ARGUMENT` error.
+   * Format: `projects/{project}/locations/{location}/links/{link}`.
+   * 
+ * + * repeated string links = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the links. + */ + java.util.List getLinksList(); + /** + * + * + *
+   * Required. An array of links to check for their associated LineageProcesses.
+   * The maximum number of items in this array is 100.
+   * If the request contains more than 100 links, it returns the
+   * `INVALID_ARGUMENT` error.
+   * Format: `projects/{project}/locations/{location}/links/{link}`.
+   * 
+ * + * repeated string links = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of links. + */ + int getLinksCount(); + /** + * + * + *
+   * Required. An array of links to check for their associated LineageProcesses.
+   * The maximum number of items in this array is 100.
+   * If the request contains more than 100 links, it returns the
+   * `INVALID_ARGUMENT` error.
+   * Format: `projects/{project}/locations/{location}/links/{link}`.
+   * 
+ * + * repeated string links = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The links at the given index. + */ + java.lang.String getLinks(int index); + /** + * + * + *
+   * Required. An array of links to check for their associated LineageProcesses.
+   * The maximum number of items in this array is 100.
+   * If the request contains more than 100 links, it returns the
+   * `INVALID_ARGUMENT` error.
+   * Format: `projects/{project}/locations/{location}/links/{link}`.
+   * 
+ * + * repeated string links = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the links at the given index. + */ + com.google.protobuf.ByteString getLinksBytes(int index); + + /** + * + * + *
+   * The maximum number of processes to return in a single page of the response.
+   * A page may contain fewer results than this value.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The page token received from a previous `BatchSearchLinkProcesses` call.
+   * Use it to get the next page.
+   * When requesting subsequent pages of a response, remember that
+   * all parameters must match the values you provided
+   * in the original request.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The page token received from a previous `BatchSearchLinkProcesses` call.
+   * Use it to get the next page.
+   * When requesting subsequent pages of a response, remember that
+   * all parameters must match the values you provided
+   * in the original request.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/BatchSearchLinkProcessesResponse.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/BatchSearchLinkProcessesResponse.java new file mode 100644 index 000000000000..37af759b1c25 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/BatchSearchLinkProcessesResponse.java @@ -0,0 +1,1143 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +/** + * + * + *
+ * Response message for
+ * [BatchSearchLinkProcesses][google.cloud.datacatalog.lineage.v1.Lineage.BatchSearchLinkProcesses].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse} + */ +public final class BatchSearchLinkProcessesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse) + BatchSearchLinkProcessesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchSearchLinkProcessesResponse.newBuilder() to construct. + private BatchSearchLinkProcessesResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchSearchLinkProcessesResponse() { + processLinks_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchSearchLinkProcessesResponse(); + } + + @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.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_BatchSearchLinkProcessesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_BatchSearchLinkProcessesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse.class, + com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse.Builder.class); + } + + public static final int PROCESS_LINKS_FIELD_NUMBER = 1; + private java.util.List processLinks_; + /** + * + * + *
+   * An array of processes associated with the specified links.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinks process_links = 1; + */ + @java.lang.Override + public java.util.List + getProcessLinksList() { + return processLinks_; + } + /** + * + * + *
+   * An array of processes associated with the specified links.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinks process_links = 1; + */ + @java.lang.Override + public java.util.List + getProcessLinksOrBuilderList() { + return processLinks_; + } + /** + * + * + *
+   * An array of processes associated with the specified links.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinks process_links = 1; + */ + @java.lang.Override + public int getProcessLinksCount() { + return processLinks_.size(); + } + /** + * + * + *
+   * An array of processes associated with the specified links.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinks process_links = 1; + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.ProcessLinks getProcessLinks(int index) { + return processLinks_.get(index); + } + /** + * + * + *
+   * An array of processes associated with the specified links.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinks process_links = 1; + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.ProcessLinksOrBuilder getProcessLinksOrBuilder( + int index) { + return processLinks_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * The token to specify as `page_token` in the subsequent call to get the next
+   * page. Omitted if there are no more pages in the response.
+   * 
+ * + * 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 token to specify as `page_token` in the subsequent call to get the next
+   * page. Omitted if there are no more pages in the response.
+   * 
+ * + * 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 < processLinks_.size(); i++) { + output.writeMessage(1, processLinks_.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 < processLinks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, processLinks_.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.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse other = + (com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse) obj; + + if (!getProcessLinksList().equals(other.getProcessLinksList())) 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 (getProcessLinksCount() > 0) { + hash = (37 * hash) + PROCESS_LINKS_FIELD_NUMBER; + hash = (53 * hash) + getProcessLinksList().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.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse 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.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse 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.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse 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.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse + 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.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse 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.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse 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
+   * [BatchSearchLinkProcesses][google.cloud.datacatalog.lineage.v1.Lineage.BatchSearchLinkProcesses].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse) + com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_BatchSearchLinkProcessesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_BatchSearchLinkProcessesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse.class, + com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (processLinksBuilder_ == null) { + processLinks_ = java.util.Collections.emptyList(); + } else { + processLinks_ = null; + processLinksBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_BatchSearchLinkProcessesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse + getDefaultInstanceForType() { + return com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse build() { + com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse buildPartial() { + com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse result = + new com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse(this); + int from_bitField0_ = bitField0_; + if (processLinksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + processLinks_ = java.util.Collections.unmodifiableList(processLinks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.processLinks_ = processLinks_; + } else { + result.processLinks_ = processLinksBuilder_.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.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse) { + return mergeFrom( + (com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse other) { + if (other + == com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse + .getDefaultInstance()) return this; + if (processLinksBuilder_ == null) { + if (!other.processLinks_.isEmpty()) { + if (processLinks_.isEmpty()) { + processLinks_ = other.processLinks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureProcessLinksIsMutable(); + processLinks_.addAll(other.processLinks_); + } + onChanged(); + } + } else { + if (!other.processLinks_.isEmpty()) { + if (processLinksBuilder_.isEmpty()) { + processLinksBuilder_.dispose(); + processLinksBuilder_ = null; + processLinks_ = other.processLinks_; + bitField0_ = (bitField0_ & ~0x00000001); + processLinksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getProcessLinksFieldBuilder() + : null; + } else { + processLinksBuilder_.addAllMessages(other.processLinks_); + } + } + } + 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.datacatalog.lineage.v1.ProcessLinks m = + input.readMessage( + com.google.cloud.datacatalog.lineage.v1.ProcessLinks.parser(), + extensionRegistry); + if (processLinksBuilder_ == null) { + ensureProcessLinksIsMutable(); + processLinks_.add(m); + } else { + processLinksBuilder_.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 processLinks_ = + java.util.Collections.emptyList(); + + private void ensureProcessLinksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + processLinks_ = + new java.util.ArrayList( + processLinks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.ProcessLinks, + com.google.cloud.datacatalog.lineage.v1.ProcessLinks.Builder, + com.google.cloud.datacatalog.lineage.v1.ProcessLinksOrBuilder> + processLinksBuilder_; + + /** + * + * + *
+     * An array of processes associated with the specified links.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinks process_links = 1; + */ + public java.util.List + getProcessLinksList() { + if (processLinksBuilder_ == null) { + return java.util.Collections.unmodifiableList(processLinks_); + } else { + return processLinksBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * An array of processes associated with the specified links.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinks process_links = 1; + */ + public int getProcessLinksCount() { + if (processLinksBuilder_ == null) { + return processLinks_.size(); + } else { + return processLinksBuilder_.getCount(); + } + } + /** + * + * + *
+     * An array of processes associated with the specified links.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinks process_links = 1; + */ + public com.google.cloud.datacatalog.lineage.v1.ProcessLinks getProcessLinks(int index) { + if (processLinksBuilder_ == null) { + return processLinks_.get(index); + } else { + return processLinksBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * An array of processes associated with the specified links.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinks process_links = 1; + */ + public Builder setProcessLinks( + int index, com.google.cloud.datacatalog.lineage.v1.ProcessLinks value) { + if (processLinksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProcessLinksIsMutable(); + processLinks_.set(index, value); + onChanged(); + } else { + processLinksBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * An array of processes associated with the specified links.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinks process_links = 1; + */ + public Builder setProcessLinks( + int index, com.google.cloud.datacatalog.lineage.v1.ProcessLinks.Builder builderForValue) { + if (processLinksBuilder_ == null) { + ensureProcessLinksIsMutable(); + processLinks_.set(index, builderForValue.build()); + onChanged(); + } else { + processLinksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * An array of processes associated with the specified links.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinks process_links = 1; + */ + public Builder addProcessLinks(com.google.cloud.datacatalog.lineage.v1.ProcessLinks value) { + if (processLinksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProcessLinksIsMutable(); + processLinks_.add(value); + onChanged(); + } else { + processLinksBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * An array of processes associated with the specified links.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinks process_links = 1; + */ + public Builder addProcessLinks( + int index, com.google.cloud.datacatalog.lineage.v1.ProcessLinks value) { + if (processLinksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProcessLinksIsMutable(); + processLinks_.add(index, value); + onChanged(); + } else { + processLinksBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * An array of processes associated with the specified links.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinks process_links = 1; + */ + public Builder addProcessLinks( + com.google.cloud.datacatalog.lineage.v1.ProcessLinks.Builder builderForValue) { + if (processLinksBuilder_ == null) { + ensureProcessLinksIsMutable(); + processLinks_.add(builderForValue.build()); + onChanged(); + } else { + processLinksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * An array of processes associated with the specified links.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinks process_links = 1; + */ + public Builder addProcessLinks( + int index, com.google.cloud.datacatalog.lineage.v1.ProcessLinks.Builder builderForValue) { + if (processLinksBuilder_ == null) { + ensureProcessLinksIsMutable(); + processLinks_.add(index, builderForValue.build()); + onChanged(); + } else { + processLinksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * An array of processes associated with the specified links.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinks process_links = 1; + */ + public Builder addAllProcessLinks( + java.lang.Iterable values) { + if (processLinksBuilder_ == null) { + ensureProcessLinksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, processLinks_); + onChanged(); + } else { + processLinksBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * An array of processes associated with the specified links.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinks process_links = 1; + */ + public Builder clearProcessLinks() { + if (processLinksBuilder_ == null) { + processLinks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + processLinksBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * An array of processes associated with the specified links.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinks process_links = 1; + */ + public Builder removeProcessLinks(int index) { + if (processLinksBuilder_ == null) { + ensureProcessLinksIsMutable(); + processLinks_.remove(index); + onChanged(); + } else { + processLinksBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * An array of processes associated with the specified links.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinks process_links = 1; + */ + public com.google.cloud.datacatalog.lineage.v1.ProcessLinks.Builder getProcessLinksBuilder( + int index) { + return getProcessLinksFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * An array of processes associated with the specified links.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinks process_links = 1; + */ + public com.google.cloud.datacatalog.lineage.v1.ProcessLinksOrBuilder getProcessLinksOrBuilder( + int index) { + if (processLinksBuilder_ == null) { + return processLinks_.get(index); + } else { + return processLinksBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * An array of processes associated with the specified links.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinks process_links = 1; + */ + public java.util.List + getProcessLinksOrBuilderList() { + if (processLinksBuilder_ != null) { + return processLinksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(processLinks_); + } + } + /** + * + * + *
+     * An array of processes associated with the specified links.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinks process_links = 1; + */ + public com.google.cloud.datacatalog.lineage.v1.ProcessLinks.Builder addProcessLinksBuilder() { + return getProcessLinksFieldBuilder() + .addBuilder(com.google.cloud.datacatalog.lineage.v1.ProcessLinks.getDefaultInstance()); + } + /** + * + * + *
+     * An array of processes associated with the specified links.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinks process_links = 1; + */ + public com.google.cloud.datacatalog.lineage.v1.ProcessLinks.Builder addProcessLinksBuilder( + int index) { + return getProcessLinksFieldBuilder() + .addBuilder( + index, com.google.cloud.datacatalog.lineage.v1.ProcessLinks.getDefaultInstance()); + } + /** + * + * + *
+     * An array of processes associated with the specified links.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinks process_links = 1; + */ + public java.util.List + getProcessLinksBuilderList() { + return getProcessLinksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.ProcessLinks, + com.google.cloud.datacatalog.lineage.v1.ProcessLinks.Builder, + com.google.cloud.datacatalog.lineage.v1.ProcessLinksOrBuilder> + getProcessLinksFieldBuilder() { + if (processLinksBuilder_ == null) { + processLinksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.ProcessLinks, + com.google.cloud.datacatalog.lineage.v1.ProcessLinks.Builder, + com.google.cloud.datacatalog.lineage.v1.ProcessLinksOrBuilder>( + processLinks_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + processLinks_ = null; + } + return processLinksBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * The token to specify as `page_token` in the subsequent call to get the next
+     * page. Omitted if there are no more pages in the response.
+     * 
+ * + * 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 token to specify as `page_token` in the subsequent call to get the next
+     * page. Omitted if there are no more pages in the response.
+     * 
+ * + * 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 token to specify as `page_token` in the subsequent call to get the next
+     * page. Omitted if there are no more pages in the response.
+     * 
+ * + * 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 token to specify as `page_token` in the subsequent call to get the next
+     * page. Omitted if there are no more pages in the response.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The token to specify as `page_token` in the subsequent call to get the next
+     * page. Omitted if there are no more pages in the response.
+     * 
+ * + * 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.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse) + private static final com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse(); + } + + public static com.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchSearchLinkProcessesResponse 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.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/BatchSearchLinkProcessesResponseOrBuilder.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/BatchSearchLinkProcessesResponseOrBuilder.java new file mode 100644 index 000000000000..538901eaee3c --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/BatchSearchLinkProcessesResponseOrBuilder.java @@ -0,0 +1,104 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +public interface BatchSearchLinkProcessesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * An array of processes associated with the specified links.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinks process_links = 1; + */ + java.util.List getProcessLinksList(); + /** + * + * + *
+   * An array of processes associated with the specified links.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinks process_links = 1; + */ + com.google.cloud.datacatalog.lineage.v1.ProcessLinks getProcessLinks(int index); + /** + * + * + *
+   * An array of processes associated with the specified links.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinks process_links = 1; + */ + int getProcessLinksCount(); + /** + * + * + *
+   * An array of processes associated with the specified links.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinks process_links = 1; + */ + java.util.List + getProcessLinksOrBuilderList(); + /** + * + * + *
+   * An array of processes associated with the specified links.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinks process_links = 1; + */ + com.google.cloud.datacatalog.lineage.v1.ProcessLinksOrBuilder getProcessLinksOrBuilder(int index); + + /** + * + * + *
+   * The token to specify as `page_token` in the subsequent call to get the next
+   * page. Omitted if there are no more pages in the response.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * The token to specify as `page_token` in the subsequent call to get the next
+   * page. Omitted if there are no more pages in the response.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/CreateLineageEventRequest.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/CreateLineageEventRequest.java new file mode 100644 index 000000000000..f187c50dc6a5 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/CreateLineageEventRequest.java @@ -0,0 +1,1125 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +/** + * + * + *
+ * Request message for
+ * [CreateLineageEvent][google.cloud.datacatalog.lineage.v1.CreateLineageEvent].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest} + */ +public final class CreateLineageEventRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest) + CreateLineageEventRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateLineageEventRequest.newBuilder() to construct. + private CreateLineageEventRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateLineageEventRequest() { + parent_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateLineageEventRequest(); + } + + @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.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_CreateLineageEventRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_CreateLineageEventRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest.class, + com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The name of the run that should own the lineage event.
+   * 
+ * + * + * 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 run that should own the lineage event.
+   * 
+ * + * + * 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 LINEAGE_EVENT_FIELD_NUMBER = 2; + private com.google.cloud.datacatalog.lineage.v1.LineageEvent lineageEvent_; + /** + * + * + *
+   * Required. The lineage event to create.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the lineageEvent field is set. + */ + @java.lang.Override + public boolean hasLineageEvent() { + return lineageEvent_ != null; + } + /** + * + * + *
+   * Required. The lineage event to create.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The lineageEvent. + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.LineageEvent getLineageEvent() { + return lineageEvent_ == null + ? com.google.cloud.datacatalog.lineage.v1.LineageEvent.getDefaultInstance() + : lineageEvent_; + } + /** + * + * + *
+   * Required. The lineage event to create.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.LineageEventOrBuilder getLineageEventOrBuilder() { + return getLineageEvent(); + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * A unique identifier for this request. Restricted to 36 ASCII characters.
+   * A random UUID is recommended. This request is idempotent only if a
+   * `request_id` is provided.
+   * 
+ * + * string request_id = 3; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * A unique identifier for this request. Restricted to 36 ASCII characters.
+   * A random UUID is recommended. This request is idempotent only if a
+   * `request_id` is provided.
+   * 
+ * + * string request_id = 3; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (lineageEvent_ != null) { + output.writeMessage(2, getLineageEvent()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + 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 (lineageEvent_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getLineageEvent()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + 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.datacatalog.lineage.v1.CreateLineageEventRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest other = + (com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasLineageEvent() != other.hasLineageEvent()) return false; + if (hasLineageEvent()) { + if (!getLineageEvent().equals(other.getLineageEvent())) return false; + } + if (!getRequestId().equals(other.getRequestId())) 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 (hasLineageEvent()) { + hash = (37 * hash) + LINEAGE_EVENT_FIELD_NUMBER; + hash = (53 * hash) + getLineageEvent().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest 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.datacatalog.lineage.v1.CreateLineageEventRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest 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.datacatalog.lineage.v1.CreateLineageEventRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest 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.datacatalog.lineage.v1.CreateLineageEventRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest + 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.datacatalog.lineage.v1.CreateLineageEventRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest 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.datacatalog.lineage.v1.CreateLineageEventRequest 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
+   * [CreateLineageEvent][google.cloud.datacatalog.lineage.v1.CreateLineageEvent].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest) + com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_CreateLineageEventRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_CreateLineageEventRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest.class, + com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest.Builder.class); + } + + // Construct using + // com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (lineageEventBuilder_ == null) { + lineageEvent_ = null; + } else { + lineageEvent_ = null; + lineageEventBuilder_ = null; + } + requestId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_CreateLineageEventRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest + getDefaultInstanceForType() { + return com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest build() { + com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest buildPartial() { + com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest result = + new com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest(this); + result.parent_ = parent_; + if (lineageEventBuilder_ == null) { + result.lineageEvent_ = lineageEvent_; + } else { + result.lineageEvent_ = lineageEventBuilder_.build(); + } + result.requestId_ = requestId_; + 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.datacatalog.lineage.v1.CreateLineageEventRequest) { + return mergeFrom((com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest other) { + if (other + == com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasLineageEvent()) { + mergeLineageEvent(other.getLineageEvent()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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: + { + input.readMessage(getLineageEventFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + requestId_ = 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 java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The name of the run that should own the lineage event.
+     * 
+ * + * + * 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 run that should own the lineage event.
+     * 
+ * + * + * 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 run that should own the lineage event.
+     * 
+ * + * + * 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 run that should own the lineage event.
+     * 
+ * + * + * 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 run that should own the lineage event.
+     * 
+ * + * + * 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.datacatalog.lineage.v1.LineageEvent lineageEvent_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.LineageEvent, + com.google.cloud.datacatalog.lineage.v1.LineageEvent.Builder, + com.google.cloud.datacatalog.lineage.v1.LineageEventOrBuilder> + lineageEventBuilder_; + /** + * + * + *
+     * Required. The lineage event to create.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the lineageEvent field is set. + */ + public boolean hasLineageEvent() { + return lineageEventBuilder_ != null || lineageEvent_ != null; + } + /** + * + * + *
+     * Required. The lineage event to create.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The lineageEvent. + */ + public com.google.cloud.datacatalog.lineage.v1.LineageEvent getLineageEvent() { + if (lineageEventBuilder_ == null) { + return lineageEvent_ == null + ? com.google.cloud.datacatalog.lineage.v1.LineageEvent.getDefaultInstance() + : lineageEvent_; + } else { + return lineageEventBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The lineage event to create.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setLineageEvent(com.google.cloud.datacatalog.lineage.v1.LineageEvent value) { + if (lineageEventBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lineageEvent_ = value; + onChanged(); + } else { + lineageEventBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The lineage event to create.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setLineageEvent( + com.google.cloud.datacatalog.lineage.v1.LineageEvent.Builder builderForValue) { + if (lineageEventBuilder_ == null) { + lineageEvent_ = builderForValue.build(); + onChanged(); + } else { + lineageEventBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The lineage event to create.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeLineageEvent(com.google.cloud.datacatalog.lineage.v1.LineageEvent value) { + if (lineageEventBuilder_ == null) { + if (lineageEvent_ != null) { + lineageEvent_ = + com.google.cloud.datacatalog.lineage.v1.LineageEvent.newBuilder(lineageEvent_) + .mergeFrom(value) + .buildPartial(); + } else { + lineageEvent_ = value; + } + onChanged(); + } else { + lineageEventBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The lineage event to create.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearLineageEvent() { + if (lineageEventBuilder_ == null) { + lineageEvent_ = null; + onChanged(); + } else { + lineageEvent_ = null; + lineageEventBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The lineage event to create.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.lineage.v1.LineageEvent.Builder getLineageEventBuilder() { + + onChanged(); + return getLineageEventFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The lineage event to create.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.lineage.v1.LineageEventOrBuilder + getLineageEventOrBuilder() { + if (lineageEventBuilder_ != null) { + return lineageEventBuilder_.getMessageOrBuilder(); + } else { + return lineageEvent_ == null + ? com.google.cloud.datacatalog.lineage.v1.LineageEvent.getDefaultInstance() + : lineageEvent_; + } + } + /** + * + * + *
+     * Required. The lineage event to create.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.LineageEvent, + com.google.cloud.datacatalog.lineage.v1.LineageEvent.Builder, + com.google.cloud.datacatalog.lineage.v1.LineageEventOrBuilder> + getLineageEventFieldBuilder() { + if (lineageEventBuilder_ == null) { + lineageEventBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.LineageEvent, + com.google.cloud.datacatalog.lineage.v1.LineageEvent.Builder, + com.google.cloud.datacatalog.lineage.v1.LineageEventOrBuilder>( + getLineageEvent(), getParentForChildren(), isClean()); + lineageEvent_ = null; + } + return lineageEventBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * A unique identifier for this request. Restricted to 36 ASCII characters.
+     * A random UUID is recommended. This request is idempotent only if a
+     * `request_id` is provided.
+     * 
+ * + * string request_id = 3; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A unique identifier for this request. Restricted to 36 ASCII characters.
+     * A random UUID is recommended. This request is idempotent only if a
+     * `request_id` is provided.
+     * 
+ * + * string request_id = 3; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A unique identifier for this request. Restricted to 36 ASCII characters.
+     * A random UUID is recommended. This request is idempotent only if a
+     * `request_id` is provided.
+     * 
+ * + * string request_id = 3; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A unique identifier for this request. Restricted to 36 ASCII characters.
+     * A random UUID is recommended. This request is idempotent only if a
+     * `request_id` is provided.
+     * 
+ * + * string request_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * A unique identifier for this request. Restricted to 36 ASCII characters.
+     * A random UUID is recommended. This request is idempotent only if a
+     * `request_id` is provided.
+     * 
+ * + * string request_id = 3; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = 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.datacatalog.lineage.v1.CreateLineageEventRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest) + private static final com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest(); + } + + public static com.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateLineageEventRequest 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.datacatalog.lineage.v1.CreateLineageEventRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/CreateLineageEventRequestOrBuilder.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/CreateLineageEventRequestOrBuilder.java new file mode 100644 index 000000000000..2fde94282b7d --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/CreateLineageEventRequestOrBuilder.java @@ -0,0 +1,124 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +public interface CreateLineageEventRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the run that should own the lineage event.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The name of the run that should own the lineage event.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The lineage event to create.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the lineageEvent field is set. + */ + boolean hasLineageEvent(); + /** + * + * + *
+   * Required. The lineage event to create.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The lineageEvent. + */ + com.google.cloud.datacatalog.lineage.v1.LineageEvent getLineageEvent(); + /** + * + * + *
+   * Required. The lineage event to create.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.datacatalog.lineage.v1.LineageEventOrBuilder getLineageEventOrBuilder(); + + /** + * + * + *
+   * A unique identifier for this request. Restricted to 36 ASCII characters.
+   * A random UUID is recommended. This request is idempotent only if a
+   * `request_id` is provided.
+   * 
+ * + * string request_id = 3; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * A unique identifier for this request. Restricted to 36 ASCII characters.
+   * A random UUID is recommended. This request is idempotent only if a
+   * `request_id` is provided.
+   * 
+ * + * string request_id = 3; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/CreateProcessRequest.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/CreateProcessRequest.java new file mode 100644 index 000000000000..6b977f0fab85 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/CreateProcessRequest.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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +/** + * + * + *
+ * Request message for
+ * [CreateProcess][google.cloud.datacatalog.lineage.v1.CreateProcess].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.CreateProcessRequest} + */ +public final class CreateProcessRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.lineage.v1.CreateProcessRequest) + CreateProcessRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateProcessRequest.newBuilder() to construct. + private CreateProcessRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateProcessRequest() { + parent_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateProcessRequest(); + } + + @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.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_CreateProcessRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_CreateProcessRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest.class, + com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The name of the project and its location that should own the
+   * process.
+   * 
+ * + * + * 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 project and its location that should own the
+   * process.
+   * 
+ * + * + * 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 PROCESS_FIELD_NUMBER = 2; + private com.google.cloud.datacatalog.lineage.v1.Process process_; + /** + * + * + *
+   * Required. The process to create.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Process process = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the process field is set. + */ + @java.lang.Override + public boolean hasProcess() { + return process_ != null; + } + /** + * + * + *
+   * Required. The process to create.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Process process = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The process. + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.Process getProcess() { + return process_ == null + ? com.google.cloud.datacatalog.lineage.v1.Process.getDefaultInstance() + : process_; + } + /** + * + * + *
+   * Required. The process to create.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Process process = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.ProcessOrBuilder getProcessOrBuilder() { + return getProcess(); + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * A unique identifier for this request. Restricted to 36 ASCII characters.
+   * A random UUID is recommended. This request is idempotent only if a
+   * `request_id` is provided.
+   * 
+ * + * string request_id = 3; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * A unique identifier for this request. Restricted to 36 ASCII characters.
+   * A random UUID is recommended. This request is idempotent only if a
+   * `request_id` is provided.
+   * 
+ * + * string request_id = 3; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (process_ != null) { + output.writeMessage(2, getProcess()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + 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 (process_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getProcess()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + 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.datacatalog.lineage.v1.CreateProcessRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest other = + (com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasProcess() != other.hasProcess()) return false; + if (hasProcess()) { + if (!getProcess().equals(other.getProcess())) return false; + } + if (!getRequestId().equals(other.getRequestId())) 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 (hasProcess()) { + hash = (37 * hash) + PROCESS_FIELD_NUMBER; + hash = (53 * hash) + getProcess().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest 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.datacatalog.lineage.v1.CreateProcessRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest 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.datacatalog.lineage.v1.CreateProcessRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest 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.datacatalog.lineage.v1.CreateProcessRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest 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.datacatalog.lineage.v1.CreateProcessRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest 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.datacatalog.lineage.v1.CreateProcessRequest 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
+   * [CreateProcess][google.cloud.datacatalog.lineage.v1.CreateProcess].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.CreateProcessRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.lineage.v1.CreateProcessRequest) + com.google.cloud.datacatalog.lineage.v1.CreateProcessRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_CreateProcessRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_CreateProcessRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest.class, + com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (processBuilder_ == null) { + process_ = null; + } else { + process_ = null; + processBuilder_ = null; + } + requestId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_CreateProcessRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest + getDefaultInstanceForType() { + return com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest build() { + com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest buildPartial() { + com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest result = + new com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest(this); + result.parent_ = parent_; + if (processBuilder_ == null) { + result.process_ = process_; + } else { + result.process_ = processBuilder_.build(); + } + result.requestId_ = requestId_; + 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.datacatalog.lineage.v1.CreateProcessRequest) { + return mergeFrom((com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest other) { + if (other + == com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasProcess()) { + mergeProcess(other.getProcess()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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: + { + input.readMessage(getProcessFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + requestId_ = 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 java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The name of the project and its location that should own the
+     * process.
+     * 
+ * + * + * 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 project and its location that should own the
+     * process.
+     * 
+ * + * + * 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 project and its location that should own the
+     * process.
+     * 
+ * + * + * 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 project and its location that should own the
+     * process.
+     * 
+ * + * + * 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 project and its location that should own the
+     * process.
+     * 
+ * + * + * 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.datacatalog.lineage.v1.Process process_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.Process, + com.google.cloud.datacatalog.lineage.v1.Process.Builder, + com.google.cloud.datacatalog.lineage.v1.ProcessOrBuilder> + processBuilder_; + /** + * + * + *
+     * Required. The process to create.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Process process = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the process field is set. + */ + public boolean hasProcess() { + return processBuilder_ != null || process_ != null; + } + /** + * + * + *
+     * Required. The process to create.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Process process = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The process. + */ + public com.google.cloud.datacatalog.lineage.v1.Process getProcess() { + if (processBuilder_ == null) { + return process_ == null + ? com.google.cloud.datacatalog.lineage.v1.Process.getDefaultInstance() + : process_; + } else { + return processBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The process to create.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Process process = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setProcess(com.google.cloud.datacatalog.lineage.v1.Process value) { + if (processBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + process_ = value; + onChanged(); + } else { + processBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The process to create.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Process process = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setProcess( + com.google.cloud.datacatalog.lineage.v1.Process.Builder builderForValue) { + if (processBuilder_ == null) { + process_ = builderForValue.build(); + onChanged(); + } else { + processBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The process to create.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Process process = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeProcess(com.google.cloud.datacatalog.lineage.v1.Process value) { + if (processBuilder_ == null) { + if (process_ != null) { + process_ = + com.google.cloud.datacatalog.lineage.v1.Process.newBuilder(process_) + .mergeFrom(value) + .buildPartial(); + } else { + process_ = value; + } + onChanged(); + } else { + processBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The process to create.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Process process = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearProcess() { + if (processBuilder_ == null) { + process_ = null; + onChanged(); + } else { + process_ = null; + processBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The process to create.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Process process = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.lineage.v1.Process.Builder getProcessBuilder() { + + onChanged(); + return getProcessFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The process to create.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Process process = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.lineage.v1.ProcessOrBuilder getProcessOrBuilder() { + if (processBuilder_ != null) { + return processBuilder_.getMessageOrBuilder(); + } else { + return process_ == null + ? com.google.cloud.datacatalog.lineage.v1.Process.getDefaultInstance() + : process_; + } + } + /** + * + * + *
+     * Required. The process to create.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Process process = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.Process, + com.google.cloud.datacatalog.lineage.v1.Process.Builder, + com.google.cloud.datacatalog.lineage.v1.ProcessOrBuilder> + getProcessFieldBuilder() { + if (processBuilder_ == null) { + processBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.Process, + com.google.cloud.datacatalog.lineage.v1.Process.Builder, + com.google.cloud.datacatalog.lineage.v1.ProcessOrBuilder>( + getProcess(), getParentForChildren(), isClean()); + process_ = null; + } + return processBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * A unique identifier for this request. Restricted to 36 ASCII characters.
+     * A random UUID is recommended. This request is idempotent only if a
+     * `request_id` is provided.
+     * 
+ * + * string request_id = 3; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A unique identifier for this request. Restricted to 36 ASCII characters.
+     * A random UUID is recommended. This request is idempotent only if a
+     * `request_id` is provided.
+     * 
+ * + * string request_id = 3; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A unique identifier for this request. Restricted to 36 ASCII characters.
+     * A random UUID is recommended. This request is idempotent only if a
+     * `request_id` is provided.
+     * 
+ * + * string request_id = 3; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A unique identifier for this request. Restricted to 36 ASCII characters.
+     * A random UUID is recommended. This request is idempotent only if a
+     * `request_id` is provided.
+     * 
+ * + * string request_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * A unique identifier for this request. Restricted to 36 ASCII characters.
+     * A random UUID is recommended. This request is idempotent only if a
+     * `request_id` is provided.
+     * 
+ * + * string request_id = 3; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = 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.datacatalog.lineage.v1.CreateProcessRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.lineage.v1.CreateProcessRequest) + private static final com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest(); + } + + public static com.google.cloud.datacatalog.lineage.v1.CreateProcessRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateProcessRequest 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.datacatalog.lineage.v1.CreateProcessRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/CreateProcessRequestOrBuilder.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/CreateProcessRequestOrBuilder.java new file mode 100644 index 000000000000..2c8abb58ec74 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/CreateProcessRequestOrBuilder.java @@ -0,0 +1,126 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +public interface CreateProcessRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.lineage.v1.CreateProcessRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the project and its location that should own the
+   * process.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The name of the project and its location that should own the
+   * process.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The process to create.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Process process = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the process field is set. + */ + boolean hasProcess(); + /** + * + * + *
+   * Required. The process to create.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Process process = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The process. + */ + com.google.cloud.datacatalog.lineage.v1.Process getProcess(); + /** + * + * + *
+   * Required. The process to create.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Process process = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.datacatalog.lineage.v1.ProcessOrBuilder getProcessOrBuilder(); + + /** + * + * + *
+   * A unique identifier for this request. Restricted to 36 ASCII characters.
+   * A random UUID is recommended. This request is idempotent only if a
+   * `request_id` is provided.
+   * 
+ * + * string request_id = 3; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * A unique identifier for this request. Restricted to 36 ASCII characters.
+   * A random UUID is recommended. This request is idempotent only if a
+   * `request_id` is provided.
+   * 
+ * + * string request_id = 3; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/CreateRunRequest.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/CreateRunRequest.java new file mode 100644 index 000000000000..ae5a3ca1621c --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/CreateRunRequest.java @@ -0,0 +1,1113 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +/** + * + * + *
+ * Request message for
+ * [CreateRun][google.cloud.datacatalog.lineage.v1.CreateRun].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.CreateRunRequest} + */ +public final class CreateRunRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.lineage.v1.CreateRunRequest) + CreateRunRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateRunRequest.newBuilder() to construct. + private CreateRunRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateRunRequest() { + parent_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateRunRequest(); + } + + @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.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_CreateRunRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_CreateRunRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.CreateRunRequest.class, + com.google.cloud.datacatalog.lineage.v1.CreateRunRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The name of the process that should own the run.
+   * 
+ * + * + * 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 process that should own the run.
+   * 
+ * + * + * 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 RUN_FIELD_NUMBER = 2; + private com.google.cloud.datacatalog.lineage.v1.Run run_; + /** + * + * + *
+   * Required. The run to create.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run run = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the run field is set. + */ + @java.lang.Override + public boolean hasRun() { + return run_ != null; + } + /** + * + * + *
+   * Required. The run to create.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run run = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The run. + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.Run getRun() { + return run_ == null ? com.google.cloud.datacatalog.lineage.v1.Run.getDefaultInstance() : run_; + } + /** + * + * + *
+   * Required. The run to create.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run run = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.RunOrBuilder getRunOrBuilder() { + return getRun(); + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * A unique identifier for this request. Restricted to 36 ASCII characters.
+   * A random UUID is recommended. This request is idempotent only if a
+   * `request_id` is provided.
+   * 
+ * + * string request_id = 3; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * A unique identifier for this request. Restricted to 36 ASCII characters.
+   * A random UUID is recommended. This request is idempotent only if a
+   * `request_id` is provided.
+   * 
+ * + * string request_id = 3; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (run_ != null) { + output.writeMessage(2, getRun()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + 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 (run_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRun()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + 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.datacatalog.lineage.v1.CreateRunRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.lineage.v1.CreateRunRequest other = + (com.google.cloud.datacatalog.lineage.v1.CreateRunRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasRun() != other.hasRun()) return false; + if (hasRun()) { + if (!getRun().equals(other.getRun())) return false; + } + if (!getRequestId().equals(other.getRequestId())) 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 (hasRun()) { + hash = (37 * hash) + RUN_FIELD_NUMBER; + hash = (53 * hash) + getRun().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.lineage.v1.CreateRunRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.CreateRunRequest 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.datacatalog.lineage.v1.CreateRunRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.CreateRunRequest 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.datacatalog.lineage.v1.CreateRunRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.CreateRunRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.lineage.v1.CreateRunRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.CreateRunRequest 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.datacatalog.lineage.v1.CreateRunRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.CreateRunRequest 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.datacatalog.lineage.v1.CreateRunRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.CreateRunRequest 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.datacatalog.lineage.v1.CreateRunRequest 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
+   * [CreateRun][google.cloud.datacatalog.lineage.v1.CreateRun].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.CreateRunRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.lineage.v1.CreateRunRequest) + com.google.cloud.datacatalog.lineage.v1.CreateRunRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_CreateRunRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_CreateRunRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.CreateRunRequest.class, + com.google.cloud.datacatalog.lineage.v1.CreateRunRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.lineage.v1.CreateRunRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (runBuilder_ == null) { + run_ = null; + } else { + run_ = null; + runBuilder_ = null; + } + requestId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_CreateRunRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.CreateRunRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.lineage.v1.CreateRunRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.CreateRunRequest build() { + com.google.cloud.datacatalog.lineage.v1.CreateRunRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.CreateRunRequest buildPartial() { + com.google.cloud.datacatalog.lineage.v1.CreateRunRequest result = + new com.google.cloud.datacatalog.lineage.v1.CreateRunRequest(this); + result.parent_ = parent_; + if (runBuilder_ == null) { + result.run_ = run_; + } else { + result.run_ = runBuilder_.build(); + } + result.requestId_ = requestId_; + 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.datacatalog.lineage.v1.CreateRunRequest) { + return mergeFrom((com.google.cloud.datacatalog.lineage.v1.CreateRunRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.lineage.v1.CreateRunRequest other) { + if (other == com.google.cloud.datacatalog.lineage.v1.CreateRunRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasRun()) { + mergeRun(other.getRun()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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: + { + input.readMessage(getRunFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + requestId_ = 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 java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The name of the process that should own the run.
+     * 
+ * + * + * 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 process that should own the run.
+     * 
+ * + * + * 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 process that should own the run.
+     * 
+ * + * + * 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 process that should own the run.
+     * 
+ * + * + * 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 process that should own the run.
+     * 
+ * + * + * 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.datacatalog.lineage.v1.Run run_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.Run, + com.google.cloud.datacatalog.lineage.v1.Run.Builder, + com.google.cloud.datacatalog.lineage.v1.RunOrBuilder> + runBuilder_; + /** + * + * + *
+     * Required. The run to create.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run run = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the run field is set. + */ + public boolean hasRun() { + return runBuilder_ != null || run_ != null; + } + /** + * + * + *
+     * Required. The run to create.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run run = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The run. + */ + public com.google.cloud.datacatalog.lineage.v1.Run getRun() { + if (runBuilder_ == null) { + return run_ == null + ? com.google.cloud.datacatalog.lineage.v1.Run.getDefaultInstance() + : run_; + } else { + return runBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The run to create.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run run = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRun(com.google.cloud.datacatalog.lineage.v1.Run value) { + if (runBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + run_ = value; + onChanged(); + } else { + runBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The run to create.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run run = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRun(com.google.cloud.datacatalog.lineage.v1.Run.Builder builderForValue) { + if (runBuilder_ == null) { + run_ = builderForValue.build(); + onChanged(); + } else { + runBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The run to create.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run run = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeRun(com.google.cloud.datacatalog.lineage.v1.Run value) { + if (runBuilder_ == null) { + if (run_ != null) { + run_ = + com.google.cloud.datacatalog.lineage.v1.Run.newBuilder(run_) + .mergeFrom(value) + .buildPartial(); + } else { + run_ = value; + } + onChanged(); + } else { + runBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The run to create.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run run = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearRun() { + if (runBuilder_ == null) { + run_ = null; + onChanged(); + } else { + run_ = null; + runBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The run to create.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run run = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.lineage.v1.Run.Builder getRunBuilder() { + + onChanged(); + return getRunFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The run to create.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run run = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.lineage.v1.RunOrBuilder getRunOrBuilder() { + if (runBuilder_ != null) { + return runBuilder_.getMessageOrBuilder(); + } else { + return run_ == null + ? com.google.cloud.datacatalog.lineage.v1.Run.getDefaultInstance() + : run_; + } + } + /** + * + * + *
+     * Required. The run to create.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run run = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.Run, + com.google.cloud.datacatalog.lineage.v1.Run.Builder, + com.google.cloud.datacatalog.lineage.v1.RunOrBuilder> + getRunFieldBuilder() { + if (runBuilder_ == null) { + runBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.Run, + com.google.cloud.datacatalog.lineage.v1.Run.Builder, + com.google.cloud.datacatalog.lineage.v1.RunOrBuilder>( + getRun(), getParentForChildren(), isClean()); + run_ = null; + } + return runBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * A unique identifier for this request. Restricted to 36 ASCII characters.
+     * A random UUID is recommended. This request is idempotent only if a
+     * `request_id` is provided.
+     * 
+ * + * string request_id = 3; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A unique identifier for this request. Restricted to 36 ASCII characters.
+     * A random UUID is recommended. This request is idempotent only if a
+     * `request_id` is provided.
+     * 
+ * + * string request_id = 3; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A unique identifier for this request. Restricted to 36 ASCII characters.
+     * A random UUID is recommended. This request is idempotent only if a
+     * `request_id` is provided.
+     * 
+ * + * string request_id = 3; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A unique identifier for this request. Restricted to 36 ASCII characters.
+     * A random UUID is recommended. This request is idempotent only if a
+     * `request_id` is provided.
+     * 
+ * + * string request_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * A unique identifier for this request. Restricted to 36 ASCII characters.
+     * A random UUID is recommended. This request is idempotent only if a
+     * `request_id` is provided.
+     * 
+ * + * string request_id = 3; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = 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.datacatalog.lineage.v1.CreateRunRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.lineage.v1.CreateRunRequest) + private static final com.google.cloud.datacatalog.lineage.v1.CreateRunRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.lineage.v1.CreateRunRequest(); + } + + public static com.google.cloud.datacatalog.lineage.v1.CreateRunRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateRunRequest 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.datacatalog.lineage.v1.CreateRunRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/CreateRunRequestOrBuilder.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/CreateRunRequestOrBuilder.java new file mode 100644 index 000000000000..288437281aa4 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/CreateRunRequestOrBuilder.java @@ -0,0 +1,124 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +public interface CreateRunRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.lineage.v1.CreateRunRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the process that should own the run.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The name of the process that should own the run.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The run to create.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run run = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the run field is set. + */ + boolean hasRun(); + /** + * + * + *
+   * Required. The run to create.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run run = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The run. + */ + com.google.cloud.datacatalog.lineage.v1.Run getRun(); + /** + * + * + *
+   * Required. The run to create.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run run = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.datacatalog.lineage.v1.RunOrBuilder getRunOrBuilder(); + + /** + * + * + *
+   * A unique identifier for this request. Restricted to 36 ASCII characters.
+   * A random UUID is recommended. This request is idempotent only if a
+   * `request_id` is provided.
+   * 
+ * + * string request_id = 3; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * A unique identifier for this request. Restricted to 36 ASCII characters.
+   * A random UUID is recommended. This request is idempotent only if a
+   * `request_id` is provided.
+   * 
+ * + * string request_id = 3; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/DeleteLineageEventRequest.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/DeleteLineageEventRequest.java new file mode 100644 index 000000000000..919107b5585a --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/DeleteLineageEventRequest.java @@ -0,0 +1,735 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +/** + * + * + *
+ * Request message for
+ * [DeleteLineageEvent][google.cloud.datacatalog.lineage.v1.DeleteLineageEvent].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest} + */ +public final class DeleteLineageEventRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest) + DeleteLineageEventRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteLineageEventRequest.newBuilder() to construct. + private DeleteLineageEventRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteLineageEventRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteLineageEventRequest(); + } + + @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.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_DeleteLineageEventRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_DeleteLineageEventRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest.class, + com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the lineage event to delete.
+   * 
+ * + * + * 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 lineage event to delete.
+   * 
+ * + * + * 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; + } + } + + public static final int ALLOW_MISSING_FIELD_NUMBER = 2; + private boolean allowMissing_; + /** + * + * + *
+   * If set to true and the lineage event is not found, the request
+   * succeeds but the server doesn't perform any actions.
+   * 
+ * + * bool allow_missing = 2; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + + 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 (allowMissing_ != false) { + output.writeBool(2, allowMissing_); + } + 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 (allowMissing_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, allowMissing_); + } + 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.datacatalog.lineage.v1.DeleteLineageEventRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest other = + (com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (getAllowMissing() != other.getAllowMissing()) 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 = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest 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.datacatalog.lineage.v1.DeleteLineageEventRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest 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.datacatalog.lineage.v1.DeleteLineageEventRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest 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.datacatalog.lineage.v1.DeleteLineageEventRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest + 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.datacatalog.lineage.v1.DeleteLineageEventRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest 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.datacatalog.lineage.v1.DeleteLineageEventRequest 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
+   * [DeleteLineageEvent][google.cloud.datacatalog.lineage.v1.DeleteLineageEvent].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest) + com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_DeleteLineageEventRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_DeleteLineageEventRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest.class, + com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest.Builder.class); + } + + // Construct using + // com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + allowMissing_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_DeleteLineageEventRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest + getDefaultInstanceForType() { + return com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest build() { + com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest buildPartial() { + com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest result = + new com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest(this); + result.name_ = name_; + result.allowMissing_ = allowMissing_; + 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.datacatalog.lineage.v1.DeleteLineageEventRequest) { + return mergeFrom((com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest other) { + if (other + == com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getAllowMissing() != false) { + setAllowMissing(other.getAllowMissing()); + } + 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 16: + { + allowMissing_ = input.readBool(); + + break; + } // case 16 + 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 lineage event to delete.
+     * 
+ * + * + * 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 lineage event to delete.
+     * 
+ * + * + * 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 lineage event to delete.
+     * 
+ * + * + * 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 lineage event to delete.
+     * 
+ * + * + * 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 lineage event to delete.
+     * 
+ * + * + * 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; + } + + private boolean allowMissing_; + /** + * + * + *
+     * If set to true and the lineage event is not found, the request
+     * succeeds but the server doesn't perform any actions.
+     * 
+ * + * bool allow_missing = 2; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + /** + * + * + *
+     * If set to true and the lineage event is not found, the request
+     * succeeds but the server doesn't perform any actions.
+     * 
+ * + * bool allow_missing = 2; + * + * @param value The allowMissing to set. + * @return This builder for chaining. + */ + public Builder setAllowMissing(boolean value) { + + allowMissing_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If set to true and the lineage event is not found, the request
+     * succeeds but the server doesn't perform any actions.
+     * 
+ * + * bool allow_missing = 2; + * + * @return This builder for chaining. + */ + public Builder clearAllowMissing() { + + allowMissing_ = 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.datacatalog.lineage.v1.DeleteLineageEventRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest) + private static final com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest(); + } + + public static com.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteLineageEventRequest 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.datacatalog.lineage.v1.DeleteLineageEventRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/DeleteLineageEventRequestOrBuilder.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/DeleteLineageEventRequestOrBuilder.java new file mode 100644 index 000000000000..8b32d912520b --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/DeleteLineageEventRequestOrBuilder.java @@ -0,0 +1,68 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +public interface DeleteLineageEventRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the lineage event to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the lineage event to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * If set to true and the lineage event is not found, the request
+   * succeeds but the server doesn't perform any actions.
+   * 
+ * + * bool allow_missing = 2; + * + * @return The allowMissing. + */ + boolean getAllowMissing(); +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/DeleteProcessRequest.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/DeleteProcessRequest.java new file mode 100644 index 000000000000..078043c10ab6 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/DeleteProcessRequest.java @@ -0,0 +1,730 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +/** + * + * + *
+ * Request message for
+ * [DeleteProcess][google.cloud.datacatalog.lineage.v1.DeleteProcess].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.DeleteProcessRequest} + */ +public final class DeleteProcessRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.lineage.v1.DeleteProcessRequest) + DeleteProcessRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteProcessRequest.newBuilder() to construct. + private DeleteProcessRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteProcessRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteProcessRequest(); + } + + @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.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_DeleteProcessRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_DeleteProcessRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest.class, + com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the process to delete.
+   * 
+ * + * + * 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 process to delete.
+   * 
+ * + * + * 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; + } + } + + public static final int ALLOW_MISSING_FIELD_NUMBER = 2; + private boolean allowMissing_; + /** + * + * + *
+   * If set to true and the process is not found, the request
+   * succeeds but the server doesn't perform any actions.
+   * 
+ * + * bool allow_missing = 2; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + + 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 (allowMissing_ != false) { + output.writeBool(2, allowMissing_); + } + 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 (allowMissing_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, allowMissing_); + } + 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.datacatalog.lineage.v1.DeleteProcessRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest other = + (com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (getAllowMissing() != other.getAllowMissing()) 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 = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest 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.datacatalog.lineage.v1.DeleteProcessRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest 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.datacatalog.lineage.v1.DeleteProcessRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest 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.datacatalog.lineage.v1.DeleteProcessRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest 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.datacatalog.lineage.v1.DeleteProcessRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest 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.datacatalog.lineage.v1.DeleteProcessRequest 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
+   * [DeleteProcess][google.cloud.datacatalog.lineage.v1.DeleteProcess].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.DeleteProcessRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.lineage.v1.DeleteProcessRequest) + com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_DeleteProcessRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_DeleteProcessRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest.class, + com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + allowMissing_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_DeleteProcessRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest + getDefaultInstanceForType() { + return com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest build() { + com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest buildPartial() { + com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest result = + new com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest(this); + result.name_ = name_; + result.allowMissing_ = allowMissing_; + 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.datacatalog.lineage.v1.DeleteProcessRequest) { + return mergeFrom((com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest other) { + if (other + == com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getAllowMissing() != false) { + setAllowMissing(other.getAllowMissing()); + } + 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 16: + { + allowMissing_ = input.readBool(); + + break; + } // case 16 + 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 process to delete.
+     * 
+ * + * + * 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 process to delete.
+     * 
+ * + * + * 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 process to delete.
+     * 
+ * + * + * 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 process to delete.
+     * 
+ * + * + * 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 process to delete.
+     * 
+ * + * + * 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; + } + + private boolean allowMissing_; + /** + * + * + *
+     * If set to true and the process is not found, the request
+     * succeeds but the server doesn't perform any actions.
+     * 
+ * + * bool allow_missing = 2; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + /** + * + * + *
+     * If set to true and the process is not found, the request
+     * succeeds but the server doesn't perform any actions.
+     * 
+ * + * bool allow_missing = 2; + * + * @param value The allowMissing to set. + * @return This builder for chaining. + */ + public Builder setAllowMissing(boolean value) { + + allowMissing_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If set to true and the process is not found, the request
+     * succeeds but the server doesn't perform any actions.
+     * 
+ * + * bool allow_missing = 2; + * + * @return This builder for chaining. + */ + public Builder clearAllowMissing() { + + allowMissing_ = 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.datacatalog.lineage.v1.DeleteProcessRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.lineage.v1.DeleteProcessRequest) + private static final com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest(); + } + + public static com.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteProcessRequest 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.datacatalog.lineage.v1.DeleteProcessRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/DeleteProcessRequestOrBuilder.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/DeleteProcessRequestOrBuilder.java new file mode 100644 index 000000000000..de6e66540455 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/DeleteProcessRequestOrBuilder.java @@ -0,0 +1,68 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +public interface DeleteProcessRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.lineage.v1.DeleteProcessRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the process to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the process to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * If set to true and the process is not found, the request
+   * succeeds but the server doesn't perform any actions.
+   * 
+ * + * bool allow_missing = 2; + * + * @return The allowMissing. + */ + boolean getAllowMissing(); +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/DeleteRunRequest.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/DeleteRunRequest.java new file mode 100644 index 000000000000..94a037d8105d --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/DeleteRunRequest.java @@ -0,0 +1,727 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +/** + * + * + *
+ * Request message for
+ * [DeleteRun][google.cloud.datacatalog.lineage.v1.DeleteRun].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.DeleteRunRequest} + */ +public final class DeleteRunRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.lineage.v1.DeleteRunRequest) + DeleteRunRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteRunRequest.newBuilder() to construct. + private DeleteRunRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteRunRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteRunRequest(); + } + + @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.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_DeleteRunRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_DeleteRunRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest.class, + com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the run to delete.
+   * 
+ * + * + * 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 run to delete.
+   * 
+ * + * + * 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; + } + } + + public static final int ALLOW_MISSING_FIELD_NUMBER = 2; + private boolean allowMissing_; + /** + * + * + *
+   * If set to true and the run is not found, the request
+   * succeeds but the server doesn't perform any actions.
+   * 
+ * + * bool allow_missing = 2; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + + 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 (allowMissing_ != false) { + output.writeBool(2, allowMissing_); + } + 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 (allowMissing_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, allowMissing_); + } + 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.datacatalog.lineage.v1.DeleteRunRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest other = + (com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (getAllowMissing() != other.getAllowMissing()) 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 = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest 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.datacatalog.lineage.v1.DeleteRunRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest 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.datacatalog.lineage.v1.DeleteRunRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest 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.datacatalog.lineage.v1.DeleteRunRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest 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.datacatalog.lineage.v1.DeleteRunRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest 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.datacatalog.lineage.v1.DeleteRunRequest 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
+   * [DeleteRun][google.cloud.datacatalog.lineage.v1.DeleteRun].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.DeleteRunRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.lineage.v1.DeleteRunRequest) + com.google.cloud.datacatalog.lineage.v1.DeleteRunRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_DeleteRunRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_DeleteRunRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest.class, + com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + allowMissing_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_DeleteRunRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest build() { + com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest buildPartial() { + com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest result = + new com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest(this); + result.name_ = name_; + result.allowMissing_ = allowMissing_; + 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.datacatalog.lineage.v1.DeleteRunRequest) { + return mergeFrom((com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest other) { + if (other == com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getAllowMissing() != false) { + setAllowMissing(other.getAllowMissing()); + } + 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 16: + { + allowMissing_ = input.readBool(); + + break; + } // case 16 + 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 run to delete.
+     * 
+ * + * + * 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 run to delete.
+     * 
+ * + * + * 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 run to delete.
+     * 
+ * + * + * 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 run to delete.
+     * 
+ * + * + * 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 run to delete.
+     * 
+ * + * + * 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; + } + + private boolean allowMissing_; + /** + * + * + *
+     * If set to true and the run is not found, the request
+     * succeeds but the server doesn't perform any actions.
+     * 
+ * + * bool allow_missing = 2; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + /** + * + * + *
+     * If set to true and the run is not found, the request
+     * succeeds but the server doesn't perform any actions.
+     * 
+ * + * bool allow_missing = 2; + * + * @param value The allowMissing to set. + * @return This builder for chaining. + */ + public Builder setAllowMissing(boolean value) { + + allowMissing_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If set to true and the run is not found, the request
+     * succeeds but the server doesn't perform any actions.
+     * 
+ * + * bool allow_missing = 2; + * + * @return This builder for chaining. + */ + public Builder clearAllowMissing() { + + allowMissing_ = 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.datacatalog.lineage.v1.DeleteRunRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.lineage.v1.DeleteRunRequest) + private static final com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest(); + } + + public static com.google.cloud.datacatalog.lineage.v1.DeleteRunRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteRunRequest 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.datacatalog.lineage.v1.DeleteRunRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/DeleteRunRequestOrBuilder.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/DeleteRunRequestOrBuilder.java new file mode 100644 index 000000000000..cc90c1f594c1 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/DeleteRunRequestOrBuilder.java @@ -0,0 +1,68 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +public interface DeleteRunRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.lineage.v1.DeleteRunRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the run to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the run to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * If set to true and the run is not found, the request
+   * succeeds but the server doesn't perform any actions.
+   * 
+ * + * bool allow_missing = 2; + * + * @return The allowMissing. + */ + boolean getAllowMissing(); +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/EntityReference.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/EntityReference.java new file mode 100644 index 000000000000..3d372b3b2fc0 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/EntityReference.java @@ -0,0 +1,665 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +/** + * + * + *
+ * The soft reference to everything you can attach a lineage event to.
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.EntityReference} + */ +public final class EntityReference extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.lineage.v1.EntityReference) + EntityReferenceOrBuilder { + private static final long serialVersionUID = 0L; + // Use EntityReference.newBuilder() to construct. + private EntityReference(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EntityReference() { + fullyQualifiedName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EntityReference(); + } + + @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.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_EntityReference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_EntityReference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.EntityReference.class, + com.google.cloud.datacatalog.lineage.v1.EntityReference.Builder.class); + } + + public static final int FULLY_QUALIFIED_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object fullyQualifiedName_; + /** + * + * + *
+   * Required. Fully Qualified Name of the entity. Useful for referencing
+   * entities that aren't represented as GCP resources, for example, tables in
+   * Dataproc Metastore API.
+   * Examples:
+   *   * `bigquery:dataset.project_id.dataset_id`
+   *   * `bigquery:table.project_id.dataset_id.table_id`
+   *   * `pubsub:project_id.topic_id`
+   *   * `dataproc_metastore:projectId.locationId.instanceId.databaseId.tableId`
+   * 
+ * + * string fully_qualified_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The fullyQualifiedName. + */ + @java.lang.Override + public java.lang.String getFullyQualifiedName() { + java.lang.Object ref = fullyQualifiedName_; + 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(); + fullyQualifiedName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Fully Qualified Name of the entity. Useful for referencing
+   * entities that aren't represented as GCP resources, for example, tables in
+   * Dataproc Metastore API.
+   * Examples:
+   *   * `bigquery:dataset.project_id.dataset_id`
+   *   * `bigquery:table.project_id.dataset_id.table_id`
+   *   * `pubsub:project_id.topic_id`
+   *   * `dataproc_metastore:projectId.locationId.instanceId.databaseId.tableId`
+   * 
+ * + * string fully_qualified_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for fullyQualifiedName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFullyQualifiedNameBytes() { + java.lang.Object ref = fullyQualifiedName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fullyQualifiedName_ = 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(fullyQualifiedName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fullyQualifiedName_); + } + 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(fullyQualifiedName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, fullyQualifiedName_); + } + 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.datacatalog.lineage.v1.EntityReference)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.lineage.v1.EntityReference other = + (com.google.cloud.datacatalog.lineage.v1.EntityReference) obj; + + if (!getFullyQualifiedName().equals(other.getFullyQualifiedName())) 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) + FULLY_QUALIFIED_NAME_FIELD_NUMBER; + hash = (53 * hash) + getFullyQualifiedName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.lineage.v1.EntityReference parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.EntityReference 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.datacatalog.lineage.v1.EntityReference parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.EntityReference 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.datacatalog.lineage.v1.EntityReference parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.EntityReference parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.lineage.v1.EntityReference parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.EntityReference 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.datacatalog.lineage.v1.EntityReference parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.EntityReference 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.datacatalog.lineage.v1.EntityReference parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.EntityReference 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.datacatalog.lineage.v1.EntityReference 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 soft reference to everything you can attach a lineage event to.
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.EntityReference} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.lineage.v1.EntityReference) + com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_EntityReference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_EntityReference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.EntityReference.class, + com.google.cloud.datacatalog.lineage.v1.EntityReference.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.lineage.v1.EntityReference.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + fullyQualifiedName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_EntityReference_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.EntityReference getDefaultInstanceForType() { + return com.google.cloud.datacatalog.lineage.v1.EntityReference.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.EntityReference build() { + com.google.cloud.datacatalog.lineage.v1.EntityReference result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.EntityReference buildPartial() { + com.google.cloud.datacatalog.lineage.v1.EntityReference result = + new com.google.cloud.datacatalog.lineage.v1.EntityReference(this); + result.fullyQualifiedName_ = fullyQualifiedName_; + 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.datacatalog.lineage.v1.EntityReference) { + return mergeFrom((com.google.cloud.datacatalog.lineage.v1.EntityReference) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.lineage.v1.EntityReference other) { + if (other == com.google.cloud.datacatalog.lineage.v1.EntityReference.getDefaultInstance()) + return this; + if (!other.getFullyQualifiedName().isEmpty()) { + fullyQualifiedName_ = other.fullyQualifiedName_; + 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: + { + fullyQualifiedName_ = 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 fullyQualifiedName_ = ""; + /** + * + * + *
+     * Required. Fully Qualified Name of the entity. Useful for referencing
+     * entities that aren't represented as GCP resources, for example, tables in
+     * Dataproc Metastore API.
+     * Examples:
+     *   * `bigquery:dataset.project_id.dataset_id`
+     *   * `bigquery:table.project_id.dataset_id.table_id`
+     *   * `pubsub:project_id.topic_id`
+     *   * `dataproc_metastore:projectId.locationId.instanceId.databaseId.tableId`
+     * 
+ * + * string fully_qualified_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The fullyQualifiedName. + */ + public java.lang.String getFullyQualifiedName() { + java.lang.Object ref = fullyQualifiedName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fullyQualifiedName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Fully Qualified Name of the entity. Useful for referencing
+     * entities that aren't represented as GCP resources, for example, tables in
+     * Dataproc Metastore API.
+     * Examples:
+     *   * `bigquery:dataset.project_id.dataset_id`
+     *   * `bigquery:table.project_id.dataset_id.table_id`
+     *   * `pubsub:project_id.topic_id`
+     *   * `dataproc_metastore:projectId.locationId.instanceId.databaseId.tableId`
+     * 
+ * + * string fully_qualified_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for fullyQualifiedName. + */ + public com.google.protobuf.ByteString getFullyQualifiedNameBytes() { + java.lang.Object ref = fullyQualifiedName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fullyQualifiedName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Fully Qualified Name of the entity. Useful for referencing
+     * entities that aren't represented as GCP resources, for example, tables in
+     * Dataproc Metastore API.
+     * Examples:
+     *   * `bigquery:dataset.project_id.dataset_id`
+     *   * `bigquery:table.project_id.dataset_id.table_id`
+     *   * `pubsub:project_id.topic_id`
+     *   * `dataproc_metastore:projectId.locationId.instanceId.databaseId.tableId`
+     * 
+ * + * string fully_qualified_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The fullyQualifiedName to set. + * @return This builder for chaining. + */ + public Builder setFullyQualifiedName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + fullyQualifiedName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Fully Qualified Name of the entity. Useful for referencing
+     * entities that aren't represented as GCP resources, for example, tables in
+     * Dataproc Metastore API.
+     * Examples:
+     *   * `bigquery:dataset.project_id.dataset_id`
+     *   * `bigquery:table.project_id.dataset_id.table_id`
+     *   * `pubsub:project_id.topic_id`
+     *   * `dataproc_metastore:projectId.locationId.instanceId.databaseId.tableId`
+     * 
+ * + * string fully_qualified_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearFullyQualifiedName() { + + fullyQualifiedName_ = getDefaultInstance().getFullyQualifiedName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Fully Qualified Name of the entity. Useful for referencing
+     * entities that aren't represented as GCP resources, for example, tables in
+     * Dataproc Metastore API.
+     * Examples:
+     *   * `bigquery:dataset.project_id.dataset_id`
+     *   * `bigquery:table.project_id.dataset_id.table_id`
+     *   * `pubsub:project_id.topic_id`
+     *   * `dataproc_metastore:projectId.locationId.instanceId.databaseId.tableId`
+     * 
+ * + * string fully_qualified_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for fullyQualifiedName to set. + * @return This builder for chaining. + */ + public Builder setFullyQualifiedNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + fullyQualifiedName_ = 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.datacatalog.lineage.v1.EntityReference) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.lineage.v1.EntityReference) + private static final com.google.cloud.datacatalog.lineage.v1.EntityReference DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.lineage.v1.EntityReference(); + } + + public static com.google.cloud.datacatalog.lineage.v1.EntityReference getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EntityReference 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.datacatalog.lineage.v1.EntityReference getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/EntityReferenceOrBuilder.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/EntityReferenceOrBuilder.java new file mode 100644 index 000000000000..0bbd5cbecc61 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/EntityReferenceOrBuilder.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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +public interface EntityReferenceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.lineage.v1.EntityReference) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Fully Qualified Name of the entity. Useful for referencing
+   * entities that aren't represented as GCP resources, for example, tables in
+   * Dataproc Metastore API.
+   * Examples:
+   *   * `bigquery:dataset.project_id.dataset_id`
+   *   * `bigquery:table.project_id.dataset_id.table_id`
+   *   * `pubsub:project_id.topic_id`
+   *   * `dataproc_metastore:projectId.locationId.instanceId.databaseId.tableId`
+   * 
+ * + * string fully_qualified_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The fullyQualifiedName. + */ + java.lang.String getFullyQualifiedName(); + /** + * + * + *
+   * Required. Fully Qualified Name of the entity. Useful for referencing
+   * entities that aren't represented as GCP resources, for example, tables in
+   * Dataproc Metastore API.
+   * Examples:
+   *   * `bigquery:dataset.project_id.dataset_id`
+   *   * `bigquery:table.project_id.dataset_id.table_id`
+   *   * `pubsub:project_id.topic_id`
+   *   * `dataproc_metastore:projectId.locationId.instanceId.databaseId.tableId`
+   * 
+ * + * string fully_qualified_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for fullyQualifiedName. + */ + com.google.protobuf.ByteString getFullyQualifiedNameBytes(); +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/EventLink.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/EventLink.java new file mode 100644 index 000000000000..64160f5fb54c --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/EventLink.java @@ -0,0 +1,1020 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +/** + * + * + *
+ * A lineage between source and target entities.
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.EventLink} + */ +public final class EventLink extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.lineage.v1.EventLink) + EventLinkOrBuilder { + private static final long serialVersionUID = 0L; + // Use EventLink.newBuilder() to construct. + private EventLink(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EventLink() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EventLink(); + } + + @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.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_EventLink_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_EventLink_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.EventLink.class, + com.google.cloud.datacatalog.lineage.v1.EventLink.Builder.class); + } + + public static final int SOURCE_FIELD_NUMBER = 1; + private com.google.cloud.datacatalog.lineage.v1.EntityReference source_; + /** + * + * + *
+   * Required. Reference to the source entity
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the source field is set. + */ + @java.lang.Override + public boolean hasSource() { + return source_ != null; + } + /** + * + * + *
+   * Required. Reference to the source entity
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The source. + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.EntityReference getSource() { + return source_ == null + ? com.google.cloud.datacatalog.lineage.v1.EntityReference.getDefaultInstance() + : source_; + } + /** + * + * + *
+   * Required. Reference to the source entity
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder getSourceOrBuilder() { + return getSource(); + } + + public static final int TARGET_FIELD_NUMBER = 2; + private com.google.cloud.datacatalog.lineage.v1.EntityReference target_; + /** + * + * + *
+   * Required. Reference to the target entity
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the target field is set. + */ + @java.lang.Override + public boolean hasTarget() { + return target_ != null; + } + /** + * + * + *
+   * Required. Reference to the target entity
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The target. + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.EntityReference getTarget() { + return target_ == null + ? com.google.cloud.datacatalog.lineage.v1.EntityReference.getDefaultInstance() + : target_; + } + /** + * + * + *
+   * Required. Reference to the target entity
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder getTargetOrBuilder() { + return getTarget(); + } + + 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 (source_ != null) { + output.writeMessage(1, getSource()); + } + if (target_ != null) { + output.writeMessage(2, getTarget()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (source_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSource()); + } + if (target_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTarget()); + } + 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.datacatalog.lineage.v1.EventLink)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.lineage.v1.EventLink other = + (com.google.cloud.datacatalog.lineage.v1.EventLink) obj; + + if (hasSource() != other.hasSource()) return false; + if (hasSource()) { + if (!getSource().equals(other.getSource())) return false; + } + if (hasTarget() != other.hasTarget()) return false; + if (hasTarget()) { + if (!getTarget().equals(other.getTarget())) 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 (hasSource()) { + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + } + if (hasTarget()) { + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.lineage.v1.EventLink parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.EventLink 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.datacatalog.lineage.v1.EventLink parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.EventLink 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.datacatalog.lineage.v1.EventLink parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.EventLink parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.lineage.v1.EventLink parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.EventLink 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.datacatalog.lineage.v1.EventLink parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.EventLink 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.datacatalog.lineage.v1.EventLink parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.EventLink 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.datacatalog.lineage.v1.EventLink 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; + } + /** + * + * + *
+   * A lineage between source and target entities.
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.EventLink} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.lineage.v1.EventLink) + com.google.cloud.datacatalog.lineage.v1.EventLinkOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_EventLink_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_EventLink_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.EventLink.class, + com.google.cloud.datacatalog.lineage.v1.EventLink.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.lineage.v1.EventLink.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (sourceBuilder_ == null) { + source_ = null; + } else { + source_ = null; + sourceBuilder_ = null; + } + if (targetBuilder_ == null) { + target_ = null; + } else { + target_ = null; + targetBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_EventLink_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.EventLink getDefaultInstanceForType() { + return com.google.cloud.datacatalog.lineage.v1.EventLink.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.EventLink build() { + com.google.cloud.datacatalog.lineage.v1.EventLink result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.EventLink buildPartial() { + com.google.cloud.datacatalog.lineage.v1.EventLink result = + new com.google.cloud.datacatalog.lineage.v1.EventLink(this); + if (sourceBuilder_ == null) { + result.source_ = source_; + } else { + result.source_ = sourceBuilder_.build(); + } + if (targetBuilder_ == null) { + result.target_ = target_; + } else { + result.target_ = targetBuilder_.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.datacatalog.lineage.v1.EventLink) { + return mergeFrom((com.google.cloud.datacatalog.lineage.v1.EventLink) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.lineage.v1.EventLink other) { + if (other == com.google.cloud.datacatalog.lineage.v1.EventLink.getDefaultInstance()) + return this; + if (other.hasSource()) { + mergeSource(other.getSource()); + } + if (other.hasTarget()) { + mergeTarget(other.getTarget()); + } + 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(getSourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getTargetFieldBuilder().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 com.google.cloud.datacatalog.lineage.v1.EntityReference source_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.EntityReference, + com.google.cloud.datacatalog.lineage.v1.EntityReference.Builder, + com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder> + sourceBuilder_; + /** + * + * + *
+     * Required. Reference to the source entity
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the source field is set. + */ + public boolean hasSource() { + return sourceBuilder_ != null || source_ != null; + } + /** + * + * + *
+     * Required. Reference to the source entity
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The source. + */ + public com.google.cloud.datacatalog.lineage.v1.EntityReference getSource() { + if (sourceBuilder_ == null) { + return source_ == null + ? com.google.cloud.datacatalog.lineage.v1.EntityReference.getDefaultInstance() + : source_; + } else { + return sourceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Reference to the source entity
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSource(com.google.cloud.datacatalog.lineage.v1.EntityReference value) { + if (sourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + sourceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Reference to the source entity
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSource( + com.google.cloud.datacatalog.lineage.v1.EntityReference.Builder builderForValue) { + if (sourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + sourceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Reference to the source entity
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSource(com.google.cloud.datacatalog.lineage.v1.EntityReference value) { + if (sourceBuilder_ == null) { + if (source_ != null) { + source_ = + com.google.cloud.datacatalog.lineage.v1.EntityReference.newBuilder(source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + sourceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Reference to the source entity
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSource() { + if (sourceBuilder_ == null) { + source_ = null; + onChanged(); + } else { + source_ = null; + sourceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Reference to the source entity
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.lineage.v1.EntityReference.Builder getSourceBuilder() { + + onChanged(); + return getSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Reference to the source entity
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder getSourceOrBuilder() { + if (sourceBuilder_ != null) { + return sourceBuilder_.getMessageOrBuilder(); + } else { + return source_ == null + ? com.google.cloud.datacatalog.lineage.v1.EntityReference.getDefaultInstance() + : source_; + } + } + /** + * + * + *
+     * Required. Reference to the source entity
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.EntityReference, + com.google.cloud.datacatalog.lineage.v1.EntityReference.Builder, + com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder> + getSourceFieldBuilder() { + if (sourceBuilder_ == null) { + sourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.EntityReference, + com.google.cloud.datacatalog.lineage.v1.EntityReference.Builder, + com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder>( + getSource(), getParentForChildren(), isClean()); + source_ = null; + } + return sourceBuilder_; + } + + private com.google.cloud.datacatalog.lineage.v1.EntityReference target_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.EntityReference, + com.google.cloud.datacatalog.lineage.v1.EntityReference.Builder, + com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder> + targetBuilder_; + /** + * + * + *
+     * Required. Reference to the target entity
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the target field is set. + */ + public boolean hasTarget() { + return targetBuilder_ != null || target_ != null; + } + /** + * + * + *
+     * Required. Reference to the target entity
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The target. + */ + public com.google.cloud.datacatalog.lineage.v1.EntityReference getTarget() { + if (targetBuilder_ == null) { + return target_ == null + ? com.google.cloud.datacatalog.lineage.v1.EntityReference.getDefaultInstance() + : target_; + } else { + return targetBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Reference to the target entity
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTarget(com.google.cloud.datacatalog.lineage.v1.EntityReference value) { + if (targetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + onChanged(); + } else { + targetBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Reference to the target entity
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTarget( + com.google.cloud.datacatalog.lineage.v1.EntityReference.Builder builderForValue) { + if (targetBuilder_ == null) { + target_ = builderForValue.build(); + onChanged(); + } else { + targetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Reference to the target entity
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTarget(com.google.cloud.datacatalog.lineage.v1.EntityReference value) { + if (targetBuilder_ == null) { + if (target_ != null) { + target_ = + com.google.cloud.datacatalog.lineage.v1.EntityReference.newBuilder(target_) + .mergeFrom(value) + .buildPartial(); + } else { + target_ = value; + } + onChanged(); + } else { + targetBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Reference to the target entity
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTarget() { + if (targetBuilder_ == null) { + target_ = null; + onChanged(); + } else { + target_ = null; + targetBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Reference to the target entity
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.lineage.v1.EntityReference.Builder getTargetBuilder() { + + onChanged(); + return getTargetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Reference to the target entity
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder getTargetOrBuilder() { + if (targetBuilder_ != null) { + return targetBuilder_.getMessageOrBuilder(); + } else { + return target_ == null + ? com.google.cloud.datacatalog.lineage.v1.EntityReference.getDefaultInstance() + : target_; + } + } + /** + * + * + *
+     * Required. Reference to the target entity
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.EntityReference, + com.google.cloud.datacatalog.lineage.v1.EntityReference.Builder, + com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder> + getTargetFieldBuilder() { + if (targetBuilder_ == null) { + targetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.EntityReference, + com.google.cloud.datacatalog.lineage.v1.EntityReference.Builder, + com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder>( + getTarget(), getParentForChildren(), isClean()); + target_ = null; + } + return targetBuilder_; + } + + @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.datacatalog.lineage.v1.EventLink) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.lineage.v1.EventLink) + private static final com.google.cloud.datacatalog.lineage.v1.EventLink DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.lineage.v1.EventLink(); + } + + public static com.google.cloud.datacatalog.lineage.v1.EventLink getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EventLink 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.datacatalog.lineage.v1.EventLink getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/EventLinkOrBuilder.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/EventLinkOrBuilder.java new file mode 100644 index 000000000000..e0832e7bf147 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/EventLinkOrBuilder.java @@ -0,0 +1,107 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +public interface EventLinkOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.lineage.v1.EventLink) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Reference to the source entity
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the source field is set. + */ + boolean hasSource(); + /** + * + * + *
+   * Required. Reference to the source entity
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The source. + */ + com.google.cloud.datacatalog.lineage.v1.EntityReference getSource(); + /** + * + * + *
+   * Required. Reference to the source entity
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder getSourceOrBuilder(); + + /** + * + * + *
+   * Required. Reference to the target entity
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the target field is set. + */ + boolean hasTarget(); + /** + * + * + *
+   * Required. Reference to the target entity
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The target. + */ + com.google.cloud.datacatalog.lineage.v1.EntityReference getTarget(); + /** + * + * + *
+   * Required. Reference to the target entity
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder getTargetOrBuilder(); +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/GetLineageEventRequest.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/GetLineageEventRequest.java new file mode 100644 index 000000000000..1a6561be6663 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/GetLineageEventRequest.java @@ -0,0 +1,637 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +/** + * + * + *
+ * Request message for
+ * [GetLineageEvent][google.cloud.datacatalog.lineage.v1.GetLineageEvent].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.GetLineageEventRequest} + */ +public final class GetLineageEventRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.lineage.v1.GetLineageEventRequest) + GetLineageEventRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetLineageEventRequest.newBuilder() to construct. + private GetLineageEventRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetLineageEventRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetLineageEventRequest(); + } + + @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.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_GetLineageEventRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_GetLineageEventRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest.class, + com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the lineage event to get.
+   * 
+ * + * + * 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 lineage event to get.
+   * 
+ * + * + * 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.datacatalog.lineage.v1.GetLineageEventRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest other = + (com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest) 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.datacatalog.lineage.v1.GetLineageEventRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest 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.datacatalog.lineage.v1.GetLineageEventRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest 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.datacatalog.lineage.v1.GetLineageEventRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest 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.datacatalog.lineage.v1.GetLineageEventRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest 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.datacatalog.lineage.v1.GetLineageEventRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest 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.datacatalog.lineage.v1.GetLineageEventRequest 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
+   * [GetLineageEvent][google.cloud.datacatalog.lineage.v1.GetLineageEvent].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.GetLineageEventRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.lineage.v1.GetLineageEventRequest) + com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_GetLineageEventRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_GetLineageEventRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest.class, + com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest.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.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_GetLineageEventRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest + getDefaultInstanceForType() { + return com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest build() { + com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest buildPartial() { + com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest result = + new com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest(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.datacatalog.lineage.v1.GetLineageEventRequest) { + return mergeFrom((com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest other) { + if (other + == com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest.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 lineage event to get.
+     * 
+ * + * + * 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 lineage event to get.
+     * 
+ * + * + * 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 lineage event to get.
+     * 
+ * + * + * 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 lineage event to get.
+     * 
+ * + * + * 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 lineage event to get.
+     * 
+ * + * + * 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.datacatalog.lineage.v1.GetLineageEventRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.lineage.v1.GetLineageEventRequest) + private static final com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest(); + } + + public static com.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetLineageEventRequest 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.datacatalog.lineage.v1.GetLineageEventRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/GetLineageEventRequestOrBuilder.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/GetLineageEventRequestOrBuilder.java new file mode 100644 index 000000000000..f561d51c54dd --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/GetLineageEventRequestOrBuilder.java @@ -0,0 +1,54 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +public interface GetLineageEventRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.lineage.v1.GetLineageEventRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the lineage event to get.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the lineage event to get.
+   * 
+ * + * + * 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-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/GetProcessRequest.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/GetProcessRequest.java new file mode 100644 index 000000000000..595118d9f3fc --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/GetProcessRequest.java @@ -0,0 +1,632 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +/** + * + * + *
+ * Request message for
+ * [GetProcess][google.cloud.datacatalog.lineage.v1.GetProcess].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.GetProcessRequest} + */ +public final class GetProcessRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.lineage.v1.GetProcessRequest) + GetProcessRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetProcessRequest.newBuilder() to construct. + private GetProcessRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetProcessRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetProcessRequest(); + } + + @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.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_GetProcessRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_GetProcessRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.GetProcessRequest.class, + com.google.cloud.datacatalog.lineage.v1.GetProcessRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the process to get.
+   * 
+ * + * + * 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 process to get.
+   * 
+ * + * + * 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.datacatalog.lineage.v1.GetProcessRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.lineage.v1.GetProcessRequest other = + (com.google.cloud.datacatalog.lineage.v1.GetProcessRequest) 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.datacatalog.lineage.v1.GetProcessRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.GetProcessRequest 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.datacatalog.lineage.v1.GetProcessRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.GetProcessRequest 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.datacatalog.lineage.v1.GetProcessRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.GetProcessRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.lineage.v1.GetProcessRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.GetProcessRequest 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.datacatalog.lineage.v1.GetProcessRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.GetProcessRequest 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.datacatalog.lineage.v1.GetProcessRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.GetProcessRequest 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.datacatalog.lineage.v1.GetProcessRequest 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
+   * [GetProcess][google.cloud.datacatalog.lineage.v1.GetProcess].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.GetProcessRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.lineage.v1.GetProcessRequest) + com.google.cloud.datacatalog.lineage.v1.GetProcessRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_GetProcessRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_GetProcessRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.GetProcessRequest.class, + com.google.cloud.datacatalog.lineage.v1.GetProcessRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.lineage.v1.GetProcessRequest.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.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_GetProcessRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.GetProcessRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.lineage.v1.GetProcessRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.GetProcessRequest build() { + com.google.cloud.datacatalog.lineage.v1.GetProcessRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.GetProcessRequest buildPartial() { + com.google.cloud.datacatalog.lineage.v1.GetProcessRequest result = + new com.google.cloud.datacatalog.lineage.v1.GetProcessRequest(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.datacatalog.lineage.v1.GetProcessRequest) { + return mergeFrom((com.google.cloud.datacatalog.lineage.v1.GetProcessRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.lineage.v1.GetProcessRequest other) { + if (other == com.google.cloud.datacatalog.lineage.v1.GetProcessRequest.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 process to get.
+     * 
+ * + * + * 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 process to get.
+     * 
+ * + * + * 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 process to get.
+     * 
+ * + * + * 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 process to get.
+     * 
+ * + * + * 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 process to get.
+     * 
+ * + * + * 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.datacatalog.lineage.v1.GetProcessRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.lineage.v1.GetProcessRequest) + private static final com.google.cloud.datacatalog.lineage.v1.GetProcessRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.lineage.v1.GetProcessRequest(); + } + + public static com.google.cloud.datacatalog.lineage.v1.GetProcessRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetProcessRequest 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.datacatalog.lineage.v1.GetProcessRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/GetProcessRequestOrBuilder.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/GetProcessRequestOrBuilder.java new file mode 100644 index 000000000000..d255ee0c00b0 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/GetProcessRequestOrBuilder.java @@ -0,0 +1,54 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +public interface GetProcessRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.lineage.v1.GetProcessRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the process to get.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the process to get.
+   * 
+ * + * + * 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-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/GetRunRequest.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/GetRunRequest.java new file mode 100644 index 000000000000..d26e241eaa7c --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/GetRunRequest.java @@ -0,0 +1,632 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +/** + * + * + *
+ * Request message for
+ * [GetRun][google.cloud.datacatalog.lineage.v1.GetRun].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.GetRunRequest} + */ +public final class GetRunRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.lineage.v1.GetRunRequest) + GetRunRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetRunRequest.newBuilder() to construct. + private GetRunRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetRunRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetRunRequest(); + } + + @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.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_GetRunRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_GetRunRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.GetRunRequest.class, + com.google.cloud.datacatalog.lineage.v1.GetRunRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the run to get.
+   * 
+ * + * + * 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 run to get.
+   * 
+ * + * + * 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.datacatalog.lineage.v1.GetRunRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.lineage.v1.GetRunRequest other = + (com.google.cloud.datacatalog.lineage.v1.GetRunRequest) 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.datacatalog.lineage.v1.GetRunRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.GetRunRequest 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.datacatalog.lineage.v1.GetRunRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.GetRunRequest 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.datacatalog.lineage.v1.GetRunRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.GetRunRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.lineage.v1.GetRunRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.GetRunRequest 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.datacatalog.lineage.v1.GetRunRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.GetRunRequest 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.datacatalog.lineage.v1.GetRunRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.GetRunRequest 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.datacatalog.lineage.v1.GetRunRequest 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
+   * [GetRun][google.cloud.datacatalog.lineage.v1.GetRun].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.GetRunRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.lineage.v1.GetRunRequest) + com.google.cloud.datacatalog.lineage.v1.GetRunRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_GetRunRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_GetRunRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.GetRunRequest.class, + com.google.cloud.datacatalog.lineage.v1.GetRunRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.lineage.v1.GetRunRequest.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.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_GetRunRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.GetRunRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.lineage.v1.GetRunRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.GetRunRequest build() { + com.google.cloud.datacatalog.lineage.v1.GetRunRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.GetRunRequest buildPartial() { + com.google.cloud.datacatalog.lineage.v1.GetRunRequest result = + new com.google.cloud.datacatalog.lineage.v1.GetRunRequest(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.datacatalog.lineage.v1.GetRunRequest) { + return mergeFrom((com.google.cloud.datacatalog.lineage.v1.GetRunRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.lineage.v1.GetRunRequest other) { + if (other == com.google.cloud.datacatalog.lineage.v1.GetRunRequest.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 run to get.
+     * 
+ * + * + * 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 run to get.
+     * 
+ * + * + * 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 run to get.
+     * 
+ * + * + * 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 run to get.
+     * 
+ * + * + * 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 run to get.
+     * 
+ * + * + * 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.datacatalog.lineage.v1.GetRunRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.lineage.v1.GetRunRequest) + private static final com.google.cloud.datacatalog.lineage.v1.GetRunRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.lineage.v1.GetRunRequest(); + } + + public static com.google.cloud.datacatalog.lineage.v1.GetRunRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetRunRequest 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.datacatalog.lineage.v1.GetRunRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/GetRunRequestOrBuilder.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/GetRunRequestOrBuilder.java new file mode 100644 index 000000000000..8937d2db2a6b --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/GetRunRequestOrBuilder.java @@ -0,0 +1,54 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +public interface GetRunRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.lineage.v1.GetRunRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the run to get.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the run to get.
+   * 
+ * + * + * 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-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/LineageEvent.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/LineageEvent.java new file mode 100644 index 000000000000..236776c54ab1 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/LineageEvent.java @@ -0,0 +1,1777 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +/** + * + * + *
+ * A lineage event represents an operation on assets. Within the operation, the
+ * data flows from the source to the target defined in the links field.
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.LineageEvent} + */ +public final class LineageEvent extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.lineage.v1.LineageEvent) + LineageEventOrBuilder { + private static final long serialVersionUID = 0L; + // Use LineageEvent.newBuilder() to construct. + private LineageEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LineageEvent() { + name_ = ""; + links_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LineageEvent(); + } + + @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.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_LineageEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_LineageEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.LineageEvent.class, + com.google.cloud.datacatalog.lineage.v1.LineageEvent.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Immutable. The resource name of the lineage event.
+   * Format:
+   * `projects/{project}/locations/{location}/processes/{process}/runs/{run}/lineageEvents/{lineage_event}`.
+   * Can be specified or auto-assigned.
+   * {lineage_event} must be not longer than 200 characters and only
+   * contain characters in a set: `a-zA-Z0-9_-:.`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + } + /** + * + * + *
+   * Immutable. The resource name of the lineage event.
+   * Format:
+   * `projects/{project}/locations/{location}/processes/{process}/runs/{run}/lineageEvents/{lineage_event}`.
+   * Can be specified or auto-assigned.
+   * {lineage_event} must be not longer than 200 characters and only
+   * contain characters in a set: `a-zA-Z0-9_-:.`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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 LINKS_FIELD_NUMBER = 8; + private java.util.List links_; + /** + * + * + *
+   * Optional. List of source-target pairs. Can't contain more than 100 tuples.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.lineage.v1.EventLink links = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getLinksList() { + return links_; + } + /** + * + * + *
+   * Optional. List of source-target pairs. Can't contain more than 100 tuples.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.lineage.v1.EventLink links = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getLinksOrBuilderList() { + return links_; + } + /** + * + * + *
+   * Optional. List of source-target pairs. Can't contain more than 100 tuples.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.lineage.v1.EventLink links = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getLinksCount() { + return links_.size(); + } + /** + * + * + *
+   * Optional. List of source-target pairs. Can't contain more than 100 tuples.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.lineage.v1.EventLink links = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.EventLink getLinks(int index) { + return links_.get(index); + } + /** + * + * + *
+   * Optional. List of source-target pairs. Can't contain more than 100 tuples.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.lineage.v1.EventLink links = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.EventLinkOrBuilder getLinksOrBuilder(int index) { + return links_.get(index); + } + + public static final int START_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * Optional. The beginning of the transformation which resulted in this
+   * lineage event. For streaming scenarios, it should be the beginning of the
+   * period from which the lineage is being reported.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
+   * Optional. The beginning of the transformation which resulted in this
+   * lineage event. For streaming scenarios, it should be the beginning of the
+   * period from which the lineage is being reported.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * Optional. The beginning of the transformation which resulted in this
+   * lineage event. For streaming scenarios, it should be the beginning of the
+   * period from which the lineage is being reported.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return getStartTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * Optional. The end of the transformation which resulted in this lineage
+   * event.  For streaming scenarios, it should be the end of the period from
+   * which the lineage is being reported.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * Optional. The end of the transformation which resulted in this lineage
+   * event.  For streaming scenarios, it should be the end of the period from
+   * which the lineage is being reported.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * Optional. The end of the transformation which resulted in this lineage
+   * event.  For streaming scenarios, it should be the end of the period from
+   * which the lineage is being reported.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + 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 (startTime_ != null) { + output.writeMessage(6, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(7, getEndTime()); + } + for (int i = 0; i < links_.size(); i++) { + output.writeMessage(8, links_.get(i)); + } + 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 (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getEndTime()); + } + for (int i = 0; i < links_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, links_.get(i)); + } + 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.datacatalog.lineage.v1.LineageEvent)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.lineage.v1.LineageEvent other = + (com.google.cloud.datacatalog.lineage.v1.LineageEvent) obj; + + if (!getName().equals(other.getName())) return false; + if (!getLinksList().equals(other.getLinksList())) return false; + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) 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 (getLinksCount() > 0) { + hash = (37 * hash) + LINKS_FIELD_NUMBER; + hash = (53 * hash) + getLinksList().hashCode(); + } + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.lineage.v1.LineageEvent parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.LineageEvent 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.datacatalog.lineage.v1.LineageEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.LineageEvent 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.datacatalog.lineage.v1.LineageEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.LineageEvent parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.lineage.v1.LineageEvent parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.LineageEvent 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.datacatalog.lineage.v1.LineageEvent parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.LineageEvent 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.datacatalog.lineage.v1.LineageEvent parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.LineageEvent 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.datacatalog.lineage.v1.LineageEvent 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; + } + /** + * + * + *
+   * A lineage event represents an operation on assets. Within the operation, the
+   * data flows from the source to the target defined in the links field.
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.LineageEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.lineage.v1.LineageEvent) + com.google.cloud.datacatalog.lineage.v1.LineageEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_LineageEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_LineageEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.LineageEvent.class, + com.google.cloud.datacatalog.lineage.v1.LineageEvent.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.lineage.v1.LineageEvent.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (linksBuilder_ == null) { + links_ = java.util.Collections.emptyList(); + } else { + links_ = null; + linksBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (startTimeBuilder_ == null) { + startTime_ = null; + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_LineageEvent_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.LineageEvent getDefaultInstanceForType() { + return com.google.cloud.datacatalog.lineage.v1.LineageEvent.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.LineageEvent build() { + com.google.cloud.datacatalog.lineage.v1.LineageEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.LineageEvent buildPartial() { + com.google.cloud.datacatalog.lineage.v1.LineageEvent result = + new com.google.cloud.datacatalog.lineage.v1.LineageEvent(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (linksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + links_ = java.util.Collections.unmodifiableList(links_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.links_ = links_; + } else { + result.links_ = linksBuilder_.build(); + } + if (startTimeBuilder_ == null) { + result.startTime_ = startTime_; + } else { + result.startTime_ = startTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.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.datacatalog.lineage.v1.LineageEvent) { + return mergeFrom((com.google.cloud.datacatalog.lineage.v1.LineageEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.lineage.v1.LineageEvent other) { + if (other == com.google.cloud.datacatalog.lineage.v1.LineageEvent.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (linksBuilder_ == null) { + if (!other.links_.isEmpty()) { + if (links_.isEmpty()) { + links_ = other.links_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLinksIsMutable(); + links_.addAll(other.links_); + } + onChanged(); + } + } else { + if (!other.links_.isEmpty()) { + if (linksBuilder_.isEmpty()) { + linksBuilder_.dispose(); + linksBuilder_ = null; + links_ = other.links_; + bitField0_ = (bitField0_ & ~0x00000001); + linksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getLinksFieldBuilder() + : null; + } else { + linksBuilder_.addAllMessages(other.links_); + } + } + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + 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 50: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 50 + case 58: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 58 + case 66: + { + com.google.cloud.datacatalog.lineage.v1.EventLink m = + input.readMessage( + com.google.cloud.datacatalog.lineage.v1.EventLink.parser(), + extensionRegistry); + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.add(m); + } else { + linksBuilder_.addMessage(m); + } + break; + } // case 66 + 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.lang.Object name_ = ""; + /** + * + * + *
+     * Immutable. The resource name of the lineage event.
+     * Format:
+     * `projects/{project}/locations/{location}/processes/{process}/runs/{run}/lineageEvents/{lineage_event}`.
+     * Can be specified or auto-assigned.
+     * {lineage_event} must be not longer than 200 characters and only
+     * contain characters in a set: `a-zA-Z0-9_-:.`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + } + /** + * + * + *
+     * Immutable. The resource name of the lineage event.
+     * Format:
+     * `projects/{project}/locations/{location}/processes/{process}/runs/{run}/lineageEvents/{lineage_event}`.
+     * Can be specified or auto-assigned.
+     * {lineage_event} must be not longer than 200 characters and only
+     * contain characters in a set: `a-zA-Z0-9_-:.`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + } + /** + * + * + *
+     * Immutable. The resource name of the lineage event.
+     * Format:
+     * `projects/{project}/locations/{location}/processes/{process}/runs/{run}/lineageEvents/{lineage_event}`.
+     * Can be specified or auto-assigned.
+     * {lineage_event} must be not longer than 200 characters and only
+     * contain characters in a set: `a-zA-Z0-9_-:.`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + /** + * + * + *
+     * Immutable. The resource name of the lineage event.
+     * Format:
+     * `projects/{project}/locations/{location}/processes/{process}/runs/{run}/lineageEvents/{lineage_event}`.
+     * Can be specified or auto-assigned.
+     * {lineage_event} must be not longer than 200 characters and only
+     * contain characters in a set: `a-zA-Z0-9_-:.`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The resource name of the lineage event.
+     * Format:
+     * `projects/{project}/locations/{location}/processes/{process}/runs/{run}/lineageEvents/{lineage_event}`.
+     * Can be specified or auto-assigned.
+     * {lineage_event} must be not longer than 200 characters and only
+     * contain characters in a set: `a-zA-Z0-9_-:.`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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 java.util.List links_ = + java.util.Collections.emptyList(); + + private void ensureLinksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + links_ = new java.util.ArrayList(links_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.EventLink, + com.google.cloud.datacatalog.lineage.v1.EventLink.Builder, + com.google.cloud.datacatalog.lineage.v1.EventLinkOrBuilder> + linksBuilder_; + + /** + * + * + *
+     * Optional. List of source-target pairs. Can't contain more than 100 tuples.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.lineage.v1.EventLink links = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getLinksList() { + if (linksBuilder_ == null) { + return java.util.Collections.unmodifiableList(links_); + } else { + return linksBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. List of source-target pairs. Can't contain more than 100 tuples.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.lineage.v1.EventLink links = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getLinksCount() { + if (linksBuilder_ == null) { + return links_.size(); + } else { + return linksBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. List of source-target pairs. Can't contain more than 100 tuples.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.lineage.v1.EventLink links = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.datacatalog.lineage.v1.EventLink getLinks(int index) { + if (linksBuilder_ == null) { + return links_.get(index); + } else { + return linksBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. List of source-target pairs. Can't contain more than 100 tuples.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.lineage.v1.EventLink links = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLinks(int index, com.google.cloud.datacatalog.lineage.v1.EventLink value) { + if (linksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinksIsMutable(); + links_.set(index, value); + onChanged(); + } else { + linksBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. List of source-target pairs. Can't contain more than 100 tuples.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.lineage.v1.EventLink links = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLinks( + int index, com.google.cloud.datacatalog.lineage.v1.EventLink.Builder builderForValue) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.set(index, builderForValue.build()); + onChanged(); + } else { + linksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. List of source-target pairs. Can't contain more than 100 tuples.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.lineage.v1.EventLink links = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addLinks(com.google.cloud.datacatalog.lineage.v1.EventLink value) { + if (linksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinksIsMutable(); + links_.add(value); + onChanged(); + } else { + linksBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. List of source-target pairs. Can't contain more than 100 tuples.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.lineage.v1.EventLink links = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addLinks(int index, com.google.cloud.datacatalog.lineage.v1.EventLink value) { + if (linksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinksIsMutable(); + links_.add(index, value); + onChanged(); + } else { + linksBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. List of source-target pairs. Can't contain more than 100 tuples.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.lineage.v1.EventLink links = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addLinks( + com.google.cloud.datacatalog.lineage.v1.EventLink.Builder builderForValue) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.add(builderForValue.build()); + onChanged(); + } else { + linksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. List of source-target pairs. Can't contain more than 100 tuples.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.lineage.v1.EventLink links = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addLinks( + int index, com.google.cloud.datacatalog.lineage.v1.EventLink.Builder builderForValue) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.add(index, builderForValue.build()); + onChanged(); + } else { + linksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. List of source-target pairs. Can't contain more than 100 tuples.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.lineage.v1.EventLink links = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllLinks( + java.lang.Iterable values) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, links_); + onChanged(); + } else { + linksBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. List of source-target pairs. Can't contain more than 100 tuples.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.lineage.v1.EventLink links = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearLinks() { + if (linksBuilder_ == null) { + links_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + linksBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. List of source-target pairs. Can't contain more than 100 tuples.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.lineage.v1.EventLink links = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeLinks(int index) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.remove(index); + onChanged(); + } else { + linksBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. List of source-target pairs. Can't contain more than 100 tuples.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.lineage.v1.EventLink links = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.datacatalog.lineage.v1.EventLink.Builder getLinksBuilder(int index) { + return getLinksFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. List of source-target pairs. Can't contain more than 100 tuples.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.lineage.v1.EventLink links = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.datacatalog.lineage.v1.EventLinkOrBuilder getLinksOrBuilder(int index) { + if (linksBuilder_ == null) { + return links_.get(index); + } else { + return linksBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. List of source-target pairs. Can't contain more than 100 tuples.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.lineage.v1.EventLink links = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getLinksOrBuilderList() { + if (linksBuilder_ != null) { + return linksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(links_); + } + } + /** + * + * + *
+     * Optional. List of source-target pairs. Can't contain more than 100 tuples.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.lineage.v1.EventLink links = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.datacatalog.lineage.v1.EventLink.Builder addLinksBuilder() { + return getLinksFieldBuilder() + .addBuilder(com.google.cloud.datacatalog.lineage.v1.EventLink.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. List of source-target pairs. Can't contain more than 100 tuples.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.lineage.v1.EventLink links = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.datacatalog.lineage.v1.EventLink.Builder addLinksBuilder(int index) { + return getLinksFieldBuilder() + .addBuilder( + index, com.google.cloud.datacatalog.lineage.v1.EventLink.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. List of source-target pairs. Can't contain more than 100 tuples.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.lineage.v1.EventLink links = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getLinksBuilderList() { + return getLinksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.EventLink, + com.google.cloud.datacatalog.lineage.v1.EventLink.Builder, + com.google.cloud.datacatalog.lineage.v1.EventLinkOrBuilder> + getLinksFieldBuilder() { + if (linksBuilder_ == null) { + linksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.EventLink, + com.google.cloud.datacatalog.lineage.v1.EventLink.Builder, + com.google.cloud.datacatalog.lineage.v1.EventLinkOrBuilder>( + links_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + links_ = null; + } + return linksBuilder_; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * Optional. The beginning of the transformation which resulted in this
+     * lineage event. For streaming scenarios, it should be the beginning of the
+     * period from which the lineage is being reported.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return startTimeBuilder_ != null || startTime_ != null; + } + /** + * + * + *
+     * Optional. The beginning of the transformation which resulted in this
+     * lineage event. For streaming scenarios, it should be the beginning of the
+     * period from which the lineage is being reported.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The beginning of the transformation which resulted in this
+     * lineage event. For streaming scenarios, it should be the beginning of the
+     * period from which the lineage is being reported.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + onChanged(); + } else { + startTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The beginning of the transformation which resulted in this
+     * lineage event. For streaming scenarios, it should be the beginning of the
+     * period from which the lineage is being reported.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + onChanged(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. The beginning of the transformation which resulted in this
+     * lineage event. For streaming scenarios, it should be the beginning of the
+     * period from which the lineage is being reported.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (startTime_ != null) { + startTime_ = + com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); + } else { + startTime_ = value; + } + onChanged(); + } else { + startTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The beginning of the transformation which resulted in this
+     * lineage event. For streaming scenarios, it should be the beginning of the
+     * period from which the lineage is being reported.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearStartTime() { + if (startTimeBuilder_ == null) { + startTime_ = null; + onChanged(); + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. The beginning of the transformation which resulted in this
+     * lineage event. For streaming scenarios, it should be the beginning of the
+     * period from which the lineage is being reported.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The beginning of the transformation which resulted in this
+     * lineage event. For streaming scenarios, it should be the beginning of the
+     * period from which the lineage is being reported.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * Optional. The beginning of the transformation which resulted in this
+     * lineage event. For streaming scenarios, it should be the beginning of the
+     * period from which the lineage is being reported.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + 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_; + /** + * + * + *
+     * Optional. The end of the transformation which resulted in this lineage
+     * event.  For streaming scenarios, it should be the end of the period from
+     * which the lineage is being reported.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * Optional. The end of the transformation which resulted in this lineage
+     * event.  For streaming scenarios, it should be the end of the period from
+     * which the lineage is being reported.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @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(); + } + } + /** + * + * + *
+     * Optional. The end of the transformation which resulted in this lineage
+     * event.  For streaming scenarios, it should be the end of the period from
+     * which the lineage is being reported.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + 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; + } + /** + * + * + *
+     * Optional. The end of the transformation which resulted in this lineage
+     * event.  For streaming scenarios, it should be the end of the period from
+     * which the lineage is being reported.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. The end of the transformation which resulted in this lineage
+     * event.  For streaming scenarios, it should be the end of the period from
+     * which the lineage is being reported.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + 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; + } + /** + * + * + *
+     * Optional. The end of the transformation which resulted in this lineage
+     * event.  For streaming scenarios, it should be the end of the period from
+     * which the lineage is being reported.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. The end of the transformation which resulted in this lineage
+     * event.  For streaming scenarios, it should be the end of the period from
+     * which the lineage is being reported.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The end of the transformation which resulted in this lineage
+     * event.  For streaming scenarios, it should be the end of the period from
+     * which the lineage is being reported.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * Optional. The end of the transformation which resulted in this lineage
+     * event.  For streaming scenarios, it should be the end of the period from
+     * which the lineage is being reported.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + 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_; + } + + @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.datacatalog.lineage.v1.LineageEvent) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.lineage.v1.LineageEvent) + private static final com.google.cloud.datacatalog.lineage.v1.LineageEvent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.lineage.v1.LineageEvent(); + } + + public static com.google.cloud.datacatalog.lineage.v1.LineageEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LineageEvent 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.datacatalog.lineage.v1.LineageEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/LineageEventName.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/LineageEventName.java new file mode 100644 index 000000000000..5f7c31afb319 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/LineageEventName.java @@ -0,0 +1,298 @@ +/* + * 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.datacatalog.lineage.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 LineageEventName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_PROCESS_RUN_LINEAGE_EVENT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/processes/{process}/runs/{run}/lineageEvents/{lineage_event}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String process; + private final String run; + private final String lineageEvent; + + @Deprecated + protected LineageEventName() { + project = null; + location = null; + process = null; + run = null; + lineageEvent = null; + } + + private LineageEventName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + process = Preconditions.checkNotNull(builder.getProcess()); + run = Preconditions.checkNotNull(builder.getRun()); + lineageEvent = Preconditions.checkNotNull(builder.getLineageEvent()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getProcess() { + return process; + } + + public String getRun() { + return run; + } + + public String getLineageEvent() { + return lineageEvent; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LineageEventName of( + String project, String location, String process, String run, String lineageEvent) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setProcess(process) + .setRun(run) + .setLineageEvent(lineageEvent) + .build(); + } + + public static String format( + String project, String location, String process, String run, String lineageEvent) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setProcess(process) + .setRun(run) + .setLineageEvent(lineageEvent) + .build() + .toString(); + } + + public static LineageEventName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_PROCESS_RUN_LINEAGE_EVENT.validatedMatch( + formattedString, "LineageEventName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("process"), + matchMap.get("run"), + matchMap.get("lineage_event")); + } + + 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 (LineageEventName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_PROCESS_RUN_LINEAGE_EVENT.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 (process != null) { + fieldMapBuilder.put("process", process); + } + if (run != null) { + fieldMapBuilder.put("run", run); + } + if (lineageEvent != null) { + fieldMapBuilder.put("lineage_event", lineageEvent); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_PROCESS_RUN_LINEAGE_EVENT.instantiate( + "project", + project, + "location", + location, + "process", + process, + "run", + run, + "lineage_event", + lineageEvent); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + LineageEventName that = ((LineageEventName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.process, that.process) + && Objects.equals(this.run, that.run) + && Objects.equals(this.lineageEvent, that.lineageEvent); + } + 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(process); + h *= 1000003; + h ^= Objects.hashCode(run); + h *= 1000003; + h ^= Objects.hashCode(lineageEvent); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/processes/{process}/runs/{run}/lineageEvents/{lineage_event}. + */ + public static class Builder { + private String project; + private String location; + private String process; + private String run; + private String lineageEvent; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getProcess() { + return process; + } + + public String getRun() { + return run; + } + + public String getLineageEvent() { + return lineageEvent; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setProcess(String process) { + this.process = process; + return this; + } + + public Builder setRun(String run) { + this.run = run; + return this; + } + + public Builder setLineageEvent(String lineageEvent) { + this.lineageEvent = lineageEvent; + return this; + } + + private Builder(LineageEventName lineageEventName) { + this.project = lineageEventName.project; + this.location = lineageEventName.location; + this.process = lineageEventName.process; + this.run = lineageEventName.run; + this.lineageEvent = lineageEventName.lineageEvent; + } + + public LineageEventName build() { + return new LineageEventName(this); + } + } +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/LineageEventOrBuilder.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/LineageEventOrBuilder.java new file mode 100644 index 000000000000..583f9e09b055 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/LineageEventOrBuilder.java @@ -0,0 +1,207 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +public interface LineageEventOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.lineage.v1.LineageEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Immutable. The resource name of the lineage event.
+   * Format:
+   * `projects/{project}/locations/{location}/processes/{process}/runs/{run}/lineageEvents/{lineage_event}`.
+   * Can be specified or auto-assigned.
+   * {lineage_event} must be not longer than 200 characters and only
+   * contain characters in a set: `a-zA-Z0-9_-:.`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Immutable. The resource name of the lineage event.
+   * Format:
+   * `projects/{project}/locations/{location}/processes/{process}/runs/{run}/lineageEvents/{lineage_event}`.
+   * Can be specified or auto-assigned.
+   * {lineage_event} must be not longer than 200 characters and only
+   * contain characters in a set: `a-zA-Z0-9_-:.`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. List of source-target pairs. Can't contain more than 100 tuples.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.lineage.v1.EventLink links = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getLinksList(); + /** + * + * + *
+   * Optional. List of source-target pairs. Can't contain more than 100 tuples.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.lineage.v1.EventLink links = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.datacatalog.lineage.v1.EventLink getLinks(int index); + /** + * + * + *
+   * Optional. List of source-target pairs. Can't contain more than 100 tuples.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.lineage.v1.EventLink links = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getLinksCount(); + /** + * + * + *
+   * Optional. List of source-target pairs. Can't contain more than 100 tuples.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.lineage.v1.EventLink links = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getLinksOrBuilderList(); + /** + * + * + *
+   * Optional. List of source-target pairs. Can't contain more than 100 tuples.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.lineage.v1.EventLink links = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.datacatalog.lineage.v1.EventLinkOrBuilder getLinksOrBuilder(int index); + + /** + * + * + *
+   * Optional. The beginning of the transformation which resulted in this
+   * lineage event. For streaming scenarios, it should be the beginning of the
+   * period from which the lineage is being reported.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * Optional. The beginning of the transformation which resulted in this
+   * lineage event. For streaming scenarios, it should be the beginning of the
+   * period from which the lineage is being reported.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * Optional. The beginning of the transformation which resulted in this
+   * lineage event. For streaming scenarios, it should be the beginning of the
+   * period from which the lineage is being reported.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * Optional. The end of the transformation which resulted in this lineage
+   * event.  For streaming scenarios, it should be the end of the period from
+   * which the lineage is being reported.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Optional. The end of the transformation which resulted in this lineage
+   * event.  For streaming scenarios, it should be the end of the period from
+   * which the lineage is being reported.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Optional. The end of the transformation which resulted in this lineage
+   * event.  For streaming scenarios, it should be the end of the period from
+   * which the lineage is being reported.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/LineageProto.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/LineageProto.java new file mode 100644 index 000000000000..4685d13e8fe7 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/LineageProto.java @@ -0,0 +1,718 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +public final class LineageProto { + private LineageProto() {} + + 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_datacatalog_lineage_v1_Process_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_lineage_v1_Process_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_lineage_v1_Process_AttributesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_lineage_v1_Process_AttributesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_lineage_v1_Run_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_lineage_v1_Run_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_lineage_v1_Run_AttributesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_lineage_v1_Run_AttributesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_lineage_v1_LineageEvent_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_lineage_v1_LineageEvent_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_lineage_v1_EventLink_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_lineage_v1_EventLink_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_lineage_v1_EntityReference_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_lineage_v1_EntityReference_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_lineage_v1_OperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_lineage_v1_OperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_lineage_v1_CreateProcessRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_lineage_v1_CreateProcessRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_lineage_v1_UpdateProcessRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_lineage_v1_UpdateProcessRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_lineage_v1_GetProcessRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_lineage_v1_GetProcessRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_lineage_v1_ListProcessesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_lineage_v1_ListProcessesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_lineage_v1_ListProcessesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_lineage_v1_ListProcessesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_lineage_v1_DeleteProcessRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_lineage_v1_DeleteProcessRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_lineage_v1_CreateRunRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_lineage_v1_CreateRunRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_lineage_v1_UpdateRunRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_lineage_v1_UpdateRunRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_lineage_v1_GetRunRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_lineage_v1_GetRunRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_lineage_v1_ListRunsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_lineage_v1_ListRunsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_lineage_v1_ListRunsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_lineage_v1_ListRunsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_lineage_v1_DeleteRunRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_lineage_v1_DeleteRunRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_lineage_v1_CreateLineageEventRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_lineage_v1_CreateLineageEventRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_lineage_v1_GetLineageEventRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_lineage_v1_GetLineageEventRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_lineage_v1_ListLineageEventsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_lineage_v1_ListLineageEventsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_lineage_v1_ListLineageEventsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_lineage_v1_ListLineageEventsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_lineage_v1_DeleteLineageEventRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_lineage_v1_DeleteLineageEventRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_lineage_v1_SearchLinksRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_lineage_v1_SearchLinksRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_lineage_v1_SearchLinksResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_lineage_v1_SearchLinksResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_lineage_v1_Link_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_lineage_v1_Link_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_lineage_v1_BatchSearchLinkProcessesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_lineage_v1_BatchSearchLinkProcessesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_lineage_v1_BatchSearchLinkProcessesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_lineage_v1_BatchSearchLinkProcessesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_lineage_v1_ProcessLinks_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_lineage_v1_ProcessLinks_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_lineage_v1_ProcessLinkInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_lineage_v1_ProcessLinkInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_lineage_v1_Origin_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_lineage_v1_Origin_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n1google/cloud/datacatalog/lineage/v1/li" + + "neage.proto\022#google.cloud.datacatalog.li" + + "neage.v1\032\034google/api/annotations.proto\032\027" + + "google/api/client.proto\032\037google/api/fiel" + + "d_behavior.proto\032\031google/api/resource.pr" + + "oto\032#google/longrunning/operations.proto" + + "\032\033google/protobuf/empty.proto\032 google/pr" + + "otobuf/field_mask.proto\032\034google/protobuf" + + "/struct.proto\032\037google/protobuf/timestamp" + + ".proto\"\201\003\n\007Process\022\021\n\004name\030\001 \001(\tB\003\340A\005\022\031\n" + + "\014display_name\030\002 \001(\tB\003\340A\001\022U\n\nattributes\030\003" + + " \003(\0132<.google.cloud.datacatalog.lineage." + + "v1.Process.AttributesEntryB\003\340A\001\022@\n\006origi" + + "n\030\004 \001(\0132+.google.cloud.datacatalog.linea" + + "ge.v1.OriginB\003\340A\001\032I\n\017AttributesEntry\022\013\n\003" + + "key\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.google.protob" + + "uf.Value:\0028\001:d\352Aa\n\"datalineage.googleapi" + + "s.com/Process\022;projects/{project}/locati" + + "ons/{location}/processes/{process}\"\265\004\n\003R" + + "un\022\021\n\004name\030\001 \001(\tB\003\340A\005\022\031\n\014display_name\030\002 " + + "\001(\tB\003\340A\001\022Q\n\nattributes\030\003 \003(\01328.google.cl" + + "oud.datacatalog.lineage.v1.Run.Attribute" + + "sEntryB\003\340A\001\0223\n\nstart_time\030\004 \001(\0132\032.google" + + ".protobuf.TimestampB\003\340A\002\0221\n\010end_time\030\005 \001" + + "(\0132\032.google.protobuf.TimestampB\003\340A\001\022B\n\005s" + + "tate\030\006 \001(\0162..google.cloud.datacatalog.li" + + "neage.v1.Run.StateB\003\340A\002\032I\n\017AttributesEnt" + + "ry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.google." + + "protobuf.Value:\0028\001\"I\n\005State\022\013\n\007UNKNOWN\020\000" + + "\022\013\n\007STARTED\020\001\022\r\n\tCOMPLETED\020\002\022\n\n\006FAILED\020\003" + + "\022\013\n\007ABORTED\020\004:k\352Ah\n\036datalineage.googleap" + + "is.com/Run\022Fprojects/{project}/locations" + + "/{location}/processes/{process}/runs/{ru" + + "n}\"\343\002\n\014LineageEvent\022\021\n\004name\030\001 \001(\tB\003\340A\005\022B" + + "\n\005links\030\010 \003(\0132..google.cloud.datacatalog" + + ".lineage.v1.EventLinkB\003\340A\001\0223\n\nstart_time" + + "\030\006 \001(\0132\032.google.protobuf.TimestampB\003\340A\001\022" + + "1\n\010end_time\030\007 \001(\0132\032.google.protobuf.Time" + + "stampB\003\340A\001:\223\001\352A\217\001\n\'datalineage.googleapi" + + "s.com/LineageEvent\022dprojects/{project}/l" + + "ocations/{location}/processes/{process}/" + + "runs/{run}/lineageEvents/{lineage_event}" + + "\"\241\001\n\tEventLink\022I\n\006source\030\001 \001(\01324.google." + + "cloud.datacatalog.lineage.v1.EntityRefer" + + "enceB\003\340A\002\022I\n\006target\030\002 \001(\01324.google.cloud" + + ".datacatalog.lineage.v1.EntityReferenceB" + + "\003\340A\002\"4\n\017EntityReference\022!\n\024fully_qualifi" + + "ed_name\030\001 \001(\tB\003\340A\002\"\332\003\n\021OperationMetadata" + + "\022P\n\005state\030\001 \001(\0162<.google.cloud.datacatal" + + "og.lineage.v1.OperationMetadata.StateB\003\340" + + "A\003\022X\n\016operation_type\030\002 \001(\0162;.google.clou" + + "d.datacatalog.lineage.v1.OperationMetada" + + "ta.TypeB\003\340A\003\022\025\n\010resource\030\003 \001(\tB\003\340A\003\022\032\n\rr" + + "esource_uuid\030\004 \001(\tB\003\340A\003\0224\n\013create_time\030\005" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0221\n" + + "\010end_time\030\006 \001(\0132\032.google.protobuf.Timest" + + "ampB\003\340A\003\"S\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000" + + "\022\013\n\007PENDING\020\001\022\013\n\007RUNNING\020\002\022\r\n\tSUCCEEDED\020" + + "\003\022\n\n\006FAILED\020\004\"(\n\004Type\022\024\n\020TYPE_UNSPECIFIE" + + "D\020\000\022\n\n\006DELETE\020\001\"\252\001\n\024CreateProcessRequest" + + "\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"datalineage.go" + + "ogleapis.com/Process\022B\n\007process\030\002 \001(\0132,." + + "google.cloud.datacatalog.lineage.v1.Proc" + + "essB\003\340A\002\022\022\n\nrequest_id\030\003 \001(\t\"\242\001\n\024UpdateP" + + "rocessRequest\022B\n\007process\030\001 \001(\0132,.google." + + "cloud.datacatalog.lineage.v1.ProcessB\003\340A" + + "\002\022/\n\013update_mask\030\002 \001(\0132\032.google.protobuf" + + ".FieldMask\022\025\n\rallow_missing\030\003 \001(\010\"M\n\021Get" + + "ProcessRequest\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"da" + + "talineage.googleapis.com/Process\"y\n\024List" + + "ProcessesRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$" + + "\022\"datalineage.googleapis.com/Process\022\021\n\t" + + "page_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"q\n\025L" + + "istProcessesResponse\022?\n\tprocesses\030\001 \003(\0132" + + ",.google.cloud.datacatalog.lineage.v1.Pr" + + "ocess\022\027\n\017next_page_token\030\002 \001(\t\"g\n\024Delete" + + "ProcessRequest\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"da" + + "talineage.googleapis.com/Process\022\025\n\rallo" + + "w_missing\030\002 \001(\010\"\232\001\n\020CreateRunRequest\0226\n\006" + + "parent\030\001 \001(\tB&\340A\002\372A \022\036datalineage.google" + + "apis.com/Run\022:\n\003run\030\002 \001(\0132(.google.cloud" + + ".datacatalog.lineage.v1.RunB\003\340A\002\022\022\n\nrequ" + + "est_id\030\003 \001(\t\"\177\n\020UpdateRunRequest\022:\n\003run\030" + + "\001 \001(\0132(.google.cloud.datacatalog.lineage" + + ".v1.RunB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132\032.goog" + + "le.protobuf.FieldMask\"E\n\rGetRunRequest\0224" + + "\n\004name\030\001 \001(\tB&\340A\002\372A \n\036datalineage.google" + + "apis.com/Run\"p\n\017ListRunsRequest\0226\n\006paren" + + "t\030\001 \001(\tB&\340A\002\372A \022\036datalineage.googleapis." + + "com/Run\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token" + + "\030\003 \001(\t\"c\n\020ListRunsResponse\0226\n\004runs\030\001 \003(\013" + + "2(.google.cloud.datacatalog.lineage.v1.R" + + "un\022\027\n\017next_page_token\030\002 \001(\t\"_\n\020DeleteRun" + + "Request\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036datalinea" + + "ge.googleapis.com/Run\022\025\n\rallow_missing\030\002" + + " \001(\010\"\277\001\n\031CreateLineageEventRequest\022?\n\006pa" + + "rent\030\001 \001(\tB/\340A\002\372A)\022\'datalineage.googleap" + + "is.com/LineageEvent\022M\n\rlineage_event\030\002 \001" + + "(\01321.google.cloud.datacatalog.lineage.v1" + + ".LineageEventB\003\340A\002\022\022\n\nrequest_id\030\003 \001(\t\"W" + + "\n\026GetLineageEventRequest\022=\n\004name\030\001 \001(\tB/" + + "\340A\002\372A)\n\'datalineage.googleapis.com/Linea" + + "geEvent\"\202\001\n\030ListLineageEventsRequest\022?\n\006" + + "parent\030\001 \001(\tB/\340A\002\372A)\022\'datalineage.google" + + "apis.com/LineageEvent\022\021\n\tpage_size\030\002 \001(\005" + + "\022\022\n\npage_token\030\003 \001(\t\"\177\n\031ListLineageEvent" + + "sResponse\022I\n\016lineage_events\030\001 \003(\01321.goog" + + "le.cloud.datacatalog.lineage.v1.LineageE" + + "vent\022\027\n\017next_page_token\030\002 \001(\t\"q\n\031DeleteL" + + "ineageEventRequest\022=\n\004name\030\001 \001(\tB/\340A\002\372A)" + + "\n\'datalineage.googleapis.com/LineageEven" + + "t\022\025\n\rallow_missing\030\002 \001(\010\"\247\002\n\022SearchLinks" + + "Request\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"datalin" + + "eage.googleapis.com/Process\022K\n\006source\030\004 " + + "\001(\01324.google.cloud.datacatalog.lineage.v" + + "1.EntityReferenceB\003\340A\001H\000\022K\n\006target\030\005 \001(\013" + + "24.google.cloud.datacatalog.lineage.v1.E" + + "ntityReferenceB\003\340A\001H\000\022\026\n\tpage_size\030\002 \001(\005" + + "B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001B\n\n\010criter" + + "ia\"h\n\023SearchLinksResponse\0228\n\005links\030\001 \003(\013" + + "2).google.cloud.datacatalog.lineage.v1.L" + + "ink\022\027\n\017next_page_token\030\002 \001(\t\"\206\002\n\004Link\022\024\n" + + "\004name\030\001 \001(\tB\006\340A\003\340A\005\022D\n\006source\030\002 \001(\01324.go" + + "ogle.cloud.datacatalog.lineage.v1.Entity" + + "Reference\022D\n\006target\030\003 \001(\01324.google.cloud" + + ".datacatalog.lineage.v1.EntityReference\022" + + ".\n\nstart_time\030\004 \001(\0132\032.google.protobuf.Ti" + + "mestamp\022,\n\010end_time\030\005 \001(\0132\032.google.proto" + + "buf.Timestamp\"\230\001\n\037BatchSearchLinkProcess" + + "esRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"datal" + + "ineage.googleapis.com/Process\022\022\n\005links\030\002" + + " \003(\tB\003\340A\002\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_tok" + + "en\030\004 \001(\t\"\205\001\n BatchSearchLinkProcessesRes" + + "ponse\022H\n\rprocess_links\030\001 \003(\01321.google.cl" + + "oud.datacatalog.lineage.v1.ProcessLinks\022" + + "\027\n\017next_page_token\030\002 \001(\t\"\215\001\n\014ProcessLink" + + "s\0228\n\007process\030\001 \001(\tB\'\372A$\n\"datalineage.goo" + + "gleapis.com/Process\022C\n\005links\030\002 \003(\01324.goo" + + "gle.cloud.datacatalog.lineage.v1.Process" + + "LinkInfo\"}\n\017ProcessLinkInfo\022\014\n\004link\030\001 \001(" + + "\t\022.\n\nstart_time\030\002 \001(\0132\032.google.protobuf." + + "Timestamp\022,\n\010end_time\030\003 \001(\0132\032.google.pro" + + "tobuf.Timestamp\"\332\001\n\006Origin\022K\n\013source_typ" + + "e\030\001 \001(\01626.google.cloud.datacatalog.linea" + + "ge.v1.Origin.SourceType\022\014\n\004name\030\002 \001(\t\"u\n" + + "\nSourceType\022\033\n\027SOURCE_TYPE_UNSPECIFIED\020\000" + + "\022\n\n\006CUSTOM\020\001\022\014\n\010BIGQUERY\020\002\022\017\n\013DATA_FUSIO" + + "N\020\003\022\014\n\010COMPOSER\020\004\022\021\n\rLOOKER_STUDIO\020\0052\240\033\n" + + "\007Lineage\022\311\001\n\rCreateProcess\0229.google.clou" + + "d.datacatalog.lineage.v1.CreateProcessRe" + + "quest\032,.google.cloud.datacatalog.lineage" + + ".v1.Process\"O\202\323\344\223\0028\"-/v1/{parent=project" + + "s/*/locations/*}/processes:\007process\332A\016pa" + + "rent,process\022\326\001\n\rUpdateProcess\0229.google." + + "cloud.datacatalog.lineage.v1.UpdateProce" + + "ssRequest\032,.google.cloud.datacatalog.lin" + + "eage.v1.Process\"\\\202\323\344\223\002@25/v1/{process.na" + + "me=projects/*/locations/*/processes/*}:\007" + + "process\332A\023process,update_mask\022\260\001\n\nGetPro" + + "cess\0226.google.cloud.datacatalog.lineage." + + "v1.GetProcessRequest\032,.google.cloud.data" + + "catalog.lineage.v1.Process\"<\202\323\344\223\002/\022-/v1/" + + "{name=projects/*/locations/*/processes/*" + + "}\332A\004name\022\306\001\n\rListProcesses\0229.google.clou" + + "d.datacatalog.lineage.v1.ListProcessesRe" + + "quest\032:.google.cloud.datacatalog.lineage" + + ".v1.ListProcessesResponse\">\202\323\344\223\002/\022-/v1/{" + + "parent=projects/*/locations/*}/processes" + + "\332A\006parent\022\371\001\n\rDeleteProcess\0229.google.clo" + + "ud.datacatalog.lineage.v1.DeleteProcessR" + + "equest\032\035.google.longrunning.Operation\"\215\001" + + "\202\323\344\223\002/*-/v1/{name=projects/*/locations/*" + + "/processes/*}\332A\004name\312AN\n\025google.protobuf" + + ".Empty\0225google.cloud.datacatalog.lineage" + + ".v1.OperationMetadata\022\274\001\n\tCreateRun\0225.go" + + "ogle.cloud.datacatalog.lineage.v1.Create" + + "RunRequest\032(.google.cloud.datacatalog.li" + + "neage.v1.Run\"N\202\323\344\223\002;\"4/v1/{parent=projec" + + "ts/*/locations/*/processes/*}/runs:\003run\332" + + "A\nparent,run\022\305\001\n\tUpdateRun\0225.google.clou" + + "d.datacatalog.lineage.v1.UpdateRunReques" + + "t\032(.google.cloud.datacatalog.lineage.v1." + + "Run\"W\202\323\344\223\002?28/v1/{run.name=projects/*/lo" + + "cations/*/processes/*/runs/*}:\003run\332A\017run" + + ",update_mask\022\253\001\n\006GetRun\0222.google.cloud.d" + + "atacatalog.lineage.v1.GetRunRequest\032(.go" + + "ogle.cloud.datacatalog.lineage.v1.Run\"C\202" + + "\323\344\223\0026\0224/v1/{name=projects/*/locations/*/" + + "processes/*/runs/*}\332A\004name\022\276\001\n\010ListRuns\022" + + "4.google.cloud.datacatalog.lineage.v1.Li" + + "stRunsRequest\0325.google.cloud.datacatalog" + + ".lineage.v1.ListRunsResponse\"E\202\323\344\223\0026\0224/v" + + "1/{parent=projects/*/locations/*/process" + + "es/*}/runs\332A\006parent\022\370\001\n\tDeleteRun\0225.goog" + + "le.cloud.datacatalog.lineage.v1.DeleteRu" + + "nRequest\032\035.google.longrunning.Operation\"" + + "\224\001\202\323\344\223\0026*4/v1/{name=projects/*/locations" + + "/*/processes/*/runs/*}\332A\004name\312AN\n\025google" + + ".protobuf.Empty\0225google.cloud.datacatalo" + + "g.lineage.v1.OperationMetadata\022\373\001\n\022Creat" + + "eLineageEvent\022>.google.cloud.datacatalog" + + ".lineage.v1.CreateLineageEventRequest\0321." + + "google.cloud.datacatalog.lineage.v1.Line" + + "ageEvent\"r\202\323\344\223\002U\"D/v1/{parent=projects/*" + + "/locations/*/processes/*/runs/*}/lineage" + + "Events:\rlineage_event\332A\024parent,lineage_e" + + "vent\022\326\001\n\017GetLineageEvent\022;.google.cloud." + + "datacatalog.lineage.v1.GetLineageEventRe" + + "quest\0321.google.cloud.datacatalog.lineage" + + ".v1.LineageEvent\"S\202\323\344\223\002F\022D/v1/{name=proj" + + "ects/*/locations/*/processes/*/runs/*/li" + + "neageEvents/*}\332A\004name\022\351\001\n\021ListLineageEve" + + "nts\022=.google.cloud.datacatalog.lineage.v" + + "1.ListLineageEventsRequest\032>.google.clou" + + "d.datacatalog.lineage.v1.ListLineageEven" + + "tsResponse\"U\202\323\344\223\002F\022D/v1/{parent=projects" + + "/*/locations/*/processes/*/runs/*}/linea" + + "geEvents\332A\006parent\022\301\001\n\022DeleteLineageEvent" + + "\022>.google.cloud.datacatalog.lineage.v1.D" + + "eleteLineageEventRequest\032\026.google.protob" + + "uf.Empty\"S\202\323\344\223\002F*D/v1/{name=projects/*/l" + + "ocations/*/processes/*/runs/*/lineageEve" + + "nts/*}\332A\004name\022\274\001\n\013SearchLinks\0227.google.c" + + "loud.datacatalog.lineage.v1.SearchLinksR" + + "equest\0328.google.cloud.datacatalog.lineag" + + "e.v1.SearchLinksResponse\":\202\323\344\223\0024\"//v1/{p" + + "arent=projects/*/locations/*}:searchLink" + + "s:\001*\022\360\001\n\030BatchSearchLinkProcesses\022D.goog" + + "le.cloud.datacatalog.lineage.v1.BatchSea" + + "rchLinkProcessesRequest\032E.google.cloud.d" + + "atacatalog.lineage.v1.BatchSearchLinkPro" + + "cessesResponse\"G\202\323\344\223\002A\" + * Links represent the data flow between **source** (upstream) + * and **target** (downstream) assets in transformation pipelines. + * Links are created when LineageEvents record data transformation between + * related assets. + * + * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.Link} + */ +public final class Link extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.lineage.v1.Link) + LinkOrBuilder { + private static final long serialVersionUID = 0L; + // Use Link.newBuilder() to construct. + private Link(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Link() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Link(); + } + + @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.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_Link_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_Link_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.Link.class, + com.google.cloud.datacatalog.lineage.v1.Link.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. Immutable. The name of the link. Format:
+   * `projects/{project}/locations/{location}/links/{link}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @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. Immutable. The name of the link. Format:
+   * `projects/{project}/locations/{location}/links/{link}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @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 SOURCE_FIELD_NUMBER = 2; + private com.google.cloud.datacatalog.lineage.v1.EntityReference source_; + /** + * + * + *
+   * The pointer to the entity that is the **source** of this link.
+   * 
+ * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 2; + * + * @return Whether the source field is set. + */ + @java.lang.Override + public boolean hasSource() { + return source_ != null; + } + /** + * + * + *
+   * The pointer to the entity that is the **source** of this link.
+   * 
+ * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 2; + * + * @return The source. + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.EntityReference getSource() { + return source_ == null + ? com.google.cloud.datacatalog.lineage.v1.EntityReference.getDefaultInstance() + : source_; + } + /** + * + * + *
+   * The pointer to the entity that is the **source** of this link.
+   * 
+ * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 2; + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder getSourceOrBuilder() { + return getSource(); + } + + public static final int TARGET_FIELD_NUMBER = 3; + private com.google.cloud.datacatalog.lineage.v1.EntityReference target_; + /** + * + * + *
+   * The pointer to the entity that is the **target** of this link.
+   * 
+ * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 3; + * + * @return Whether the target field is set. + */ + @java.lang.Override + public boolean hasTarget() { + return target_ != null; + } + /** + * + * + *
+   * The pointer to the entity that is the **target** of this link.
+   * 
+ * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 3; + * + * @return The target. + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.EntityReference getTarget() { + return target_ == null + ? com.google.cloud.datacatalog.lineage.v1.EntityReference.getDefaultInstance() + : target_; + } + /** + * + * + *
+   * The pointer to the entity that is the **target** of this link.
+   * 
+ * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 3; + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder getTargetOrBuilder() { + return getTarget(); + } + + public static final int START_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * The start of the first event establishing this link.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 4; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
+   * The start of the first event establishing this link.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 4; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * The start of the first event establishing this link.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 4; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return getStartTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * The end of the last event establishing this link.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 5; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * The end of the last event establishing this link.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 5; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * The end of the last event establishing this link.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 5; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + 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 (source_ != null) { + output.writeMessage(2, getSource()); + } + if (target_ != null) { + output.writeMessage(3, getTarget()); + } + if (startTime_ != null) { + output.writeMessage(4, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(5, getEndTime()); + } + 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 (source_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSource()); + } + if (target_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTarget()); + } + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getEndTime()); + } + 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.datacatalog.lineage.v1.Link)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.lineage.v1.Link other = + (com.google.cloud.datacatalog.lineage.v1.Link) obj; + + if (!getName().equals(other.getName())) return false; + if (hasSource() != other.hasSource()) return false; + if (hasSource()) { + if (!getSource().equals(other.getSource())) return false; + } + if (hasTarget() != other.hasTarget()) return false; + if (hasTarget()) { + if (!getTarget().equals(other.getTarget())) return false; + } + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) 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 (hasSource()) { + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + } + if (hasTarget()) { + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + } + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.lineage.v1.Link parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.Link 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.datacatalog.lineage.v1.Link parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.Link 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.datacatalog.lineage.v1.Link parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.Link parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.lineage.v1.Link parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.Link 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.datacatalog.lineage.v1.Link parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.Link 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.datacatalog.lineage.v1.Link parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.Link 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.datacatalog.lineage.v1.Link 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; + } + /** + * + * + *
+   * Links represent the data flow between **source** (upstream)
+   * and **target** (downstream) assets in transformation pipelines.
+   * Links are created when LineageEvents record data transformation between
+   * related assets.
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.Link} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.lineage.v1.Link) + com.google.cloud.datacatalog.lineage.v1.LinkOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_Link_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_Link_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.Link.class, + com.google.cloud.datacatalog.lineage.v1.Link.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.lineage.v1.Link.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (sourceBuilder_ == null) { + source_ = null; + } else { + source_ = null; + sourceBuilder_ = null; + } + if (targetBuilder_ == null) { + target_ = null; + } else { + target_ = null; + targetBuilder_ = null; + } + if (startTimeBuilder_ == null) { + startTime_ = null; + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_Link_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.Link getDefaultInstanceForType() { + return com.google.cloud.datacatalog.lineage.v1.Link.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.Link build() { + com.google.cloud.datacatalog.lineage.v1.Link result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.Link buildPartial() { + com.google.cloud.datacatalog.lineage.v1.Link result = + new com.google.cloud.datacatalog.lineage.v1.Link(this); + result.name_ = name_; + if (sourceBuilder_ == null) { + result.source_ = source_; + } else { + result.source_ = sourceBuilder_.build(); + } + if (targetBuilder_ == null) { + result.target_ = target_; + } else { + result.target_ = targetBuilder_.build(); + } + if (startTimeBuilder_ == null) { + result.startTime_ = startTime_; + } else { + result.startTime_ = startTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.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.datacatalog.lineage.v1.Link) { + return mergeFrom((com.google.cloud.datacatalog.lineage.v1.Link) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.lineage.v1.Link other) { + if (other == com.google.cloud.datacatalog.lineage.v1.Link.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasSource()) { + mergeSource(other.getSource()); + } + if (other.hasTarget()) { + mergeTarget(other.getTarget()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + 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(getSourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getTargetFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 42: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + 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. Immutable. The name of the link. Format:
+     * `projects/{project}/locations/{location}/links/{link}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @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. Immutable. The name of the link. Format:
+     * `projects/{project}/locations/{location}/links/{link}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @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. Immutable. The name of the link. Format:
+     * `projects/{project}/locations/{location}/links/{link}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @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. Immutable. The name of the link. Format:
+     * `projects/{project}/locations/{location}/links/{link}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Immutable. The name of the link. Format:
+     * `projects/{project}/locations/{location}/links/{link}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @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.datacatalog.lineage.v1.EntityReference source_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.EntityReference, + com.google.cloud.datacatalog.lineage.v1.EntityReference.Builder, + com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder> + sourceBuilder_; + /** + * + * + *
+     * The pointer to the entity that is the **source** of this link.
+     * 
+ * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 2; + * + * @return Whether the source field is set. + */ + public boolean hasSource() { + return sourceBuilder_ != null || source_ != null; + } + /** + * + * + *
+     * The pointer to the entity that is the **source** of this link.
+     * 
+ * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 2; + * + * @return The source. + */ + public com.google.cloud.datacatalog.lineage.v1.EntityReference getSource() { + if (sourceBuilder_ == null) { + return source_ == null + ? com.google.cloud.datacatalog.lineage.v1.EntityReference.getDefaultInstance() + : source_; + } else { + return sourceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The pointer to the entity that is the **source** of this link.
+     * 
+ * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 2; + */ + public Builder setSource(com.google.cloud.datacatalog.lineage.v1.EntityReference value) { + if (sourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + sourceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The pointer to the entity that is the **source** of this link.
+     * 
+ * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 2; + */ + public Builder setSource( + com.google.cloud.datacatalog.lineage.v1.EntityReference.Builder builderForValue) { + if (sourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + sourceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The pointer to the entity that is the **source** of this link.
+     * 
+ * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 2; + */ + public Builder mergeSource(com.google.cloud.datacatalog.lineage.v1.EntityReference value) { + if (sourceBuilder_ == null) { + if (source_ != null) { + source_ = + com.google.cloud.datacatalog.lineage.v1.EntityReference.newBuilder(source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + sourceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The pointer to the entity that is the **source** of this link.
+     * 
+ * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 2; + */ + public Builder clearSource() { + if (sourceBuilder_ == null) { + source_ = null; + onChanged(); + } else { + source_ = null; + sourceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The pointer to the entity that is the **source** of this link.
+     * 
+ * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 2; + */ + public com.google.cloud.datacatalog.lineage.v1.EntityReference.Builder getSourceBuilder() { + + onChanged(); + return getSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The pointer to the entity that is the **source** of this link.
+     * 
+ * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 2; + */ + public com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder getSourceOrBuilder() { + if (sourceBuilder_ != null) { + return sourceBuilder_.getMessageOrBuilder(); + } else { + return source_ == null + ? com.google.cloud.datacatalog.lineage.v1.EntityReference.getDefaultInstance() + : source_; + } + } + /** + * + * + *
+     * The pointer to the entity that is the **source** of this link.
+     * 
+ * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.EntityReference, + com.google.cloud.datacatalog.lineage.v1.EntityReference.Builder, + com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder> + getSourceFieldBuilder() { + if (sourceBuilder_ == null) { + sourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.EntityReference, + com.google.cloud.datacatalog.lineage.v1.EntityReference.Builder, + com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder>( + getSource(), getParentForChildren(), isClean()); + source_ = null; + } + return sourceBuilder_; + } + + private com.google.cloud.datacatalog.lineage.v1.EntityReference target_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.EntityReference, + com.google.cloud.datacatalog.lineage.v1.EntityReference.Builder, + com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder> + targetBuilder_; + /** + * + * + *
+     * The pointer to the entity that is the **target** of this link.
+     * 
+ * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 3; + * + * @return Whether the target field is set. + */ + public boolean hasTarget() { + return targetBuilder_ != null || target_ != null; + } + /** + * + * + *
+     * The pointer to the entity that is the **target** of this link.
+     * 
+ * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 3; + * + * @return The target. + */ + public com.google.cloud.datacatalog.lineage.v1.EntityReference getTarget() { + if (targetBuilder_ == null) { + return target_ == null + ? com.google.cloud.datacatalog.lineage.v1.EntityReference.getDefaultInstance() + : target_; + } else { + return targetBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The pointer to the entity that is the **target** of this link.
+     * 
+ * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 3; + */ + public Builder setTarget(com.google.cloud.datacatalog.lineage.v1.EntityReference value) { + if (targetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + onChanged(); + } else { + targetBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The pointer to the entity that is the **target** of this link.
+     * 
+ * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 3; + */ + public Builder setTarget( + com.google.cloud.datacatalog.lineage.v1.EntityReference.Builder builderForValue) { + if (targetBuilder_ == null) { + target_ = builderForValue.build(); + onChanged(); + } else { + targetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The pointer to the entity that is the **target** of this link.
+     * 
+ * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 3; + */ + public Builder mergeTarget(com.google.cloud.datacatalog.lineage.v1.EntityReference value) { + if (targetBuilder_ == null) { + if (target_ != null) { + target_ = + com.google.cloud.datacatalog.lineage.v1.EntityReference.newBuilder(target_) + .mergeFrom(value) + .buildPartial(); + } else { + target_ = value; + } + onChanged(); + } else { + targetBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The pointer to the entity that is the **target** of this link.
+     * 
+ * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 3; + */ + public Builder clearTarget() { + if (targetBuilder_ == null) { + target_ = null; + onChanged(); + } else { + target_ = null; + targetBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The pointer to the entity that is the **target** of this link.
+     * 
+ * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 3; + */ + public com.google.cloud.datacatalog.lineage.v1.EntityReference.Builder getTargetBuilder() { + + onChanged(); + return getTargetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The pointer to the entity that is the **target** of this link.
+     * 
+ * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 3; + */ + public com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder getTargetOrBuilder() { + if (targetBuilder_ != null) { + return targetBuilder_.getMessageOrBuilder(); + } else { + return target_ == null + ? com.google.cloud.datacatalog.lineage.v1.EntityReference.getDefaultInstance() + : target_; + } + } + /** + * + * + *
+     * The pointer to the entity that is the **target** of this link.
+     * 
+ * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.EntityReference, + com.google.cloud.datacatalog.lineage.v1.EntityReference.Builder, + com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder> + getTargetFieldBuilder() { + if (targetBuilder_ == null) { + targetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.EntityReference, + com.google.cloud.datacatalog.lineage.v1.EntityReference.Builder, + com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder>( + getTarget(), getParentForChildren(), isClean()); + target_ = null; + } + return targetBuilder_; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * The start of the first event establishing this link.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return startTimeBuilder_ != null || startTime_ != null; + } + /** + * + * + *
+     * The start of the first event establishing this link.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4; + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The start of the first event establishing this link.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + onChanged(); + } else { + startTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The start of the first event establishing this link.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + onChanged(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The start of the first event establishing this link.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (startTime_ != null) { + startTime_ = + com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); + } else { + startTime_ = value; + } + onChanged(); + } else { + startTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The start of the first event establishing this link.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4; + */ + public Builder clearStartTime() { + if (startTimeBuilder_ == null) { + startTime_ = null; + onChanged(); + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The start of the first event establishing this link.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The start of the first event establishing this link.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * The start of the first event establishing this link.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + 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_; + /** + * + * + *
+     * The end of the last event establishing this link.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * The end of the last event establishing this link.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5; + * + * @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(); + } + } + /** + * + * + *
+     * The end of the last event establishing this link.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5; + */ + 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; + } + /** + * + * + *
+     * The end of the last event establishing this link.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The end of the last event establishing this link.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5; + */ + 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; + } + /** + * + * + *
+     * The end of the last event establishing this link.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The end of the last event establishing this link.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The end of the last event establishing this link.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * The end of the last event establishing this link.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5; + */ + 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_; + } + + @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.datacatalog.lineage.v1.Link) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.lineage.v1.Link) + private static final com.google.cloud.datacatalog.lineage.v1.Link DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.lineage.v1.Link(); + } + + public static com.google.cloud.datacatalog.lineage.v1.Link getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Link 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.datacatalog.lineage.v1.Link getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/LinkOrBuilder.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/LinkOrBuilder.java new file mode 100644 index 000000000000..b2d57e34011a --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/LinkOrBuilder.java @@ -0,0 +1,196 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +public interface LinkOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.lineage.v1.Link) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Immutable. The name of the link. Format:
+   * `projects/{project}/locations/{location}/links/{link}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Immutable. The name of the link. Format:
+   * `projects/{project}/locations/{location}/links/{link}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The pointer to the entity that is the **source** of this link.
+   * 
+ * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 2; + * + * @return Whether the source field is set. + */ + boolean hasSource(); + /** + * + * + *
+   * The pointer to the entity that is the **source** of this link.
+   * 
+ * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 2; + * + * @return The source. + */ + com.google.cloud.datacatalog.lineage.v1.EntityReference getSource(); + /** + * + * + *
+   * The pointer to the entity that is the **source** of this link.
+   * 
+ * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 2; + */ + com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder getSourceOrBuilder(); + + /** + * + * + *
+   * The pointer to the entity that is the **target** of this link.
+   * 
+ * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 3; + * + * @return Whether the target field is set. + */ + boolean hasTarget(); + /** + * + * + *
+   * The pointer to the entity that is the **target** of this link.
+   * 
+ * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 3; + * + * @return The target. + */ + com.google.cloud.datacatalog.lineage.v1.EntityReference getTarget(); + /** + * + * + *
+   * The pointer to the entity that is the **target** of this link.
+   * 
+ * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 3; + */ + com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder getTargetOrBuilder(); + + /** + * + * + *
+   * The start of the first event establishing this link.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 4; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * The start of the first event establishing this link.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 4; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * The start of the first event establishing this link.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 4; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * The end of the last event establishing this link.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 5; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * The end of the last event establishing this link.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 5; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * The end of the last event establishing this link.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 5; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ListLineageEventsRequest.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ListLineageEventsRequest.java new file mode 100644 index 000000000000..383a7fdf1c11 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ListLineageEventsRequest.java @@ -0,0 +1,947 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +/** + * + * + *
+ * Request message for
+ * [ListLineageEvents][google.cloud.datacatalog.lineage.v1.ListLineageEvents].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest} + */ +public final class ListLineageEventsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest) + ListLineageEventsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListLineageEventsRequest.newBuilder() to construct. + private ListLineageEventsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListLineageEventsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListLineageEventsRequest(); + } + + @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.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ListLineageEventsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ListLineageEventsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest.class, + com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The name of the run that owns the collection of lineage events to
+   * get.
+   * 
+ * + * + * 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 run that owns the collection of lineage events to
+   * get.
+   * 
+ * + * + * 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 PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The maximum number of lineage events to return.
+   * The service may return fewer events than this value.
+   * If unspecified, at most 50 events are returned. The maximum value is 100;
+   * values greater than 100 are cut to 100.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The page token received from a previous `ListLineageEvents` call. Specify
+   * it to get the next page.
+   * When paginating, all other parameters specified in this call must
+   * match the parameters of the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @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 page token received from a previous `ListLineageEvents` call. Specify
+   * it to get the next page.
+   * When paginating, all other parameters specified in this call must
+   * match the parameters of the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @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 (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, 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 (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, 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.datacatalog.lineage.v1.ListLineageEventsRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest other = + (com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest) obj; + + if (!getParent().equals(other.getParent())) 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) + 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.datacatalog.lineage.v1.ListLineageEventsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest 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.datacatalog.lineage.v1.ListLineageEventsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest 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.datacatalog.lineage.v1.ListLineageEventsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest 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.datacatalog.lineage.v1.ListLineageEventsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest 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.datacatalog.lineage.v1.ListLineageEventsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest 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.datacatalog.lineage.v1.ListLineageEventsRequest 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
+   * [ListLineageEvents][google.cloud.datacatalog.lineage.v1.ListLineageEvents].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest) + com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ListLineageEventsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ListLineageEventsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest.class, + com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ListLineageEventsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest + getDefaultInstanceForType() { + return com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest build() { + com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest buildPartial() { + com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest result = + new com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest(this); + result.parent_ = parent_; + 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.datacatalog.lineage.v1.ListLineageEventsRequest) { + return mergeFrom((com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest other) { + if (other + == com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + 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 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = 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 java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The name of the run that owns the collection of lineage events to
+     * get.
+     * 
+ * + * + * 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 run that owns the collection of lineage events to
+     * get.
+     * 
+ * + * + * 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 run that owns the collection of lineage events to
+     * get.
+     * 
+ * + * + * 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 run that owns the collection of lineage events to
+     * get.
+     * 
+ * + * + * 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 run that owns the collection of lineage events to
+     * get.
+     * 
+ * + * + * 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 int pageSize_; + /** + * + * + *
+     * The maximum number of lineage events to return.
+     * The service may return fewer events than this value.
+     * If unspecified, at most 50 events are returned. The maximum value is 100;
+     * values greater than 100 are cut to 100.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of lineage events to return.
+     * The service may return fewer events than this value.
+     * If unspecified, at most 50 events are returned. The maximum value is 100;
+     * values greater than 100 are cut to 100.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of lineage events to return.
+     * The service may return fewer events than this value.
+     * If unspecified, at most 50 events are returned. The maximum value is 100;
+     * values greater than 100 are cut to 100.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The page token received from a previous `ListLineageEvents` call. Specify
+     * it to get the next page.
+     * When paginating, all other parameters specified in this call must
+     * match the parameters of the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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 page token received from a previous `ListLineageEvents` call. Specify
+     * it to get the next page.
+     * When paginating, all other parameters specified in this call must
+     * match the parameters of the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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 page token received from a previous `ListLineageEvents` call. Specify
+     * it to get the next page.
+     * When paginating, all other parameters specified in this call must
+     * match the parameters of the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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 page token received from a previous `ListLineageEvents` call. Specify
+     * it to get the next page.
+     * When paginating, all other parameters specified in this call must
+     * match the parameters of the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The page token received from a previous `ListLineageEvents` call. Specify
+     * it to get the next page.
+     * When paginating, all other parameters specified in this call must
+     * match the parameters of the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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.datacatalog.lineage.v1.ListLineageEventsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest) + private static final com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest(); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListLineageEventsRequest 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.datacatalog.lineage.v1.ListLineageEventsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ListLineageEventsRequestOrBuilder.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ListLineageEventsRequestOrBuilder.java new file mode 100644 index 000000000000..281b3165efc6 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ListLineageEventsRequestOrBuilder.java @@ -0,0 +1,103 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +public interface ListLineageEventsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the run that owns the collection of lineage events to
+   * get.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The name of the run that owns the collection of lineage events to
+   * get.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of lineage events to return.
+   * The service may return fewer events than this value.
+   * If unspecified, at most 50 events are returned. The maximum value is 100;
+   * values greater than 100 are cut to 100.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The page token received from a previous `ListLineageEvents` call. Specify
+   * it to get the next page.
+   * When paginating, all other parameters specified in this call must
+   * match the parameters of the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The page token received from a previous `ListLineageEvents` call. Specify
+   * it to get the next page.
+   * When paginating, all other parameters specified in this call must
+   * match the parameters of the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ListLineageEventsResponse.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ListLineageEventsResponse.java new file mode 100644 index 000000000000..f625da583851 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ListLineageEventsResponse.java @@ -0,0 +1,1138 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +/** + * + * + *
+ * Response message for
+ * [ListLineageEvents][google.cloud.datacatalog.lineage.v1.ListLineageEvents].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse} + */ +public final class ListLineageEventsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse) + ListLineageEventsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListLineageEventsResponse.newBuilder() to construct. + private ListLineageEventsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListLineageEventsResponse() { + lineageEvents_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListLineageEventsResponse(); + } + + @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.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ListLineageEventsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ListLineageEventsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse.class, + com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse.Builder.class); + } + + public static final int LINEAGE_EVENTS_FIELD_NUMBER = 1; + private java.util.List lineageEvents_; + /** + * + * + *
+   * Lineage events from the specified project and location.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_events = 1; + */ + @java.lang.Override + public java.util.List + getLineageEventsList() { + return lineageEvents_; + } + /** + * + * + *
+   * Lineage events from the specified project and location.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_events = 1; + */ + @java.lang.Override + public java.util.List + getLineageEventsOrBuilderList() { + return lineageEvents_; + } + /** + * + * + *
+   * Lineage events from the specified project and location.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_events = 1; + */ + @java.lang.Override + public int getLineageEventsCount() { + return lineageEvents_.size(); + } + /** + * + * + *
+   * Lineage events from the specified project and location.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_events = 1; + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.LineageEvent getLineageEvents(int index) { + return lineageEvents_.get(index); + } + /** + * + * + *
+   * Lineage events from the specified project and location.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_events = 1; + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.LineageEventOrBuilder getLineageEventsOrBuilder( + int index) { + return lineageEvents_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * The token to specify as `page_token` in the next call to get the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * 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 token to specify as `page_token` in the next call to get the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * 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 < lineageEvents_.size(); i++) { + output.writeMessage(1, lineageEvents_.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 < lineageEvents_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, lineageEvents_.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.datacatalog.lineage.v1.ListLineageEventsResponse)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse other = + (com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse) obj; + + if (!getLineageEventsList().equals(other.getLineageEventsList())) 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 (getLineageEventsCount() > 0) { + hash = (37 * hash) + LINEAGE_EVENTS_FIELD_NUMBER; + hash = (53 * hash) + getLineageEventsList().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.datacatalog.lineage.v1.ListLineageEventsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse 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.datacatalog.lineage.v1.ListLineageEventsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse 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.datacatalog.lineage.v1.ListLineageEventsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse 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.datacatalog.lineage.v1.ListLineageEventsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse + 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.datacatalog.lineage.v1.ListLineageEventsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse 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.datacatalog.lineage.v1.ListLineageEventsResponse 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
+   * [ListLineageEvents][google.cloud.datacatalog.lineage.v1.ListLineageEvents].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse) + com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ListLineageEventsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ListLineageEventsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse.class, + com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse.Builder.class); + } + + // Construct using + // com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (lineageEventsBuilder_ == null) { + lineageEvents_ = java.util.Collections.emptyList(); + } else { + lineageEvents_ = null; + lineageEventsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ListLineageEventsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse + getDefaultInstanceForType() { + return com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse build() { + com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse buildPartial() { + com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse result = + new com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse(this); + int from_bitField0_ = bitField0_; + if (lineageEventsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + lineageEvents_ = java.util.Collections.unmodifiableList(lineageEvents_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.lineageEvents_ = lineageEvents_; + } else { + result.lineageEvents_ = lineageEventsBuilder_.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.datacatalog.lineage.v1.ListLineageEventsResponse) { + return mergeFrom((com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse other) { + if (other + == com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse.getDefaultInstance()) + return this; + if (lineageEventsBuilder_ == null) { + if (!other.lineageEvents_.isEmpty()) { + if (lineageEvents_.isEmpty()) { + lineageEvents_ = other.lineageEvents_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLineageEventsIsMutable(); + lineageEvents_.addAll(other.lineageEvents_); + } + onChanged(); + } + } else { + if (!other.lineageEvents_.isEmpty()) { + if (lineageEventsBuilder_.isEmpty()) { + lineageEventsBuilder_.dispose(); + lineageEventsBuilder_ = null; + lineageEvents_ = other.lineageEvents_; + bitField0_ = (bitField0_ & ~0x00000001); + lineageEventsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getLineageEventsFieldBuilder() + : null; + } else { + lineageEventsBuilder_.addAllMessages(other.lineageEvents_); + } + } + } + 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.datacatalog.lineage.v1.LineageEvent m = + input.readMessage( + com.google.cloud.datacatalog.lineage.v1.LineageEvent.parser(), + extensionRegistry); + if (lineageEventsBuilder_ == null) { + ensureLineageEventsIsMutable(); + lineageEvents_.add(m); + } else { + lineageEventsBuilder_.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 lineageEvents_ = + java.util.Collections.emptyList(); + + private void ensureLineageEventsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + lineageEvents_ = + new java.util.ArrayList( + lineageEvents_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.LineageEvent, + com.google.cloud.datacatalog.lineage.v1.LineageEvent.Builder, + com.google.cloud.datacatalog.lineage.v1.LineageEventOrBuilder> + lineageEventsBuilder_; + + /** + * + * + *
+     * Lineage events from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_events = 1; + */ + public java.util.List + getLineageEventsList() { + if (lineageEventsBuilder_ == null) { + return java.util.Collections.unmodifiableList(lineageEvents_); + } else { + return lineageEventsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Lineage events from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_events = 1; + */ + public int getLineageEventsCount() { + if (lineageEventsBuilder_ == null) { + return lineageEvents_.size(); + } else { + return lineageEventsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Lineage events from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_events = 1; + */ + public com.google.cloud.datacatalog.lineage.v1.LineageEvent getLineageEvents(int index) { + if (lineageEventsBuilder_ == null) { + return lineageEvents_.get(index); + } else { + return lineageEventsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Lineage events from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_events = 1; + */ + public Builder setLineageEvents( + int index, com.google.cloud.datacatalog.lineage.v1.LineageEvent value) { + if (lineageEventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLineageEventsIsMutable(); + lineageEvents_.set(index, value); + onChanged(); + } else { + lineageEventsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Lineage events from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_events = 1; + */ + public Builder setLineageEvents( + int index, com.google.cloud.datacatalog.lineage.v1.LineageEvent.Builder builderForValue) { + if (lineageEventsBuilder_ == null) { + ensureLineageEventsIsMutable(); + lineageEvents_.set(index, builderForValue.build()); + onChanged(); + } else { + lineageEventsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Lineage events from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_events = 1; + */ + public Builder addLineageEvents(com.google.cloud.datacatalog.lineage.v1.LineageEvent value) { + if (lineageEventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLineageEventsIsMutable(); + lineageEvents_.add(value); + onChanged(); + } else { + lineageEventsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Lineage events from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_events = 1; + */ + public Builder addLineageEvents( + int index, com.google.cloud.datacatalog.lineage.v1.LineageEvent value) { + if (lineageEventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLineageEventsIsMutable(); + lineageEvents_.add(index, value); + onChanged(); + } else { + lineageEventsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Lineage events from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_events = 1; + */ + public Builder addLineageEvents( + com.google.cloud.datacatalog.lineage.v1.LineageEvent.Builder builderForValue) { + if (lineageEventsBuilder_ == null) { + ensureLineageEventsIsMutable(); + lineageEvents_.add(builderForValue.build()); + onChanged(); + } else { + lineageEventsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Lineage events from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_events = 1; + */ + public Builder addLineageEvents( + int index, com.google.cloud.datacatalog.lineage.v1.LineageEvent.Builder builderForValue) { + if (lineageEventsBuilder_ == null) { + ensureLineageEventsIsMutable(); + lineageEvents_.add(index, builderForValue.build()); + onChanged(); + } else { + lineageEventsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Lineage events from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_events = 1; + */ + public Builder addAllLineageEvents( + java.lang.Iterable values) { + if (lineageEventsBuilder_ == null) { + ensureLineageEventsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, lineageEvents_); + onChanged(); + } else { + lineageEventsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Lineage events from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_events = 1; + */ + public Builder clearLineageEvents() { + if (lineageEventsBuilder_ == null) { + lineageEvents_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + lineageEventsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Lineage events from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_events = 1; + */ + public Builder removeLineageEvents(int index) { + if (lineageEventsBuilder_ == null) { + ensureLineageEventsIsMutable(); + lineageEvents_.remove(index); + onChanged(); + } else { + lineageEventsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Lineage events from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_events = 1; + */ + public com.google.cloud.datacatalog.lineage.v1.LineageEvent.Builder getLineageEventsBuilder( + int index) { + return getLineageEventsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Lineage events from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_events = 1; + */ + public com.google.cloud.datacatalog.lineage.v1.LineageEventOrBuilder getLineageEventsOrBuilder( + int index) { + if (lineageEventsBuilder_ == null) { + return lineageEvents_.get(index); + } else { + return lineageEventsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Lineage events from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_events = 1; + */ + public java.util.List + getLineageEventsOrBuilderList() { + if (lineageEventsBuilder_ != null) { + return lineageEventsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(lineageEvents_); + } + } + /** + * + * + *
+     * Lineage events from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_events = 1; + */ + public com.google.cloud.datacatalog.lineage.v1.LineageEvent.Builder addLineageEventsBuilder() { + return getLineageEventsFieldBuilder() + .addBuilder(com.google.cloud.datacatalog.lineage.v1.LineageEvent.getDefaultInstance()); + } + /** + * + * + *
+     * Lineage events from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_events = 1; + */ + public com.google.cloud.datacatalog.lineage.v1.LineageEvent.Builder addLineageEventsBuilder( + int index) { + return getLineageEventsFieldBuilder() + .addBuilder( + index, com.google.cloud.datacatalog.lineage.v1.LineageEvent.getDefaultInstance()); + } + /** + * + * + *
+     * Lineage events from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_events = 1; + */ + public java.util.List + getLineageEventsBuilderList() { + return getLineageEventsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.LineageEvent, + com.google.cloud.datacatalog.lineage.v1.LineageEvent.Builder, + com.google.cloud.datacatalog.lineage.v1.LineageEventOrBuilder> + getLineageEventsFieldBuilder() { + if (lineageEventsBuilder_ == null) { + lineageEventsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.LineageEvent, + com.google.cloud.datacatalog.lineage.v1.LineageEvent.Builder, + com.google.cloud.datacatalog.lineage.v1.LineageEventOrBuilder>( + lineageEvents_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + lineageEvents_ = null; + } + return lineageEventsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * The token to specify as `page_token` in the next call to get the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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 token to specify as `page_token` in the next call to get the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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 token to specify as `page_token` in the next call to get the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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 token to specify as `page_token` in the next call to get the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The token to specify as `page_token` in the next call to get the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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.datacatalog.lineage.v1.ListLineageEventsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse) + private static final com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse(); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListLineageEventsResponse 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.datacatalog.lineage.v1.ListLineageEventsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ListLineageEventsResponseOrBuilder.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ListLineageEventsResponseOrBuilder.java new file mode 100644 index 000000000000..efee272824fc --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ListLineageEventsResponseOrBuilder.java @@ -0,0 +1,105 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +public interface ListLineageEventsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.lineage.v1.ListLineageEventsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Lineage events from the specified project and location.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_events = 1; + */ + java.util.List getLineageEventsList(); + /** + * + * + *
+   * Lineage events from the specified project and location.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_events = 1; + */ + com.google.cloud.datacatalog.lineage.v1.LineageEvent getLineageEvents(int index); + /** + * + * + *
+   * Lineage events from the specified project and location.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_events = 1; + */ + int getLineageEventsCount(); + /** + * + * + *
+   * Lineage events from the specified project and location.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_events = 1; + */ + java.util.List + getLineageEventsOrBuilderList(); + /** + * + * + *
+   * Lineage events from the specified project and location.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.LineageEvent lineage_events = 1; + */ + com.google.cloud.datacatalog.lineage.v1.LineageEventOrBuilder getLineageEventsOrBuilder( + int index); + + /** + * + * + *
+   * The token to specify as `page_token` in the next call to get the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * The token to specify as `page_token` in the next call to get the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ListProcessesRequest.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ListProcessesRequest.java new file mode 100644 index 000000000000..af256e26845b --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ListProcessesRequest.java @@ -0,0 +1,944 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +/** + * + * + *
+ * Request message for
+ * [ListProcesses][google.cloud.datacatalog.lineage.v1.ListProcesses].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.ListProcessesRequest} + */ +public final class ListProcessesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.lineage.v1.ListProcessesRequest) + ListProcessesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListProcessesRequest.newBuilder() to construct. + private ListProcessesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListProcessesRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListProcessesRequest(); + } + + @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.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ListProcessesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ListProcessesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest.class, + com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The name of the project and its location that owns this
+   * collection of processes.
+   * 
+ * + * + * 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 project and its location that owns this
+   * collection of processes.
+   * 
+ * + * + * 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 PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The maximum number of processes to return. The service may return
+   * fewer than this value. If unspecified, at most 50 processes are
+   * returned. The maximum value is 100; values greater than 100 are cut to
+   * 100.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The page token received from a previous `ListProcesses` call. Specify
+   * it to get the next page.
+   * When paginating, all other parameters specified in this call must
+   * match the parameters of the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @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 page token received from a previous `ListProcesses` call. Specify
+   * it to get the next page.
+   * When paginating, all other parameters specified in this call must
+   * match the parameters of the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @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 (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, 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 (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, 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.datacatalog.lineage.v1.ListProcessesRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest other = + (com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest) obj; + + if (!getParent().equals(other.getParent())) 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) + 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.datacatalog.lineage.v1.ListProcessesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest 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.datacatalog.lineage.v1.ListProcessesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest 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.datacatalog.lineage.v1.ListProcessesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest 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.datacatalog.lineage.v1.ListProcessesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest 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.datacatalog.lineage.v1.ListProcessesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest 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.datacatalog.lineage.v1.ListProcessesRequest 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
+   * [ListProcesses][google.cloud.datacatalog.lineage.v1.ListProcesses].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.ListProcessesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.lineage.v1.ListProcessesRequest) + com.google.cloud.datacatalog.lineage.v1.ListProcessesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ListProcessesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ListProcessesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest.class, + com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ListProcessesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest + getDefaultInstanceForType() { + return com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest build() { + com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest buildPartial() { + com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest result = + new com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest(this); + result.parent_ = parent_; + 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.datacatalog.lineage.v1.ListProcessesRequest) { + return mergeFrom((com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest other) { + if (other + == com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + 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 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = 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 java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The name of the project and its location that owns this
+     * collection of processes.
+     * 
+ * + * + * 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 project and its location that owns this
+     * collection of processes.
+     * 
+ * + * + * 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 project and its location that owns this
+     * collection of processes.
+     * 
+ * + * + * 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 project and its location that owns this
+     * collection of processes.
+     * 
+ * + * + * 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 project and its location that owns this
+     * collection of processes.
+     * 
+ * + * + * 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 int pageSize_; + /** + * + * + *
+     * The maximum number of processes to return. The service may return
+     * fewer than this value. If unspecified, at most 50 processes are
+     * returned. The maximum value is 100; values greater than 100 are cut to
+     * 100.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of processes to return. The service may return
+     * fewer than this value. If unspecified, at most 50 processes are
+     * returned. The maximum value is 100; values greater than 100 are cut to
+     * 100.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of processes to return. The service may return
+     * fewer than this value. If unspecified, at most 50 processes are
+     * returned. The maximum value is 100; values greater than 100 are cut to
+     * 100.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The page token received from a previous `ListProcesses` call. Specify
+     * it to get the next page.
+     * When paginating, all other parameters specified in this call must
+     * match the parameters of the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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 page token received from a previous `ListProcesses` call. Specify
+     * it to get the next page.
+     * When paginating, all other parameters specified in this call must
+     * match the parameters of the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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 page token received from a previous `ListProcesses` call. Specify
+     * it to get the next page.
+     * When paginating, all other parameters specified in this call must
+     * match the parameters of the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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 page token received from a previous `ListProcesses` call. Specify
+     * it to get the next page.
+     * When paginating, all other parameters specified in this call must
+     * match the parameters of the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The page token received from a previous `ListProcesses` call. Specify
+     * it to get the next page.
+     * When paginating, all other parameters specified in this call must
+     * match the parameters of the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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.datacatalog.lineage.v1.ListProcessesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.lineage.v1.ListProcessesRequest) + private static final com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest(); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListProcessesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListProcessesRequest 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.datacatalog.lineage.v1.ListProcessesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ListProcessesRequestOrBuilder.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ListProcessesRequestOrBuilder.java new file mode 100644 index 000000000000..ce277255ea61 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ListProcessesRequestOrBuilder.java @@ -0,0 +1,103 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +public interface ListProcessesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.lineage.v1.ListProcessesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the project and its location that owns this
+   * collection of processes.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The name of the project and its location that owns this
+   * collection of processes.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of processes to return. The service may return
+   * fewer than this value. If unspecified, at most 50 processes are
+   * returned. The maximum value is 100; values greater than 100 are cut to
+   * 100.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The page token received from a previous `ListProcesses` call. Specify
+   * it to get the next page.
+   * When paginating, all other parameters specified in this call must
+   * match the parameters of the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The page token received from a previous `ListProcesses` call. Specify
+   * it to get the next page.
+   * When paginating, all other parameters specified in this call must
+   * match the parameters of the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ListProcessesResponse.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ListProcessesResponse.java new file mode 100644 index 000000000000..697d99c5a6af --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ListProcessesResponse.java @@ -0,0 +1,1121 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +/** + * + * + *
+ * Response message for
+ * [ListProcesses][google.cloud.datacatalog.lineage.v1.ListProcesses].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.ListProcessesResponse} + */ +public final class ListProcessesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.lineage.v1.ListProcessesResponse) + ListProcessesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListProcessesResponse.newBuilder() to construct. + private ListProcessesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListProcessesResponse() { + processes_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListProcessesResponse(); + } + + @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.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ListProcessesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ListProcessesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse.class, + com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse.Builder.class); + } + + public static final int PROCESSES_FIELD_NUMBER = 1; + private java.util.List processes_; + /** + * + * + *
+   * The processes from the specified project and location.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Process processes = 1; + */ + @java.lang.Override + public java.util.List getProcessesList() { + return processes_; + } + /** + * + * + *
+   * The processes from the specified project and location.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Process processes = 1; + */ + @java.lang.Override + public java.util.List + getProcessesOrBuilderList() { + return processes_; + } + /** + * + * + *
+   * The processes from the specified project and location.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Process processes = 1; + */ + @java.lang.Override + public int getProcessesCount() { + return processes_.size(); + } + /** + * + * + *
+   * The processes from the specified project and location.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Process processes = 1; + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.Process getProcesses(int index) { + return processes_.get(index); + } + /** + * + * + *
+   * The processes from the specified project and location.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Process processes = 1; + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.ProcessOrBuilder getProcessesOrBuilder(int index) { + return processes_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * The token to specify as `page_token` in the next call to get the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * 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 token to specify as `page_token` in the next call to get the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * 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 < processes_.size(); i++) { + output.writeMessage(1, processes_.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 < processes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, processes_.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.datacatalog.lineage.v1.ListProcessesResponse)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse other = + (com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse) obj; + + if (!getProcessesList().equals(other.getProcessesList())) 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 (getProcessesCount() > 0) { + hash = (37 * hash) + PROCESSES_FIELD_NUMBER; + hash = (53 * hash) + getProcessesList().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.datacatalog.lineage.v1.ListProcessesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse 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.datacatalog.lineage.v1.ListProcessesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse 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.datacatalog.lineage.v1.ListProcessesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse 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.datacatalog.lineage.v1.ListProcessesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse 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.datacatalog.lineage.v1.ListProcessesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse 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.datacatalog.lineage.v1.ListProcessesResponse 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
+   * [ListProcesses][google.cloud.datacatalog.lineage.v1.ListProcesses].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.ListProcessesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.lineage.v1.ListProcessesResponse) + com.google.cloud.datacatalog.lineage.v1.ListProcessesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ListProcessesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ListProcessesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse.class, + com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (processesBuilder_ == null) { + processes_ = java.util.Collections.emptyList(); + } else { + processes_ = null; + processesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ListProcessesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse + getDefaultInstanceForType() { + return com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse build() { + com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse buildPartial() { + com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse result = + new com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse(this); + int from_bitField0_ = bitField0_; + if (processesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + processes_ = java.util.Collections.unmodifiableList(processes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.processes_ = processes_; + } else { + result.processes_ = processesBuilder_.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.datacatalog.lineage.v1.ListProcessesResponse) { + return mergeFrom((com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse other) { + if (other + == com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse.getDefaultInstance()) + return this; + if (processesBuilder_ == null) { + if (!other.processes_.isEmpty()) { + if (processes_.isEmpty()) { + processes_ = other.processes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureProcessesIsMutable(); + processes_.addAll(other.processes_); + } + onChanged(); + } + } else { + if (!other.processes_.isEmpty()) { + if (processesBuilder_.isEmpty()) { + processesBuilder_.dispose(); + processesBuilder_ = null; + processes_ = other.processes_; + bitField0_ = (bitField0_ & ~0x00000001); + processesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getProcessesFieldBuilder() + : null; + } else { + processesBuilder_.addAllMessages(other.processes_); + } + } + } + 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.datacatalog.lineage.v1.Process m = + input.readMessage( + com.google.cloud.datacatalog.lineage.v1.Process.parser(), + extensionRegistry); + if (processesBuilder_ == null) { + ensureProcessesIsMutable(); + processes_.add(m); + } else { + processesBuilder_.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 processes_ = + java.util.Collections.emptyList(); + + private void ensureProcessesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + processes_ = + new java.util.ArrayList(processes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.Process, + com.google.cloud.datacatalog.lineage.v1.Process.Builder, + com.google.cloud.datacatalog.lineage.v1.ProcessOrBuilder> + processesBuilder_; + + /** + * + * + *
+     * The processes from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Process processes = 1; + */ + public java.util.List getProcessesList() { + if (processesBuilder_ == null) { + return java.util.Collections.unmodifiableList(processes_); + } else { + return processesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The processes from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Process processes = 1; + */ + public int getProcessesCount() { + if (processesBuilder_ == null) { + return processes_.size(); + } else { + return processesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The processes from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Process processes = 1; + */ + public com.google.cloud.datacatalog.lineage.v1.Process getProcesses(int index) { + if (processesBuilder_ == null) { + return processes_.get(index); + } else { + return processesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The processes from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Process processes = 1; + */ + public Builder setProcesses(int index, com.google.cloud.datacatalog.lineage.v1.Process value) { + if (processesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProcessesIsMutable(); + processes_.set(index, value); + onChanged(); + } else { + processesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The processes from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Process processes = 1; + */ + public Builder setProcesses( + int index, com.google.cloud.datacatalog.lineage.v1.Process.Builder builderForValue) { + if (processesBuilder_ == null) { + ensureProcessesIsMutable(); + processes_.set(index, builderForValue.build()); + onChanged(); + } else { + processesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The processes from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Process processes = 1; + */ + public Builder addProcesses(com.google.cloud.datacatalog.lineage.v1.Process value) { + if (processesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProcessesIsMutable(); + processes_.add(value); + onChanged(); + } else { + processesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The processes from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Process processes = 1; + */ + public Builder addProcesses(int index, com.google.cloud.datacatalog.lineage.v1.Process value) { + if (processesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProcessesIsMutable(); + processes_.add(index, value); + onChanged(); + } else { + processesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The processes from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Process processes = 1; + */ + public Builder addProcesses( + com.google.cloud.datacatalog.lineage.v1.Process.Builder builderForValue) { + if (processesBuilder_ == null) { + ensureProcessesIsMutable(); + processes_.add(builderForValue.build()); + onChanged(); + } else { + processesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The processes from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Process processes = 1; + */ + public Builder addProcesses( + int index, com.google.cloud.datacatalog.lineage.v1.Process.Builder builderForValue) { + if (processesBuilder_ == null) { + ensureProcessesIsMutable(); + processes_.add(index, builderForValue.build()); + onChanged(); + } else { + processesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The processes from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Process processes = 1; + */ + public Builder addAllProcesses( + java.lang.Iterable values) { + if (processesBuilder_ == null) { + ensureProcessesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, processes_); + onChanged(); + } else { + processesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The processes from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Process processes = 1; + */ + public Builder clearProcesses() { + if (processesBuilder_ == null) { + processes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + processesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The processes from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Process processes = 1; + */ + public Builder removeProcesses(int index) { + if (processesBuilder_ == null) { + ensureProcessesIsMutable(); + processes_.remove(index); + onChanged(); + } else { + processesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The processes from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Process processes = 1; + */ + public com.google.cloud.datacatalog.lineage.v1.Process.Builder getProcessesBuilder(int index) { + return getProcessesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The processes from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Process processes = 1; + */ + public com.google.cloud.datacatalog.lineage.v1.ProcessOrBuilder getProcessesOrBuilder( + int index) { + if (processesBuilder_ == null) { + return processes_.get(index); + } else { + return processesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The processes from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Process processes = 1; + */ + public java.util.List + getProcessesOrBuilderList() { + if (processesBuilder_ != null) { + return processesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(processes_); + } + } + /** + * + * + *
+     * The processes from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Process processes = 1; + */ + public com.google.cloud.datacatalog.lineage.v1.Process.Builder addProcessesBuilder() { + return getProcessesFieldBuilder() + .addBuilder(com.google.cloud.datacatalog.lineage.v1.Process.getDefaultInstance()); + } + /** + * + * + *
+     * The processes from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Process processes = 1; + */ + public com.google.cloud.datacatalog.lineage.v1.Process.Builder addProcessesBuilder(int index) { + return getProcessesFieldBuilder() + .addBuilder(index, com.google.cloud.datacatalog.lineage.v1.Process.getDefaultInstance()); + } + /** + * + * + *
+     * The processes from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Process processes = 1; + */ + public java.util.List + getProcessesBuilderList() { + return getProcessesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.Process, + com.google.cloud.datacatalog.lineage.v1.Process.Builder, + com.google.cloud.datacatalog.lineage.v1.ProcessOrBuilder> + getProcessesFieldBuilder() { + if (processesBuilder_ == null) { + processesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.Process, + com.google.cloud.datacatalog.lineage.v1.Process.Builder, + com.google.cloud.datacatalog.lineage.v1.ProcessOrBuilder>( + processes_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + processes_ = null; + } + return processesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * The token to specify as `page_token` in the next call to get the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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 token to specify as `page_token` in the next call to get the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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 token to specify as `page_token` in the next call to get the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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 token to specify as `page_token` in the next call to get the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The token to specify as `page_token` in the next call to get the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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.datacatalog.lineage.v1.ListProcessesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.lineage.v1.ListProcessesResponse) + private static final com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse(); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListProcessesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListProcessesResponse 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.datacatalog.lineage.v1.ListProcessesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ListProcessesResponseOrBuilder.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ListProcessesResponseOrBuilder.java new file mode 100644 index 000000000000..75659b94d405 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ListProcessesResponseOrBuilder.java @@ -0,0 +1,104 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +public interface ListProcessesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.lineage.v1.ListProcessesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The processes from the specified project and location.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Process processes = 1; + */ + java.util.List getProcessesList(); + /** + * + * + *
+   * The processes from the specified project and location.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Process processes = 1; + */ + com.google.cloud.datacatalog.lineage.v1.Process getProcesses(int index); + /** + * + * + *
+   * The processes from the specified project and location.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Process processes = 1; + */ + int getProcessesCount(); + /** + * + * + *
+   * The processes from the specified project and location.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Process processes = 1; + */ + java.util.List + getProcessesOrBuilderList(); + /** + * + * + *
+   * The processes from the specified project and location.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Process processes = 1; + */ + com.google.cloud.datacatalog.lineage.v1.ProcessOrBuilder getProcessesOrBuilder(int index); + + /** + * + * + *
+   * The token to specify as `page_token` in the next call to get the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * The token to specify as `page_token` in the next call to get the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ListRunsRequest.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ListRunsRequest.java new file mode 100644 index 000000000000..c0d8ca0a0a1e --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ListRunsRequest.java @@ -0,0 +1,934 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +/** + * + * + *
+ * Request message for
+ * [ListRuns][google.cloud.datacatalog.lineage.v1.ListRuns].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.ListRunsRequest} + */ +public final class ListRunsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.lineage.v1.ListRunsRequest) + ListRunsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListRunsRequest.newBuilder() to construct. + private ListRunsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListRunsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListRunsRequest(); + } + + @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.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ListRunsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ListRunsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.ListRunsRequest.class, + com.google.cloud.datacatalog.lineage.v1.ListRunsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The name of process that owns this collection of runs.
+   * 
+ * + * + * 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 process that owns this collection of runs.
+   * 
+ * + * + * 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 PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The maximum number of runs to return. The service may return
+   * fewer than this value. If unspecified, at most 50 runs are
+   * returned. The maximum value is 100; values greater than 100 are cut to
+   * 100.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The page token received from a previous `ListRuns` call. Specify
+   * it to get the next page.
+   * When paginating, all other parameters specified in this call must
+   * match the parameters of the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @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 page token received from a previous `ListRuns` call. Specify
+   * it to get the next page.
+   * When paginating, all other parameters specified in this call must
+   * match the parameters of the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @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 (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, 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 (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, 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.datacatalog.lineage.v1.ListRunsRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.lineage.v1.ListRunsRequest other = + (com.google.cloud.datacatalog.lineage.v1.ListRunsRequest) obj; + + if (!getParent().equals(other.getParent())) 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) + 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.datacatalog.lineage.v1.ListRunsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListRunsRequest 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.datacatalog.lineage.v1.ListRunsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListRunsRequest 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.datacatalog.lineage.v1.ListRunsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListRunsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListRunsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListRunsRequest 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.datacatalog.lineage.v1.ListRunsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListRunsRequest 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.datacatalog.lineage.v1.ListRunsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListRunsRequest 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.datacatalog.lineage.v1.ListRunsRequest 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
+   * [ListRuns][google.cloud.datacatalog.lineage.v1.ListRuns].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.ListRunsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.lineage.v1.ListRunsRequest) + com.google.cloud.datacatalog.lineage.v1.ListRunsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ListRunsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ListRunsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.ListRunsRequest.class, + com.google.cloud.datacatalog.lineage.v1.ListRunsRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.lineage.v1.ListRunsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ListRunsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.ListRunsRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.lineage.v1.ListRunsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.ListRunsRequest build() { + com.google.cloud.datacatalog.lineage.v1.ListRunsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.ListRunsRequest buildPartial() { + com.google.cloud.datacatalog.lineage.v1.ListRunsRequest result = + new com.google.cloud.datacatalog.lineage.v1.ListRunsRequest(this); + result.parent_ = parent_; + 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.datacatalog.lineage.v1.ListRunsRequest) { + return mergeFrom((com.google.cloud.datacatalog.lineage.v1.ListRunsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.lineage.v1.ListRunsRequest other) { + if (other == com.google.cloud.datacatalog.lineage.v1.ListRunsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + 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 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = 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 java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The name of process that owns this collection of runs.
+     * 
+ * + * + * 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 process that owns this collection of runs.
+     * 
+ * + * + * 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 process that owns this collection of runs.
+     * 
+ * + * + * 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 process that owns this collection of runs.
+     * 
+ * + * + * 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 process that owns this collection of runs.
+     * 
+ * + * + * 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 int pageSize_; + /** + * + * + *
+     * The maximum number of runs to return. The service may return
+     * fewer than this value. If unspecified, at most 50 runs are
+     * returned. The maximum value is 100; values greater than 100 are cut to
+     * 100.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of runs to return. The service may return
+     * fewer than this value. If unspecified, at most 50 runs are
+     * returned. The maximum value is 100; values greater than 100 are cut to
+     * 100.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of runs to return. The service may return
+     * fewer than this value. If unspecified, at most 50 runs are
+     * returned. The maximum value is 100; values greater than 100 are cut to
+     * 100.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The page token received from a previous `ListRuns` call. Specify
+     * it to get the next page.
+     * When paginating, all other parameters specified in this call must
+     * match the parameters of the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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 page token received from a previous `ListRuns` call. Specify
+     * it to get the next page.
+     * When paginating, all other parameters specified in this call must
+     * match the parameters of the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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 page token received from a previous `ListRuns` call. Specify
+     * it to get the next page.
+     * When paginating, all other parameters specified in this call must
+     * match the parameters of the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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 page token received from a previous `ListRuns` call. Specify
+     * it to get the next page.
+     * When paginating, all other parameters specified in this call must
+     * match the parameters of the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The page token received from a previous `ListRuns` call. Specify
+     * it to get the next page.
+     * When paginating, all other parameters specified in this call must
+     * match the parameters of the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @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.datacatalog.lineage.v1.ListRunsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.lineage.v1.ListRunsRequest) + private static final com.google.cloud.datacatalog.lineage.v1.ListRunsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.lineage.v1.ListRunsRequest(); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListRunsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRunsRequest 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.datacatalog.lineage.v1.ListRunsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ListRunsRequestOrBuilder.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ListRunsRequestOrBuilder.java new file mode 100644 index 000000000000..b0b15d775a3d --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ListRunsRequestOrBuilder.java @@ -0,0 +1,101 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +public interface ListRunsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.lineage.v1.ListRunsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of process that owns this collection of runs.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The name of process that owns this collection of runs.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of runs to return. The service may return
+   * fewer than this value. If unspecified, at most 50 runs are
+   * returned. The maximum value is 100; values greater than 100 are cut to
+   * 100.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The page token received from a previous `ListRuns` call. Specify
+   * it to get the next page.
+   * When paginating, all other parameters specified in this call must
+   * match the parameters of the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The page token received from a previous `ListRuns` call. Specify
+   * it to get the next page.
+   * When paginating, all other parameters specified in this call must
+   * match the parameters of the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ListRunsResponse.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ListRunsResponse.java new file mode 100644 index 000000000000..34bc469fec6e --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ListRunsResponse.java @@ -0,0 +1,1114 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +/** + * + * + *
+ * Response message for
+ * [ListRuns][google.cloud.datacatalog.lineage.v1.ListRuns].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.ListRunsResponse} + */ +public final class ListRunsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.lineage.v1.ListRunsResponse) + ListRunsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListRunsResponse.newBuilder() to construct. + private ListRunsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListRunsResponse() { + runs_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListRunsResponse(); + } + + @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.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ListRunsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ListRunsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.ListRunsResponse.class, + com.google.cloud.datacatalog.lineage.v1.ListRunsResponse.Builder.class); + } + + public static final int RUNS_FIELD_NUMBER = 1; + private java.util.List runs_; + /** + * + * + *
+   * The runs from the specified project and location.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Run runs = 1; + */ + @java.lang.Override + public java.util.List getRunsList() { + return runs_; + } + /** + * + * + *
+   * The runs from the specified project and location.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Run runs = 1; + */ + @java.lang.Override + public java.util.List + getRunsOrBuilderList() { + return runs_; + } + /** + * + * + *
+   * The runs from the specified project and location.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Run runs = 1; + */ + @java.lang.Override + public int getRunsCount() { + return runs_.size(); + } + /** + * + * + *
+   * The runs from the specified project and location.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Run runs = 1; + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.Run getRuns(int index) { + return runs_.get(index); + } + /** + * + * + *
+   * The runs from the specified project and location.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Run runs = 1; + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.RunOrBuilder getRunsOrBuilder(int index) { + return runs_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * The token to specify as `page_token` in the next call to get the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * 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 token to specify as `page_token` in the next call to get the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * 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 < runs_.size(); i++) { + output.writeMessage(1, runs_.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 < runs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, runs_.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.datacatalog.lineage.v1.ListRunsResponse)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.lineage.v1.ListRunsResponse other = + (com.google.cloud.datacatalog.lineage.v1.ListRunsResponse) obj; + + if (!getRunsList().equals(other.getRunsList())) 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 (getRunsCount() > 0) { + hash = (37 * hash) + RUNS_FIELD_NUMBER; + hash = (53 * hash) + getRunsList().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.datacatalog.lineage.v1.ListRunsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListRunsResponse 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.datacatalog.lineage.v1.ListRunsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListRunsResponse 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.datacatalog.lineage.v1.ListRunsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListRunsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListRunsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListRunsResponse 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.datacatalog.lineage.v1.ListRunsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListRunsResponse 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.datacatalog.lineage.v1.ListRunsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListRunsResponse 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.datacatalog.lineage.v1.ListRunsResponse 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
+   * [ListRuns][google.cloud.datacatalog.lineage.v1.ListRuns].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.ListRunsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.lineage.v1.ListRunsResponse) + com.google.cloud.datacatalog.lineage.v1.ListRunsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ListRunsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ListRunsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.ListRunsResponse.class, + com.google.cloud.datacatalog.lineage.v1.ListRunsResponse.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.lineage.v1.ListRunsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (runsBuilder_ == null) { + runs_ = java.util.Collections.emptyList(); + } else { + runs_ = null; + runsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ListRunsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.ListRunsResponse getDefaultInstanceForType() { + return com.google.cloud.datacatalog.lineage.v1.ListRunsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.ListRunsResponse build() { + com.google.cloud.datacatalog.lineage.v1.ListRunsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.ListRunsResponse buildPartial() { + com.google.cloud.datacatalog.lineage.v1.ListRunsResponse result = + new com.google.cloud.datacatalog.lineage.v1.ListRunsResponse(this); + int from_bitField0_ = bitField0_; + if (runsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + runs_ = java.util.Collections.unmodifiableList(runs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.runs_ = runs_; + } else { + result.runs_ = runsBuilder_.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.datacatalog.lineage.v1.ListRunsResponse) { + return mergeFrom((com.google.cloud.datacatalog.lineage.v1.ListRunsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.lineage.v1.ListRunsResponse other) { + if (other == com.google.cloud.datacatalog.lineage.v1.ListRunsResponse.getDefaultInstance()) + return this; + if (runsBuilder_ == null) { + if (!other.runs_.isEmpty()) { + if (runs_.isEmpty()) { + runs_ = other.runs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRunsIsMutable(); + runs_.addAll(other.runs_); + } + onChanged(); + } + } else { + if (!other.runs_.isEmpty()) { + if (runsBuilder_.isEmpty()) { + runsBuilder_.dispose(); + runsBuilder_ = null; + runs_ = other.runs_; + bitField0_ = (bitField0_ & ~0x00000001); + runsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRunsFieldBuilder() + : null; + } else { + runsBuilder_.addAllMessages(other.runs_); + } + } + } + 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.datacatalog.lineage.v1.Run m = + input.readMessage( + com.google.cloud.datacatalog.lineage.v1.Run.parser(), extensionRegistry); + if (runsBuilder_ == null) { + ensureRunsIsMutable(); + runs_.add(m); + } else { + runsBuilder_.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 runs_ = + java.util.Collections.emptyList(); + + private void ensureRunsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + runs_ = new java.util.ArrayList(runs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.Run, + com.google.cloud.datacatalog.lineage.v1.Run.Builder, + com.google.cloud.datacatalog.lineage.v1.RunOrBuilder> + runsBuilder_; + + /** + * + * + *
+     * The runs from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Run runs = 1; + */ + public java.util.List getRunsList() { + if (runsBuilder_ == null) { + return java.util.Collections.unmodifiableList(runs_); + } else { + return runsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The runs from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Run runs = 1; + */ + public int getRunsCount() { + if (runsBuilder_ == null) { + return runs_.size(); + } else { + return runsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The runs from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Run runs = 1; + */ + public com.google.cloud.datacatalog.lineage.v1.Run getRuns(int index) { + if (runsBuilder_ == null) { + return runs_.get(index); + } else { + return runsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The runs from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Run runs = 1; + */ + public Builder setRuns(int index, com.google.cloud.datacatalog.lineage.v1.Run value) { + if (runsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRunsIsMutable(); + runs_.set(index, value); + onChanged(); + } else { + runsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The runs from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Run runs = 1; + */ + public Builder setRuns( + int index, com.google.cloud.datacatalog.lineage.v1.Run.Builder builderForValue) { + if (runsBuilder_ == null) { + ensureRunsIsMutable(); + runs_.set(index, builderForValue.build()); + onChanged(); + } else { + runsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The runs from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Run runs = 1; + */ + public Builder addRuns(com.google.cloud.datacatalog.lineage.v1.Run value) { + if (runsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRunsIsMutable(); + runs_.add(value); + onChanged(); + } else { + runsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The runs from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Run runs = 1; + */ + public Builder addRuns(int index, com.google.cloud.datacatalog.lineage.v1.Run value) { + if (runsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRunsIsMutable(); + runs_.add(index, value); + onChanged(); + } else { + runsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The runs from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Run runs = 1; + */ + public Builder addRuns(com.google.cloud.datacatalog.lineage.v1.Run.Builder builderForValue) { + if (runsBuilder_ == null) { + ensureRunsIsMutable(); + runs_.add(builderForValue.build()); + onChanged(); + } else { + runsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The runs from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Run runs = 1; + */ + public Builder addRuns( + int index, com.google.cloud.datacatalog.lineage.v1.Run.Builder builderForValue) { + if (runsBuilder_ == null) { + ensureRunsIsMutable(); + runs_.add(index, builderForValue.build()); + onChanged(); + } else { + runsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The runs from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Run runs = 1; + */ + public Builder addAllRuns( + java.lang.Iterable values) { + if (runsBuilder_ == null) { + ensureRunsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, runs_); + onChanged(); + } else { + runsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The runs from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Run runs = 1; + */ + public Builder clearRuns() { + if (runsBuilder_ == null) { + runs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + runsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The runs from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Run runs = 1; + */ + public Builder removeRuns(int index) { + if (runsBuilder_ == null) { + ensureRunsIsMutable(); + runs_.remove(index); + onChanged(); + } else { + runsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The runs from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Run runs = 1; + */ + public com.google.cloud.datacatalog.lineage.v1.Run.Builder getRunsBuilder(int index) { + return getRunsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The runs from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Run runs = 1; + */ + public com.google.cloud.datacatalog.lineage.v1.RunOrBuilder getRunsOrBuilder(int index) { + if (runsBuilder_ == null) { + return runs_.get(index); + } else { + return runsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The runs from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Run runs = 1; + */ + public java.util.List + getRunsOrBuilderList() { + if (runsBuilder_ != null) { + return runsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(runs_); + } + } + /** + * + * + *
+     * The runs from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Run runs = 1; + */ + public com.google.cloud.datacatalog.lineage.v1.Run.Builder addRunsBuilder() { + return getRunsFieldBuilder() + .addBuilder(com.google.cloud.datacatalog.lineage.v1.Run.getDefaultInstance()); + } + /** + * + * + *
+     * The runs from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Run runs = 1; + */ + public com.google.cloud.datacatalog.lineage.v1.Run.Builder addRunsBuilder(int index) { + return getRunsFieldBuilder() + .addBuilder(index, com.google.cloud.datacatalog.lineage.v1.Run.getDefaultInstance()); + } + /** + * + * + *
+     * The runs from the specified project and location.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Run runs = 1; + */ + public java.util.List + getRunsBuilderList() { + return getRunsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.Run, + com.google.cloud.datacatalog.lineage.v1.Run.Builder, + com.google.cloud.datacatalog.lineage.v1.RunOrBuilder> + getRunsFieldBuilder() { + if (runsBuilder_ == null) { + runsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.Run, + com.google.cloud.datacatalog.lineage.v1.Run.Builder, + com.google.cloud.datacatalog.lineage.v1.RunOrBuilder>( + runs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + runs_ = null; + } + return runsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * The token to specify as `page_token` in the next call to get the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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 token to specify as `page_token` in the next call to get the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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 token to specify as `page_token` in the next call to get the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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 token to specify as `page_token` in the next call to get the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The token to specify as `page_token` in the next call to get the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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.datacatalog.lineage.v1.ListRunsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.lineage.v1.ListRunsResponse) + private static final com.google.cloud.datacatalog.lineage.v1.ListRunsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.lineage.v1.ListRunsResponse(); + } + + public static com.google.cloud.datacatalog.lineage.v1.ListRunsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRunsResponse 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.datacatalog.lineage.v1.ListRunsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ListRunsResponseOrBuilder.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ListRunsResponseOrBuilder.java new file mode 100644 index 000000000000..e127b92b4b27 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ListRunsResponseOrBuilder.java @@ -0,0 +1,104 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +public interface ListRunsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.lineage.v1.ListRunsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The runs from the specified project and location.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Run runs = 1; + */ + java.util.List getRunsList(); + /** + * + * + *
+   * The runs from the specified project and location.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Run runs = 1; + */ + com.google.cloud.datacatalog.lineage.v1.Run getRuns(int index); + /** + * + * + *
+   * The runs from the specified project and location.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Run runs = 1; + */ + int getRunsCount(); + /** + * + * + *
+   * The runs from the specified project and location.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Run runs = 1; + */ + java.util.List + getRunsOrBuilderList(); + /** + * + * + *
+   * The runs from the specified project and location.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Run runs = 1; + */ + com.google.cloud.datacatalog.lineage.v1.RunOrBuilder getRunsOrBuilder(int index); + + /** + * + * + *
+   * The token to specify as `page_token` in the next call to get the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * The token to specify as `page_token` in the next call to get the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/LocationName.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/LocationName.java new file mode 100644 index 000000000000..eae6649c5450 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/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.datacatalog.lineage.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-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/OperationMetadata.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/OperationMetadata.java new file mode 100644 index 000000000000..7f7be8173ef3 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/OperationMetadata.java @@ -0,0 +1,2058 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +/** + * + * + *
+ * Metadata describing the operation.
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.OperationMetadata} + */ +public final class OperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.lineage.v1.OperationMetadata) + OperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use OperationMetadata.newBuilder() to construct. + private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OperationMetadata() { + state_ = 0; + operationType_ = 0; + resource_ = ""; + resourceUuid_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OperationMetadata(); + } + + @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.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.OperationMetadata.class, + com.google.cloud.datacatalog.lineage.v1.OperationMetadata.Builder.class); + } + + /** + * + * + *
+   * An enum with the state of the operation.
+   * 
+ * + * Protobuf enum {@code google.cloud.datacatalog.lineage.v1.OperationMetadata.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unused.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The operation has been created but is not yet started.
+     * 
+ * + * PENDING = 1; + */ + PENDING(1), + /** + * + * + *
+     * The operation is underway.
+     * 
+ * + * RUNNING = 2; + */ + RUNNING(2), + /** + * + * + *
+     * The operation completed successfully.
+     * 
+ * + * SUCCEEDED = 3; + */ + SUCCEEDED(3), + /** + * + * + *
+     * The operation is no longer running and did not succeed.
+     * 
+ * + * FAILED = 4; + */ + FAILED(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unused.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The operation has been created but is not yet started.
+     * 
+ * + * PENDING = 1; + */ + public static final int PENDING_VALUE = 1; + /** + * + * + *
+     * The operation is underway.
+     * 
+ * + * RUNNING = 2; + */ + public static final int RUNNING_VALUE = 2; + /** + * + * + *
+     * The operation completed successfully.
+     * 
+ * + * SUCCEEDED = 3; + */ + public static final int SUCCEEDED_VALUE = 3; + /** + * + * + *
+     * The operation is no longer running and did not succeed.
+     * 
+ * + * FAILED = 4; + */ + public static final int FAILED_VALUE = 4; + + 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 PENDING; + case 2: + return RUNNING; + case 3: + return SUCCEEDED; + case 4: + return FAILED; + 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.datacatalog.lineage.v1.OperationMetadata.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.datacatalog.lineage.v1.OperationMetadata.State) + } + + /** + * + * + *
+   * Type of the long running operation.
+   * 
+ * + * Protobuf enum {@code google.cloud.datacatalog.lineage.v1.OperationMetadata.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unused.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * The resource deletion operation.
+     * 
+ * + * DELETE = 1; + */ + DELETE(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unused.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The resource deletion operation.
+     * 
+ * + * DELETE = 1; + */ + public static final int DELETE_VALUE = 1; + + 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 Type 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 Type forNumber(int value) { + switch (value) { + case 0: + return TYPE_UNSPECIFIED; + case 1: + return DELETE; + 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 Type findValueByNumber(int number) { + return Type.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.datacatalog.lineage.v1.OperationMetadata.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final Type[] VALUES = values(); + + public static Type 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 Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.datacatalog.lineage.v1.OperationMetadata.Type) + } + + public static final int STATE_FIELD_NUMBER = 1; + private int state_; + /** + * + * + *
+   * Output only. The current operation state.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.OperationMetadata.State state = 1 [(.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 current operation state.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.OperationMetadata.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.OperationMetadata.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.datacatalog.lineage.v1.OperationMetadata.State result = + com.google.cloud.datacatalog.lineage.v1.OperationMetadata.State.valueOf(state_); + return result == null + ? com.google.cloud.datacatalog.lineage.v1.OperationMetadata.State.UNRECOGNIZED + : result; + } + + public static final int OPERATION_TYPE_FIELD_NUMBER = 2; + private int operationType_; + /** + * + * + *
+   * Output only. The type of the operation being performed.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.OperationMetadata.Type operation_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for operationType. + */ + @java.lang.Override + public int getOperationTypeValue() { + return operationType_; + } + /** + * + * + *
+   * Output only. The type of the operation being performed.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.OperationMetadata.Type operation_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The operationType. + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.OperationMetadata.Type getOperationType() { + @SuppressWarnings("deprecation") + com.google.cloud.datacatalog.lineage.v1.OperationMetadata.Type result = + com.google.cloud.datacatalog.lineage.v1.OperationMetadata.Type.valueOf(operationType_); + return result == null + ? com.google.cloud.datacatalog.lineage.v1.OperationMetadata.Type.UNRECOGNIZED + : result; + } + + public static final int RESOURCE_FIELD_NUMBER = 3; + private volatile java.lang.Object resource_; + /** + * + * + *
+   * Output only. The [relative name]
+   * (https://cloud.google.com//apis/design/resource_names#relative_resource_name)
+   * of the resource being operated on.
+   * 
+ * + * string resource = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The resource. + */ + @java.lang.Override + public java.lang.String getResource() { + java.lang.Object ref = resource_; + 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(); + resource_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The [relative name]
+   * (https://cloud.google.com//apis/design/resource_names#relative_resource_name)
+   * of the resource being operated on.
+   * 
+ * + * string resource = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for resource. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_UUID_FIELD_NUMBER = 4; + private volatile java.lang.Object resourceUuid_; + /** + * + * + *
+   * Output only. The UUID of the resource being operated on.
+   * 
+ * + * string resource_uuid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The resourceUuid. + */ + @java.lang.Override + public java.lang.String getResourceUuid() { + java.lang.Object ref = resourceUuid_; + 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(); + resourceUuid_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The UUID of the resource being operated on.
+   * 
+ * + * string resource_uuid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for resourceUuid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceUuidBytes() { + java.lang.Object ref = resourceUuid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceUuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The timestamp of the operation submission to the server.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The timestamp of the operation submission to the server.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.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. The timestamp of the operation submission to the server.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.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 = 6; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * Output only. The timestamp of the operation termination, regardless of its
+   * success. This field is unset if the operation is still ongoing.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * Output only. The timestamp of the operation termination, regardless of its
+   * success. This field is unset if the operation is still ongoing.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 6 [(.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. The timestamp of the operation termination, regardless of its
+   * success. This field is unset if the operation is still ongoing.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + 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.datacatalog.lineage.v1.OperationMetadata.State.STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, state_); + } + if (operationType_ + != com.google.cloud.datacatalog.lineage.v1.OperationMetadata.Type.TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, operationType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, resource_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUuid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, resourceUuid_); + } + if (createTime_ != null) { + output.writeMessage(5, getCreateTime()); + } + if (endTime_ != null) { + output.writeMessage(6, getEndTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (state_ + != com.google.cloud.datacatalog.lineage.v1.OperationMetadata.State.STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_); + } + if (operationType_ + != com.google.cloud.datacatalog.lineage.v1.OperationMetadata.Type.TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, operationType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, resource_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUuid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, resourceUuid_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getEndTime()); + } + 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.datacatalog.lineage.v1.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.lineage.v1.OperationMetadata other = + (com.google.cloud.datacatalog.lineage.v1.OperationMetadata) obj; + + if (state_ != other.state_) return false; + if (operationType_ != other.operationType_) return false; + if (!getResource().equals(other.getResource())) return false; + if (!getResourceUuid().equals(other.getResourceUuid())) 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 (!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_; + hash = (37 * hash) + OPERATION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + operationType_; + hash = (37 * hash) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + hash = (37 * hash) + RESOURCE_UUID_FIELD_NUMBER; + hash = (53 * hash) + getResourceUuid().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(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.lineage.v1.OperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.OperationMetadata 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.datacatalog.lineage.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.OperationMetadata 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.datacatalog.lineage.v1.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.OperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.lineage.v1.OperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.OperationMetadata 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.datacatalog.lineage.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.OperationMetadata 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.datacatalog.lineage.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.OperationMetadata 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.datacatalog.lineage.v1.OperationMetadata 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; + } + /** + * + * + *
+   * Metadata describing the operation.
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.OperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.lineage.v1.OperationMetadata) + com.google.cloud.datacatalog.lineage.v1.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.OperationMetadata.class, + com.google.cloud.datacatalog.lineage.v1.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.lineage.v1.OperationMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + state_ = 0; + + operationType_ = 0; + + resource_ = ""; + + resourceUuid_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.OperationMetadata getDefaultInstanceForType() { + return com.google.cloud.datacatalog.lineage.v1.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.OperationMetadata build() { + com.google.cloud.datacatalog.lineage.v1.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.OperationMetadata buildPartial() { + com.google.cloud.datacatalog.lineage.v1.OperationMetadata result = + new com.google.cloud.datacatalog.lineage.v1.OperationMetadata(this); + result.state_ = state_; + result.operationType_ = operationType_; + result.resource_ = resource_; + result.resourceUuid_ = resourceUuid_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.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.datacatalog.lineage.v1.OperationMetadata) { + return mergeFrom((com.google.cloud.datacatalog.lineage.v1.OperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.lineage.v1.OperationMetadata other) { + if (other == com.google.cloud.datacatalog.lineage.v1.OperationMetadata.getDefaultInstance()) + return this; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.operationType_ != 0) { + setOperationTypeValue(other.getOperationTypeValue()); + } + if (!other.getResource().isEmpty()) { + resource_ = other.resource_; + onChanged(); + } + if (!other.getResourceUuid().isEmpty()) { + resourceUuid_ = other.resourceUuid_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + 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 16: + { + operationType_ = input.readEnum(); + + break; + } // case 16 + case 26: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + resourceUuid_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 50: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 50 + 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; + /** + * + * + *
+     * Output only. The current operation state.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.OperationMetadata.State state = 1 [(.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 current operation state.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.OperationMetadata.State state = 1 [(.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 current operation state.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.OperationMetadata.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.OperationMetadata.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.datacatalog.lineage.v1.OperationMetadata.State result = + com.google.cloud.datacatalog.lineage.v1.OperationMetadata.State.valueOf(state_); + return result == null + ? com.google.cloud.datacatalog.lineage.v1.OperationMetadata.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The current operation state.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.OperationMetadata.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.datacatalog.lineage.v1.OperationMetadata.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current operation state.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.OperationMetadata.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private int operationType_ = 0; + /** + * + * + *
+     * Output only. The type of the operation being performed.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.OperationMetadata.Type operation_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for operationType. + */ + @java.lang.Override + public int getOperationTypeValue() { + return operationType_; + } + /** + * + * + *
+     * Output only. The type of the operation being performed.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.OperationMetadata.Type operation_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for operationType to set. + * @return This builder for chaining. + */ + public Builder setOperationTypeValue(int value) { + + operationType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The type of the operation being performed.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.OperationMetadata.Type operation_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The operationType. + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.OperationMetadata.Type getOperationType() { + @SuppressWarnings("deprecation") + com.google.cloud.datacatalog.lineage.v1.OperationMetadata.Type result = + com.google.cloud.datacatalog.lineage.v1.OperationMetadata.Type.valueOf(operationType_); + return result == null + ? com.google.cloud.datacatalog.lineage.v1.OperationMetadata.Type.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The type of the operation being performed.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.OperationMetadata.Type operation_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The operationType to set. + * @return This builder for chaining. + */ + public Builder setOperationType( + com.google.cloud.datacatalog.lineage.v1.OperationMetadata.Type value) { + if (value == null) { + throw new NullPointerException(); + } + + operationType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The type of the operation being performed.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.OperationMetadata.Type operation_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearOperationType() { + + operationType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object resource_ = ""; + /** + * + * + *
+     * Output only. The [relative name]
+     * (https://cloud.google.com//apis/design/resource_names#relative_resource_name)
+     * of the resource being operated on.
+     * 
+ * + * string resource = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The resource. + */ + public java.lang.String getResource() { + java.lang.Object ref = resource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The [relative name]
+     * (https://cloud.google.com//apis/design/resource_names#relative_resource_name)
+     * of the resource being operated on.
+     * 
+ * + * string resource = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for resource. + */ + public com.google.protobuf.ByteString getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The [relative name]
+     * (https://cloud.google.com//apis/design/resource_names#relative_resource_name)
+     * of the resource being operated on.
+     * 
+ * + * string resource = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The resource to set. + * @return This builder for chaining. + */ + public Builder setResource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + resource_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The [relative name]
+     * (https://cloud.google.com//apis/design/resource_names#relative_resource_name)
+     * of the resource being operated on.
+     * 
+ * + * string resource = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearResource() { + + resource_ = getDefaultInstance().getResource(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The [relative name]
+     * (https://cloud.google.com//apis/design/resource_names#relative_resource_name)
+     * of the resource being operated on.
+     * 
+ * + * string resource = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for resource to set. + * @return This builder for chaining. + */ + public Builder setResourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resource_ = value; + onChanged(); + return this; + } + + private java.lang.Object resourceUuid_ = ""; + /** + * + * + *
+     * Output only. The UUID of the resource being operated on.
+     * 
+ * + * string resource_uuid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The resourceUuid. + */ + public java.lang.String getResourceUuid() { + java.lang.Object ref = resourceUuid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUuid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The UUID of the resource being operated on.
+     * 
+ * + * string resource_uuid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for resourceUuid. + */ + public com.google.protobuf.ByteString getResourceUuidBytes() { + java.lang.Object ref = resourceUuid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceUuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The UUID of the resource being operated on.
+     * 
+ * + * string resource_uuid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The resourceUuid to set. + * @return This builder for chaining. + */ + public Builder setResourceUuid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + resourceUuid_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The UUID of the resource being operated on.
+     * 
+ * + * string resource_uuid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearResourceUuid() { + + resourceUuid_ = getDefaultInstance().getResourceUuid(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The UUID of the resource being operated on.
+     * 
+ * + * string resource_uuid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for resourceUuid to set. + * @return This builder for chaining. + */ + public Builder setResourceUuidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resourceUuid_ = value; + 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_; + /** + * + * + *
+     * Output only. The timestamp of the operation submission to the server.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. The timestamp of the operation submission to the server.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.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. The timestamp of the operation submission to the server.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.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. The timestamp of the operation submission to the server.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.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. The timestamp of the operation submission to the server.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.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. The timestamp of the operation submission to the server.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The timestamp of the operation submission to the server.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The timestamp of the operation submission to the server.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.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. The timestamp of the operation submission to the server.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.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. The timestamp of the operation termination, regardless of its
+     * success. This field is unset if the operation is still ongoing.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * Output only. The timestamp of the operation termination, regardless of its
+     * success. This field is unset if the operation is still ongoing.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6 [(.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. The timestamp of the operation termination, regardless of its
+     * success. This field is unset if the operation is still ongoing.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6 [(.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. The timestamp of the operation termination, regardless of its
+     * success. This field is unset if the operation is still ongoing.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6 [(.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. The timestamp of the operation termination, regardless of its
+     * success. This field is unset if the operation is still ongoing.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6 [(.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. The timestamp of the operation termination, regardless of its
+     * success. This field is unset if the operation is still ongoing.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The timestamp of the operation termination, regardless of its
+     * success. This field is unset if the operation is still ongoing.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The timestamp of the operation termination, regardless of its
+     * success. This field is unset if the operation is still ongoing.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6 [(.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. The timestamp of the operation termination, regardless of its
+     * success. This field is unset if the operation is still ongoing.
+     * 
+ * + * .google.protobuf.Timestamp end_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> + 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_; + } + + @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.datacatalog.lineage.v1.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.lineage.v1.OperationMetadata) + private static final com.google.cloud.datacatalog.lineage.v1.OperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.lineage.v1.OperationMetadata(); + } + + public static com.google.cloud.datacatalog.lineage.v1.OperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata 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.datacatalog.lineage.v1.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/OperationMetadataOrBuilder.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/OperationMetadataOrBuilder.java new file mode 100644 index 000000000000..1d3cf8e15f65 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/OperationMetadataOrBuilder.java @@ -0,0 +1,216 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +public interface OperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.lineage.v1.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The current operation state.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.OperationMetadata.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The current operation state.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.OperationMetadata.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.datacatalog.lineage.v1.OperationMetadata.State getState(); + + /** + * + * + *
+   * Output only. The type of the operation being performed.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.OperationMetadata.Type operation_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for operationType. + */ + int getOperationTypeValue(); + /** + * + * + *
+   * Output only. The type of the operation being performed.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.OperationMetadata.Type operation_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The operationType. + */ + com.google.cloud.datacatalog.lineage.v1.OperationMetadata.Type getOperationType(); + + /** + * + * + *
+   * Output only. The [relative name]
+   * (https://cloud.google.com//apis/design/resource_names#relative_resource_name)
+   * of the resource being operated on.
+   * 
+ * + * string resource = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The resource. + */ + java.lang.String getResource(); + /** + * + * + *
+   * Output only. The [relative name]
+   * (https://cloud.google.com//apis/design/resource_names#relative_resource_name)
+   * of the resource being operated on.
+   * 
+ * + * string resource = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for resource. + */ + com.google.protobuf.ByteString getResourceBytes(); + + /** + * + * + *
+   * Output only. The UUID of the resource being operated on.
+   * 
+ * + * string resource_uuid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The resourceUuid. + */ + java.lang.String getResourceUuid(); + /** + * + * + *
+   * Output only. The UUID of the resource being operated on.
+   * 
+ * + * string resource_uuid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for resourceUuid. + */ + com.google.protobuf.ByteString getResourceUuidBytes(); + + /** + * + * + *
+   * Output only. The timestamp of the operation submission to the server.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The timestamp of the operation submission to the server.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The timestamp of the operation submission to the server.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The timestamp of the operation termination, regardless of its
+   * success. This field is unset if the operation is still ongoing.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Output only. The timestamp of the operation termination, regardless of its
+   * success. This field is unset if the operation is still ongoing.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Output only. The timestamp of the operation termination, regardless of its
+   * success. This field is unset if the operation is still ongoing.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/Origin.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/Origin.java new file mode 100644 index 000000000000..77b9e4465838 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/Origin.java @@ -0,0 +1,1043 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +/** + * + * + *
+ * Origin of a process.
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.Origin} + */ +public final class Origin extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.lineage.v1.Origin) + OriginOrBuilder { + private static final long serialVersionUID = 0L; + // Use Origin.newBuilder() to construct. + private Origin(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Origin() { + sourceType_ = 0; + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Origin(); + } + + @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.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_Origin_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_Origin_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.Origin.class, + com.google.cloud.datacatalog.lineage.v1.Origin.Builder.class); + } + + /** + * + * + *
+   * Type of the source of a process.
+   * 
+ * + * Protobuf enum {@code google.cloud.datacatalog.lineage.v1.Origin.SourceType} + */ + public enum SourceType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Source is Unspecified
+     * 
+ * + * SOURCE_TYPE_UNSPECIFIED = 0; + */ + SOURCE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * A custom source
+     * 
+ * + * CUSTOM = 1; + */ + CUSTOM(1), + /** + * + * + *
+     * BigQuery
+     * 
+ * + * BIGQUERY = 2; + */ + BIGQUERY(2), + /** + * + * + *
+     * Data Fusion
+     * 
+ * + * DATA_FUSION = 3; + */ + DATA_FUSION(3), + /** + * + * + *
+     * Composer
+     * 
+ * + * COMPOSER = 4; + */ + COMPOSER(4), + /** + * + * + *
+     * Looker Studio
+     * 
+ * + * LOOKER_STUDIO = 5; + */ + LOOKER_STUDIO(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Source is Unspecified
+     * 
+ * + * SOURCE_TYPE_UNSPECIFIED = 0; + */ + public static final int SOURCE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * A custom source
+     * 
+ * + * CUSTOM = 1; + */ + public static final int CUSTOM_VALUE = 1; + /** + * + * + *
+     * BigQuery
+     * 
+ * + * BIGQUERY = 2; + */ + public static final int BIGQUERY_VALUE = 2; + /** + * + * + *
+     * Data Fusion
+     * 
+ * + * DATA_FUSION = 3; + */ + public static final int DATA_FUSION_VALUE = 3; + /** + * + * + *
+     * Composer
+     * 
+ * + * COMPOSER = 4; + */ + public static final int COMPOSER_VALUE = 4; + /** + * + * + *
+     * Looker Studio
+     * 
+ * + * LOOKER_STUDIO = 5; + */ + public static final int LOOKER_STUDIO_VALUE = 5; + + 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 SourceType 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 SourceType forNumber(int value) { + switch (value) { + case 0: + return SOURCE_TYPE_UNSPECIFIED; + case 1: + return CUSTOM; + case 2: + return BIGQUERY; + case 3: + return DATA_FUSION; + case 4: + return COMPOSER; + case 5: + return LOOKER_STUDIO; + 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 SourceType findValueByNumber(int number) { + return SourceType.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.datacatalog.lineage.v1.Origin.getDescriptor().getEnumTypes().get(0); + } + + private static final SourceType[] VALUES = values(); + + public static SourceType 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 SourceType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.datacatalog.lineage.v1.Origin.SourceType) + } + + public static final int SOURCE_TYPE_FIELD_NUMBER = 1; + private int sourceType_; + /** + * + * + *
+   * Type of the source.
+   * 
+ * + * .google.cloud.datacatalog.lineage.v1.Origin.SourceType source_type = 1; + * + * @return The enum numeric value on the wire for sourceType. + */ + @java.lang.Override + public int getSourceTypeValue() { + return sourceType_; + } + /** + * + * + *
+   * Type of the source.
+   * 
+ * + * .google.cloud.datacatalog.lineage.v1.Origin.SourceType source_type = 1; + * + * @return The sourceType. + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.Origin.SourceType getSourceType() { + @SuppressWarnings("deprecation") + com.google.cloud.datacatalog.lineage.v1.Origin.SourceType result = + com.google.cloud.datacatalog.lineage.v1.Origin.SourceType.valueOf(sourceType_); + return result == null + ? com.google.cloud.datacatalog.lineage.v1.Origin.SourceType.UNRECOGNIZED + : result; + } + + public static final int NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object name_; + /** + * + * + *
+   * If the source_type isn't CUSTOM, the value of this field should be a GCP
+   * resource name of the system, which reports lineage. The project and
+   * location parts of the resource name must match the project and location of
+   * the lineage resource being created. Examples:
+   * - {source_type: COMPOSER, name:
+   * "projects/foo/locations/us/environments/bar"}
+   * - {source_type: BIGQUERY, name: "projects/foo/locations/eu"}
+   * - {source_type: CUSTOM,   name: "myCustomIntegration"}
+   * 
+ * + * string name = 2; + * + * @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; + } + } + /** + * + * + *
+   * If the source_type isn't CUSTOM, the value of this field should be a GCP
+   * resource name of the system, which reports lineage. The project and
+   * location parts of the resource name must match the project and location of
+   * the lineage resource being created. Examples:
+   * - {source_type: COMPOSER, name:
+   * "projects/foo/locations/us/environments/bar"}
+   * - {source_type: BIGQUERY, name: "projects/foo/locations/eu"}
+   * - {source_type: CUSTOM,   name: "myCustomIntegration"}
+   * 
+ * + * string name = 2; + * + * @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 (sourceType_ + != com.google.cloud.datacatalog.lineage.v1.Origin.SourceType.SOURCE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, sourceType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sourceType_ + != com.google.cloud.datacatalog.lineage.v1.Origin.SourceType.SOURCE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, sourceType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, 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.datacatalog.lineage.v1.Origin)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.lineage.v1.Origin other = + (com.google.cloud.datacatalog.lineage.v1.Origin) obj; + + if (sourceType_ != other.sourceType_) return false; + 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) + SOURCE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + sourceType_; + 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.datacatalog.lineage.v1.Origin parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.Origin 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.datacatalog.lineage.v1.Origin parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.Origin 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.datacatalog.lineage.v1.Origin parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.Origin parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.lineage.v1.Origin parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.Origin 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.datacatalog.lineage.v1.Origin parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.Origin 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.datacatalog.lineage.v1.Origin parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.Origin 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.datacatalog.lineage.v1.Origin 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; + } + /** + * + * + *
+   * Origin of a process.
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.Origin} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.lineage.v1.Origin) + com.google.cloud.datacatalog.lineage.v1.OriginOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_Origin_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_Origin_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.Origin.class, + com.google.cloud.datacatalog.lineage.v1.Origin.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.lineage.v1.Origin.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + sourceType_ = 0; + + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_Origin_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.Origin getDefaultInstanceForType() { + return com.google.cloud.datacatalog.lineage.v1.Origin.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.Origin build() { + com.google.cloud.datacatalog.lineage.v1.Origin result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.Origin buildPartial() { + com.google.cloud.datacatalog.lineage.v1.Origin result = + new com.google.cloud.datacatalog.lineage.v1.Origin(this); + result.sourceType_ = sourceType_; + 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.datacatalog.lineage.v1.Origin) { + return mergeFrom((com.google.cloud.datacatalog.lineage.v1.Origin) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.lineage.v1.Origin other) { + if (other == com.google.cloud.datacatalog.lineage.v1.Origin.getDefaultInstance()) return this; + if (other.sourceType_ != 0) { + setSourceTypeValue(other.getSourceTypeValue()); + } + 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 8: + { + sourceType_ = input.readEnum(); + + break; + } // case 8 + case 18: + { + name_ = 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 sourceType_ = 0; + /** + * + * + *
+     * Type of the source.
+     * 
+ * + * .google.cloud.datacatalog.lineage.v1.Origin.SourceType source_type = 1; + * + * @return The enum numeric value on the wire for sourceType. + */ + @java.lang.Override + public int getSourceTypeValue() { + return sourceType_; + } + /** + * + * + *
+     * Type of the source.
+     * 
+ * + * .google.cloud.datacatalog.lineage.v1.Origin.SourceType source_type = 1; + * + * @param value The enum numeric value on the wire for sourceType to set. + * @return This builder for chaining. + */ + public Builder setSourceTypeValue(int value) { + + sourceType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Type of the source.
+     * 
+ * + * .google.cloud.datacatalog.lineage.v1.Origin.SourceType source_type = 1; + * + * @return The sourceType. + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.Origin.SourceType getSourceType() { + @SuppressWarnings("deprecation") + com.google.cloud.datacatalog.lineage.v1.Origin.SourceType result = + com.google.cloud.datacatalog.lineage.v1.Origin.SourceType.valueOf(sourceType_); + return result == null + ? com.google.cloud.datacatalog.lineage.v1.Origin.SourceType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Type of the source.
+     * 
+ * + * .google.cloud.datacatalog.lineage.v1.Origin.SourceType source_type = 1; + * + * @param value The sourceType to set. + * @return This builder for chaining. + */ + public Builder setSourceType(com.google.cloud.datacatalog.lineage.v1.Origin.SourceType value) { + if (value == null) { + throw new NullPointerException(); + } + + sourceType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Type of the source.
+     * 
+ * + * .google.cloud.datacatalog.lineage.v1.Origin.SourceType source_type = 1; + * + * @return This builder for chaining. + */ + public Builder clearSourceType() { + + sourceType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * If the source_type isn't CUSTOM, the value of this field should be a GCP
+     * resource name of the system, which reports lineage. The project and
+     * location parts of the resource name must match the project and location of
+     * the lineage resource being created. Examples:
+     * - {source_type: COMPOSER, name:
+     * "projects/foo/locations/us/environments/bar"}
+     * - {source_type: BIGQUERY, name: "projects/foo/locations/eu"}
+     * - {source_type: CUSTOM,   name: "myCustomIntegration"}
+     * 
+ * + * string name = 2; + * + * @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; + } + } + /** + * + * + *
+     * If the source_type isn't CUSTOM, the value of this field should be a GCP
+     * resource name of the system, which reports lineage. The project and
+     * location parts of the resource name must match the project and location of
+     * the lineage resource being created. Examples:
+     * - {source_type: COMPOSER, name:
+     * "projects/foo/locations/us/environments/bar"}
+     * - {source_type: BIGQUERY, name: "projects/foo/locations/eu"}
+     * - {source_type: CUSTOM,   name: "myCustomIntegration"}
+     * 
+ * + * string name = 2; + * + * @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; + } + } + /** + * + * + *
+     * If the source_type isn't CUSTOM, the value of this field should be a GCP
+     * resource name of the system, which reports lineage. The project and
+     * location parts of the resource name must match the project and location of
+     * the lineage resource being created. Examples:
+     * - {source_type: COMPOSER, name:
+     * "projects/foo/locations/us/environments/bar"}
+     * - {source_type: BIGQUERY, name: "projects/foo/locations/eu"}
+     * - {source_type: CUSTOM,   name: "myCustomIntegration"}
+     * 
+ * + * string name = 2; + * + * @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; + } + /** + * + * + *
+     * If the source_type isn't CUSTOM, the value of this field should be a GCP
+     * resource name of the system, which reports lineage. The project and
+     * location parts of the resource name must match the project and location of
+     * the lineage resource being created. Examples:
+     * - {source_type: COMPOSER, name:
+     * "projects/foo/locations/us/environments/bar"}
+     * - {source_type: BIGQUERY, name: "projects/foo/locations/eu"}
+     * - {source_type: CUSTOM,   name: "myCustomIntegration"}
+     * 
+ * + * string name = 2; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * If the source_type isn't CUSTOM, the value of this field should be a GCP
+     * resource name of the system, which reports lineage. The project and
+     * location parts of the resource name must match the project and location of
+     * the lineage resource being created. Examples:
+     * - {source_type: COMPOSER, name:
+     * "projects/foo/locations/us/environments/bar"}
+     * - {source_type: BIGQUERY, name: "projects/foo/locations/eu"}
+     * - {source_type: CUSTOM,   name: "myCustomIntegration"}
+     * 
+ * + * string name = 2; + * + * @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.datacatalog.lineage.v1.Origin) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.lineage.v1.Origin) + private static final com.google.cloud.datacatalog.lineage.v1.Origin DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.lineage.v1.Origin(); + } + + public static com.google.cloud.datacatalog.lineage.v1.Origin getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Origin 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.datacatalog.lineage.v1.Origin getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/OriginOrBuilder.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/OriginOrBuilder.java new file mode 100644 index 000000000000..30feb5839697 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/OriginOrBuilder.java @@ -0,0 +1,89 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +public interface OriginOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.lineage.v1.Origin) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Type of the source.
+   * 
+ * + * .google.cloud.datacatalog.lineage.v1.Origin.SourceType source_type = 1; + * + * @return The enum numeric value on the wire for sourceType. + */ + int getSourceTypeValue(); + /** + * + * + *
+   * Type of the source.
+   * 
+ * + * .google.cloud.datacatalog.lineage.v1.Origin.SourceType source_type = 1; + * + * @return The sourceType. + */ + com.google.cloud.datacatalog.lineage.v1.Origin.SourceType getSourceType(); + + /** + * + * + *
+   * If the source_type isn't CUSTOM, the value of this field should be a GCP
+   * resource name of the system, which reports lineage. The project and
+   * location parts of the resource name must match the project and location of
+   * the lineage resource being created. Examples:
+   * - {source_type: COMPOSER, name:
+   * "projects/foo/locations/us/environments/bar"}
+   * - {source_type: BIGQUERY, name: "projects/foo/locations/eu"}
+   * - {source_type: CUSTOM,   name: "myCustomIntegration"}
+   * 
+ * + * string name = 2; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * If the source_type isn't CUSTOM, the value of this field should be a GCP
+   * resource name of the system, which reports lineage. The project and
+   * location parts of the resource name must match the project and location of
+   * the lineage resource being created. Examples:
+   * - {source_type: COMPOSER, name:
+   * "projects/foo/locations/us/environments/bar"}
+   * - {source_type: BIGQUERY, name: "projects/foo/locations/eu"}
+   * - {source_type: CUSTOM,   name: "myCustomIntegration"}
+   * 
+ * + * string name = 2; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/Process.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/Process.java new file mode 100644 index 000000000000..5d76e6881f87 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/Process.java @@ -0,0 +1,1495 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +/** + * + * + *
+ * A process is the definition of a data transformation operation.
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.Process} + */ +public final class Process extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.lineage.v1.Process) + ProcessOrBuilder { + private static final long serialVersionUID = 0L; + // Use Process.newBuilder() to construct. + private Process(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Process() { + name_ = ""; + displayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Process(); + } + + @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.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_Process_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetAttributes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_Process_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.Process.class, + com.google.cloud.datacatalog.lineage.v1.Process.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Immutable. The resource name of the lineage process. Format:
+   * `projects/{project}/locations/{location}/processes/{process}`.
+   * Can be specified or auto-assigned.
+   * {process} must be not longer than 200 characters and only
+   * contain characters in a set: `a-zA-Z0-9_-:.`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + } + /** + * + * + *
+   * Immutable. The resource name of the lineage process. Format:
+   * `projects/{project}/locations/{location}/processes/{process}`.
+   * Can be specified or auto-assigned.
+   * {process} must be not longer than 200 characters and only
+   * contain characters in a set: `a-zA-Z0-9_-:.`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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 DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Optional. A human-readable name you can set to display in a user interface.
+   * Must be not longer than 200 characters and only contain UTF-8 letters
+   * or numbers, spaces or characters like `_-:&.`
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A human-readable name you can set to display in a user interface.
+   * Must be not longer than 200 characters and only contain UTF-8 letters
+   * or numbers, spaces or characters like `_-:&.`
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ATTRIBUTES_FIELD_NUMBER = 3; + + private static final class AttributesDefaultEntryHolder { + static final com.google.protobuf.MapEntry + defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_Process_AttributesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.protobuf.Value.getDefaultInstance()); + } + + private com.google.protobuf.MapField attributes_; + + private com.google.protobuf.MapField + internalGetAttributes() { + if (attributes_ == null) { + return com.google.protobuf.MapField.emptyMapField(AttributesDefaultEntryHolder.defaultEntry); + } + return attributes_; + } + + public int getAttributesCount() { + return internalGetAttributes().getMap().size(); + } + /** + * + * + *
+   * Optional. The attributes of the process. Can be anything, for example,
+   * "author". Up to 100 attributes are allowed.
+   * 
+ * + * + * map<string, .google.protobuf.Value> attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAttributes(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAttributes().getMap().containsKey(key); + } + /** Use {@link #getAttributesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAttributes() { + return getAttributesMap(); + } + /** + * + * + *
+   * Optional. The attributes of the process. Can be anything, for example,
+   * "author". Up to 100 attributes are allowed.
+   * 
+ * + * + * map<string, .google.protobuf.Value> attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAttributesMap() { + return internalGetAttributes().getMap(); + } + /** + * + * + *
+   * Optional. The attributes of the process. Can be anything, for example,
+   * "author". Up to 100 attributes are allowed.
+   * 
+ * + * + * map<string, .google.protobuf.Value> attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.Value getAttributesOrDefault( + java.lang.String key, com.google.protobuf.Value defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetAttributes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. The attributes of the process. Can be anything, for example,
+   * "author". Up to 100 attributes are allowed.
+   * 
+ * + * + * map<string, .google.protobuf.Value> attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.Value getAttributesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetAttributes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ORIGIN_FIELD_NUMBER = 4; + private com.google.cloud.datacatalog.lineage.v1.Origin origin_; + /** + * + * + *
+   * Optional. The origin of this process and its runs and lineage events.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Origin origin = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the origin field is set. + */ + @java.lang.Override + public boolean hasOrigin() { + return origin_ != null; + } + /** + * + * + *
+   * Optional. The origin of this process and its runs and lineage events.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Origin origin = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The origin. + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.Origin getOrigin() { + return origin_ == null + ? com.google.cloud.datacatalog.lineage.v1.Origin.getDefaultInstance() + : origin_; + } + /** + * + * + *
+   * Optional. The origin of this process and its runs and lineage events.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Origin origin = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.OriginOrBuilder getOriginOrBuilder() { + return getOrigin(); + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetAttributes(), AttributesDefaultEntryHolder.defaultEntry, 3); + if (origin_ != null) { + output.writeMessage(4, getOrigin()); + } + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + for (java.util.Map.Entry entry : + internalGetAttributes().getMap().entrySet()) { + com.google.protobuf.MapEntry attributes__ = + AttributesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, attributes__); + } + if (origin_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getOrigin()); + } + 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.datacatalog.lineage.v1.Process)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.lineage.v1.Process other = + (com.google.cloud.datacatalog.lineage.v1.Process) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!internalGetAttributes().equals(other.internalGetAttributes())) return false; + if (hasOrigin() != other.hasOrigin()) return false; + if (hasOrigin()) { + if (!getOrigin().equals(other.getOrigin())) 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 = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (!internalGetAttributes().getMap().isEmpty()) { + hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + internalGetAttributes().hashCode(); + } + if (hasOrigin()) { + hash = (37 * hash) + ORIGIN_FIELD_NUMBER; + hash = (53 * hash) + getOrigin().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.lineage.v1.Process parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.Process 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.datacatalog.lineage.v1.Process parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.Process 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.datacatalog.lineage.v1.Process parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.Process parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.lineage.v1.Process parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.Process 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.datacatalog.lineage.v1.Process parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.Process 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.datacatalog.lineage.v1.Process parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.Process 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.datacatalog.lineage.v1.Process 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; + } + /** + * + * + *
+   * A process is the definition of a data transformation operation.
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.Process} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.lineage.v1.Process) + com.google.cloud.datacatalog.lineage.v1.ProcessOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_Process_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetAttributes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 3: + return internalGetMutableAttributes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_Process_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.Process.class, + com.google.cloud.datacatalog.lineage.v1.Process.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.lineage.v1.Process.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + internalGetMutableAttributes().clear(); + if (originBuilder_ == null) { + origin_ = null; + } else { + origin_ = null; + originBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_Process_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.Process getDefaultInstanceForType() { + return com.google.cloud.datacatalog.lineage.v1.Process.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.Process build() { + com.google.cloud.datacatalog.lineage.v1.Process result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.Process buildPartial() { + com.google.cloud.datacatalog.lineage.v1.Process result = + new com.google.cloud.datacatalog.lineage.v1.Process(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.displayName_ = displayName_; + result.attributes_ = internalGetAttributes(); + result.attributes_.makeImmutable(); + if (originBuilder_ == null) { + result.origin_ = origin_; + } else { + result.origin_ = originBuilder_.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.datacatalog.lineage.v1.Process) { + return mergeFrom((com.google.cloud.datacatalog.lineage.v1.Process) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.lineage.v1.Process other) { + if (other == com.google.cloud.datacatalog.lineage.v1.Process.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + internalGetMutableAttributes().mergeFrom(other.internalGetAttributes()); + if (other.hasOrigin()) { + mergeOrigin(other.getOrigin()); + } + 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: + { + displayName_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + com.google.protobuf.MapEntry + attributes__ = + input.readMessage( + AttributesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAttributes() + .getMutableMap() + .put(attributes__.getKey(), attributes__.getValue()); + break; + } // case 26 + case 34: + { + input.readMessage(getOriginFieldBuilder().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 bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Immutable. The resource name of the lineage process. Format:
+     * `projects/{project}/locations/{location}/processes/{process}`.
+     * Can be specified or auto-assigned.
+     * {process} must be not longer than 200 characters and only
+     * contain characters in a set: `a-zA-Z0-9_-:.`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + } + /** + * + * + *
+     * Immutable. The resource name of the lineage process. Format:
+     * `projects/{project}/locations/{location}/processes/{process}`.
+     * Can be specified or auto-assigned.
+     * {process} must be not longer than 200 characters and only
+     * contain characters in a set: `a-zA-Z0-9_-:.`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + } + /** + * + * + *
+     * Immutable. The resource name of the lineage process. Format:
+     * `projects/{project}/locations/{location}/processes/{process}`.
+     * Can be specified or auto-assigned.
+     * {process} must be not longer than 200 characters and only
+     * contain characters in a set: `a-zA-Z0-9_-:.`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + /** + * + * + *
+     * Immutable. The resource name of the lineage process. Format:
+     * `projects/{project}/locations/{location}/processes/{process}`.
+     * Can be specified or auto-assigned.
+     * {process} must be not longer than 200 characters and only
+     * contain characters in a set: `a-zA-Z0-9_-:.`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The resource name of the lineage process. Format:
+     * `projects/{project}/locations/{location}/processes/{process}`.
+     * Can be specified or auto-assigned.
+     * {process} must be not longer than 200 characters and only
+     * contain characters in a set: `a-zA-Z0-9_-:.`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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 java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Optional. A human-readable name you can set to display in a user interface.
+     * Must be not longer than 200 characters and only contain UTF-8 letters
+     * or numbers, spaces or characters like `_-:&.`
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A human-readable name you can set to display in a user interface.
+     * Must be not longer than 200 characters and only contain UTF-8 letters
+     * or numbers, spaces or characters like `_-:&.`
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A human-readable name you can set to display in a user interface.
+     * Must be not longer than 200 characters and only contain UTF-8 letters
+     * or numbers, spaces or characters like `_-:&.`
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A human-readable name you can set to display in a user interface.
+     * Must be not longer than 200 characters and only contain UTF-8 letters
+     * or numbers, spaces or characters like `_-:&.`
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A human-readable name you can set to display in a user interface.
+     * Must be not longer than 200 characters and only contain UTF-8 letters
+     * or numbers, spaces or characters like `_-:&.`
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField attributes_; + + private com.google.protobuf.MapField + internalGetAttributes() { + if (attributes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AttributesDefaultEntryHolder.defaultEntry); + } + return attributes_; + } + + private com.google.protobuf.MapField + internalGetMutableAttributes() { + onChanged(); + ; + if (attributes_ == null) { + attributes_ = + com.google.protobuf.MapField.newMapField(AttributesDefaultEntryHolder.defaultEntry); + } + if (!attributes_.isMutable()) { + attributes_ = attributes_.copy(); + } + return attributes_; + } + + public int getAttributesCount() { + return internalGetAttributes().getMap().size(); + } + /** + * + * + *
+     * Optional. The attributes of the process. Can be anything, for example,
+     * "author". Up to 100 attributes are allowed.
+     * 
+ * + * + * map<string, .google.protobuf.Value> attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAttributes(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAttributes().getMap().containsKey(key); + } + /** Use {@link #getAttributesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAttributes() { + return getAttributesMap(); + } + /** + * + * + *
+     * Optional. The attributes of the process. Can be anything, for example,
+     * "author". Up to 100 attributes are allowed.
+     * 
+ * + * + * map<string, .google.protobuf.Value> attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAttributesMap() { + return internalGetAttributes().getMap(); + } + /** + * + * + *
+     * Optional. The attributes of the process. Can be anything, for example,
+     * "author". Up to 100 attributes are allowed.
+     * 
+ * + * + * map<string, .google.protobuf.Value> attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.Value getAttributesOrDefault( + java.lang.String key, com.google.protobuf.Value defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetAttributes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. The attributes of the process. Can be anything, for example,
+     * "author". Up to 100 attributes are allowed.
+     * 
+ * + * + * map<string, .google.protobuf.Value> attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.Value getAttributesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetAttributes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAttributes() { + internalGetMutableAttributes().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. The attributes of the process. Can be anything, for example,
+     * "author". Up to 100 attributes are allowed.
+     * 
+ * + * + * map<string, .google.protobuf.Value> attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeAttributes(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableAttributes().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAttributes() { + return internalGetMutableAttributes().getMutableMap(); + } + /** + * + * + *
+     * Optional. The attributes of the process. Can be anything, for example,
+     * "author". Up to 100 attributes are allowed.
+     * 
+ * + * + * map<string, .google.protobuf.Value> attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAttributes(java.lang.String key, com.google.protobuf.Value value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + + internalGetMutableAttributes().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Optional. The attributes of the process. Can be anything, for example,
+     * "author". Up to 100 attributes are allowed.
+     * 
+ * + * + * map<string, .google.protobuf.Value> attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllAttributes( + java.util.Map values) { + internalGetMutableAttributes().getMutableMap().putAll(values); + return this; + } + + private com.google.cloud.datacatalog.lineage.v1.Origin origin_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.Origin, + com.google.cloud.datacatalog.lineage.v1.Origin.Builder, + com.google.cloud.datacatalog.lineage.v1.OriginOrBuilder> + originBuilder_; + /** + * + * + *
+     * Optional. The origin of this process and its runs and lineage events.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Origin origin = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the origin field is set. + */ + public boolean hasOrigin() { + return originBuilder_ != null || origin_ != null; + } + /** + * + * + *
+     * Optional. The origin of this process and its runs and lineage events.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Origin origin = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The origin. + */ + public com.google.cloud.datacatalog.lineage.v1.Origin getOrigin() { + if (originBuilder_ == null) { + return origin_ == null + ? com.google.cloud.datacatalog.lineage.v1.Origin.getDefaultInstance() + : origin_; + } else { + return originBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The origin of this process and its runs and lineage events.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Origin origin = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOrigin(com.google.cloud.datacatalog.lineage.v1.Origin value) { + if (originBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + origin_ = value; + onChanged(); + } else { + originBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The origin of this process and its runs and lineage events.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Origin origin = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOrigin( + com.google.cloud.datacatalog.lineage.v1.Origin.Builder builderForValue) { + if (originBuilder_ == null) { + origin_ = builderForValue.build(); + onChanged(); + } else { + originBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. The origin of this process and its runs and lineage events.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Origin origin = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeOrigin(com.google.cloud.datacatalog.lineage.v1.Origin value) { + if (originBuilder_ == null) { + if (origin_ != null) { + origin_ = + com.google.cloud.datacatalog.lineage.v1.Origin.newBuilder(origin_) + .mergeFrom(value) + .buildPartial(); + } else { + origin_ = value; + } + onChanged(); + } else { + originBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The origin of this process and its runs and lineage events.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Origin origin = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearOrigin() { + if (originBuilder_ == null) { + origin_ = null; + onChanged(); + } else { + origin_ = null; + originBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. The origin of this process and its runs and lineage events.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Origin origin = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.datacatalog.lineage.v1.Origin.Builder getOriginBuilder() { + + onChanged(); + return getOriginFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The origin of this process and its runs and lineage events.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Origin origin = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.datacatalog.lineage.v1.OriginOrBuilder getOriginOrBuilder() { + if (originBuilder_ != null) { + return originBuilder_.getMessageOrBuilder(); + } else { + return origin_ == null + ? com.google.cloud.datacatalog.lineage.v1.Origin.getDefaultInstance() + : origin_; + } + } + /** + * + * + *
+     * Optional. The origin of this process and its runs and lineage events.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Origin origin = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.Origin, + com.google.cloud.datacatalog.lineage.v1.Origin.Builder, + com.google.cloud.datacatalog.lineage.v1.OriginOrBuilder> + getOriginFieldBuilder() { + if (originBuilder_ == null) { + originBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.Origin, + com.google.cloud.datacatalog.lineage.v1.Origin.Builder, + com.google.cloud.datacatalog.lineage.v1.OriginOrBuilder>( + getOrigin(), getParentForChildren(), isClean()); + origin_ = null; + } + return originBuilder_; + } + + @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.datacatalog.lineage.v1.Process) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.lineage.v1.Process) + private static final com.google.cloud.datacatalog.lineage.v1.Process DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.lineage.v1.Process(); + } + + public static com.google.cloud.datacatalog.lineage.v1.Process getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Process 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.datacatalog.lineage.v1.Process getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ProcessLinkInfo.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ProcessLinkInfo.java new file mode 100644 index 000000000000..1ddef0804f7d --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ProcessLinkInfo.java @@ -0,0 +1,1141 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +/** + * + * + *
+ * Link details.
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.ProcessLinkInfo} + */ +public final class ProcessLinkInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.lineage.v1.ProcessLinkInfo) + ProcessLinkInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use ProcessLinkInfo.newBuilder() to construct. + private ProcessLinkInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ProcessLinkInfo() { + link_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ProcessLinkInfo(); + } + + @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.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ProcessLinkInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ProcessLinkInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo.class, + com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo.Builder.class); + } + + public static final int LINK_FIELD_NUMBER = 1; + private volatile java.lang.Object link_; + /** + * + * + *
+   * The name of the link in the format of
+   * `projects/{project}/locations/{location}/links/{link}`.
+   * 
+ * + * string link = 1; + * + * @return The link. + */ + @java.lang.Override + public java.lang.String getLink() { + java.lang.Object ref = link_; + 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(); + link_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the link in the format of
+   * `projects/{project}/locations/{location}/links/{link}`.
+   * 
+ * + * string link = 1; + * + * @return The bytes for link. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLinkBytes() { + java.lang.Object ref = link_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + link_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int START_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * The start of the first event establishing this link-process tuple.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
+   * The start of the first event establishing this link-process tuple.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * The start of the first event establishing this link-process tuple.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return getStartTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * The end of the last event establishing this link-process tuple.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * The end of the last event establishing this link-process tuple.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * The end of the last event establishing this link-process tuple.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + 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(link_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, link_); + } + if (startTime_ != null) { + output.writeMessage(2, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(3, getEndTime()); + } + 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(link_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, link_); + } + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndTime()); + } + 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.datacatalog.lineage.v1.ProcessLinkInfo)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo other = + (com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo) obj; + + if (!getLink().equals(other.getLink())) return false; + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) 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) + LINK_FIELD_NUMBER; + hash = (53 * hash) + getLink().hashCode(); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo 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.datacatalog.lineage.v1.ProcessLinkInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo 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.datacatalog.lineage.v1.ProcessLinkInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo 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.datacatalog.lineage.v1.ProcessLinkInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo 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.datacatalog.lineage.v1.ProcessLinkInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo 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.datacatalog.lineage.v1.ProcessLinkInfo 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; + } + /** + * + * + *
+   * Link details.
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.ProcessLinkInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.lineage.v1.ProcessLinkInfo) + com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ProcessLinkInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ProcessLinkInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo.class, + com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + link_ = ""; + + if (startTimeBuilder_ == null) { + startTime_ = null; + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ProcessLinkInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo getDefaultInstanceForType() { + return com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo build() { + com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo buildPartial() { + com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo result = + new com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo(this); + result.link_ = link_; + if (startTimeBuilder_ == null) { + result.startTime_ = startTime_; + } else { + result.startTime_ = startTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.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.datacatalog.lineage.v1.ProcessLinkInfo) { + return mergeFrom((com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo other) { + if (other == com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo.getDefaultInstance()) + return this; + if (!other.getLink().isEmpty()) { + link_ = other.link_; + onChanged(); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + 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: + { + link_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getEndTimeFieldBuilder().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 java.lang.Object link_ = ""; + /** + * + * + *
+     * The name of the link in the format of
+     * `projects/{project}/locations/{location}/links/{link}`.
+     * 
+ * + * string link = 1; + * + * @return The link. + */ + public java.lang.String getLink() { + java.lang.Object ref = link_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + link_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the link in the format of
+     * `projects/{project}/locations/{location}/links/{link}`.
+     * 
+ * + * string link = 1; + * + * @return The bytes for link. + */ + public com.google.protobuf.ByteString getLinkBytes() { + java.lang.Object ref = link_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + link_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the link in the format of
+     * `projects/{project}/locations/{location}/links/{link}`.
+     * 
+ * + * string link = 1; + * + * @param value The link to set. + * @return This builder for chaining. + */ + public Builder setLink(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + link_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the link in the format of
+     * `projects/{project}/locations/{location}/links/{link}`.
+     * 
+ * + * string link = 1; + * + * @return This builder for chaining. + */ + public Builder clearLink() { + + link_ = getDefaultInstance().getLink(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the link in the format of
+     * `projects/{project}/locations/{location}/links/{link}`.
+     * 
+ * + * string link = 1; + * + * @param value The bytes for link to set. + * @return This builder for chaining. + */ + public Builder setLinkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + link_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * The start of the first event establishing this link-process tuple.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return startTimeBuilder_ != null || startTime_ != null; + } + /** + * + * + *
+     * The start of the first event establishing this link-process tuple.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The start of the first event establishing this link-process tuple.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + onChanged(); + } else { + startTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The start of the first event establishing this link-process tuple.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + onChanged(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The start of the first event establishing this link-process tuple.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (startTime_ != null) { + startTime_ = + com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); + } else { + startTime_ = value; + } + onChanged(); + } else { + startTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The start of the first event establishing this link-process tuple.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder clearStartTime() { + if (startTimeBuilder_ == null) { + startTime_ = null; + onChanged(); + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The start of the first event establishing this link-process tuple.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The start of the first event establishing this link-process tuple.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * The start of the first event establishing this link-process tuple.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + 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_; + /** + * + * + *
+     * The end of the last event establishing this link-process tuple.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * The end of the last event establishing this link-process tuple.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * + * @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(); + } + } + /** + * + * + *
+     * The end of the last event establishing this link-process tuple.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + 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; + } + /** + * + * + *
+     * The end of the last event establishing this link-process tuple.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The end of the last event establishing this link-process tuple.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + 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; + } + /** + * + * + *
+     * The end of the last event establishing this link-process tuple.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The end of the last event establishing this link-process tuple.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The end of the last event establishing this link-process tuple.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * The end of the last event establishing this link-process tuple.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + 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_; + } + + @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.datacatalog.lineage.v1.ProcessLinkInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.lineage.v1.ProcessLinkInfo) + private static final com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo(); + } + + public static com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProcessLinkInfo 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.datacatalog.lineage.v1.ProcessLinkInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ProcessLinkInfoOrBuilder.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ProcessLinkInfoOrBuilder.java new file mode 100644 index 000000000000..de4dbae8be78 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ProcessLinkInfoOrBuilder.java @@ -0,0 +1,122 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +public interface ProcessLinkInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.lineage.v1.ProcessLinkInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of the link in the format of
+   * `projects/{project}/locations/{location}/links/{link}`.
+   * 
+ * + * string link = 1; + * + * @return The link. + */ + java.lang.String getLink(); + /** + * + * + *
+   * The name of the link in the format of
+   * `projects/{project}/locations/{location}/links/{link}`.
+   * 
+ * + * string link = 1; + * + * @return The bytes for link. + */ + com.google.protobuf.ByteString getLinkBytes(); + + /** + * + * + *
+   * The start of the first event establishing this link-process tuple.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * The start of the first event establishing this link-process tuple.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * The start of the first event establishing this link-process tuple.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * The end of the last event establishing this link-process tuple.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * The end of the last event establishing this link-process tuple.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * The end of the last event establishing this link-process tuple.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ProcessLinks.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ProcessLinks.java new file mode 100644 index 000000000000..766941e302e5 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ProcessLinks.java @@ -0,0 +1,1218 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +/** + * + * + *
+ * Links associated with a specific process.
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.ProcessLinks} + */ +public final class ProcessLinks extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.lineage.v1.ProcessLinks) + ProcessLinksOrBuilder { + private static final long serialVersionUID = 0L; + // Use ProcessLinks.newBuilder() to construct. + private ProcessLinks(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ProcessLinks() { + process_ = ""; + links_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ProcessLinks(); + } + + @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.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ProcessLinks_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ProcessLinks_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.ProcessLinks.class, + com.google.cloud.datacatalog.lineage.v1.ProcessLinks.Builder.class); + } + + public static final int PROCESS_FIELD_NUMBER = 1; + private volatile java.lang.Object process_; + /** + * + * + *
+   * The process name in the format of
+   * `projects/{project}/locations/{location}/processes/{process}`.
+   * 
+ * + * string process = 1 [(.google.api.resource_reference) = { ... } + * + * @return The process. + */ + @java.lang.Override + public java.lang.String getProcess() { + java.lang.Object ref = process_; + 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(); + process_ = s; + return s; + } + } + /** + * + * + *
+   * The process name in the format of
+   * `projects/{project}/locations/{location}/processes/{process}`.
+   * 
+ * + * string process = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for process. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProcessBytes() { + java.lang.Object ref = process_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + process_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LINKS_FIELD_NUMBER = 2; + private java.util.List links_; + /** + * + * + *
+   * An array containing link details objects of the links provided in
+   * the original request.
+   * A single process can result in creating multiple links.
+   * If any of the links you provide in the request are created by
+   * the same process, they all are included in this array.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinkInfo links = 2; + */ + @java.lang.Override + public java.util.List getLinksList() { + return links_; + } + /** + * + * + *
+   * An array containing link details objects of the links provided in
+   * the original request.
+   * A single process can result in creating multiple links.
+   * If any of the links you provide in the request are created by
+   * the same process, they all are included in this array.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinkInfo links = 2; + */ + @java.lang.Override + public java.util.List + getLinksOrBuilderList() { + return links_; + } + /** + * + * + *
+   * An array containing link details objects of the links provided in
+   * the original request.
+   * A single process can result in creating multiple links.
+   * If any of the links you provide in the request are created by
+   * the same process, they all are included in this array.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinkInfo links = 2; + */ + @java.lang.Override + public int getLinksCount() { + return links_.size(); + } + /** + * + * + *
+   * An array containing link details objects of the links provided in
+   * the original request.
+   * A single process can result in creating multiple links.
+   * If any of the links you provide in the request are created by
+   * the same process, they all are included in this array.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinkInfo links = 2; + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo getLinks(int index) { + return links_.get(index); + } + /** + * + * + *
+   * An array containing link details objects of the links provided in
+   * the original request.
+   * A single process can result in creating multiple links.
+   * If any of the links you provide in the request are created by
+   * the same process, they all are included in this array.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinkInfo links = 2; + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfoOrBuilder getLinksOrBuilder( + int index) { + return links_.get(index); + } + + 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(process_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, process_); + } + for (int i = 0; i < links_.size(); i++) { + output.writeMessage(2, links_.get(i)); + } + 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(process_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, process_); + } + for (int i = 0; i < links_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, links_.get(i)); + } + 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.datacatalog.lineage.v1.ProcessLinks)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.lineage.v1.ProcessLinks other = + (com.google.cloud.datacatalog.lineage.v1.ProcessLinks) obj; + + if (!getProcess().equals(other.getProcess())) return false; + if (!getLinksList().equals(other.getLinksList())) 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) + PROCESS_FIELD_NUMBER; + hash = (53 * hash) + getProcess().hashCode(); + if (getLinksCount() > 0) { + hash = (37 * hash) + LINKS_FIELD_NUMBER; + hash = (53 * hash) + getLinksList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.lineage.v1.ProcessLinks parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.ProcessLinks 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.datacatalog.lineage.v1.ProcessLinks parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.ProcessLinks 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.datacatalog.lineage.v1.ProcessLinks parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.ProcessLinks parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.lineage.v1.ProcessLinks parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.ProcessLinks 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.datacatalog.lineage.v1.ProcessLinks parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.ProcessLinks 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.datacatalog.lineage.v1.ProcessLinks parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.ProcessLinks 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.datacatalog.lineage.v1.ProcessLinks 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; + } + /** + * + * + *
+   * Links associated with a specific process.
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.ProcessLinks} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.lineage.v1.ProcessLinks) + com.google.cloud.datacatalog.lineage.v1.ProcessLinksOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ProcessLinks_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ProcessLinks_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.ProcessLinks.class, + com.google.cloud.datacatalog.lineage.v1.ProcessLinks.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.lineage.v1.ProcessLinks.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + process_ = ""; + + if (linksBuilder_ == null) { + links_ = java.util.Collections.emptyList(); + } else { + links_ = null; + linksBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_ProcessLinks_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.ProcessLinks getDefaultInstanceForType() { + return com.google.cloud.datacatalog.lineage.v1.ProcessLinks.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.ProcessLinks build() { + com.google.cloud.datacatalog.lineage.v1.ProcessLinks result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.ProcessLinks buildPartial() { + com.google.cloud.datacatalog.lineage.v1.ProcessLinks result = + new com.google.cloud.datacatalog.lineage.v1.ProcessLinks(this); + int from_bitField0_ = bitField0_; + result.process_ = process_; + if (linksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + links_ = java.util.Collections.unmodifiableList(links_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.links_ = links_; + } else { + result.links_ = linksBuilder_.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.datacatalog.lineage.v1.ProcessLinks) { + return mergeFrom((com.google.cloud.datacatalog.lineage.v1.ProcessLinks) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.lineage.v1.ProcessLinks other) { + if (other == com.google.cloud.datacatalog.lineage.v1.ProcessLinks.getDefaultInstance()) + return this; + if (!other.getProcess().isEmpty()) { + process_ = other.process_; + onChanged(); + } + if (linksBuilder_ == null) { + if (!other.links_.isEmpty()) { + if (links_.isEmpty()) { + links_ = other.links_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLinksIsMutable(); + links_.addAll(other.links_); + } + onChanged(); + } + } else { + if (!other.links_.isEmpty()) { + if (linksBuilder_.isEmpty()) { + linksBuilder_.dispose(); + linksBuilder_ = null; + links_ = other.links_; + bitField0_ = (bitField0_ & ~0x00000001); + linksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getLinksFieldBuilder() + : null; + } else { + linksBuilder_.addAllMessages(other.links_); + } + } + } + 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: + { + process_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo m = + input.readMessage( + com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo.parser(), + extensionRegistry); + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.add(m); + } else { + linksBuilder_.addMessage(m); + } + 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.lang.Object process_ = ""; + /** + * + * + *
+     * The process name in the format of
+     * `projects/{project}/locations/{location}/processes/{process}`.
+     * 
+ * + * string process = 1 [(.google.api.resource_reference) = { ... } + * + * @return The process. + */ + public java.lang.String getProcess() { + java.lang.Object ref = process_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + process_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The process name in the format of
+     * `projects/{project}/locations/{location}/processes/{process}`.
+     * 
+ * + * string process = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for process. + */ + public com.google.protobuf.ByteString getProcessBytes() { + java.lang.Object ref = process_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + process_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The process name in the format of
+     * `projects/{project}/locations/{location}/processes/{process}`.
+     * 
+ * + * string process = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The process to set. + * @return This builder for chaining. + */ + public Builder setProcess(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + process_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The process name in the format of
+     * `projects/{project}/locations/{location}/processes/{process}`.
+     * 
+ * + * string process = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearProcess() { + + process_ = getDefaultInstance().getProcess(); + onChanged(); + return this; + } + /** + * + * + *
+     * The process name in the format of
+     * `projects/{project}/locations/{location}/processes/{process}`.
+     * 
+ * + * string process = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for process to set. + * @return This builder for chaining. + */ + public Builder setProcessBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + process_ = value; + onChanged(); + return this; + } + + private java.util.List links_ = + java.util.Collections.emptyList(); + + private void ensureLinksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + links_ = + new java.util.ArrayList( + links_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo, + com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo.Builder, + com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfoOrBuilder> + linksBuilder_; + + /** + * + * + *
+     * An array containing link details objects of the links provided in
+     * the original request.
+     * A single process can result in creating multiple links.
+     * If any of the links you provide in the request are created by
+     * the same process, they all are included in this array.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinkInfo links = 2; + */ + public java.util.List getLinksList() { + if (linksBuilder_ == null) { + return java.util.Collections.unmodifiableList(links_); + } else { + return linksBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * An array containing link details objects of the links provided in
+     * the original request.
+     * A single process can result in creating multiple links.
+     * If any of the links you provide in the request are created by
+     * the same process, they all are included in this array.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinkInfo links = 2; + */ + public int getLinksCount() { + if (linksBuilder_ == null) { + return links_.size(); + } else { + return linksBuilder_.getCount(); + } + } + /** + * + * + *
+     * An array containing link details objects of the links provided in
+     * the original request.
+     * A single process can result in creating multiple links.
+     * If any of the links you provide in the request are created by
+     * the same process, they all are included in this array.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinkInfo links = 2; + */ + public com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo getLinks(int index) { + if (linksBuilder_ == null) { + return links_.get(index); + } else { + return linksBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * An array containing link details objects of the links provided in
+     * the original request.
+     * A single process can result in creating multiple links.
+     * If any of the links you provide in the request are created by
+     * the same process, they all are included in this array.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinkInfo links = 2; + */ + public Builder setLinks( + int index, com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo value) { + if (linksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinksIsMutable(); + links_.set(index, value); + onChanged(); + } else { + linksBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * An array containing link details objects of the links provided in
+     * the original request.
+     * A single process can result in creating multiple links.
+     * If any of the links you provide in the request are created by
+     * the same process, they all are included in this array.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinkInfo links = 2; + */ + public Builder setLinks( + int index, + com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo.Builder builderForValue) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.set(index, builderForValue.build()); + onChanged(); + } else { + linksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * An array containing link details objects of the links provided in
+     * the original request.
+     * A single process can result in creating multiple links.
+     * If any of the links you provide in the request are created by
+     * the same process, they all are included in this array.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinkInfo links = 2; + */ + public Builder addLinks(com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo value) { + if (linksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinksIsMutable(); + links_.add(value); + onChanged(); + } else { + linksBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * An array containing link details objects of the links provided in
+     * the original request.
+     * A single process can result in creating multiple links.
+     * If any of the links you provide in the request are created by
+     * the same process, they all are included in this array.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinkInfo links = 2; + */ + public Builder addLinks( + int index, com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo value) { + if (linksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinksIsMutable(); + links_.add(index, value); + onChanged(); + } else { + linksBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * An array containing link details objects of the links provided in
+     * the original request.
+     * A single process can result in creating multiple links.
+     * If any of the links you provide in the request are created by
+     * the same process, they all are included in this array.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinkInfo links = 2; + */ + public Builder addLinks( + com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo.Builder builderForValue) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.add(builderForValue.build()); + onChanged(); + } else { + linksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * An array containing link details objects of the links provided in
+     * the original request.
+     * A single process can result in creating multiple links.
+     * If any of the links you provide in the request are created by
+     * the same process, they all are included in this array.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinkInfo links = 2; + */ + public Builder addLinks( + int index, + com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo.Builder builderForValue) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.add(index, builderForValue.build()); + onChanged(); + } else { + linksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * An array containing link details objects of the links provided in
+     * the original request.
+     * A single process can result in creating multiple links.
+     * If any of the links you provide in the request are created by
+     * the same process, they all are included in this array.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinkInfo links = 2; + */ + public Builder addAllLinks( + java.lang.Iterable + values) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, links_); + onChanged(); + } else { + linksBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * An array containing link details objects of the links provided in
+     * the original request.
+     * A single process can result in creating multiple links.
+     * If any of the links you provide in the request are created by
+     * the same process, they all are included in this array.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinkInfo links = 2; + */ + public Builder clearLinks() { + if (linksBuilder_ == null) { + links_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + linksBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * An array containing link details objects of the links provided in
+     * the original request.
+     * A single process can result in creating multiple links.
+     * If any of the links you provide in the request are created by
+     * the same process, they all are included in this array.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinkInfo links = 2; + */ + public Builder removeLinks(int index) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.remove(index); + onChanged(); + } else { + linksBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * An array containing link details objects of the links provided in
+     * the original request.
+     * A single process can result in creating multiple links.
+     * If any of the links you provide in the request are created by
+     * the same process, they all are included in this array.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinkInfo links = 2; + */ + public com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo.Builder getLinksBuilder( + int index) { + return getLinksFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * An array containing link details objects of the links provided in
+     * the original request.
+     * A single process can result in creating multiple links.
+     * If any of the links you provide in the request are created by
+     * the same process, they all are included in this array.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinkInfo links = 2; + */ + public com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfoOrBuilder getLinksOrBuilder( + int index) { + if (linksBuilder_ == null) { + return links_.get(index); + } else { + return linksBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * An array containing link details objects of the links provided in
+     * the original request.
+     * A single process can result in creating multiple links.
+     * If any of the links you provide in the request are created by
+     * the same process, they all are included in this array.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinkInfo links = 2; + */ + public java.util.List< + ? extends com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfoOrBuilder> + getLinksOrBuilderList() { + if (linksBuilder_ != null) { + return linksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(links_); + } + } + /** + * + * + *
+     * An array containing link details objects of the links provided in
+     * the original request.
+     * A single process can result in creating multiple links.
+     * If any of the links you provide in the request are created by
+     * the same process, they all are included in this array.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinkInfo links = 2; + */ + public com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo.Builder addLinksBuilder() { + return getLinksFieldBuilder() + .addBuilder(com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo.getDefaultInstance()); + } + /** + * + * + *
+     * An array containing link details objects of the links provided in
+     * the original request.
+     * A single process can result in creating multiple links.
+     * If any of the links you provide in the request are created by
+     * the same process, they all are included in this array.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinkInfo links = 2; + */ + public com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo.Builder addLinksBuilder( + int index) { + return getLinksFieldBuilder() + .addBuilder( + index, com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo.getDefaultInstance()); + } + /** + * + * + *
+     * An array containing link details objects of the links provided in
+     * the original request.
+     * A single process can result in creating multiple links.
+     * If any of the links you provide in the request are created by
+     * the same process, they all are included in this array.
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinkInfo links = 2; + */ + public java.util.List + getLinksBuilderList() { + return getLinksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo, + com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo.Builder, + com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfoOrBuilder> + getLinksFieldBuilder() { + if (linksBuilder_ == null) { + linksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo, + com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo.Builder, + com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfoOrBuilder>( + links_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + links_ = null; + } + return linksBuilder_; + } + + @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.datacatalog.lineage.v1.ProcessLinks) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.lineage.v1.ProcessLinks) + private static final com.google.cloud.datacatalog.lineage.v1.ProcessLinks DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.lineage.v1.ProcessLinks(); + } + + public static com.google.cloud.datacatalog.lineage.v1.ProcessLinks getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProcessLinks 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.datacatalog.lineage.v1.ProcessLinks getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ProcessLinksOrBuilder.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ProcessLinksOrBuilder.java new file mode 100644 index 000000000000..6217adbb21f7 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ProcessLinksOrBuilder.java @@ -0,0 +1,124 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +public interface ProcessLinksOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.lineage.v1.ProcessLinks) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The process name in the format of
+   * `projects/{project}/locations/{location}/processes/{process}`.
+   * 
+ * + * string process = 1 [(.google.api.resource_reference) = { ... } + * + * @return The process. + */ + java.lang.String getProcess(); + /** + * + * + *
+   * The process name in the format of
+   * `projects/{project}/locations/{location}/processes/{process}`.
+   * 
+ * + * string process = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for process. + */ + com.google.protobuf.ByteString getProcessBytes(); + + /** + * + * + *
+   * An array containing link details objects of the links provided in
+   * the original request.
+   * A single process can result in creating multiple links.
+   * If any of the links you provide in the request are created by
+   * the same process, they all are included in this array.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinkInfo links = 2; + */ + java.util.List getLinksList(); + /** + * + * + *
+   * An array containing link details objects of the links provided in
+   * the original request.
+   * A single process can result in creating multiple links.
+   * If any of the links you provide in the request are created by
+   * the same process, they all are included in this array.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinkInfo links = 2; + */ + com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfo getLinks(int index); + /** + * + * + *
+   * An array containing link details objects of the links provided in
+   * the original request.
+   * A single process can result in creating multiple links.
+   * If any of the links you provide in the request are created by
+   * the same process, they all are included in this array.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinkInfo links = 2; + */ + int getLinksCount(); + /** + * + * + *
+   * An array containing link details objects of the links provided in
+   * the original request.
+   * A single process can result in creating multiple links.
+   * If any of the links you provide in the request are created by
+   * the same process, they all are included in this array.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinkInfo links = 2; + */ + java.util.List + getLinksOrBuilderList(); + /** + * + * + *
+   * An array containing link details objects of the links provided in
+   * the original request.
+   * A single process can result in creating multiple links.
+   * If any of the links you provide in the request are created by
+   * the same process, they all are included in this array.
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.ProcessLinkInfo links = 2; + */ + com.google.cloud.datacatalog.lineage.v1.ProcessLinkInfoOrBuilder getLinksOrBuilder(int index); +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ProcessName.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ProcessName.java new file mode 100644 index 000000000000..16fc0648c339 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ProcessName.java @@ -0,0 +1,223 @@ +/* + * 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.datacatalog.lineage.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 ProcessName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_PROCESS = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/processes/{process}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String process; + + @Deprecated + protected ProcessName() { + project = null; + location = null; + process = null; + } + + private ProcessName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + process = Preconditions.checkNotNull(builder.getProcess()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getProcess() { + return process; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ProcessName of(String project, String location, String process) { + return newBuilder().setProject(project).setLocation(location).setProcess(process).build(); + } + + public static String format(String project, String location, String process) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setProcess(process) + .build() + .toString(); + } + + public static ProcessName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_PROCESS.validatedMatch( + formattedString, "ProcessName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("process")); + } + + 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 (ProcessName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_PROCESS.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 (process != null) { + fieldMapBuilder.put("process", process); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_PROCESS.instantiate( + "project", project, "location", location, "process", process); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ProcessName that = ((ProcessName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.process, that.process); + } + 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(process); + return h; + } + + /** Builder for projects/{project}/locations/{location}/processes/{process}. */ + public static class Builder { + private String project; + private String location; + private String process; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getProcess() { + return process; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setProcess(String process) { + this.process = process; + return this; + } + + private Builder(ProcessName processName) { + this.project = processName.project; + this.location = processName.location; + this.process = processName.process; + } + + public ProcessName build() { + return new ProcessName(this); + } + } +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ProcessOrBuilder.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ProcessOrBuilder.java new file mode 100644 index 000000000000..8e38f4d68dbf --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/ProcessOrBuilder.java @@ -0,0 +1,202 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +public interface ProcessOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.lineage.v1.Process) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Immutable. The resource name of the lineage process. Format:
+   * `projects/{project}/locations/{location}/processes/{process}`.
+   * Can be specified or auto-assigned.
+   * {process} must be not longer than 200 characters and only
+   * contain characters in a set: `a-zA-Z0-9_-:.`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Immutable. The resource name of the lineage process. Format:
+   * `projects/{project}/locations/{location}/processes/{process}`.
+   * Can be specified or auto-assigned.
+   * {process} must be not longer than 200 characters and only
+   * contain characters in a set: `a-zA-Z0-9_-:.`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. A human-readable name you can set to display in a user interface.
+   * Must be not longer than 200 characters and only contain UTF-8 letters
+   * or numbers, spaces or characters like `_-:&.`
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Optional. A human-readable name you can set to display in a user interface.
+   * Must be not longer than 200 characters and only contain UTF-8 letters
+   * or numbers, spaces or characters like `_-:&.`
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. The attributes of the process. Can be anything, for example,
+   * "author". Up to 100 attributes are allowed.
+   * 
+ * + * + * map<string, .google.protobuf.Value> attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getAttributesCount(); + /** + * + * + *
+   * Optional. The attributes of the process. Can be anything, for example,
+   * "author". Up to 100 attributes are allowed.
+   * 
+ * + * + * map<string, .google.protobuf.Value> attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsAttributes(java.lang.String key); + /** Use {@link #getAttributesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAttributes(); + /** + * + * + *
+   * Optional. The attributes of the process. Can be anything, for example,
+   * "author". Up to 100 attributes are allowed.
+   * 
+ * + * + * map<string, .google.protobuf.Value> attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getAttributesMap(); + /** + * + * + *
+   * Optional. The attributes of the process. Can be anything, for example,
+   * "author". Up to 100 attributes are allowed.
+   * 
+ * + * + * map<string, .google.protobuf.Value> attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + + /* nullable */ + com.google.protobuf.Value getAttributesOrDefault( + java.lang.String key, + /* nullable */ + com.google.protobuf.Value defaultValue); + /** + * + * + *
+   * Optional. The attributes of the process. Can be anything, for example,
+   * "author". Up to 100 attributes are allowed.
+   * 
+ * + * + * map<string, .google.protobuf.Value> attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.Value getAttributesOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. The origin of this process and its runs and lineage events.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Origin origin = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the origin field is set. + */ + boolean hasOrigin(); + /** + * + * + *
+   * Optional. The origin of this process and its runs and lineage events.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Origin origin = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The origin. + */ + com.google.cloud.datacatalog.lineage.v1.Origin getOrigin(); + /** + * + * + *
+   * Optional. The origin of this process and its runs and lineage events.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Origin origin = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.datacatalog.lineage.v1.OriginOrBuilder getOriginOrBuilder(); +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/Run.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/Run.java new file mode 100644 index 000000000000..8e40527fc885 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/Run.java @@ -0,0 +1,2111 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +/** + * + * + *
+ * A lineage run represents an execution of a process that creates
+ * lineage events.
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.Run} + */ +public final class Run extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.lineage.v1.Run) + RunOrBuilder { + private static final long serialVersionUID = 0L; + // Use Run.newBuilder() to construct. + private Run(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Run() { + name_ = ""; + displayName_ = ""; + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Run(); + } + + @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.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_Run_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetAttributes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_Run_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.Run.class, + com.google.cloud.datacatalog.lineage.v1.Run.Builder.class); + } + + /** + * + * + *
+   * The current state of the run.
+   * 
+ * + * Protobuf enum {@code google.cloud.datacatalog.lineage.v1.Run.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The state is unknown. The true state may be any of the below or a
+     * different state that is not supported here explicitly.
+     * 
+ * + * UNKNOWN = 0; + */ + UNKNOWN(0), + /** + * + * + *
+     * The run is still executing.
+     * 
+ * + * STARTED = 1; + */ + STARTED(1), + /** + * + * + *
+     * The run completed.
+     * 
+ * + * COMPLETED = 2; + */ + COMPLETED(2), + /** + * + * + *
+     * The run failed.
+     * 
+ * + * FAILED = 3; + */ + FAILED(3), + /** + * + * + *
+     * The run aborted.
+     * 
+ * + * ABORTED = 4; + */ + ABORTED(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The state is unknown. The true state may be any of the below or a
+     * different state that is not supported here explicitly.
+     * 
+ * + * UNKNOWN = 0; + */ + public static final int UNKNOWN_VALUE = 0; + /** + * + * + *
+     * The run is still executing.
+     * 
+ * + * STARTED = 1; + */ + public static final int STARTED_VALUE = 1; + /** + * + * + *
+     * The run completed.
+     * 
+ * + * COMPLETED = 2; + */ + public static final int COMPLETED_VALUE = 2; + /** + * + * + *
+     * The run failed.
+     * 
+ * + * FAILED = 3; + */ + public static final int FAILED_VALUE = 3; + /** + * + * + *
+     * The run aborted.
+     * 
+ * + * ABORTED = 4; + */ + public static final int ABORTED_VALUE = 4; + + 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 UNKNOWN; + case 1: + return STARTED; + case 2: + return COMPLETED; + case 3: + return FAILED; + case 4: + return ABORTED; + 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.datacatalog.lineage.v1.Run.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.datacatalog.lineage.v1.Run.State) + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Immutable. The resource name of the run. Format:
+   * `projects/{project}/locations/{location}/processes/{process}/runs/{run}`.
+   * Can be specified or auto-assigned.
+   * {run} must be not longer than 200 characters and only
+   * contain characters in a set: `a-zA-Z0-9_-:.`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + } + /** + * + * + *
+   * Immutable. The resource name of the run. Format:
+   * `projects/{project}/locations/{location}/processes/{process}/runs/{run}`.
+   * Can be specified or auto-assigned.
+   * {run} must be not longer than 200 characters and only
+   * contain characters in a set: `a-zA-Z0-9_-:.`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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 DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Optional. A human-readable name you can set to display in a user interface.
+   * Must be not longer than 1024 characters and only contain UTF-8 letters
+   * or numbers, spaces or characters like `_-:&.`
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A human-readable name you can set to display in a user interface.
+   * Must be not longer than 1024 characters and only contain UTF-8 letters
+   * or numbers, spaces or characters like `_-:&.`
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ATTRIBUTES_FIELD_NUMBER = 3; + + private static final class AttributesDefaultEntryHolder { + static final com.google.protobuf.MapEntry + defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_Run_AttributesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.protobuf.Value.getDefaultInstance()); + } + + private com.google.protobuf.MapField attributes_; + + private com.google.protobuf.MapField + internalGetAttributes() { + if (attributes_ == null) { + return com.google.protobuf.MapField.emptyMapField(AttributesDefaultEntryHolder.defaultEntry); + } + return attributes_; + } + + public int getAttributesCount() { + return internalGetAttributes().getMap().size(); + } + /** + * + * + *
+   * Optional. The attributes of the run. Can be anything, for example, a string
+   * with an SQL request. Up to 100 attributes are allowed.
+   * 
+ * + * + * map<string, .google.protobuf.Value> attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAttributes(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAttributes().getMap().containsKey(key); + } + /** Use {@link #getAttributesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAttributes() { + return getAttributesMap(); + } + /** + * + * + *
+   * Optional. The attributes of the run. Can be anything, for example, a string
+   * with an SQL request. Up to 100 attributes are allowed.
+   * 
+ * + * + * map<string, .google.protobuf.Value> attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAttributesMap() { + return internalGetAttributes().getMap(); + } + /** + * + * + *
+   * Optional. The attributes of the run. Can be anything, for example, a string
+   * with an SQL request. Up to 100 attributes are allowed.
+   * 
+ * + * + * map<string, .google.protobuf.Value> attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.Value getAttributesOrDefault( + java.lang.String key, com.google.protobuf.Value defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetAttributes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. The attributes of the run. Can be anything, for example, a string
+   * with an SQL request. Up to 100 attributes are allowed.
+   * 
+ * + * + * map<string, .google.protobuf.Value> attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.Value getAttributesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetAttributes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int START_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * Required. The timestamp of the start of the run.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
+   * Required. The timestamp of the start of the run.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * Required. The timestamp of the start of the run.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return getStartTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * Optional. The timestamp of the end of the run.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * Optional. The timestamp of the end of the run.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * Optional. The timestamp of the end of the run.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + public static final int STATE_FIELD_NUMBER = 6; + private int state_; + /** + * + * + *
+   * Required. The state of the run.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run.State state = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Required. The state of the run.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run.State state = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.Run.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.datacatalog.lineage.v1.Run.State result = + com.google.cloud.datacatalog.lineage.v1.Run.State.valueOf(state_); + return result == null ? com.google.cloud.datacatalog.lineage.v1.Run.State.UNRECOGNIZED : result; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetAttributes(), AttributesDefaultEntryHolder.defaultEntry, 3); + if (startTime_ != null) { + output.writeMessage(4, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(5, getEndTime()); + } + if (state_ != com.google.cloud.datacatalog.lineage.v1.Run.State.UNKNOWN.getNumber()) { + output.writeEnum(6, state_); + } + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + for (java.util.Map.Entry entry : + internalGetAttributes().getMap().entrySet()) { + com.google.protobuf.MapEntry attributes__ = + AttributesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, attributes__); + } + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getEndTime()); + } + if (state_ != com.google.cloud.datacatalog.lineage.v1.Run.State.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, state_); + } + 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.datacatalog.lineage.v1.Run)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.lineage.v1.Run other = + (com.google.cloud.datacatalog.lineage.v1.Run) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!internalGetAttributes().equals(other.internalGetAttributes())) return false; + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (state_ != other.state_) 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 = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (!internalGetAttributes().getMap().isEmpty()) { + hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + internalGetAttributes().hashCode(); + } + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.lineage.v1.Run parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.Run 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.datacatalog.lineage.v1.Run parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.Run 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.datacatalog.lineage.v1.Run parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.Run parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.lineage.v1.Run parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.Run 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.datacatalog.lineage.v1.Run parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.Run 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.datacatalog.lineage.v1.Run parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.Run 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.datacatalog.lineage.v1.Run 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; + } + /** + * + * + *
+   * A lineage run represents an execution of a process that creates
+   * lineage events.
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.Run} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.lineage.v1.Run) + com.google.cloud.datacatalog.lineage.v1.RunOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_Run_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetAttributes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 3: + return internalGetMutableAttributes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_Run_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.Run.class, + com.google.cloud.datacatalog.lineage.v1.Run.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.lineage.v1.Run.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + internalGetMutableAttributes().clear(); + if (startTimeBuilder_ == null) { + startTime_ = null; + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + state_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_Run_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.Run getDefaultInstanceForType() { + return com.google.cloud.datacatalog.lineage.v1.Run.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.Run build() { + com.google.cloud.datacatalog.lineage.v1.Run result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.Run buildPartial() { + com.google.cloud.datacatalog.lineage.v1.Run result = + new com.google.cloud.datacatalog.lineage.v1.Run(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.displayName_ = displayName_; + result.attributes_ = internalGetAttributes(); + result.attributes_.makeImmutable(); + if (startTimeBuilder_ == null) { + result.startTime_ = startTime_; + } else { + result.startTime_ = startTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + result.state_ = state_; + 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.datacatalog.lineage.v1.Run) { + return mergeFrom((com.google.cloud.datacatalog.lineage.v1.Run) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.lineage.v1.Run other) { + if (other == com.google.cloud.datacatalog.lineage.v1.Run.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + internalGetMutableAttributes().mergeFrom(other.internalGetAttributes()); + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + 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: + { + displayName_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + com.google.protobuf.MapEntry + attributes__ = + input.readMessage( + AttributesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAttributes() + .getMutableMap() + .put(attributes__.getKey(), attributes__.getValue()); + break; + } // case 26 + case 34: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 42: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 48: + { + state_ = input.readEnum(); + + break; + } // case 48 + 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.lang.Object name_ = ""; + /** + * + * + *
+     * Immutable. The resource name of the run. Format:
+     * `projects/{project}/locations/{location}/processes/{process}/runs/{run}`.
+     * Can be specified or auto-assigned.
+     * {run} must be not longer than 200 characters and only
+     * contain characters in a set: `a-zA-Z0-9_-:.`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + } + /** + * + * + *
+     * Immutable. The resource name of the run. Format:
+     * `projects/{project}/locations/{location}/processes/{process}/runs/{run}`.
+     * Can be specified or auto-assigned.
+     * {run} must be not longer than 200 characters and only
+     * contain characters in a set: `a-zA-Z0-9_-:.`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + } + /** + * + * + *
+     * Immutable. The resource name of the run. Format:
+     * `projects/{project}/locations/{location}/processes/{process}/runs/{run}`.
+     * Can be specified or auto-assigned.
+     * {run} must be not longer than 200 characters and only
+     * contain characters in a set: `a-zA-Z0-9_-:.`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + /** + * + * + *
+     * Immutable. The resource name of the run. Format:
+     * `projects/{project}/locations/{location}/processes/{process}/runs/{run}`.
+     * Can be specified or auto-assigned.
+     * {run} must be not longer than 200 characters and only
+     * contain characters in a set: `a-zA-Z0-9_-:.`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The resource name of the run. Format:
+     * `projects/{project}/locations/{location}/processes/{process}/runs/{run}`.
+     * Can be specified or auto-assigned.
+     * {run} must be not longer than 200 characters and only
+     * contain characters in a set: `a-zA-Z0-9_-:.`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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 java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Optional. A human-readable name you can set to display in a user interface.
+     * Must be not longer than 1024 characters and only contain UTF-8 letters
+     * or numbers, spaces or characters like `_-:&.`
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A human-readable name you can set to display in a user interface.
+     * Must be not longer than 1024 characters and only contain UTF-8 letters
+     * or numbers, spaces or characters like `_-:&.`
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A human-readable name you can set to display in a user interface.
+     * Must be not longer than 1024 characters and only contain UTF-8 letters
+     * or numbers, spaces or characters like `_-:&.`
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A human-readable name you can set to display in a user interface.
+     * Must be not longer than 1024 characters and only contain UTF-8 letters
+     * or numbers, spaces or characters like `_-:&.`
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A human-readable name you can set to display in a user interface.
+     * Must be not longer than 1024 characters and only contain UTF-8 letters
+     * or numbers, spaces or characters like `_-:&.`
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField attributes_; + + private com.google.protobuf.MapField + internalGetAttributes() { + if (attributes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AttributesDefaultEntryHolder.defaultEntry); + } + return attributes_; + } + + private com.google.protobuf.MapField + internalGetMutableAttributes() { + onChanged(); + ; + if (attributes_ == null) { + attributes_ = + com.google.protobuf.MapField.newMapField(AttributesDefaultEntryHolder.defaultEntry); + } + if (!attributes_.isMutable()) { + attributes_ = attributes_.copy(); + } + return attributes_; + } + + public int getAttributesCount() { + return internalGetAttributes().getMap().size(); + } + /** + * + * + *
+     * Optional. The attributes of the run. Can be anything, for example, a string
+     * with an SQL request. Up to 100 attributes are allowed.
+     * 
+ * + * + * map<string, .google.protobuf.Value> attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAttributes(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAttributes().getMap().containsKey(key); + } + /** Use {@link #getAttributesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAttributes() { + return getAttributesMap(); + } + /** + * + * + *
+     * Optional. The attributes of the run. Can be anything, for example, a string
+     * with an SQL request. Up to 100 attributes are allowed.
+     * 
+ * + * + * map<string, .google.protobuf.Value> attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAttributesMap() { + return internalGetAttributes().getMap(); + } + /** + * + * + *
+     * Optional. The attributes of the run. Can be anything, for example, a string
+     * with an SQL request. Up to 100 attributes are allowed.
+     * 
+ * + * + * map<string, .google.protobuf.Value> attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.Value getAttributesOrDefault( + java.lang.String key, com.google.protobuf.Value defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetAttributes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. The attributes of the run. Can be anything, for example, a string
+     * with an SQL request. Up to 100 attributes are allowed.
+     * 
+ * + * + * map<string, .google.protobuf.Value> attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.Value getAttributesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetAttributes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAttributes() { + internalGetMutableAttributes().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. The attributes of the run. Can be anything, for example, a string
+     * with an SQL request. Up to 100 attributes are allowed.
+     * 
+ * + * + * map<string, .google.protobuf.Value> attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeAttributes(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableAttributes().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAttributes() { + return internalGetMutableAttributes().getMutableMap(); + } + /** + * + * + *
+     * Optional. The attributes of the run. Can be anything, for example, a string
+     * with an SQL request. Up to 100 attributes are allowed.
+     * 
+ * + * + * map<string, .google.protobuf.Value> attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAttributes(java.lang.String key, com.google.protobuf.Value value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + + internalGetMutableAttributes().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Optional. The attributes of the run. Can be anything, for example, a string
+     * with an SQL request. Up to 100 attributes are allowed.
+     * 
+ * + * + * map<string, .google.protobuf.Value> attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllAttributes( + java.util.Map values) { + internalGetMutableAttributes().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * Required. The timestamp of the start of the run.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return startTimeBuilder_ != null || startTime_ != null; + } + /** + * + * + *
+     * Required. The timestamp of the start of the run.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The timestamp of the start of the run.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + onChanged(); + } else { + startTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The timestamp of the start of the run.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + onChanged(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The timestamp of the start of the run.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (startTime_ != null) { + startTime_ = + com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); + } else { + startTime_ = value; + } + onChanged(); + } else { + startTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The timestamp of the start of the run.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearStartTime() { + if (startTimeBuilder_ == null) { + startTime_ = null; + onChanged(); + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The timestamp of the start of the run.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The timestamp of the start of the run.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * Required. The timestamp of the start of the run.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + 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_; + /** + * + * + *
+     * Optional. The timestamp of the end of the run.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * Optional. The timestamp of the end of the run.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @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(); + } + } + /** + * + * + *
+     * Optional. The timestamp of the end of the run.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + 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; + } + /** + * + * + *
+     * Optional. The timestamp of the end of the run.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. The timestamp of the end of the run.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + 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; + } + /** + * + * + *
+     * Optional. The timestamp of the end of the run.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. The timestamp of the end of the run.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The timestamp of the end of the run.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * Optional. The timestamp of the end of the run.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + 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 int state_ = 0; + /** + * + * + *
+     * Required. The state of the run.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run.State state = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Required. The state of the run.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run.State state = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @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; + } + /** + * + * + *
+     * Required. The state of the run.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run.State state = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.Run.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.datacatalog.lineage.v1.Run.State result = + com.google.cloud.datacatalog.lineage.v1.Run.State.valueOf(state_); + return result == null + ? com.google.cloud.datacatalog.lineage.v1.Run.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. The state of the run.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run.State state = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.datacatalog.lineage.v1.Run.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The state of the run.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run.State state = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + 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.datacatalog.lineage.v1.Run) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.lineage.v1.Run) + private static final com.google.cloud.datacatalog.lineage.v1.Run DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.lineage.v1.Run(); + } + + public static com.google.cloud.datacatalog.lineage.v1.Run getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Run 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.datacatalog.lineage.v1.Run getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/RunName.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/RunName.java new file mode 100644 index 000000000000..79750f600df9 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/RunName.java @@ -0,0 +1,257 @@ +/* + * 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.datacatalog.lineage.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 RunName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_PROCESS_RUN = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/processes/{process}/runs/{run}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String process; + private final String run; + + @Deprecated + protected RunName() { + project = null; + location = null; + process = null; + run = null; + } + + private RunName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + process = Preconditions.checkNotNull(builder.getProcess()); + run = Preconditions.checkNotNull(builder.getRun()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getProcess() { + return process; + } + + public String getRun() { + return run; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static RunName of(String project, String location, String process, String run) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setProcess(process) + .setRun(run) + .build(); + } + + public static String format(String project, String location, String process, String run) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setProcess(process) + .setRun(run) + .build() + .toString(); + } + + public static RunName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_PROCESS_RUN.validatedMatch( + formattedString, "RunName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("process"), + matchMap.get("run")); + } + + 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 (RunName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_PROCESS_RUN.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 (process != null) { + fieldMapBuilder.put("process", process); + } + if (run != null) { + fieldMapBuilder.put("run", run); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_PROCESS_RUN.instantiate( + "project", project, "location", location, "process", process, "run", run); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + RunName that = ((RunName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.process, that.process) + && Objects.equals(this.run, that.run); + } + 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(process); + h *= 1000003; + h ^= Objects.hashCode(run); + return h; + } + + /** Builder for projects/{project}/locations/{location}/processes/{process}/runs/{run}. */ + public static class Builder { + private String project; + private String location; + private String process; + private String run; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getProcess() { + return process; + } + + public String getRun() { + return run; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setProcess(String process) { + this.process = process; + return this; + } + + public Builder setRun(String run) { + this.run = run; + return this; + } + + private Builder(RunName runName) { + this.project = runName.project; + this.location = runName.location; + this.process = runName.process; + this.run = runName.run; + } + + public RunName build() { + return new RunName(this); + } + } +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/RunOrBuilder.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/RunOrBuilder.java new file mode 100644 index 000000000000..d1c8fa6a8a62 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/RunOrBuilder.java @@ -0,0 +1,263 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +public interface RunOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.lineage.v1.Run) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Immutable. The resource name of the run. Format:
+   * `projects/{project}/locations/{location}/processes/{process}/runs/{run}`.
+   * Can be specified or auto-assigned.
+   * {run} must be not longer than 200 characters and only
+   * contain characters in a set: `a-zA-Z0-9_-:.`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Immutable. The resource name of the run. Format:
+   * `projects/{project}/locations/{location}/processes/{process}/runs/{run}`.
+   * Can be specified or auto-assigned.
+   * {run} must be not longer than 200 characters and only
+   * contain characters in a set: `a-zA-Z0-9_-:.`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. A human-readable name you can set to display in a user interface.
+   * Must be not longer than 1024 characters and only contain UTF-8 letters
+   * or numbers, spaces or characters like `_-:&.`
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Optional. A human-readable name you can set to display in a user interface.
+   * Must be not longer than 1024 characters and only contain UTF-8 letters
+   * or numbers, spaces or characters like `_-:&.`
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. The attributes of the run. Can be anything, for example, a string
+   * with an SQL request. Up to 100 attributes are allowed.
+   * 
+ * + * + * map<string, .google.protobuf.Value> attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getAttributesCount(); + /** + * + * + *
+   * Optional. The attributes of the run. Can be anything, for example, a string
+   * with an SQL request. Up to 100 attributes are allowed.
+   * 
+ * + * + * map<string, .google.protobuf.Value> attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsAttributes(java.lang.String key); + /** Use {@link #getAttributesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAttributes(); + /** + * + * + *
+   * Optional. The attributes of the run. Can be anything, for example, a string
+   * with an SQL request. Up to 100 attributes are allowed.
+   * 
+ * + * + * map<string, .google.protobuf.Value> attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getAttributesMap(); + /** + * + * + *
+   * Optional. The attributes of the run. Can be anything, for example, a string
+   * with an SQL request. Up to 100 attributes are allowed.
+   * 
+ * + * + * map<string, .google.protobuf.Value> attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + + /* nullable */ + com.google.protobuf.Value getAttributesOrDefault( + java.lang.String key, + /* nullable */ + com.google.protobuf.Value defaultValue); + /** + * + * + *
+   * Optional. The attributes of the run. Can be anything, for example, a string
+   * with an SQL request. Up to 100 attributes are allowed.
+   * 
+ * + * + * map<string, .google.protobuf.Value> attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.Value getAttributesOrThrow(java.lang.String key); + + /** + * + * + *
+   * Required. The timestamp of the start of the run.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * Required. The timestamp of the start of the run.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * Required. The timestamp of the start of the run.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * Optional. The timestamp of the end of the run.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Optional. The timestamp of the end of the run.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Optional. The timestamp of the end of the run.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Required. The state of the run.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run.State state = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Required. The state of the run.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run.State state = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The state. + */ + com.google.cloud.datacatalog.lineage.v1.Run.State getState(); +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/SearchLinksRequest.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/SearchLinksRequest.java new file mode 100644 index 000000000000..bfc91a427353 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/SearchLinksRequest.java @@ -0,0 +1,1688 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +/** + * + * + *
+ * Request message for
+ * [SearchLinks][google.cloud.datacatalog.lineage.v1.Lineage.SearchLinks].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.SearchLinksRequest} + */ +public final class SearchLinksRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.lineage.v1.SearchLinksRequest) + SearchLinksRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchLinksRequest.newBuilder() to construct. + private SearchLinksRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchLinksRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchLinksRequest(); + } + + @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.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_SearchLinksRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_SearchLinksRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest.class, + com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest.Builder.class); + } + + private int criteriaCase_ = 0; + private java.lang.Object criteria_; + + public enum CriteriaCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + SOURCE(4), + TARGET(5), + CRITERIA_NOT_SET(0); + private final int value; + + private CriteriaCase(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 CriteriaCase valueOf(int value) { + return forNumber(value); + } + + public static CriteriaCase forNumber(int value) { + switch (value) { + case 4: + return SOURCE; + case 5: + return TARGET; + case 0: + return CRITERIA_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public CriteriaCase getCriteriaCase() { + return CriteriaCase.forNumber(criteriaCase_); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The project and location you want search in.
+   * 
+ * + * + * 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 project and location you want search in.
+   * 
+ * + * + * 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 SOURCE_FIELD_NUMBER = 4; + /** + * + * + *
+   * Optional. Send asset information in the **source** field to retrieve all
+   * links that lead from the specified asset to downstream assets.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the source field is set. + */ + @java.lang.Override + public boolean hasSource() { + return criteriaCase_ == 4; + } + /** + * + * + *
+   * Optional. Send asset information in the **source** field to retrieve all
+   * links that lead from the specified asset to downstream assets.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The source. + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.EntityReference getSource() { + if (criteriaCase_ == 4) { + return (com.google.cloud.datacatalog.lineage.v1.EntityReference) criteria_; + } + return com.google.cloud.datacatalog.lineage.v1.EntityReference.getDefaultInstance(); + } + /** + * + * + *
+   * Optional. Send asset information in the **source** field to retrieve all
+   * links that lead from the specified asset to downstream assets.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder getSourceOrBuilder() { + if (criteriaCase_ == 4) { + return (com.google.cloud.datacatalog.lineage.v1.EntityReference) criteria_; + } + return com.google.cloud.datacatalog.lineage.v1.EntityReference.getDefaultInstance(); + } + + public static final int TARGET_FIELD_NUMBER = 5; + /** + * + * + *
+   * Optional. Send asset information in the **target** field to retrieve all
+   * links that lead from upstream assets to the specified asset.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the target field is set. + */ + @java.lang.Override + public boolean hasTarget() { + return criteriaCase_ == 5; + } + /** + * + * + *
+   * Optional. Send asset information in the **target** field to retrieve all
+   * links that lead from upstream assets to the specified asset.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The target. + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.EntityReference getTarget() { + if (criteriaCase_ == 5) { + return (com.google.cloud.datacatalog.lineage.v1.EntityReference) criteria_; + } + return com.google.cloud.datacatalog.lineage.v1.EntityReference.getDefaultInstance(); + } + /** + * + * + *
+   * Optional. Send asset information in the **target** field to retrieve all
+   * links that lead from upstream assets to the specified asset.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder getTargetOrBuilder() { + if (criteriaCase_ == 5) { + return (com.google.cloud.datacatalog.lineage.v1.EntityReference) criteria_; + } + return com.google.cloud.datacatalog.lineage.v1.EntityReference.getDefaultInstance(); + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * Optional. The maximum number of links to return in a single page of the
+   * response. A page may contain fewer links than this value. If unspecified,
+   * at most 10 links are returned.
+   * Maximum value is 100; values greater than 100 are reduced to 100.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Optional. The page token received from a previous `SearchLinksRequest`
+   * call. Use it to get the next page.
+   * When requesting subsequent pages of a response, remember that
+   * all parameters must match the values you provided
+   * in the original request.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+   * Optional. The page token received from a previous `SearchLinksRequest`
+   * call. Use it to get the next page.
+   * When requesting subsequent pages of a response, remember that
+   * all parameters must match the values you provided
+   * in the original request.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (criteriaCase_ == 4) { + output.writeMessage(4, (com.google.cloud.datacatalog.lineage.v1.EntityReference) criteria_); + } + if (criteriaCase_ == 5) { + output.writeMessage(5, (com.google.cloud.datacatalog.lineage.v1.EntityReference) criteria_); + } + 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 (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (criteriaCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.datacatalog.lineage.v1.EntityReference) criteria_); + } + if (criteriaCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.datacatalog.lineage.v1.EntityReference) criteria_); + } + 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.datacatalog.lineage.v1.SearchLinksRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest other = + (com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getCriteriaCase().equals(other.getCriteriaCase())) return false; + switch (criteriaCase_) { + case 4: + if (!getSource().equals(other.getSource())) return false; + break; + case 5: + if (!getTarget().equals(other.getTarget())) 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(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + switch (criteriaCase_) { + case 4: + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + break; + case 5: + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest 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.datacatalog.lineage.v1.SearchLinksRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest 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.datacatalog.lineage.v1.SearchLinksRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest 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.datacatalog.lineage.v1.SearchLinksRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest 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.datacatalog.lineage.v1.SearchLinksRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest 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.datacatalog.lineage.v1.SearchLinksRequest 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
+   * [SearchLinks][google.cloud.datacatalog.lineage.v1.Lineage.SearchLinks].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.SearchLinksRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.lineage.v1.SearchLinksRequest) + com.google.cloud.datacatalog.lineage.v1.SearchLinksRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_SearchLinksRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_SearchLinksRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest.class, + com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (sourceBuilder_ != null) { + sourceBuilder_.clear(); + } + if (targetBuilder_ != null) { + targetBuilder_.clear(); + } + pageSize_ = 0; + + pageToken_ = ""; + + criteriaCase_ = 0; + criteria_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_SearchLinksRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest build() { + com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest buildPartial() { + com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest result = + new com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest(this); + result.parent_ = parent_; + if (criteriaCase_ == 4) { + if (sourceBuilder_ == null) { + result.criteria_ = criteria_; + } else { + result.criteria_ = sourceBuilder_.build(); + } + } + if (criteriaCase_ == 5) { + if (targetBuilder_ == null) { + result.criteria_ = criteria_; + } else { + result.criteria_ = targetBuilder_.build(); + } + } + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.criteriaCase_ = criteriaCase_; + 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.datacatalog.lineage.v1.SearchLinksRequest) { + return mergeFrom((com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest other) { + if (other == com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + switch (other.getCriteriaCase()) { + case SOURCE: + { + mergeSource(other.getSource()); + break; + } + case TARGET: + { + mergeTarget(other.getTarget()); + break; + } + case CRITERIA_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: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + input.readMessage(getSourceFieldBuilder().getBuilder(), extensionRegistry); + criteriaCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage(getTargetFieldBuilder().getBuilder(), extensionRegistry); + criteriaCase_ = 5; + break; + } // case 42 + 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 criteriaCase_ = 0; + private java.lang.Object criteria_; + + public CriteriaCase getCriteriaCase() { + return CriteriaCase.forNumber(criteriaCase_); + } + + public Builder clearCriteria() { + criteriaCase_ = 0; + criteria_ = null; + onChanged(); + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The project and location you want search in.
+     * 
+ * + * + * 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 project and location you want search in.
+     * 
+ * + * + * 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 project and location you want search in.
+     * 
+ * + * + * 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 project and location you want search in.
+     * 
+ * + * + * 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 project and location you want search in.
+     * 
+ * + * + * 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.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.EntityReference, + com.google.cloud.datacatalog.lineage.v1.EntityReference.Builder, + com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder> + sourceBuilder_; + /** + * + * + *
+     * Optional. Send asset information in the **source** field to retrieve all
+     * links that lead from the specified asset to downstream assets.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the source field is set. + */ + @java.lang.Override + public boolean hasSource() { + return criteriaCase_ == 4; + } + /** + * + * + *
+     * Optional. Send asset information in the **source** field to retrieve all
+     * links that lead from the specified asset to downstream assets.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The source. + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.EntityReference getSource() { + if (sourceBuilder_ == null) { + if (criteriaCase_ == 4) { + return (com.google.cloud.datacatalog.lineage.v1.EntityReference) criteria_; + } + return com.google.cloud.datacatalog.lineage.v1.EntityReference.getDefaultInstance(); + } else { + if (criteriaCase_ == 4) { + return sourceBuilder_.getMessage(); + } + return com.google.cloud.datacatalog.lineage.v1.EntityReference.getDefaultInstance(); + } + } + /** + * + * + *
+     * Optional. Send asset information in the **source** field to retrieve all
+     * links that lead from the specified asset to downstream assets.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSource(com.google.cloud.datacatalog.lineage.v1.EntityReference value) { + if (sourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + criteria_ = value; + onChanged(); + } else { + sourceBuilder_.setMessage(value); + } + criteriaCase_ = 4; + return this; + } + /** + * + * + *
+     * Optional. Send asset information in the **source** field to retrieve all
+     * links that lead from the specified asset to downstream assets.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSource( + com.google.cloud.datacatalog.lineage.v1.EntityReference.Builder builderForValue) { + if (sourceBuilder_ == null) { + criteria_ = builderForValue.build(); + onChanged(); + } else { + sourceBuilder_.setMessage(builderForValue.build()); + } + criteriaCase_ = 4; + return this; + } + /** + * + * + *
+     * Optional. Send asset information in the **source** field to retrieve all
+     * links that lead from the specified asset to downstream assets.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeSource(com.google.cloud.datacatalog.lineage.v1.EntityReference value) { + if (sourceBuilder_ == null) { + if (criteriaCase_ == 4 + && criteria_ + != com.google.cloud.datacatalog.lineage.v1.EntityReference.getDefaultInstance()) { + criteria_ = + com.google.cloud.datacatalog.lineage.v1.EntityReference.newBuilder( + (com.google.cloud.datacatalog.lineage.v1.EntityReference) criteria_) + .mergeFrom(value) + .buildPartial(); + } else { + criteria_ = value; + } + onChanged(); + } else { + if (criteriaCase_ == 4) { + sourceBuilder_.mergeFrom(value); + } else { + sourceBuilder_.setMessage(value); + } + } + criteriaCase_ = 4; + return this; + } + /** + * + * + *
+     * Optional. Send asset information in the **source** field to retrieve all
+     * links that lead from the specified asset to downstream assets.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSource() { + if (sourceBuilder_ == null) { + if (criteriaCase_ == 4) { + criteriaCase_ = 0; + criteria_ = null; + onChanged(); + } + } else { + if (criteriaCase_ == 4) { + criteriaCase_ = 0; + criteria_ = null; + } + sourceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. Send asset information in the **source** field to retrieve all
+     * links that lead from the specified asset to downstream assets.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.datacatalog.lineage.v1.EntityReference.Builder getSourceBuilder() { + return getSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Send asset information in the **source** field to retrieve all
+     * links that lead from the specified asset to downstream assets.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder getSourceOrBuilder() { + if ((criteriaCase_ == 4) && (sourceBuilder_ != null)) { + return sourceBuilder_.getMessageOrBuilder(); + } else { + if (criteriaCase_ == 4) { + return (com.google.cloud.datacatalog.lineage.v1.EntityReference) criteria_; + } + return com.google.cloud.datacatalog.lineage.v1.EntityReference.getDefaultInstance(); + } + } + /** + * + * + *
+     * Optional. Send asset information in the **source** field to retrieve all
+     * links that lead from the specified asset to downstream assets.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.EntityReference, + com.google.cloud.datacatalog.lineage.v1.EntityReference.Builder, + com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder> + getSourceFieldBuilder() { + if (sourceBuilder_ == null) { + if (!(criteriaCase_ == 4)) { + criteria_ = com.google.cloud.datacatalog.lineage.v1.EntityReference.getDefaultInstance(); + } + sourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.EntityReference, + com.google.cloud.datacatalog.lineage.v1.EntityReference.Builder, + com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder>( + (com.google.cloud.datacatalog.lineage.v1.EntityReference) criteria_, + getParentForChildren(), + isClean()); + criteria_ = null; + } + criteriaCase_ = 4; + onChanged(); + ; + return sourceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.EntityReference, + com.google.cloud.datacatalog.lineage.v1.EntityReference.Builder, + com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder> + targetBuilder_; + /** + * + * + *
+     * Optional. Send asset information in the **target** field to retrieve all
+     * links that lead from upstream assets to the specified asset.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the target field is set. + */ + @java.lang.Override + public boolean hasTarget() { + return criteriaCase_ == 5; + } + /** + * + * + *
+     * Optional. Send asset information in the **target** field to retrieve all
+     * links that lead from upstream assets to the specified asset.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The target. + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.EntityReference getTarget() { + if (targetBuilder_ == null) { + if (criteriaCase_ == 5) { + return (com.google.cloud.datacatalog.lineage.v1.EntityReference) criteria_; + } + return com.google.cloud.datacatalog.lineage.v1.EntityReference.getDefaultInstance(); + } else { + if (criteriaCase_ == 5) { + return targetBuilder_.getMessage(); + } + return com.google.cloud.datacatalog.lineage.v1.EntityReference.getDefaultInstance(); + } + } + /** + * + * + *
+     * Optional. Send asset information in the **target** field to retrieve all
+     * links that lead from upstream assets to the specified asset.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setTarget(com.google.cloud.datacatalog.lineage.v1.EntityReference value) { + if (targetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + criteria_ = value; + onChanged(); + } else { + targetBuilder_.setMessage(value); + } + criteriaCase_ = 5; + return this; + } + /** + * + * + *
+     * Optional. Send asset information in the **target** field to retrieve all
+     * links that lead from upstream assets to the specified asset.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setTarget( + com.google.cloud.datacatalog.lineage.v1.EntityReference.Builder builderForValue) { + if (targetBuilder_ == null) { + criteria_ = builderForValue.build(); + onChanged(); + } else { + targetBuilder_.setMessage(builderForValue.build()); + } + criteriaCase_ = 5; + return this; + } + /** + * + * + *
+     * Optional. Send asset information in the **target** field to retrieve all
+     * links that lead from upstream assets to the specified asset.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeTarget(com.google.cloud.datacatalog.lineage.v1.EntityReference value) { + if (targetBuilder_ == null) { + if (criteriaCase_ == 5 + && criteria_ + != com.google.cloud.datacatalog.lineage.v1.EntityReference.getDefaultInstance()) { + criteria_ = + com.google.cloud.datacatalog.lineage.v1.EntityReference.newBuilder( + (com.google.cloud.datacatalog.lineage.v1.EntityReference) criteria_) + .mergeFrom(value) + .buildPartial(); + } else { + criteria_ = value; + } + onChanged(); + } else { + if (criteriaCase_ == 5) { + targetBuilder_.mergeFrom(value); + } else { + targetBuilder_.setMessage(value); + } + } + criteriaCase_ = 5; + return this; + } + /** + * + * + *
+     * Optional. Send asset information in the **target** field to retrieve all
+     * links that lead from upstream assets to the specified asset.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearTarget() { + if (targetBuilder_ == null) { + if (criteriaCase_ == 5) { + criteriaCase_ = 0; + criteria_ = null; + onChanged(); + } + } else { + if (criteriaCase_ == 5) { + criteriaCase_ = 0; + criteria_ = null; + } + targetBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. Send asset information in the **target** field to retrieve all
+     * links that lead from upstream assets to the specified asset.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.datacatalog.lineage.v1.EntityReference.Builder getTargetBuilder() { + return getTargetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Send asset information in the **target** field to retrieve all
+     * links that lead from upstream assets to the specified asset.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder getTargetOrBuilder() { + if ((criteriaCase_ == 5) && (targetBuilder_ != null)) { + return targetBuilder_.getMessageOrBuilder(); + } else { + if (criteriaCase_ == 5) { + return (com.google.cloud.datacatalog.lineage.v1.EntityReference) criteria_; + } + return com.google.cloud.datacatalog.lineage.v1.EntityReference.getDefaultInstance(); + } + } + /** + * + * + *
+     * Optional. Send asset information in the **target** field to retrieve all
+     * links that lead from upstream assets to the specified asset.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.EntityReference, + com.google.cloud.datacatalog.lineage.v1.EntityReference.Builder, + com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder> + getTargetFieldBuilder() { + if (targetBuilder_ == null) { + if (!(criteriaCase_ == 5)) { + criteria_ = com.google.cloud.datacatalog.lineage.v1.EntityReference.getDefaultInstance(); + } + targetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.EntityReference, + com.google.cloud.datacatalog.lineage.v1.EntityReference.Builder, + com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder>( + (com.google.cloud.datacatalog.lineage.v1.EntityReference) criteria_, + getParentForChildren(), + isClean()); + criteria_ = null; + } + criteriaCase_ = 5; + onChanged(); + ; + return targetBuilder_; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. The maximum number of links to return in a single page of the
+     * response. A page may contain fewer links than this value. If unspecified,
+     * at most 10 links are returned.
+     * Maximum value is 100; values greater than 100 are reduced to 100.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. The maximum number of links to return in a single page of the
+     * response. A page may contain fewer links than this value. If unspecified,
+     * at most 10 links are returned.
+     * Maximum value is 100; values greater than 100 are reduced to 100.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The maximum number of links to return in a single page of the
+     * response. A page may contain fewer links than this value. If unspecified,
+     * at most 10 links are returned.
+     * Maximum value is 100; values greater than 100 are reduced to 100.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. The page token received from a previous `SearchLinksRequest`
+     * call. Use it to get the next page.
+     * When requesting subsequent pages of a response, remember that
+     * all parameters must match the values you provided
+     * in the original request.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+     * Optional. The page token received from a previous `SearchLinksRequest`
+     * call. Use it to get the next page.
+     * When requesting subsequent pages of a response, remember that
+     * all parameters must match the values you provided
+     * in the original request.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+     * Optional. The page token received from a previous `SearchLinksRequest`
+     * call. Use it to get the next page.
+     * When requesting subsequent pages of a response, remember that
+     * all parameters must match the values you provided
+     * in the original request.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + /** + * + * + *
+     * Optional. The page token received from a previous `SearchLinksRequest`
+     * call. Use it to get the next page.
+     * When requesting subsequent pages of a response, remember that
+     * all parameters must match the values you provided
+     * in the original request.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The page token received from a previous `SearchLinksRequest`
+     * call. Use it to get the next page.
+     * When requesting subsequent pages of a response, remember that
+     * all parameters must match the values you provided
+     * in the original request.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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.datacatalog.lineage.v1.SearchLinksRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.lineage.v1.SearchLinksRequest) + private static final com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest(); + } + + public static com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchLinksRequest 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.datacatalog.lineage.v1.SearchLinksRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/SearchLinksRequestOrBuilder.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/SearchLinksRequestOrBuilder.java new file mode 100644 index 000000000000..3ead16543812 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/SearchLinksRequestOrBuilder.java @@ -0,0 +1,193 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +public interface SearchLinksRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.lineage.v1.SearchLinksRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project and location you want search in.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The project and location you want search in.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Send asset information in the **source** field to retrieve all
+   * links that lead from the specified asset to downstream assets.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the source field is set. + */ + boolean hasSource(); + /** + * + * + *
+   * Optional. Send asset information in the **source** field to retrieve all
+   * links that lead from the specified asset to downstream assets.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The source. + */ + com.google.cloud.datacatalog.lineage.v1.EntityReference getSource(); + /** + * + * + *
+   * Optional. Send asset information in the **source** field to retrieve all
+   * links that lead from the specified asset to downstream assets.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference source = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder getSourceOrBuilder(); + + /** + * + * + *
+   * Optional. Send asset information in the **target** field to retrieve all
+   * links that lead from upstream assets to the specified asset.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the target field is set. + */ + boolean hasTarget(); + /** + * + * + *
+   * Optional. Send asset information in the **target** field to retrieve all
+   * links that lead from upstream assets to the specified asset.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The target. + */ + com.google.cloud.datacatalog.lineage.v1.EntityReference getTarget(); + /** + * + * + *
+   * Optional. Send asset information in the **target** field to retrieve all
+   * links that lead from upstream assets to the specified asset.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.EntityReference target = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.datacatalog.lineage.v1.EntityReferenceOrBuilder getTargetOrBuilder(); + + /** + * + * + *
+   * Optional. The maximum number of links to return in a single page of the
+   * response. A page may contain fewer links than this value. If unspecified,
+   * at most 10 links are returned.
+   * Maximum value is 100; values greater than 100 are reduced to 100.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. The page token received from a previous `SearchLinksRequest`
+   * call. Use it to get the next page.
+   * When requesting subsequent pages of a response, remember that
+   * all parameters must match the values you provided
+   * in the original request.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. The page token received from a previous `SearchLinksRequest`
+   * call. Use it to get the next page.
+   * When requesting subsequent pages of a response, remember that
+   * all parameters must match the values you provided
+   * in the original request.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + public com.google.cloud.datacatalog.lineage.v1.SearchLinksRequest.CriteriaCase getCriteriaCase(); +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/SearchLinksResponse.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/SearchLinksResponse.java new file mode 100644 index 000000000000..b0f16684b727 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/SearchLinksResponse.java @@ -0,0 +1,1137 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +/** + * + * + *
+ * Response message for
+ * [SearchLinks][google.cloud.datacatalog.lineage.v1.Lineage.SearchLinks].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.SearchLinksResponse} + */ +public final class SearchLinksResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.lineage.v1.SearchLinksResponse) + SearchLinksResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchLinksResponse.newBuilder() to construct. + private SearchLinksResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchLinksResponse() { + links_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchLinksResponse(); + } + + @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.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_SearchLinksResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_SearchLinksResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse.class, + com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse.Builder.class); + } + + public static final int LINKS_FIELD_NUMBER = 1; + private java.util.List links_; + /** + * + * + *
+   * The list of links for a given asset. Can be empty if the asset has no
+   * relations of requested type (source or target).
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Link links = 1; + */ + @java.lang.Override + public java.util.List getLinksList() { + return links_; + } + /** + * + * + *
+   * The list of links for a given asset. Can be empty if the asset has no
+   * relations of requested type (source or target).
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Link links = 1; + */ + @java.lang.Override + public java.util.List + getLinksOrBuilderList() { + return links_; + } + /** + * + * + *
+   * The list of links for a given asset. Can be empty if the asset has no
+   * relations of requested type (source or target).
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Link links = 1; + */ + @java.lang.Override + public int getLinksCount() { + return links_.size(); + } + /** + * + * + *
+   * The list of links for a given asset. Can be empty if the asset has no
+   * relations of requested type (source or target).
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Link links = 1; + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.Link getLinks(int index) { + return links_.get(index); + } + /** + * + * + *
+   * The list of links for a given asset. Can be empty if the asset has no
+   * relations of requested type (source or target).
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Link links = 1; + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.LinkOrBuilder getLinksOrBuilder(int index) { + return links_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * The token to specify as `page_token` in the subsequent call to get the next
+   * page. Omitted if there are no more pages in the response.
+   * 
+ * + * 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 token to specify as `page_token` in the subsequent call to get the next
+   * page. Omitted if there are no more pages in the response.
+   * 
+ * + * 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 < links_.size(); i++) { + output.writeMessage(1, links_.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 < links_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, links_.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.datacatalog.lineage.v1.SearchLinksResponse)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse other = + (com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse) obj; + + if (!getLinksList().equals(other.getLinksList())) 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 (getLinksCount() > 0) { + hash = (37 * hash) + LINKS_FIELD_NUMBER; + hash = (53 * hash) + getLinksList().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.datacatalog.lineage.v1.SearchLinksResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse 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.datacatalog.lineage.v1.SearchLinksResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse 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.datacatalog.lineage.v1.SearchLinksResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse 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.datacatalog.lineage.v1.SearchLinksResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse 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.datacatalog.lineage.v1.SearchLinksResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse 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.datacatalog.lineage.v1.SearchLinksResponse 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
+   * [SearchLinks][google.cloud.datacatalog.lineage.v1.Lineage.SearchLinks].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.SearchLinksResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.lineage.v1.SearchLinksResponse) + com.google.cloud.datacatalog.lineage.v1.SearchLinksResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_SearchLinksResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_SearchLinksResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse.class, + com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (linksBuilder_ == null) { + links_ = java.util.Collections.emptyList(); + } else { + links_ = null; + linksBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_SearchLinksResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse getDefaultInstanceForType() { + return com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse build() { + com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse buildPartial() { + com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse result = + new com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse(this); + int from_bitField0_ = bitField0_; + if (linksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + links_ = java.util.Collections.unmodifiableList(links_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.links_ = links_; + } else { + result.links_ = linksBuilder_.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.datacatalog.lineage.v1.SearchLinksResponse) { + return mergeFrom((com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse other) { + if (other == com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse.getDefaultInstance()) + return this; + if (linksBuilder_ == null) { + if (!other.links_.isEmpty()) { + if (links_.isEmpty()) { + links_ = other.links_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLinksIsMutable(); + links_.addAll(other.links_); + } + onChanged(); + } + } else { + if (!other.links_.isEmpty()) { + if (linksBuilder_.isEmpty()) { + linksBuilder_.dispose(); + linksBuilder_ = null; + links_ = other.links_; + bitField0_ = (bitField0_ & ~0x00000001); + linksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getLinksFieldBuilder() + : null; + } else { + linksBuilder_.addAllMessages(other.links_); + } + } + } + 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.datacatalog.lineage.v1.Link m = + input.readMessage( + com.google.cloud.datacatalog.lineage.v1.Link.parser(), extensionRegistry); + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.add(m); + } else { + linksBuilder_.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 links_ = + java.util.Collections.emptyList(); + + private void ensureLinksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + links_ = new java.util.ArrayList(links_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.Link, + com.google.cloud.datacatalog.lineage.v1.Link.Builder, + com.google.cloud.datacatalog.lineage.v1.LinkOrBuilder> + linksBuilder_; + + /** + * + * + *
+     * The list of links for a given asset. Can be empty if the asset has no
+     * relations of requested type (source or target).
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Link links = 1; + */ + public java.util.List getLinksList() { + if (linksBuilder_ == null) { + return java.util.Collections.unmodifiableList(links_); + } else { + return linksBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of links for a given asset. Can be empty if the asset has no
+     * relations of requested type (source or target).
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Link links = 1; + */ + public int getLinksCount() { + if (linksBuilder_ == null) { + return links_.size(); + } else { + return linksBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of links for a given asset. Can be empty if the asset has no
+     * relations of requested type (source or target).
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Link links = 1; + */ + public com.google.cloud.datacatalog.lineage.v1.Link getLinks(int index) { + if (linksBuilder_ == null) { + return links_.get(index); + } else { + return linksBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of links for a given asset. Can be empty if the asset has no
+     * relations of requested type (source or target).
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Link links = 1; + */ + public Builder setLinks(int index, com.google.cloud.datacatalog.lineage.v1.Link value) { + if (linksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinksIsMutable(); + links_.set(index, value); + onChanged(); + } else { + linksBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of links for a given asset. Can be empty if the asset has no
+     * relations of requested type (source or target).
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Link links = 1; + */ + public Builder setLinks( + int index, com.google.cloud.datacatalog.lineage.v1.Link.Builder builderForValue) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.set(index, builderForValue.build()); + onChanged(); + } else { + linksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of links for a given asset. Can be empty if the asset has no
+     * relations of requested type (source or target).
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Link links = 1; + */ + public Builder addLinks(com.google.cloud.datacatalog.lineage.v1.Link value) { + if (linksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinksIsMutable(); + links_.add(value); + onChanged(); + } else { + linksBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of links for a given asset. Can be empty if the asset has no
+     * relations of requested type (source or target).
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Link links = 1; + */ + public Builder addLinks(int index, com.google.cloud.datacatalog.lineage.v1.Link value) { + if (linksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinksIsMutable(); + links_.add(index, value); + onChanged(); + } else { + linksBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of links for a given asset. Can be empty if the asset has no
+     * relations of requested type (source or target).
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Link links = 1; + */ + public Builder addLinks(com.google.cloud.datacatalog.lineage.v1.Link.Builder builderForValue) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.add(builderForValue.build()); + onChanged(); + } else { + linksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of links for a given asset. Can be empty if the asset has no
+     * relations of requested type (source or target).
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Link links = 1; + */ + public Builder addLinks( + int index, com.google.cloud.datacatalog.lineage.v1.Link.Builder builderForValue) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.add(index, builderForValue.build()); + onChanged(); + } else { + linksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of links for a given asset. Can be empty if the asset has no
+     * relations of requested type (source or target).
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Link links = 1; + */ + public Builder addAllLinks( + java.lang.Iterable values) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, links_); + onChanged(); + } else { + linksBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of links for a given asset. Can be empty if the asset has no
+     * relations of requested type (source or target).
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Link links = 1; + */ + public Builder clearLinks() { + if (linksBuilder_ == null) { + links_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + linksBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of links for a given asset. Can be empty if the asset has no
+     * relations of requested type (source or target).
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Link links = 1; + */ + public Builder removeLinks(int index) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.remove(index); + onChanged(); + } else { + linksBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of links for a given asset. Can be empty if the asset has no
+     * relations of requested type (source or target).
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Link links = 1; + */ + public com.google.cloud.datacatalog.lineage.v1.Link.Builder getLinksBuilder(int index) { + return getLinksFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of links for a given asset. Can be empty if the asset has no
+     * relations of requested type (source or target).
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Link links = 1; + */ + public com.google.cloud.datacatalog.lineage.v1.LinkOrBuilder getLinksOrBuilder(int index) { + if (linksBuilder_ == null) { + return links_.get(index); + } else { + return linksBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of links for a given asset. Can be empty if the asset has no
+     * relations of requested type (source or target).
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Link links = 1; + */ + public java.util.List + getLinksOrBuilderList() { + if (linksBuilder_ != null) { + return linksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(links_); + } + } + /** + * + * + *
+     * The list of links for a given asset. Can be empty if the asset has no
+     * relations of requested type (source or target).
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Link links = 1; + */ + public com.google.cloud.datacatalog.lineage.v1.Link.Builder addLinksBuilder() { + return getLinksFieldBuilder() + .addBuilder(com.google.cloud.datacatalog.lineage.v1.Link.getDefaultInstance()); + } + /** + * + * + *
+     * The list of links for a given asset. Can be empty if the asset has no
+     * relations of requested type (source or target).
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Link links = 1; + */ + public com.google.cloud.datacatalog.lineage.v1.Link.Builder addLinksBuilder(int index) { + return getLinksFieldBuilder() + .addBuilder(index, com.google.cloud.datacatalog.lineage.v1.Link.getDefaultInstance()); + } + /** + * + * + *
+     * The list of links for a given asset. Can be empty if the asset has no
+     * relations of requested type (source or target).
+     * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Link links = 1; + */ + public java.util.List + getLinksBuilderList() { + return getLinksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.Link, + com.google.cloud.datacatalog.lineage.v1.Link.Builder, + com.google.cloud.datacatalog.lineage.v1.LinkOrBuilder> + getLinksFieldBuilder() { + if (linksBuilder_ == null) { + linksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.Link, + com.google.cloud.datacatalog.lineage.v1.Link.Builder, + com.google.cloud.datacatalog.lineage.v1.LinkOrBuilder>( + links_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + links_ = null; + } + return linksBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * The token to specify as `page_token` in the subsequent call to get the next
+     * page. Omitted if there are no more pages in the response.
+     * 
+ * + * 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 token to specify as `page_token` in the subsequent call to get the next
+     * page. Omitted if there are no more pages in the response.
+     * 
+ * + * 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 token to specify as `page_token` in the subsequent call to get the next
+     * page. Omitted if there are no more pages in the response.
+     * 
+ * + * 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 token to specify as `page_token` in the subsequent call to get the next
+     * page. Omitted if there are no more pages in the response.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The token to specify as `page_token` in the subsequent call to get the next
+     * page. Omitted if there are no more pages in the response.
+     * 
+ * + * 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.datacatalog.lineage.v1.SearchLinksResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.lineage.v1.SearchLinksResponse) + private static final com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse(); + } + + public static com.google.cloud.datacatalog.lineage.v1.SearchLinksResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchLinksResponse 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.datacatalog.lineage.v1.SearchLinksResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/SearchLinksResponseOrBuilder.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/SearchLinksResponseOrBuilder.java new file mode 100644 index 000000000000..31e21e2470b9 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/SearchLinksResponseOrBuilder.java @@ -0,0 +1,109 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +public interface SearchLinksResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.lineage.v1.SearchLinksResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of links for a given asset. Can be empty if the asset has no
+   * relations of requested type (source or target).
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Link links = 1; + */ + java.util.List getLinksList(); + /** + * + * + *
+   * The list of links for a given asset. Can be empty if the asset has no
+   * relations of requested type (source or target).
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Link links = 1; + */ + com.google.cloud.datacatalog.lineage.v1.Link getLinks(int index); + /** + * + * + *
+   * The list of links for a given asset. Can be empty if the asset has no
+   * relations of requested type (source or target).
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Link links = 1; + */ + int getLinksCount(); + /** + * + * + *
+   * The list of links for a given asset. Can be empty if the asset has no
+   * relations of requested type (source or target).
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Link links = 1; + */ + java.util.List + getLinksOrBuilderList(); + /** + * + * + *
+   * The list of links for a given asset. Can be empty if the asset has no
+   * relations of requested type (source or target).
+   * 
+ * + * repeated .google.cloud.datacatalog.lineage.v1.Link links = 1; + */ + com.google.cloud.datacatalog.lineage.v1.LinkOrBuilder getLinksOrBuilder(int index); + + /** + * + * + *
+   * The token to specify as `page_token` in the subsequent call to get the next
+   * page. Omitted if there are no more pages in the response.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * The token to specify as `page_token` in the subsequent call to get the next
+   * page. Omitted if there are no more pages in the response.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/UpdateProcessRequest.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/UpdateProcessRequest.java new file mode 100644 index 000000000000..7fdf9f2af794 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/UpdateProcessRequest.java @@ -0,0 +1,1112 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +/** + * + * + *
+ * Request message for
+ * [UpdateProcess][google.cloud.datacatalog.lineage.v1.UpdateProcess].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.UpdateProcessRequest} + */ +public final class UpdateProcessRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.lineage.v1.UpdateProcessRequest) + UpdateProcessRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateProcessRequest.newBuilder() to construct. + private UpdateProcessRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateProcessRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateProcessRequest(); + } + + @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.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_UpdateProcessRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_UpdateProcessRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest.class, + com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest.Builder.class); + } + + public static final int PROCESS_FIELD_NUMBER = 1; + private com.google.cloud.datacatalog.lineage.v1.Process process_; + /** + * + * + *
+   * Required. The lineage process to update.
+   * The process's `name` field is used to identify the process to update.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Process process = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the process field is set. + */ + @java.lang.Override + public boolean hasProcess() { + return process_ != null; + } + /** + * + * + *
+   * Required. The lineage process to update.
+   * The process's `name` field is used to identify the process to update.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Process process = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The process. + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.Process getProcess() { + return process_ == null + ? com.google.cloud.datacatalog.lineage.v1.Process.getDefaultInstance() + : process_; + } + /** + * + * + *
+   * Required. The lineage process to update.
+   * The process's `name` field is used to identify the process to update.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Process process = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.ProcessOrBuilder getProcessOrBuilder() { + return getProcess(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * The list of fields to update. Currently not used. The whole message is
+   * updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * The list of fields to update. Currently not used. The whole message is
+   * updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * The list of fields to update. Currently not used. The whole message is
+   * updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + public static final int ALLOW_MISSING_FIELD_NUMBER = 3; + private boolean allowMissing_; + /** + * + * + *
+   * If set to true and the process is not found, the request inserts it.
+   * 
+ * + * bool allow_missing = 3; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + + 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 (process_ != null) { + output.writeMessage(1, getProcess()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + if (allowMissing_ != false) { + output.writeBool(3, allowMissing_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (process_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getProcess()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + if (allowMissing_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, allowMissing_); + } + 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.datacatalog.lineage.v1.UpdateProcessRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest other = + (com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest) obj; + + if (hasProcess() != other.hasProcess()) return false; + if (hasProcess()) { + if (!getProcess().equals(other.getProcess())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (getAllowMissing() != other.getAllowMissing()) 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 (hasProcess()) { + hash = (37 * hash) + PROCESS_FIELD_NUMBER; + hash = (53 * hash) + getProcess().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest 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.datacatalog.lineage.v1.UpdateProcessRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest 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.datacatalog.lineage.v1.UpdateProcessRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest 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.datacatalog.lineage.v1.UpdateProcessRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest 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.datacatalog.lineage.v1.UpdateProcessRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest 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.datacatalog.lineage.v1.UpdateProcessRequest 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
+   * [UpdateProcess][google.cloud.datacatalog.lineage.v1.UpdateProcess].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.UpdateProcessRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.lineage.v1.UpdateProcessRequest) + com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_UpdateProcessRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_UpdateProcessRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest.class, + com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (processBuilder_ == null) { + process_ = null; + } else { + process_ = null; + processBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + allowMissing_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_UpdateProcessRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest + getDefaultInstanceForType() { + return com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest build() { + com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest buildPartial() { + com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest result = + new com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest(this); + if (processBuilder_ == null) { + result.process_ = process_; + } else { + result.process_ = processBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + result.allowMissing_ = allowMissing_; + 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.datacatalog.lineage.v1.UpdateProcessRequest) { + return mergeFrom((com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest other) { + if (other + == com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest.getDefaultInstance()) + return this; + if (other.hasProcess()) { + mergeProcess(other.getProcess()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.getAllowMissing() != false) { + setAllowMissing(other.getAllowMissing()); + } + 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(getProcessFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 24: + { + allowMissing_ = input.readBool(); + + break; + } // case 24 + 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.datacatalog.lineage.v1.Process process_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.Process, + com.google.cloud.datacatalog.lineage.v1.Process.Builder, + com.google.cloud.datacatalog.lineage.v1.ProcessOrBuilder> + processBuilder_; + /** + * + * + *
+     * Required. The lineage process to update.
+     * The process's `name` field is used to identify the process to update.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Process process = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the process field is set. + */ + public boolean hasProcess() { + return processBuilder_ != null || process_ != null; + } + /** + * + * + *
+     * Required. The lineage process to update.
+     * The process's `name` field is used to identify the process to update.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Process process = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The process. + */ + public com.google.cloud.datacatalog.lineage.v1.Process getProcess() { + if (processBuilder_ == null) { + return process_ == null + ? com.google.cloud.datacatalog.lineage.v1.Process.getDefaultInstance() + : process_; + } else { + return processBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The lineage process to update.
+     * The process's `name` field is used to identify the process to update.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Process process = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setProcess(com.google.cloud.datacatalog.lineage.v1.Process value) { + if (processBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + process_ = value; + onChanged(); + } else { + processBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The lineage process to update.
+     * The process's `name` field is used to identify the process to update.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Process process = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setProcess( + com.google.cloud.datacatalog.lineage.v1.Process.Builder builderForValue) { + if (processBuilder_ == null) { + process_ = builderForValue.build(); + onChanged(); + } else { + processBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The lineage process to update.
+     * The process's `name` field is used to identify the process to update.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Process process = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeProcess(com.google.cloud.datacatalog.lineage.v1.Process value) { + if (processBuilder_ == null) { + if (process_ != null) { + process_ = + com.google.cloud.datacatalog.lineage.v1.Process.newBuilder(process_) + .mergeFrom(value) + .buildPartial(); + } else { + process_ = value; + } + onChanged(); + } else { + processBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The lineage process to update.
+     * The process's `name` field is used to identify the process to update.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Process process = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearProcess() { + if (processBuilder_ == null) { + process_ = null; + onChanged(); + } else { + process_ = null; + processBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The lineage process to update.
+     * The process's `name` field is used to identify the process to update.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Process process = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.lineage.v1.Process.Builder getProcessBuilder() { + + onChanged(); + return getProcessFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The lineage process to update.
+     * The process's `name` field is used to identify the process to update.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Process process = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.lineage.v1.ProcessOrBuilder getProcessOrBuilder() { + if (processBuilder_ != null) { + return processBuilder_.getMessageOrBuilder(); + } else { + return process_ == null + ? com.google.cloud.datacatalog.lineage.v1.Process.getDefaultInstance() + : process_; + } + } + /** + * + * + *
+     * Required. The lineage process to update.
+     * The process's `name` field is used to identify the process to update.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Process process = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.Process, + com.google.cloud.datacatalog.lineage.v1.Process.Builder, + com.google.cloud.datacatalog.lineage.v1.ProcessOrBuilder> + getProcessFieldBuilder() { + if (processBuilder_ == null) { + processBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.Process, + com.google.cloud.datacatalog.lineage.v1.Process.Builder, + com.google.cloud.datacatalog.lineage.v1.ProcessOrBuilder>( + getProcess(), getParentForChildren(), isClean()); + process_ = null; + } + return processBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * The list of fields to update. Currently not used. The whole message is
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * The list of fields to update. Currently not used. The whole message is
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The list of fields to update. Currently not used. The whole message is
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The list of fields to update. Currently not used. The whole message is
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The list of fields to update. Currently not used. The whole message is
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The list of fields to update. Currently not used. The whole message is
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The list of fields to update. Currently not used. The whole message is
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The list of fields to update. Currently not used. The whole message is
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * The list of fields to update. Currently not used. The whole message is
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private boolean allowMissing_; + /** + * + * + *
+     * If set to true and the process is not found, the request inserts it.
+     * 
+ * + * bool allow_missing = 3; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + /** + * + * + *
+     * If set to true and the process is not found, the request inserts it.
+     * 
+ * + * bool allow_missing = 3; + * + * @param value The allowMissing to set. + * @return This builder for chaining. + */ + public Builder setAllowMissing(boolean value) { + + allowMissing_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If set to true and the process is not found, the request inserts it.
+     * 
+ * + * bool allow_missing = 3; + * + * @return This builder for chaining. + */ + public Builder clearAllowMissing() { + + allowMissing_ = 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.datacatalog.lineage.v1.UpdateProcessRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.lineage.v1.UpdateProcessRequest) + private static final com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest(); + } + + public static com.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateProcessRequest 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.datacatalog.lineage.v1.UpdateProcessRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/UpdateProcessRequestOrBuilder.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/UpdateProcessRequestOrBuilder.java new file mode 100644 index 000000000000..2248b0178eaa --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/UpdateProcessRequestOrBuilder.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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +public interface UpdateProcessRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.lineage.v1.UpdateProcessRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The lineage process to update.
+   * The process's `name` field is used to identify the process to update.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Process process = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the process field is set. + */ + boolean hasProcess(); + /** + * + * + *
+   * Required. The lineage process to update.
+   * The process's `name` field is used to identify the process to update.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Process process = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The process. + */ + com.google.cloud.datacatalog.lineage.v1.Process getProcess(); + /** + * + * + *
+   * Required. The lineage process to update.
+   * The process's `name` field is used to identify the process to update.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Process process = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.datacatalog.lineage.v1.ProcessOrBuilder getProcessOrBuilder(); + + /** + * + * + *
+   * The list of fields to update. Currently not used. The whole message is
+   * updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * The list of fields to update. Currently not used. The whole message is
+   * updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * The list of fields to update. Currently not used. The whole message is
+   * updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * If set to true and the process is not found, the request inserts it.
+   * 
+ * + * bool allow_missing = 3; + * + * @return The allowMissing. + */ + boolean getAllowMissing(); +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/UpdateRunRequest.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/UpdateRunRequest.java new file mode 100644 index 000000000000..03382b5dae42 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/UpdateRunRequest.java @@ -0,0 +1,1039 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +/** + * + * + *
+ * Request message for
+ * [UpdateRun][google.cloud.datacatalog.lineage.v1.UpdateRun].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.UpdateRunRequest} + */ +public final class UpdateRunRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.lineage.v1.UpdateRunRequest) + UpdateRunRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateRunRequest.newBuilder() to construct. + private UpdateRunRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateRunRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateRunRequest(); + } + + @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.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_UpdateRunRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_UpdateRunRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest.class, + com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest.Builder.class); + } + + public static final int RUN_FIELD_NUMBER = 1; + private com.google.cloud.datacatalog.lineage.v1.Run run_; + /** + * + * + *
+   * Required. The lineage run to update.
+   * The run's `name` field is used to identify the run to update.
+   * Format:
+   * `projects/{project}/locations/{location}/processes/{process}/runs/{run}`.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run run = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the run field is set. + */ + @java.lang.Override + public boolean hasRun() { + return run_ != null; + } + /** + * + * + *
+   * Required. The lineage run to update.
+   * The run's `name` field is used to identify the run to update.
+   * Format:
+   * `projects/{project}/locations/{location}/processes/{process}/runs/{run}`.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run run = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The run. + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.Run getRun() { + return run_ == null ? com.google.cloud.datacatalog.lineage.v1.Run.getDefaultInstance() : run_; + } + /** + * + * + *
+   * Required. The lineage run to update.
+   * The run's `name` field is used to identify the run to update.
+   * Format:
+   * `projects/{project}/locations/{location}/processes/{process}/runs/{run}`.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run run = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.RunOrBuilder getRunOrBuilder() { + return getRun(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * The list of fields to update. Currently not used. The whole message is
+   * updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * The list of fields to update. Currently not used. The whole message is
+   * updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * The list of fields to update. Currently not used. The whole message is
+   * updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + 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 (run_ != null) { + output.writeMessage(1, getRun()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (run_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getRun()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + 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.datacatalog.lineage.v1.UpdateRunRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest other = + (com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest) obj; + + if (hasRun() != other.hasRun()) return false; + if (hasRun()) { + if (!getRun().equals(other.getRun())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) 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 (hasRun()) { + hash = (37 * hash) + RUN_FIELD_NUMBER; + hash = (53 * hash) + getRun().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest 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.datacatalog.lineage.v1.UpdateRunRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest 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.datacatalog.lineage.v1.UpdateRunRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest 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.datacatalog.lineage.v1.UpdateRunRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest 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.datacatalog.lineage.v1.UpdateRunRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest 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.datacatalog.lineage.v1.UpdateRunRequest 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
+   * [UpdateRun][google.cloud.datacatalog.lineage.v1.UpdateRun].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.lineage.v1.UpdateRunRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.lineage.v1.UpdateRunRequest) + com.google.cloud.datacatalog.lineage.v1.UpdateRunRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_UpdateRunRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_UpdateRunRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest.class, + com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (runBuilder_ == null) { + run_ = null; + } else { + run_ = null; + runBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.lineage.v1.LineageProto + .internal_static_google_cloud_datacatalog_lineage_v1_UpdateRunRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest build() { + com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest buildPartial() { + com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest result = + new com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest(this); + if (runBuilder_ == null) { + result.run_ = run_; + } else { + result.run_ = runBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.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.datacatalog.lineage.v1.UpdateRunRequest) { + return mergeFrom((com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest other) { + if (other == com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest.getDefaultInstance()) + return this; + if (other.hasRun()) { + mergeRun(other.getRun()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + 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(getRunFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().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 com.google.cloud.datacatalog.lineage.v1.Run run_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.Run, + com.google.cloud.datacatalog.lineage.v1.Run.Builder, + com.google.cloud.datacatalog.lineage.v1.RunOrBuilder> + runBuilder_; + /** + * + * + *
+     * Required. The lineage run to update.
+     * The run's `name` field is used to identify the run to update.
+     * Format:
+     * `projects/{project}/locations/{location}/processes/{process}/runs/{run}`.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run run = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the run field is set. + */ + public boolean hasRun() { + return runBuilder_ != null || run_ != null; + } + /** + * + * + *
+     * Required. The lineage run to update.
+     * The run's `name` field is used to identify the run to update.
+     * Format:
+     * `projects/{project}/locations/{location}/processes/{process}/runs/{run}`.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run run = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The run. + */ + public com.google.cloud.datacatalog.lineage.v1.Run getRun() { + if (runBuilder_ == null) { + return run_ == null + ? com.google.cloud.datacatalog.lineage.v1.Run.getDefaultInstance() + : run_; + } else { + return runBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The lineage run to update.
+     * The run's `name` field is used to identify the run to update.
+     * Format:
+     * `projects/{project}/locations/{location}/processes/{process}/runs/{run}`.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run run = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRun(com.google.cloud.datacatalog.lineage.v1.Run value) { + if (runBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + run_ = value; + onChanged(); + } else { + runBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The lineage run to update.
+     * The run's `name` field is used to identify the run to update.
+     * Format:
+     * `projects/{project}/locations/{location}/processes/{process}/runs/{run}`.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run run = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRun(com.google.cloud.datacatalog.lineage.v1.Run.Builder builderForValue) { + if (runBuilder_ == null) { + run_ = builderForValue.build(); + onChanged(); + } else { + runBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The lineage run to update.
+     * The run's `name` field is used to identify the run to update.
+     * Format:
+     * `projects/{project}/locations/{location}/processes/{process}/runs/{run}`.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run run = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeRun(com.google.cloud.datacatalog.lineage.v1.Run value) { + if (runBuilder_ == null) { + if (run_ != null) { + run_ = + com.google.cloud.datacatalog.lineage.v1.Run.newBuilder(run_) + .mergeFrom(value) + .buildPartial(); + } else { + run_ = value; + } + onChanged(); + } else { + runBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The lineage run to update.
+     * The run's `name` field is used to identify the run to update.
+     * Format:
+     * `projects/{project}/locations/{location}/processes/{process}/runs/{run}`.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run run = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearRun() { + if (runBuilder_ == null) { + run_ = null; + onChanged(); + } else { + run_ = null; + runBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The lineage run to update.
+     * The run's `name` field is used to identify the run to update.
+     * Format:
+     * `projects/{project}/locations/{location}/processes/{process}/runs/{run}`.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run run = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.lineage.v1.Run.Builder getRunBuilder() { + + onChanged(); + return getRunFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The lineage run to update.
+     * The run's `name` field is used to identify the run to update.
+     * Format:
+     * `projects/{project}/locations/{location}/processes/{process}/runs/{run}`.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run run = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.lineage.v1.RunOrBuilder getRunOrBuilder() { + if (runBuilder_ != null) { + return runBuilder_.getMessageOrBuilder(); + } else { + return run_ == null + ? com.google.cloud.datacatalog.lineage.v1.Run.getDefaultInstance() + : run_; + } + } + /** + * + * + *
+     * Required. The lineage run to update.
+     * The run's `name` field is used to identify the run to update.
+     * Format:
+     * `projects/{project}/locations/{location}/processes/{process}/runs/{run}`.
+     * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run run = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.Run, + com.google.cloud.datacatalog.lineage.v1.Run.Builder, + com.google.cloud.datacatalog.lineage.v1.RunOrBuilder> + getRunFieldBuilder() { + if (runBuilder_ == null) { + runBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.lineage.v1.Run, + com.google.cloud.datacatalog.lineage.v1.Run.Builder, + com.google.cloud.datacatalog.lineage.v1.RunOrBuilder>( + getRun(), getParentForChildren(), isClean()); + run_ = null; + } + return runBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * The list of fields to update. Currently not used. The whole message is
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * The list of fields to update. Currently not used. The whole message is
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The list of fields to update. Currently not used. The whole message is
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The list of fields to update. Currently not used. The whole message is
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The list of fields to update. Currently not used. The whole message is
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The list of fields to update. Currently not used. The whole message is
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The list of fields to update. Currently not used. The whole message is
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The list of fields to update. Currently not used. The whole message is
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * The list of fields to update. Currently not used. The whole message is
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @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.datacatalog.lineage.v1.UpdateRunRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.lineage.v1.UpdateRunRequest) + private static final com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest(); + } + + public static com.google.cloud.datacatalog.lineage.v1.UpdateRunRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateRunRequest 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.datacatalog.lineage.v1.UpdateRunRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/UpdateRunRequestOrBuilder.java b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/UpdateRunRequestOrBuilder.java new file mode 100644 index 000000000000..61e22db5d3d6 --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/java/com/google/cloud/datacatalog/lineage/v1/UpdateRunRequestOrBuilder.java @@ -0,0 +1,113 @@ +/* + * 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/datacatalog/lineage/v1/lineage.proto + +package com.google.cloud.datacatalog.lineage.v1; + +public interface UpdateRunRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.lineage.v1.UpdateRunRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The lineage run to update.
+   * The run's `name` field is used to identify the run to update.
+   * Format:
+   * `projects/{project}/locations/{location}/processes/{process}/runs/{run}`.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run run = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the run field is set. + */ + boolean hasRun(); + /** + * + * + *
+   * Required. The lineage run to update.
+   * The run's `name` field is used to identify the run to update.
+   * Format:
+   * `projects/{project}/locations/{location}/processes/{process}/runs/{run}`.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run run = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The run. + */ + com.google.cloud.datacatalog.lineage.v1.Run getRun(); + /** + * + * + *
+   * Required. The lineage run to update.
+   * The run's `name` field is used to identify the run to update.
+   * Format:
+   * `projects/{project}/locations/{location}/processes/{process}/runs/{run}`.
+   * 
+ * + * + * .google.cloud.datacatalog.lineage.v1.Run run = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.datacatalog.lineage.v1.RunOrBuilder getRunOrBuilder(); + + /** + * + * + *
+   * The list of fields to update. Currently not used. The whole message is
+   * updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * The list of fields to update. Currently not used. The whole message is
+   * updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * The list of fields to update. Currently not used. The whole message is
+   * updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/src/main/proto/google/cloud/datacatalog/lineage/v1/lineage.proto b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/proto/google/cloud/datacatalog/lineage/v1/lineage.proto new file mode 100644 index 000000000000..3ccb06082efd --- /dev/null +++ b/java-datalineage/proto-google-cloud-datalineage-v1/src/main/proto/google/cloud/datacatalog/lineage/v1/lineage.proto @@ -0,0 +1,879 @@ +// 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. + +syntax = "proto3"; + +package google.cloud.datacatalog.lineage.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.DataCatalog.Lineage.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/lineage/v1;lineage"; +option java_multiple_files = true; +option java_outer_classname = "LineageProto"; +option java_package = "com.google.cloud.datacatalog.lineage.v1"; +option php_namespace = "Google\\Cloud\\DataCatalog\\Lineage\\V1"; +option ruby_package = "Google::Cloud::DataCatalog::Lineage::V1"; + +// Lineage is used to track data flows between assets over time. You can +// create [LineageEvents][google.cloud.datacatalog.lineage.v1.LineageEvent] +// to record lineage between multiple sources and a single target, for +// example, when table data is based on data from multiple tables. +service Lineage { + option (google.api.default_host) = "datalineage.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a new process. + rpc CreateProcess(CreateProcessRequest) returns (Process) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/processes" + body: "process" + }; + option (google.api.method_signature) = "parent,process"; + } + + // Updates a process. + rpc UpdateProcess(UpdateProcessRequest) returns (Process) { + option (google.api.http) = { + patch: "/v1/{process.name=projects/*/locations/*/processes/*}" + body: "process" + }; + option (google.api.method_signature) = "process,update_mask"; + } + + // Gets the details of the specified process. + rpc GetProcess(GetProcessRequest) returns (Process) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/processes/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List processes in the given project and location. List order is descending + // by insertion time. + rpc ListProcesses(ListProcessesRequest) returns (ListProcessesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/processes" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes the process with the specified name. + rpc DeleteProcess(DeleteProcessRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/processes/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.datacatalog.lineage.v1.OperationMetadata" + }; + } + + // Creates a new run. + rpc CreateRun(CreateRunRequest) returns (Run) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/processes/*}/runs" + body: "run" + }; + option (google.api.method_signature) = "parent,run"; + } + + // Updates a run. + rpc UpdateRun(UpdateRunRequest) returns (Run) { + option (google.api.http) = { + patch: "/v1/{run.name=projects/*/locations/*/processes/*/runs/*}" + body: "run" + }; + option (google.api.method_signature) = "run,update_mask"; + } + + // Gets the details of the specified run. + rpc GetRun(GetRunRequest) returns (Run) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/processes/*/runs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists runs in the given project and location. List order is descending by + // `start_time`. + rpc ListRuns(ListRunsRequest) returns (ListRunsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/processes/*}/runs" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes the run with the specified name. + rpc DeleteRun(DeleteRunRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/processes/*/runs/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.datacatalog.lineage.v1.OperationMetadata" + }; + } + + // Creates a new lineage event. + rpc CreateLineageEvent(CreateLineageEventRequest) returns (LineageEvent) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/processes/*/runs/*}/lineageEvents" + body: "lineage_event" + }; + option (google.api.method_signature) = "parent,lineage_event"; + } + + // Gets details of a specified lineage event. + rpc GetLineageEvent(GetLineageEventRequest) returns (LineageEvent) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/processes/*/runs/*/lineageEvents/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists lineage events in the given project and location. The list order is + // not defined. + rpc ListLineageEvents(ListLineageEventsRequest) + returns (ListLineageEventsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/processes/*/runs/*}/lineageEvents" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes the lineage event with the specified name. + rpc DeleteLineageEvent(DeleteLineageEventRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/processes/*/runs/*/lineageEvents/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Retrieve a list of links connected to a specific asset. + // Links represent the data flow between **source** (upstream) + // and **target** (downstream) assets in transformation pipelines. + // Links are stored in the same project as the Lineage Events that create + // them. + // + // You can retrieve links in every project where you have the + // `datalineage.events.get` permission. The project provided in the URL + // is used for Billing and Quota. + rpc SearchLinks(SearchLinksRequest) returns (SearchLinksResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}:searchLinks" + body: "*" + }; + } + + // Retrieve information about LineageProcesses associated with specific + // links. LineageProcesses are transformation pipelines that result in data + // flowing from **source** to **target** assets. Links between assets + // represent this operation. + // + // If you have specific link names, you can use this method to + // verify which LineageProcesses contribute to creating those links. + // See the + // [SearchLinks][google.cloud.datacatalog.lineage.v1.Lineage.SearchLinks] + // method for more information on how to retrieve link name. + // + // You can retrieve the LineageProcess information in every project where you + // have the `datalineage.events.get` permission. The project provided in the + // URL is used for Billing and Quota. + rpc BatchSearchLinkProcesses(BatchSearchLinkProcessesRequest) + returns (BatchSearchLinkProcessesResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}:batchSearchLinkProcesses" + body: "*" + }; + } +} + +// A process is the definition of a data transformation operation. +message Process { + option (google.api.resource) = { + type: "datalineage.googleapis.com/Process" + pattern: "projects/{project}/locations/{location}/processes/{process}" + }; + + // Immutable. The resource name of the lineage process. Format: + // `projects/{project}/locations/{location}/processes/{process}`. + // Can be specified or auto-assigned. + // {process} must be not longer than 200 characters and only + // contain characters in a set: `a-zA-Z0-9_-:.` + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Optional. A human-readable name you can set to display in a user interface. + // Must be not longer than 200 characters and only contain UTF-8 letters + // or numbers, spaces or characters like `_-:&.` + string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The attributes of the process. Can be anything, for example, + // "author". Up to 100 attributes are allowed. + map attributes = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The origin of this process and its runs and lineage events. + Origin origin = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// A lineage run represents an execution of a process that creates +// lineage events. +message Run { + option (google.api.resource) = { + type: "datalineage.googleapis.com/Run" + pattern: "projects/{project}/locations/{location}/processes/{process}/runs/{run}" + }; + + // The current state of the run. + enum State { + // The state is unknown. The true state may be any of the below or a + // different state that is not supported here explicitly. + UNKNOWN = 0; + + // The run is still executing. + STARTED = 1; + + // The run completed. + COMPLETED = 2; + + // The run failed. + FAILED = 3; + + // The run aborted. + ABORTED = 4; + } + + // Immutable. The resource name of the run. Format: + // `projects/{project}/locations/{location}/processes/{process}/runs/{run}`. + // Can be specified or auto-assigned. + // {run} must be not longer than 200 characters and only + // contain characters in a set: `a-zA-Z0-9_-:.` + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Optional. A human-readable name you can set to display in a user interface. + // Must be not longer than 1024 characters and only contain UTF-8 letters + // or numbers, spaces or characters like `_-:&.` + string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The attributes of the run. Can be anything, for example, a string + // with an SQL request. Up to 100 attributes are allowed. + map attributes = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The timestamp of the start of the run. + google.protobuf.Timestamp start_time = 4 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The timestamp of the end of the run. + google.protobuf.Timestamp end_time = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The state of the run. + State state = 6 [(google.api.field_behavior) = REQUIRED]; +} + +// A lineage event represents an operation on assets. Within the operation, the +// data flows from the source to the target defined in the links field. +message LineageEvent { + option (google.api.resource) = { + type: "datalineage.googleapis.com/LineageEvent" + pattern: "projects/{project}/locations/{location}/processes/{process}/runs/{run}/lineageEvents/{lineage_event}" + }; + + // Immutable. The resource name of the lineage event. + // Format: + // `projects/{project}/locations/{location}/processes/{process}/runs/{run}/lineageEvents/{lineage_event}`. + // Can be specified or auto-assigned. + // {lineage_event} must be not longer than 200 characters and only + // contain characters in a set: `a-zA-Z0-9_-:.` + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Optional. List of source-target pairs. Can't contain more than 100 tuples. + repeated EventLink links = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The beginning of the transformation which resulted in this + // lineage event. For streaming scenarios, it should be the beginning of the + // period from which the lineage is being reported. + google.protobuf.Timestamp start_time = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The end of the transformation which resulted in this lineage + // event. For streaming scenarios, it should be the end of the period from + // which the lineage is being reported. + google.protobuf.Timestamp end_time = 7 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A lineage between source and target entities. +message EventLink { + // Required. Reference to the source entity + EntityReference source = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Reference to the target entity + EntityReference target = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The soft reference to everything you can attach a lineage event to. +message EntityReference { + // Required. Fully Qualified Name of the entity. Useful for referencing + // entities that aren't represented as GCP resources, for example, tables in + // Dataproc Metastore API. + // + // Examples: + // + // * `bigquery:dataset.project_id.dataset_id` + // * `bigquery:table.project_id.dataset_id.table_id` + // * `pubsub:project_id.topic_id` + // * `dataproc_metastore:projectId.locationId.instanceId.databaseId.tableId` + string fully_qualified_name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Metadata describing the operation. +message OperationMetadata { + // An enum with the state of the operation. + enum State { + // Unused. + STATE_UNSPECIFIED = 0; + + // The operation has been created but is not yet started. + PENDING = 1; + + // The operation is underway. + RUNNING = 2; + + // The operation completed successfully. + SUCCEEDED = 3; + + // The operation is no longer running and did not succeed. + FAILED = 4; + } + + // Type of the long running operation. + enum Type { + // Unused. + TYPE_UNSPECIFIED = 0; + + // The resource deletion operation. + DELETE = 1; + } + + // Output only. The current operation state. + State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The type of the operation being performed. + Type operation_type = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The [relative name] + // (https://cloud.google.com//apis/design/resource_names#relative_resource_name) + // of the resource being operated on. + string resource = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The UUID of the resource being operated on. + string resource_uuid = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp of the operation submission to the server. + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp of the operation termination, regardless of its + // success. This field is unset if the operation is still ongoing. + google.protobuf.Timestamp end_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for +// [CreateProcess][google.cloud.datacatalog.lineage.v1.CreateProcess]. +message CreateProcessRequest { + // Required. The name of the project and its location that should own the + // process. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datalineage.googleapis.com/Process" + } + ]; + + // Required. The process to create. + Process process = 2 [(google.api.field_behavior) = REQUIRED]; + + // A unique identifier for this request. Restricted to 36 ASCII characters. + // A random UUID is recommended. This request is idempotent only if a + // `request_id` is provided. + string request_id = 3; +} + +// Request message for +// [UpdateProcess][google.cloud.datacatalog.lineage.v1.UpdateProcess]. +message UpdateProcessRequest { + // Required. The lineage process to update. + // + // The process's `name` field is used to identify the process to update. + Process process = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to update. Currently not used. The whole message is + // updated. + google.protobuf.FieldMask update_mask = 2; + + // If set to true and the process is not found, the request inserts it. + bool allow_missing = 3; +} + +// Request message for +// [GetProcess][google.cloud.datacatalog.lineage.v1.GetProcess]. +message GetProcessRequest { + // Required. The name of the process to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datalineage.googleapis.com/Process" + } + ]; +} + +// Request message for +// [ListProcesses][google.cloud.datacatalog.lineage.v1.ListProcesses]. +message ListProcessesRequest { + // Required. The name of the project and its location that owns this + // collection of processes. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datalineage.googleapis.com/Process" + } + ]; + + // The maximum number of processes to return. The service may return + // fewer than this value. If unspecified, at most 50 processes are + // returned. The maximum value is 100; values greater than 100 are cut to + // 100. + int32 page_size = 2; + + // The page token received from a previous `ListProcesses` call. Specify + // it to get the next page. + // + // When paginating, all other parameters specified in this call must + // match the parameters of the call that provided the page token. + string page_token = 3; +} + +// Response message for +// [ListProcesses][google.cloud.datacatalog.lineage.v1.ListProcesses]. +message ListProcessesResponse { + // The processes from the specified project and location. + repeated Process processes = 1; + + // The token to specify as `page_token` in the next call to get the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for +// [DeleteProcess][google.cloud.datacatalog.lineage.v1.DeleteProcess]. +message DeleteProcessRequest { + // Required. The name of the process to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datalineage.googleapis.com/Process" + } + ]; + + // If set to true and the process is not found, the request + // succeeds but the server doesn't perform any actions. + bool allow_missing = 2; +} + +// Request message for +// [CreateRun][google.cloud.datacatalog.lineage.v1.CreateRun]. +message CreateRunRequest { + // Required. The name of the process that should own the run. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datalineage.googleapis.com/Run" + } + ]; + + // Required. The run to create. + Run run = 2 [(google.api.field_behavior) = REQUIRED]; + + // A unique identifier for this request. Restricted to 36 ASCII characters. + // A random UUID is recommended. This request is idempotent only if a + // `request_id` is provided. + string request_id = 3; +} + +// Request message for +// [UpdateRun][google.cloud.datacatalog.lineage.v1.UpdateRun]. +message UpdateRunRequest { + // Required. The lineage run to update. + // + // The run's `name` field is used to identify the run to update. + // + // Format: + // `projects/{project}/locations/{location}/processes/{process}/runs/{run}`. + Run run = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to update. Currently not used. The whole message is + // updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for +// [GetRun][google.cloud.datacatalog.lineage.v1.GetRun]. +message GetRunRequest { + // Required. The name of the run to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "datalineage.googleapis.com/Run" } + ]; +} + +// Request message for +// [ListRuns][google.cloud.datacatalog.lineage.v1.ListRuns]. +message ListRunsRequest { + // Required. The name of process that owns this collection of runs. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datalineage.googleapis.com/Run" + } + ]; + + // The maximum number of runs to return. The service may return + // fewer than this value. If unspecified, at most 50 runs are + // returned. The maximum value is 100; values greater than 100 are cut to + // 100. + int32 page_size = 2; + + // The page token received from a previous `ListRuns` call. Specify + // it to get the next page. + // + // When paginating, all other parameters specified in this call must + // match the parameters of the call that provided the page token. + string page_token = 3; +} + +// Response message for +// [ListRuns][google.cloud.datacatalog.lineage.v1.ListRuns]. +message ListRunsResponse { + // The runs from the specified project and location. + repeated Run runs = 1; + + // The token to specify as `page_token` in the next call to get the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for +// [DeleteRun][google.cloud.datacatalog.lineage.v1.DeleteRun]. +message DeleteRunRequest { + // Required. The name of the run to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "datalineage.googleapis.com/Run" } + ]; + + // If set to true and the run is not found, the request + // succeeds but the server doesn't perform any actions. + bool allow_missing = 2; +} + +// Request message for +// [CreateLineageEvent][google.cloud.datacatalog.lineage.v1.CreateLineageEvent]. +message CreateLineageEventRequest { + // Required. The name of the run that should own the lineage event. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datalineage.googleapis.com/LineageEvent" + } + ]; + + // Required. The lineage event to create. + LineageEvent lineage_event = 2 [(google.api.field_behavior) = REQUIRED]; + + // A unique identifier for this request. Restricted to 36 ASCII characters. + // A random UUID is recommended. This request is idempotent only if a + // `request_id` is provided. + string request_id = 3; +} + +// Request message for +// [GetLineageEvent][google.cloud.datacatalog.lineage.v1.GetLineageEvent]. +message GetLineageEventRequest { + // Required. The name of the lineage event to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datalineage.googleapis.com/LineageEvent" + } + ]; +} + +// Request message for +// [ListLineageEvents][google.cloud.datacatalog.lineage.v1.ListLineageEvents]. +message ListLineageEventsRequest { + // Required. The name of the run that owns the collection of lineage events to + // get. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datalineage.googleapis.com/LineageEvent" + } + ]; + + // The maximum number of lineage events to return. + // + // The service may return fewer events than this value. + // If unspecified, at most 50 events are returned. The maximum value is 100; + // values greater than 100 are cut to 100. + int32 page_size = 2; + + // The page token received from a previous `ListLineageEvents` call. Specify + // it to get the next page. + // + // When paginating, all other parameters specified in this call must + // match the parameters of the call that provided the page token. + string page_token = 3; +} + +// Response message for +// [ListLineageEvents][google.cloud.datacatalog.lineage.v1.ListLineageEvents]. +message ListLineageEventsResponse { + // Lineage events from the specified project and location. + repeated LineageEvent lineage_events = 1; + + // The token to specify as `page_token` in the next call to get the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for +// [DeleteLineageEvent][google.cloud.datacatalog.lineage.v1.DeleteLineageEvent]. +message DeleteLineageEventRequest { + // Required. The name of the lineage event to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datalineage.googleapis.com/LineageEvent" + } + ]; + + // If set to true and the lineage event is not found, the request + // succeeds but the server doesn't perform any actions. + bool allow_missing = 2; +} + +// Request message for +// [SearchLinks][google.cloud.datacatalog.lineage.v1.Lineage.SearchLinks]. +message SearchLinksRequest { + // Required. The project and location you want search in. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datalineage.googleapis.com/Process" + } + ]; + + // The asset for which you want to retrieve links. + oneof criteria { + // Optional. Send asset information in the **source** field to retrieve all + // links that lead from the specified asset to downstream assets. + EntityReference source = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Send asset information in the **target** field to retrieve all + // links that lead from upstream assets to the specified asset. + EntityReference target = 5 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. The maximum number of links to return in a single page of the + // response. A page may contain fewer links than this value. If unspecified, + // at most 10 links are returned. + // + // Maximum value is 100; values greater than 100 are reduced to 100. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The page token received from a previous `SearchLinksRequest` + // call. Use it to get the next page. + // + // When requesting subsequent pages of a response, remember that + // all parameters must match the values you provided + // in the original request. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [SearchLinks][google.cloud.datacatalog.lineage.v1.Lineage.SearchLinks]. +message SearchLinksResponse { + // The list of links for a given asset. Can be empty if the asset has no + // relations of requested type (source or target). + repeated Link links = 1; + + // The token to specify as `page_token` in the subsequent call to get the next + // page. Omitted if there are no more pages in the response. + string next_page_token = 2; +} + +// Links represent the data flow between **source** (upstream) +// and **target** (downstream) assets in transformation pipelines. +// +// Links are created when LineageEvents record data transformation between +// related assets. +message Link { + // Output only. Immutable. The name of the link. Format: + // `projects/{project}/locations/{location}/links/{link}`. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IMMUTABLE + ]; + + // The pointer to the entity that is the **source** of this link. + EntityReference source = 2; + + // The pointer to the entity that is the **target** of this link. + EntityReference target = 3; + + // The start of the first event establishing this link. + google.protobuf.Timestamp start_time = 4; + + // The end of the last event establishing this link. + google.protobuf.Timestamp end_time = 5; +} + +// Request message for +// [BatchSearchLinkProcesses][google.cloud.datacatalog.lineage.v1.Lineage.BatchSearchLinkProcesses]. +message BatchSearchLinkProcessesRequest { + // Required. The project and location where you want to search. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datalineage.googleapis.com/Process" + } + ]; + + // Required. An array of links to check for their associated LineageProcesses. + // + // The maximum number of items in this array is 100. + // If the request contains more than 100 links, it returns the + // `INVALID_ARGUMENT` error. + // + // Format: `projects/{project}/locations/{location}/links/{link}`. + repeated string links = 2 [(google.api.field_behavior) = REQUIRED]; + + // The maximum number of processes to return in a single page of the response. + // A page may contain fewer results than this value. + int32 page_size = 3; + + // The page token received from a previous `BatchSearchLinkProcesses` call. + // Use it to get the next page. + // + // When requesting subsequent pages of a response, remember that + // all parameters must match the values you provided + // in the original request. + string page_token = 4; +} + +// Response message for +// [BatchSearchLinkProcesses][google.cloud.datacatalog.lineage.v1.Lineage.BatchSearchLinkProcesses]. +message BatchSearchLinkProcessesResponse { + // An array of processes associated with the specified links. + repeated ProcessLinks process_links = 1; + + // The token to specify as `page_token` in the subsequent call to get the next + // page. Omitted if there are no more pages in the response. + string next_page_token = 2; +} + +// Links associated with a specific process. +message ProcessLinks { + // The process name in the format of + // `projects/{project}/locations/{location}/processes/{process}`. + string process = 1 [(google.api.resource_reference) = { + type: "datalineage.googleapis.com/Process" + }]; + + // An array containing link details objects of the links provided in + // the original request. + // + // A single process can result in creating multiple links. + // If any of the links you provide in the request are created by + // the same process, they all are included in this array. + repeated ProcessLinkInfo links = 2; +} + +// Link details. +message ProcessLinkInfo { + // The name of the link in the format of + // `projects/{project}/locations/{location}/links/{link}`. + string link = 1; + + // The start of the first event establishing this link-process tuple. + google.protobuf.Timestamp start_time = 2; + + // The end of the last event establishing this link-process tuple. + google.protobuf.Timestamp end_time = 3; +} + +// Origin of a process. +message Origin { + // Type of the source of a process. + enum SourceType { + // Source is Unspecified + SOURCE_TYPE_UNSPECIFIED = 0; + + // A custom source + CUSTOM = 1; + + // BigQuery + BIGQUERY = 2; + + // Data Fusion + DATA_FUSION = 3; + + // Composer + COMPOSER = 4; + + // Looker Studio + LOOKER_STUDIO = 5; + } + + // Type of the source. + SourceType source_type = 1; + + // If the source_type isn't CUSTOM, the value of this field should be a GCP + // resource name of the system, which reports lineage. The project and + // location parts of the resource name must match the project and location of + // the lineage resource being created. Examples: + // + // - {source_type: COMPOSER, name: + // "projects/foo/locations/us/environments/bar"} + // - {source_type: BIGQUERY, name: "projects/foo/locations/eu"} + // - {source_type: CUSTOM, name: "myCustomIntegration"} + string name = 2; +} diff --git a/pom.xml b/pom.xml index 362e9f8bfa59..40afd5668d3b 100644 --- a/pom.xml +++ b/pom.xml @@ -60,6 +60,7 @@ java-dataform java-data-fusion java-datalabeling + java-datalineage java-dataplex java-dataproc-metastore java-dataproc diff --git a/versions.txt b/versions.txt index 34c17a607b8f..3889c720deca 100644 --- a/versions.txt +++ b/versions.txt @@ -600,3 +600,6 @@ proto-google-cloud-monitoring-metricsscope-v1:0.2.0:0.3.0-SNAPSHOT grpc-google-cloud-monitoring-metricsscope-v1:0.2.0:0.3.0-SNAPSHOT proto-google-cloud-tpu-v2:2.9.0:2.10.0-SNAPSHOT grpc-google-cloud-tpu-v2:2.9.0:2.10.0-SNAPSHOT +google-cloud-datalineage:0.0.0:0.0.1-SNAPSHOT +proto-google-cloud-datalineage-v1:0.0.0:0.0.1-SNAPSHOT +grpc-google-cloud-datalineage-v1:0.0.0:0.0.1-SNAPSHOT